Maths Olympiad Prep

Library / /504 of 860

Combinatorics Difficulty 5.2 AIME, harder Find the answer

Count the number of functions f:Z{f: \mathbb{Z} \rightarrow\{ 'green', 'blue' }\} such that f(x)=f(x+22)f(x)=f(x+22) for all integers xx and there does not exist an integer yy with f(y)=f(y+2)=f(y)=f(y+2)= 'green'.

A number or a short expression. Fractions can be typed as 3/2, and spacing doesn't matter.

Solution

It is clear that ff is determined by f(0),,f(21)f(0), \ldots, f(21). The colors of the 11 even integers are independent of those of the odd integers because evens and odds are never exactly 2 apart. First, we count the number of ways to 'color' the even integers. f(0)f(0) can either be 'green' or 'blue'. If f(0)f(0) is 'green', then f(2)=f(20)=f(2)=f(20)= 'blue'. A valid coloring of the 8 other even integers corresponds bijectively to a string of 8 bits such that no two consecutive bits are 1. In general, the number of such length nn strings is well known to be Fn+2F_{n+2} (indexed according to F0=0,F1=1,Fn+2=Fn+1+Fn)\left.F_{0}=0, F_{1}=1, F_{n+2}=F_{n+1}+F_{n}\right), which can be proven by recursion. Therefore, the number of colorings of even integers in this case is F10=55F_{10}=55. If f(0)f(0) is 'blue', then a valid coloring of the 10 other even integers corresponds bijectively to a string as above, of 10 bits. The number of colorings for this case is F12=144F_{12}=144. The total number of colorings of even integers is 55+144=19955+144=199. Using the same reasoning for coloring the odd integers, we see that the number of colorings of all of the integers is 1992=39601199^{2}=39601.

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: Omni-MATH, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.