Possible list of exactly $k$ handshakes between $n$ people

combinatoricsgraph theory

Consider $n$ people at a party, each of them shakes hand to exactly $k\leq n-1$ different persons. Is there a generalized formula giving the number of possible handshakes configurations?

This is a generalization of a problem featuring 8 people shaking hands with exactly two times (with of course different persons), in this case the answer should be (according to the text) 3507 which is far from obvious to me since I thought, in this case, that one possible list of configurations should be given arranging the 8 persons at the verteces of an heptagon so that each couple of consecutive sides stands for the double handshake, suggesting that the other possible configurations might come out interchanging the vertices which is 7! (analogous to the problem concerning the number of ways in which 8 people can sit at a circular table), but 7!=5040 so that I'm baldly miscalculating…
Any hint?

Best Answer

For the $(n,k)$ problem:

What you are looking for are the $k$-regular graphs of $n$ nodes, with node labels, not necessarily connected.

However I couldn't find much for this labeled case. The best I could find (after a few minutes of googling) were the top answer at this MO question and also this other MO question.

The unlabeled case seems to have more literature: A good starting reference might be this wolfram link and this OEIS link. The latter lists $\sum_k f(n,k)$ but cross-references to many different OEIS sequences for fixed $k$.

For the $(8,2)$ problem:

As others have pointed out this is equivalent to partitioning into cycles of length $\ge 3$. It might(?) be easier conceptually if we partition first, then form cycles.

A set of $k$ people can clearly form $k! / 2k$ cycles. The denominator of $k$ accounts for the different start points, and the denominator of $2$ accounts for reflection.

  • An $8$-cycle: no. of ways $= 8! / 16 = 2520$.

  • An unordered pair of $4$-cycles: First of all, no. of such partitions $= {8 \choose 4} / 2 = 35$, with the denominator of $2$ accounting for the fact choosing either of the $4$-subset results in the same partition. After partitioning, each $4$-subset gives $4!/8 = 3$ cycles, so total no. of ways $= 35 \times 3 \times 3 = 315.$

  • A $3$-cycle plus a $5$-cycle: no. of such partitions $= {8\choose 3} = 56$. The $3$-subset gives $3!/6 = 1$ cycle, and the $5$-subset gives $5!/10 = 12$ cycles. Total no. of ways $= 56 \times 1 \times 12 = 672$.

Add them up: $2520 + 315 + 672 = 3507$.

Related Question