Maths Olympiad Prep

Library / /56 of 169

Combinatorics Difficulty 7.2 National Olympiad, round 2 Prove it United States

For a positive integer n3n \ge 3 plot nn equally spaced points around a circle. Label one of them AA, and place a marker at AA. One may move the marker forward in a clockwise direction to either the next point or the point after that. Hence there are a total of 2n2n distinct moves available; two from each point. Let ana_n count the number of ways to advance around the circle exactly twice, beginning and ending at AA, without repeating a move. Prove that an1+an=2na_{n-1} + a_n = 2^n for all n4n \ge 4.
(This problem was suggested by Sam Vandervelde.)

Solutions — 4

Solution 1

Solution 1 (By Sam Vandervelde). We will show that an=13(2n+1+(1)n)a_n = \frac{1}{3}(2^{n+1} + (-1)^n). This would be sufficient, since then we would have
an1+an=13(2n+(1)n1)+13(2n+1+(1)n)=13(2n+22n)=2n. a_{n-1} + a_n = \frac{1}{3}(2^n + (-1)^{n-1}) + \frac{1}{3}(2^{n+1} + (-1)^n) = \frac{1}{3}(2^n + 2 \cdot 2^n) = 2^n.

Lemma 1. For all positive integers nn, we have
k=0n/2(nkk)2k=13(2n+1+(1)n). \sum_{k=0}^{\lfloor n/2 \rfloor} \binom{n-k}{k} 2^k = \frac{1}{3}(2^{n+1} + (-1)^n).
Proof. We argue by strong induction. To begin, the cases n=1n = 1 and n=2n = 2 are quickly verified. Now suppose that n3n \ge 3 is odd, say n=2m+1n = 2m + 1. We find that
k=0m(2m+1kk)2k=1+k=1m(2mkk)2k+k=1m(2mkk1)2k=k=0m(2mkk)2k+2k=0m1(2m1kk)2k=13(22m+1+1)+23(22m1)=13(22m+21), \begin{aligned} \sum_{k=0}^{m} \binom{2m+1-k}{k} 2^k &= 1 + \sum_{k=1}^{m} \binom{2m-k}{k} 2^k + \sum_{k=1}^{m} \binom{2m-k}{k-1} 2^k \\ &= \sum_{k=0}^{m} \binom{2m-k}{k} 2^k + 2 \sum_{k=0}^{m-1} \binom{2m-1-k}{k} 2^k \\ &= \frac{1}{3}(2^{2m+1} + 1) + \frac{2}{3}(2^{2m} - 1) \\ &= \frac{1}{3}(2^{2m+2} - 1), \end{aligned}

We now determine the number of ways to advance around the circle twice, organizing our count according to the points visited both times around the circle. It is straight-forward to check that no two such points may be adjacent, and that there are exactly two sequences of moves leading from any such point to the next. (These sequences involve only moves of length two except possibly at the endpoints.) Hence given k1k \ge 1 points around the circle, no two adjacent and not including point AA, there would appear to be 2k2^k ways to traverse the circle twice without repeating a move. However, half of these options lead to repeating the same route twice, giving 2k12^{k-1} ways in actuality. There are (nkk)\binom{n-k}{k} ways to select kk nonadjacent points on the circle not including AA (add an extra point behind each of kk chosen points), for a total contribution of
k=1n/2(nkk)2k1=12[1+k=0n/2(nkk)2k]=16(2n+1+(1)n)12, \sum_{k=1}^{\lfloor n/2 \rfloor} \binom{n-k}{k} 2^{k-1} = \frac{1}{2} \left[ -1 + \sum_{k=0}^{\lfloor n/2 \rfloor} \binom{n-k}{k} 2^k \right] = \frac{1}{6} (2^{n+1} + (-1)^n) - \frac{1}{2},
where we used Lemma 1 in the last step.
On the other hand, if the k1k \ge 1 nonadjacent points do include point AA then there are (nk1k1)\binom{n-k-1}{k-1} ways to choose them around the circle. (Select AA but not the next point, then add an extra point after each of k1k-1 selected points.) But now there are actually 2k2^k ways to circle twice, since we can choose either move at AA and the subsequent points, then select the other options the second time around. Hence the contribution in this case is
k=1n/2(nk1k1)2k=2(n2)/2k=0(n2)/2(n2kk)2k=23(2n1+(1)n), \sum_{k=1}^{\lfloor n/2 \rfloor} \binom{n-k-1}{k-1} 2^k = 2^{\lfloor (n-2)/2 \rfloor} \sum_{k=0}^{\lfloor (n-2)/2 \rfloor} \binom{n-2-k}{k} 2^k = \frac{2}{3}(2^{n-1} + (-1)^n),
where we again used Lemma 1.
Finally, if nn is odd then there is one additional way to circle in which no point is visited twice by using only steps of length two, giving a contribution of 12(1(1)n)\frac{1}{2}(1 - (-1)^n). Therefore the total number of paths is
16(2n+1+(1)n)12+23(2n1+(1)n)+12(1(1)n), \frac{1}{6}(2^{n+1} + (-1)^n) - \frac{1}{2} + \frac{2}{3}(2^{n-1} + (-1)^n) + \frac{1}{2}(1 - (-1)^n),
which simplifies to 13(2n+1+(1)n)\frac{1}{3}(2^{n+1} + (-1)^n), as desired.

Solution 2

Solution 2 (By Kiran Kedlaya). We give a bijective proof of the identity
an=an1+2an2, a_n = a_{n-1} + 2a_{n-2},
which immediately implies that an+an1=2(an1+an2)a_n + a_{n-1} = 2(a_{n-1} + a_{n-2}). Since trivially a0=a1=1a_0 = a_1 = 1 (or alternatively a1=1,a2=3a_1 = 1, a_2 = 3), the desired identity will then follow by induction on nn.

To construct the bijection, it is convenient to introduce some alternate representations for the sequences we are counting. Label the points P0,,Pn1P_0, \dots, P_{n-1} in order, and define Pi+n=PiP_{i+n} = P_i. One can then represent the sequences to be counted by listing the sequence of vertices Pi0,Pi1,,PimP_{i_0}, P_{i_1}, \dots, P_{i_m} visited by the marker, with the conventions that i0=0,im=2ni_0 = 0, i_m = 2n, and ij+1ij{1,2}i_{j+1} - i_j \in \{1, 2\} for j=0,,m1j = 0, \dots, m-1. One can represent such sequences of vertices in turn by 2×(n+1)2 \times (n+1) matrices AA by setting
Aij={1Pni+j is visited0Pni+j is not visitedfor i=0,1;j=0,,n. A_{ij} = \begin{cases} 1 & P_{ni+j} \text{ is visited} \\ 0 & P_{ni+j} \text{ is not visited} \end{cases} \quad \text{for } i=0,1; j=0, \dots, n.
Such a matrix AA corresponds to a valid sequence if and only if A00=A1n=1A_{00} = A_{1n} = 1 (so the sequence of steps starts and ends at P0P_0), A0n=An0A_{0n} = A_{n0} (so the sequence of steps is well-defined at PnP_n), and there are no submatrices of any of the forms
(0 0),(00),or(1111) (0 \ 0), \quad \begin{pmatrix} 0 \\ 0 \end{pmatrix}, \quad \text{or} \quad \begin{pmatrix} 1 & 1 \\ 1 & 1 \end{pmatrix}
to exclude steps of length greater than 2, duplication of a length 2 step, and duplication of a length 1 step. For example, the valid sequences for n=3n = 3 are represented by the matrices
(10100101),(10100111),(11011011),(11100101),(10111101). \begin{pmatrix} 1 & 0 & 1 & 0 \\ 0 & 1 & 0 & 1 \end{pmatrix}, \begin{pmatrix} 1 & 0 & 1 & 0 \\ 0 & 1 & 1 & 1 \end{pmatrix}, \begin{pmatrix} 1 & 1 & 0 & 1 \\ 1 & 0 & 1 & 1 \end{pmatrix}, \begin{pmatrix} 1 & 1 & 1 & 0 \\ 0 & 1 & 0 & 1 \end{pmatrix}, \begin{pmatrix} 1 & 0 & 1 & 1 \\ 1 & 1 & 0 & 1 \end{pmatrix}.
Let SnS_n be the set of valid 2×(n+1)2 \times (n+1) matrices. The correspondence Sn2Sn1Sn2Sn1SnS_{n-2} \sqcup S_{n-1} \sqcup S_{n-2} \sqcup S_{n-1} \cong S_n can then be described by replacing the right end of the matrix in the following fashion, where \cdots represents any row of length n2n-2.
(11)(111101),(101111)(01)(010101),(010111)(0111)(011101)(1101)(101011)(1011)(110101)(1001)(110011) \begin{align*} \begin{pmatrix} \cdots & 1 \\ \cdots & 1 \end{pmatrix} &\mapsto \begin{pmatrix} \cdots & 1 & 1 & 1 \\ \cdots & 1 & 0 & 1 \end{pmatrix}, \begin{pmatrix} \cdots & 1 & 0 & 1 \\ \cdots & 1 & 1 & 1 \end{pmatrix} \\ \begin{pmatrix} \cdots & 0 \\ \cdots & 1 \end{pmatrix} &\mapsto \begin{pmatrix} \cdots & 0 & 1 & 0 \\ \cdots & 1 & 0 & 1 \end{pmatrix}, \begin{pmatrix} \cdots & 0 & 1 & 0 \\ \cdots & 1 & 1 & 1 \end{pmatrix} \\ \begin{pmatrix} \cdots & 0 & 1 \\ \cdots & 1 & 1 \end{pmatrix} &\mapsto \begin{pmatrix} \cdots & 0 & 1 & 1 \\ \cdots & 1 & 0 & 1 \end{pmatrix} \\ \begin{pmatrix} \cdots & 1 & 1 \\ \cdots & 0 & 1 \end{pmatrix} &\mapsto \begin{pmatrix} \cdots & 1 & 0 & 1 \\ \cdots & 0 & 1 & 1 \end{pmatrix} \\ \begin{pmatrix} \cdots & 1 & 0 \\ \cdots & 1 & 1 \end{pmatrix} &\mapsto \begin{pmatrix} \cdots & 1 & 1 & 0 \\ \cdots & 1 & 0 & 1 \end{pmatrix} \\ \begin{pmatrix} \cdots & 1 & 0 \\ \cdots & 0 & 1 \end{pmatrix} &\mapsto \begin{pmatrix} \cdots & 1 & 1 & 0 \\ \cdots & 0 & 1 & 1 \end{pmatrix} \end{align*}
From this description, it is easy to see that passing from one side to the other preserves the boundary condition and the excluded submatrix conditions (because every submatrix whose entries are not all shown remains unchanged). We thus have the claimed bijection.

Solution 3

Solution 3 (By Kiran Kedlaya). We maintain the notation used in the second solution.
We first solve a related but simpler counting problem. Let SnS_n be the set of sequences of steps of lengths 1 or 2 of total length nn. For each sequence sSns \in S_n, let b(s)b(s) be the number of steps of length 2 in ss and define fn=sSn2b(s)f_n = \sum_{s \in S_n} 2^{b(s)}. It is clear that f0=f1=1f_0 = f_1 = 1. For n2n \ge 2, we also have
fn=fn1+2fn2 f_n = f_{n-1} + 2f_{n-2}
by counting sequences of length nn according to whether they end in a step of length 1 or 2. Thus
fn+fn1=2(fn1+fn2), f_n + f_{n-1} = 2(f_{n-1} + f_{n-2}),
from which it follows by induction on nn that fn+fn1=2nf_n + f_{n-1} = 2^n for n1n \ge 1. Again by induction on nn, we find that
fn=2n+(1)n3. f_n = \frac{2^n + (-1)^n}{3}.
We now write ana_n in terms of fnf_n. Label the points of the circle as in the previous solution. We may separate sequences of moves into three types.

1. Sequences that visit PnP_n but not Pn1P_{n-1}. Such a sequence starts with some sSn2s \in S_{n-2} followed by a step of length 2. The number of complements for ss (i.e., the number of ways to complete it to a full sequence) can be seen to be 2b(s)2^{b(s)} as follows. If we decide in order whether to skip each of Pn+1,,P2nP_{n+1}, \dots, P_{2n}, then the choice for Pn+iP_{n+i} is uniquely forced if A0(i1)=1A_{0(i-1)} = 1 and unrestricted if A0(i1)=0A_{0(i-1)} = 0. In the notation of the previous solution, we may see this by noting that
(A0(i1)A0iA1(i1)A1i){(1101),(1110),(1001),(1011),(0110),(0111)}. \begin{pmatrix} A_{0(i-1)} & A_{0i} \\ A_{1(i-1)} & A_{1i} \end{pmatrix} \in \left\{ \begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix}, \begin{pmatrix} 1 & 1 \\ 1 & 0 \end{pmatrix}, \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}, \begin{pmatrix} 1 & 0 \\ 1 & 1 \end{pmatrix}, \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}, \begin{pmatrix} 0 & 1 \\ 1 & 1 \end{pmatrix} \right\}.
(This logic does not apply to P2nP_{2n}: we have A0(n1)=0A_{0(n-1)} = 0 but must take A1(2n)=1A_{1(2n)} = 1.) We thus get fn2f_{n-2} sequences of this type.
2. Sequences that visit Pn1P_{n-1} but not PnP_n. Such a sequence starts with some sSn1s \in S_{n-1} followed by a step of length 2. There are fn1f_{n-1} sequences of this type.
3. Sequences that visit both Pn1P_{n-1} and PnP_n. Such a sequence starts with some sSn1s \in S_{n-1} followed by a step of length 1. Here the count is complicated by the constraint that we must skip P2n1P_{2n-1}, so the final step of length 2 does not create an option. Therefore, ss contributes 2b(s)12^{b(s)-1} complements if b(s)>0b(s) > 0. The only case where b(s)=0b(s) = 0 is when ss consists of only steps of length 1, in which case we get 1 complement if nn is even and 0 complements if nn is odd.
Putting this together, we get
an=fn2+fn1+12(fn1+(1)n)=2n2+(1)n23+2n1+(1)n13+2n1+(1)n16+(1)n2=2n+(1)n3, \begin{align*} a_n &= f_{n-2} + f_{n-1} + \frac{1}{2}(f_{n-1} + (-1)^n) \\ &= \frac{2^{n-2} + (-1)^{n-2}}{3} + \frac{2^{n-1} + (-1)^{n-1}}{3} + \frac{2^{n-1} + (-1)^{n-1}}{6} + \frac{(-1)^n}{2} \\ &= \frac{2^n + (-1)^n}{3}, \end{align*}
and so an1+an=2na_{n-1} + a_n = 2^n as desired.

Solution 4

Solution 4 (By Ricky Liu). We again show that an=13(2n+1+(1)n)a_n = \frac{1}{3}(2^{n+1} + (-1)^n). First, we claim that for two paths to travel between points kk apart (k>1k > 1) such that no point in between the endpoints is in both paths and no move is used twice, one path must hit the odd intermediate points and the other must hit the even ones. Indeed, neither path can skip two consecutive points, hence neither can contain two consecutive points which are not endpoints, yielding the desired classification. Therefore, given an interval of length k>1k > 1 with both endpoints hit both times around, but no point in between them hit both times around, there are exactly 2 ways to choose the sections of the path between the two endpoints (by choosing whether the odd or even points are hit first). We conclude that the generating function for choices of paths between points kk apart which are hit both times around is
f(x)=2x2+2x3+=2x21x f(x) = 2x^2 + 2x^3 + \dots = \frac{2x^2}{1-x}
Any pair of paths that start and end at the same point such that no move is used more than once are a concatenation of some number of the paths above, hence the generating function for choices of such paths is
g(x)=f(x)+f(x)2+f(x)3+=f(x)1f(x)=2x21x2x2. g(x) = f(x) + f(x)^2 + f(x)^3 + \dots = \frac{f(x)}{1-f(x)} = \frac{2x^2}{1-x-2x^2}.
Note that the coefficient of xnx^n in g(x)g(x) counts the number of solution paths that stop at AA the first time around.

Now, any solution path that does not stop at A the first time around either (A) does not stop at any point twice or (B) has a first point PP and a last point QQ where it stops twice (where possibly P=QP = Q). Case (A) is only possible if all moves have length 2 and nn is odd, so it has generating function h(x)=x1x2h(x) = \frac{x}{1-x^2}. For Case (B), a similar argument to the first shows that the part of the path outside of the interval [P,Q][P, Q] is uniquely determined. The generating function for the number of such paths is
r(x)=(x1x)2(1+f(x)+f(x)2+)=(x1x)21x1x2x2=x2(1x)(1x2x2), r(x) = \left(\frac{x}{1-x}\right)^2 \cdot (1 + f(x) + f(x)^2 + \dots) = \left(\frac{x}{1-x}\right)^2 \frac{1-x}{1-x-2x^2} = \frac{x^2}{(1-x)(1-x-2x^2)},
where the first term comes from the part before PP and the part after QQ and the second term from the interval between PP and QQ.
Adding up our generating functions in each case, we find that the generating function for paths of the desired form is
g(x)+h(x)+r(x)=2x21x2x2+x1x2+x2(1x)(1x2x2)=43x12x13x1+x. g(x) + h(x) + r(x) = \frac{2x^2}{1-x-2x^2} + \frac{x}{1-x^2} + \frac{x^2}{(1-x)(1-x-2x^2)} = \frac{4}{3}\frac{x}{1-2x} - \frac{1}{3}\frac{x}{1+x}.
Then ana_n is the coefficient of xnx^n in this expression, which is given by
an=432n113(1)n1=13(2n+1+(1)n). a_n = \frac{4}{3}2^{n-1} - \frac{1}{3}(-1)^{n-1} = \frac{1}{3}(2^{n+1} + (-1)^n).

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.