King Radford of Peiza is hosting a banquet in his palace. The King has an enormous circular table with $2021$ chairs around it. At The King's birthday celebration, he is sitting in his throne (one of the $2021$ chairs) and the other $2020$ chairs are filled with guests, with the shortest guest sitting to the King's left and the remaining guests seated in increasing order of height from there around the table. The King announces that everybody else must get up from their chairs, run around the table, and sit back down in some chair. After doing this, The King notices that the person seated to his left is different from the person who was previously seated to his left. Each other person at the table also notices that the person sitting to their left is different. Find a closed form expression for the number of ways the people could be sitting around the table at the end. You may use the notation $D_{n},$ the number of derangements of a set of size $n$, as part of your expression.
Problem
Source: Canada RepĂȘchage 2021/8 CMOQR
Tags: Canada, repechage, combinatorics, set theory, permutations
30.03.2021 18:46
dang, now i get why i didnt make it to cmos
24.04.2021 02:00
The answer is $$D_{2020} - D_{2019} + D_{2018} - \ldots + D_2 - D_1$$ For this, we use inclusion-exclusion. Replace $2021$ by $n$. For any subset $S \subseteq \{1,2, \ldots, n\}$, we want to count the number of ways of arranging $1,2, \ldots, n$ in a circle (rotations don't count as distinct) such that for each $k \in S$, its left neighbour is NOT $k+1 \mod n$. On doing so, we get certain "chains" of elements that are already pre-decided to be in that order in the circle. We get exactly $n-|S|$ such chains, so they can be arranged in the circle in $(n-|S|-1)!$ ways (we define $(-1)! = 1$ here). By inclusion-exclusion, our answer is $$a_n = \sum_{S \subseteq [n]} (-1)^{|S|} (n-|S|-1)! = \sum_{i=0}^n (-1)^i \cdot \binom{n}{i} \cdot (n-i-1)!$$ Now, \begin{align*} a_n + a_{n+1} &= \sum_{i=0}^n (-1)^i \cdot \binom{n}{i} \cdot (n-i-1)! + \sum_{i=0}^{n+1} (-1)^i \cdot \binom{n+1}{i} \cdot (n-i)! \\ &= \sum_{i=0}^n (-1)^i \cdot \binom{n}{i} \cdot (n-i-1)! + \sum_{i=-1}^{n} (-1)^{i+1} \cdot \binom{n+1}{i+1} \cdot (n-i-1)! \\ &= n! + \sum_{i=0}^n (-1)^{i+1} \left ( \binom{n+1}{i+1} - \binom{n}{i} \right ) \cdot (n-i-1)! \\ &= n! + \sum_{i=0}^n (-1)^{i+1} \cdot \binom{n}{i+1} \cdot (n-i-1)! \\ &= n! + \left ( \sum_{i=0}^{n-1} (-1)^{i+1} \cdot \frac{n!}{(i+1)!} \right ) + (-1)^{n+1} \cdot \binom{n}{n+1} \cdot 1\\ &= n! \cdot \left ((-1)^0 \frac{1}{0!} + (-1)^1 \frac{1}{1!} + (-1)^2 \frac{1}{2!} + \ldots + (-1)^n \frac{1}{n!} \right ) = D_n \end{align*} Using this, we get $$a_n = D_{n-1} - D_{n-2} + D_{n-3} + \ldots + (-1)^{n} D_1$$for all naturals $n$.
24.04.2021 10:03
Since the King doesn't move at all, this is essentially a problem about linear permutations. In particular, find the number of permutations of $\{1,2,\dots n\}$ such that $1$ is not in the first position, $n$ is not in the last position, and $k,k+1$ are not consecutive (in that order) for all $1 \leq k \leq n-1$. (Here we have replaced $2020$ by $n$). Let $f(n)$ denote the number of such permutation. Consider $n \geq 2$ first. Now, for any of the $(n-2) \cdot (n-1)!+(n-2)!$ permutations of $[n]$ not starting with $1$ or ending with $n$, we can split it into blocks of consecutive numbers; e.g., the permutation $2 \ 1 \ 4 \ 5 \ 3$ splits into four blocks: $2$, $1$, $4 \ 5$, and $3$. To construct any such permutation, first split $[n]$ into blocks of consecutive numbers, and then rearrange those blocks such that the first block is not in the first position, the last block is not in the last position, and no two consecutive blocks remain consecutive. If there are $k$ blocks, then the splitting can be done in $\binom{n-1}{k-1}$ ways, and the rearranging can be done in $f(k)$ ways. Therefore $$(n-2) \cdot (n-1)!+(n-2)! = \sum_{k=1}^{n} \binom{n-1}{k-1}f(k)$$Write $g(k)=f(k+1)$ for $k \geq 0$ for convenience, and replace $n-1$ by $n$; then, $$(n-1) \cdot n!+(n-1)!= \sum_{k=0}^{n} \binom{n}{k} g(k)$$for all $n \geq 1$. For $n=0$, the RHS is $0$ because $g(0)=f(1)=0$ trivially. Let $G(x)$ be the egf of $g(k)$. Therefore we get $$\frac{x^2}{(1-x)^2}-\ln (1-x)=e^x G(x)$$by comparing egfs. We want to get rid of the pesky $\ln$ in the LHS. To do this, we differentiate the whole thing to get $$e^x(G(x)+G'(x))=\frac{2x}{(1-x)^3}+\frac{1}{1-x}$$$$\implies G(x)+G'(x)=\frac{e^{-x}}{1-x} \left ( \frac{2x}{(1-x)^2}+1 \right)$$Now, let $F(x)$ be the egf of $D_n$. It is well known that $$F(x)=\frac{e^{-x}}{1-x}$$Differentiating the above twice, we get $$F''(x)= \frac{e^{-x}}{1-x} \left ( \frac{2x}{(1-x)^2}+1 \right) = G(x)+G'(x)$$Comparing coefficients, we get $$f(n)+f(n+1)=g(n-1)+g(n)=D_{n+1}$$Also, $f(1)=D_1=0$, so we get $$\boxed{f(n)=\sum_{k=0}^{n-1}(-1)^k D_{n-k}}$$for all positive integers $n$.