Maths Olympiad Prep

Track / Stage 5 / 78 of 400 #678 of 1964

Problem 678

AIME late
Combinatorics Difficulty 5.2 Find the answer HMMT_2

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. Spacing, $ signs and \frac vs / are all fine.

Official 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.

Source: Omni-MATH, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.