Unofficial archive — problems, solutions & results © IMC, reproduced with permission.

IMC / 2013 / Problems / Day 2, P10

IMC 2013 · Day 2 · P10

Consider a circular necklace with 2013 beads. Each bead can be painted either white or green. A painting of the necklace is called good, if among any 21 successive beads there is at least one green bead. Prove that the number of good paintings of the necklace is odd.

(Two paintings that differ on some beads, but can be obtained from each other by rotating or flipping the necklace, are counted as different paintings.)

(Proposed by Vsevolod Bykov and Oleksandr Rybak, Kiev)

Solution 1 of 2 (official)

For k=0,1,k = 0, 1, \dots denote by NkN_k be the number of good open laces, consisting of kk (white and green) beads in a row, such that among any 21 successive beads there is at least one green bead. For k21k \le 21 all laces have this property, so Nk=2kN_k = 2^k for 0k200 \le k \le 20; in particular, N0N_0 is odd, and N1,,N20N_1, \dots, N_{20} are even.

For k21k \ge 21, there must be a green bead among the last 21 ones. Suppose that the last green bead is at the \ellth position; then k20\ell \ge k - 20. The previous 1\ell - 1 beads have N1N_{\ell-1} good colorings, and every such good coloring provides a good lace of length kk. Hence, Nk=Nk1+Nk2++Nk21for k21.(1)\tag{1} N_k = N_{k-1} + N_{k-2} + \dots + N_{k-21} \quad \text{for } k \ge 21. From (1) we can see that N21=N0++N20N_{21} = N_0 + \dots + N_{20} is odd, and N22=N1++N21N_{22} = N_1 + \dots + N_{21} is also odd.

Applying (1) again to the term Nk1N_{k-1}, Nk=Nk1++Nk21=(Nk2++Nk22)+Nk2++Nk21Nk22(mod2)N_k = N_{k-1} + \dots + N_{k-21} = \bigl( N_{k-2} + \dots + N_{k-22} \bigr) + N_{k-2} + \dots + N_{k-21} \equiv N_{k-22} \pmod 2 so the sequence of parities in (Nk)(N_k) is periodic with period 22. We conclude that

  • NkN_k is odd if k0(mod22)k \equiv 0 \pmod{22} or k21(mod22)k \equiv 21 \pmod{22};
  • NkN_k is even otherwise.

Now consider the good circular necklaces of 2013 beads. At a fixed point between two beads cut each. The resulting open lace may have some consecutive white beads at the two ends, altogether at most 20. Suppose that there are xx white beads at the beginning and yy white beads at the end; then we have x,y0x, y \ge 0 and x+y20x + y \le 20, and we have a good open lace in the middle, between the first and the last green beads. That middle lace consist of 2011xy2011 - x - y beads. So, for any fixed values of xx and yy the number of such cases is N2011xyN_{2011-x-y}.

It is easy to see that from such a good open lace we can reconstruct the original circular lace. Therefore, the number of good circular necklaces is x+y20N2011xy=N2011+2N2010+3N2009++21N1991N2011+N2009+N2007++N1991(mod2).\sum_{x+y \le 20} N_{2011-x-y} = N_{2011} + 2 N_{2010} + 3 N_{2009} + \dots + 21 N_{1991} \equiv N_{2011} + N_{2009} + N_{2007} + \dots + N_{1991} \pmod 2. By 91221=200191 \cdot 22 - 1 = 2001 the term N2001N_{2001} is odd, the other terms are all even, so the number of the good circular necklaces is odd.

Solution 2 of 2 (official)

(by Yoav Krauz, Israel) There is just one good monochromatic necklace. Let us count the parity of good necklaces having both colors.

For each necklace, we define an adjusted necklace, so that at position 0 we have a white bead and at position 1 we have a green bead. If the necklace is satisfying the condition, it corresponds to itself; if both beads 0 and 1 are white we rotate it (so that the bead 1 goes to place 0) until bead 1 becomes green; if bead 1 is green, we rotate it in the opposite direction until the bead 0 will be white. This procedure is called adjusting, and the place between the white and green bead which are rotated into places 0 and 1 will be called distinguished place. The interval consisting of the subsequent green beads after the distinguished place and subsequent white beads before it will be called distinguished interval.

For each adjusted necklace we have several necklaces corresponding to it, and the number of them is equal to the length of distinguished interval (the total number of beads in it) minus 1. Since we count only the parity, we can disregard the adjusted necklaces with even distinguished intervals and count once each adjusted necklace with odd distinguished interval.

Now we shall prove that the number of necklaces with odd distinguished intervals is even by grouping them in pairs. The pairing is the following. If the number of white beads with in the distinguished interval is even, we turn the last white bead (at the distinguished place) into green. The white interval remains, since a positive even number minus 1 is still positive. If the number of white beads in the distinguished interval is odd, we turn the green bead next to the distinguished place into white. The green interval remains since it was even; the white interval was odd and at most 19 so it will become even and at most 20, so we still get a good necklace.

This pairing on good necklaces with distinguished intervals of odd length shows, that the number of such necklaces is even; hence the total number of all good necklaces using both colors is even. Therefore, together with monochromatic green necklace, the number of good necklaces is odd.

Similar problems

IMC 1998 · Day 2 · P10no per-problem stats
IMC 1999 · Day 1 · P2mediumavg 5.4/10 · solved 47% · near-0 39% · disc 0.64