A permutation and combination question with too many cases

67 Views Asked by At

I know I shouldn't be asking homework questions but I tried. I am given 15 records (the kind you can play on a gramophone) which have one song on either side of the record (called the A and B sides). I wish to play this song in a loop (i.e. the starting song does not matter). How many different loops can I create if: Every consecutive song must be from a different record?

There are too many cases to consider when I start picking the fourth song onwards. I can't think of an insertion method or a complement method. Is there an easy method for this?

1

There are 1 best solutions below

0
On

Update

This is a derangement problem. It is the same as the following: In how many ways can $15$ couples be seated at a round table (no strict $\ldots mfmfmfmf\ldots$ requirement) such that no couple sits next to each other? I'm afraid it has to be solved by setting up an inclusion/exclusion process.

Setting this process up (whereby loops differing only by a rotation are regarded as the same) leads to the formula $$a(n)=\sum_{k=0}^n(-1)^k\> {n\choose k}2^k (2n-1-k)!\ ,$$ giving the numbers $$\bigl(a(n)\bigr)_{n\geq2}=(2, 32, 1488, 112512, 12771840, 2036229120, 434469611520,\ldots)\ .$$ This is sequence A129348 at OEIS. They say there the $a(n)$ count the Hamiltonian cycles of the cocktail party graph. At OEIS one may also find a recursion and asymptotics for the $a(n)$.