Olympiad Maths Prep

Library / /11 of 13

Combinatorics Difficulty 8.8 Shortlist Prove it IMO

The rows and columns of a 2n×2n2^{n} \times 2^{n} table are numbered from 00 to 2n12^{n}-1. The cells of the table have been colored with the following property being satisfied: for each 0i,j2n10 \leq i, j \leq 2^{n}-1, the jjth cell in the iith row and the (i+j)(i+j)th cell in the jjth row have the same color. (The indices of the cells in a row are considered modulo 2n2^{n}.)

Prove that the maximal possible number of colors is 2n2^{n}.

(Iran)

Solution

Throughout the solution we denote the cells of the table by coordinate pairs; (i,j)(i, j) refers to the jjth cell in the iith row.

Consider the directed graph, whose vertices are the cells of the board, and the edges are the arrows (i,j)(j,i+j)(i, j) \rightarrow (j, i+j) for all 0i,j2n10 \leq i, j \leq 2^{n}-1. From each vertex (i,j)(i, j), exactly one edge passes (to (j,i+jmod2n)(j, i+j \bmod 2^{n})); conversely, to each cell (j,k)(j, k) exactly one edge is directed (from the cell (kjmod2n,j)(k-j \bmod 2^{n}, j)). Hence, the graph splits into cycles.

Now, in any coloring considered, the vertices of each cycle should have the same color by the problem condition. On the other hand, if each cycle has its own color, the obtained coloring obviously satisfies the problem conditions. Thus, the maximal possible number of colors is the same as the number of cycles, and we have to prove that this number is 2n2^{n}.

Next, consider any cycle (i1,j1),(i2,j2),(i_{1}, j_{1}), (i_{2}, j_{2}), \ldots; we will describe it in other terms. Define a sequence (a0,a1,)(a_{0}, a_{1}, \ldots) by the relations a0=i1,a1=j1,an+1=an+an1a_{0}=i_{1}, a_{1}=j_{1}, a_{n+1}=a_{n}+a_{n-1} for all n1n \geq 1 (we say that such a sequence is a Fibonacci-type sequence). Then an obvious induction shows that ikak1(mod2n),jkak(mod2n)i_{k} \equiv a_{k-1} \pmod{2^{n}}, j_{k} \equiv a_{k} \pmod{2^{n}}. Hence we need to investigate the behavior of Fibonacci-type sequences modulo 2n2^{n}.

Denote by F0,F1,F_{0}, F_{1}, \ldots the Fibonacci numbers defined by F0=0,F1=1F_{0}=0, F_{1}=1, and Fn+2=Fn+1+FnF_{n+2}=F_{n+1}+F_{n} for n0n \geq 0. We also set F1=1F_{-1}=1 according to the recurrence relation.

For every positive integer mm, denote by ν(m)\nu(m) the exponent of 22 in the prime factorization of mm, i.e. for which 2ν(m)m2^{\nu(m)} \mid m but 2ν(m)+1m2^{\nu(m)+1} \nmid m.

Lemma 1. For every Fibonacci-type sequence a0,a1,a2,a_{0}, a_{1}, a_{2}, \ldots, and every k0k \geq 0, we have ak=Fk1a0+Fka1a_{k}=F_{k-1} a_{0}+F_{k} a_{1}.

*Proof.* Apply induction on kk. The base cases k=0,1k=0,1 are trivial. For the step, from the induction hypothesis we get
ak+1=ak+ak1=(Fk1a0+Fka1)+(Fk2a0+Fk1a1)=Fka0+Fk+1a1. a_{k+1}=a_{k}+a_{k-1}=(F_{k-1} a_{0}+F_{k} a_{1})+(F_{k-2} a_{0}+F_{k-1} a_{1})=F_{k} a_{0}+F_{k+1} a_{1}.

Lemma 2. For every m3m \geq 3,
(a) we have ν(F32m2)=m\nu(F_{3 \cdot 2^{m-2}})=m;
(b) d=32m2d=3 \cdot 2^{m-2} is the least positive index for which 2mFd2^{m} \mid F_{d};
(c) F32m2+11+2m1(mod2m)F_{3 \cdot 2^{m-2}+1} \equiv 1+2^{m-1} \pmod{2^{m}}.

*Proof.* Apply induction on mm. In the base case m=3m=3 we have ν(F32m2)=F6=8\nu(F_{3 \cdot 2^{m-2}})=F_{6}=8, so ν(F32m2)=ν(8)=3\nu(F_{3 \cdot 2^{m-2}})=\nu(8)=3, the preceding Fibonacci-numbers are not divisible by 88, and indeed F32m2+1=F7=131+4(mod8)F_{3 \cdot 2^{m-2}+1}=F_{7}=13 \equiv 1+4 \pmod{8}.

Now suppose that m>3m>3 and let k=32m3k=3 \cdot 2^{m-3}. By applying Lemma 1 to the Fibonacci-type sequence Fk,Fk+1,F_{k}, F_{k+1}, \ldots we get
F2k=Fk1Fk+FkFk+1=(Fk+1Fk)Fk+Fk+1Fk=2Fk+1FkFk2F2k+1=Fk2+Fk+12 \begin{gathered} F_{2k}=F_{k-1} F_{k}+F_{k} F_{k+1}=(F_{k+1}-F_{k}) F_{k}+F_{k+1} F_{k}=2 F_{k+1} F_{k}-F_{k}^{2} \\ F_{2k+1}=F_{k}^2+F_{k+1}^2 \end{gathered}
By the induction hypothesis, ν(Fk)=m1\nu(F_{k})=m-1, and Fk+1F_{k+1} is odd. Therefore we get ν(Fk2)=2(m1)>(m1)+1=ν(2FkFk+1)\nu(F_{k}^{2})=2(m-1)>(m-1)+1=\nu(2 F_{k} F_{k+1}), which implies ν(F2k)=m\nu(F_{2k})=m, establishing statement (a).

Moreover, since Fk+1=1+2m2+a2m1F_{k+1}=1+2^{m-2}+a 2^{m-1} for some integer aa, we get
F2k+1=Fk2+Fk+120+(1+2m2+a2m1)21+2m1(mod2m) F_{2k+1}=F_{k}^{2}+F_{k+1}^{2} \equiv 0+(1+2^{m-2}+a 2^{m-1})^{2} \equiv 1+2^{m-1} \pmod{2^{m}}
as desired in statement (c).

We are left to prove that 2mF2^{m} \nmid F_{\ell} for <2k\ell<2k. Assume the contrary. Since 2m1F2^{m-1} \mid F_{\ell}, from the induction hypothesis it follows that >k\ell>k. But then we have F=Fk1Fk+FkFk+1F_{\ell}=F_{k-1} F_{\ell-k}+F_{k} F_{\ell-k+1}, where the second summand is divisible by 2m12^{m-1} but the first one is not (since Fk1F_{k-1} is odd and k<k\ell-k<k). Hence the sum is not divisible even by 2m12^{m-1}. A contradiction.

Now, for every pair of integers (a,b)(0,0)(a, b) \neq (0,0), let μ(a,b)=min{ν(a),ν(b)}\mu(a, b)=\min\{\nu(a), \nu(b)\}. By an obvious induction, for every Fibonacci-type sequence A=(a0,a1,)A=(a_{0}, a_{1}, \ldots) we have μ(a0,a1)=μ(a1,a2)=\mu(a_{0}, a_{1})=\mu(a_{1}, a_{2})=\ldots; denote this common value by μ(A)\mu(A). Also denote by pn(A)p_{n}(A) the period of this sequence modulo 2n2^{n}, that is, the least p>0p>0 such that ak+pak(mod2n)a_{k+p} \equiv a_{k} \pmod{2^{n}} for all k0k \geq 0.

Lemma 3. Let A=(a0,a1,)A=(a_{0}, a_{1}, \ldots) be a Fibonacci-type sequence such that μ(A)=k<n\mu(A)=k<n. Then pn(A)=32n1kp_{n}(A)=3 \cdot 2^{n-1-k}.

*Proof.* First, we note that the sequence (a0,a1,)(a_{0}, a_{1}, \ldots) has period pp modulo 2n2^{n} if and only if the sequence (a0/2k,a1/2k,)(a_{0}/2^{k}, a_{1}/2^{k}, \ldots) has period pp modulo 2nk2^{n-k}. Hence, passing to this sequence we can assume that k=0k=0.

We prove the statement by induction on nn. It is easy to see that for n=1,2n=1,2 the claim is true; actually, each Fibonacci-type sequence AA with μ(A)=0\mu(A)=0 behaves as 0,1,1,0,1,1,0,1,1,0,1,1, \ldots modulo 22, and as 0,1,1,2,3,1,0,1,1,2,3,1,0,1,1,2,3,1,0,1,1,2,3,1, \ldots modulo 44 (all pairs of residues from which at least one is odd appear as a pair of consecutive terms in this sequence).

Now suppose that n3n \geq 3 and consider an arbitrary Fibonacci-type sequence A=(a0,a1,)A=(a_{0}, a_{1}, \ldots) with μ(A)=0\mu(A)=0. Obviously we should have pn1(A)pn(A)p_{n-1}(A) \mid p_{n}(A), or, using the induction hypothesis, s=32n2pn(A)s=3 \cdot 2^{n-2} \mid p_{n}(A). Next, we may suppose that a0a_{0} is even; hence a1a_{1} is odd, and a0=2b0a_{0}=2 b_{0}, a1=2b1+1a_{1}=2 b_{1}+1 for some integers b0,b1b_{0}, b_{1}.

Consider the Fibonacci-type sequence B=(b0,b1,)B=(b_{0}, b_{1}, \ldots) starting with (b0,b1)(b_{0}, b_{1}). Since a0=2b0+F0,a1=2b1+F1a_{0}=2 b_{0}+F_{0}, a_{1}=2 b_{1}+F_{1}, by an easy induction we get ak=2bk+Fka_{k}=2 b_{k}+F_{k} for all k0k \geq 0. By the induction hypothesis, we have pn1(B)sp_{n-1}(B) \mid s, hence the sequence (2b0,2b1,)(2 b_{0}, 2 b_{1}, \ldots) is ss-periodic modulo 2n2^{n}. On the other hand, by Lemma 2 we have Fs+11+2n1(mod2n),F2s0(mod2n),F2s+11(mod2n)F_{s+1} \equiv 1+2^{n-1} \pmod{2^{n}}, F_{2s} \equiv 0 \pmod{2^{n}}, F_{2s+1} \equiv 1 \pmod{2^{n}}, hence
as+1=2bs+1+Fs+12b1+1+2n1≢2b1+1=a1(mod2n)a2s=2b2s+F2s2b0+0=a0(mod2n)a2s+1=2b2s+1+F2s+12b1+1=a1(mod2n) \begin{gathered} a_{s+1}=2 b_{s+1}+F_{s+1} \equiv 2 b_{1}+1+2^{n-1} \not\equiv 2 b_{1}+1=a_{1} \pmod{2^{n}} \\ a_{2s}=2 b_{2s}+F_{2s} \equiv 2 b_{0}+0=a_{0} \pmod{2^{n}} \\ a_{2s+1}=2 b_{2s+1}+F_{2s+1} \equiv 2 b_{1}+1=a_{1} \pmod{2^{n}} \end{gathered}
The first line means that AA is not ss-periodic, while the other two provide that a2sa0a_{2s} \equiv a_{0}, a2s+1a1a_{2s+1} \equiv a_{1} and hence a2s+tata_{2s+t} \equiv a_{t} for all t0t \geq 0. Hence spn(A)2ss \mid p_{n}(A) \mid 2s and pn(A)sp_{n}(A) \neq s, which means that pn(A)=2sp_{n}(A)=2s, as desired.

Finally, Lemma 3 provides a straightforward method of counting the number of cycles. Actually, take any number 0kn10 \leq k \leq n-1 and consider all the cells (i,j)(i, j) with μ(i,j)=k\mu(i, j)=k. The total number of such cells is 22(nk)22(nk1)=322n2k22^{2(n-k)}-2^{2(n-k-1)}=3 \cdot 2^{2n-2k-2}. On the other hand, they are split into cycles, and by Lemma 3 the length of each cycle is 32n1k3 \cdot 2^{n-1-k}. Hence the number of cycles consisting of these cells is exactly 322n2k232n1k=2nk1\frac{3 \cdot 2^{2n-2k-2}}{3 \cdot 2^{n-1-k}}=2^{n-k-1}. Finally, there is only one cell (0,0)(0,0) which is not mentioned in the previous computation, and it forms a separate cycle. So the total number of cycles is
1+k=0n12n1k=1+(1+2+4++2n1)=2n 1+\sum_{k=0}^{n-1} 2^{n-1-k}=1+(1+2+4+\cdots+2^{n-1})=2^{n}

Looking for a route rather than 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 and solution reproduced as published; topic and difficulty added by this site.