Maths Olympiad Prep

Library / /15 of 15

Combinatorics Difficulty 7.0 National Olympiad Prove it Philippines

Problem:

Gari took a 6-item multiple choice test with 3 choices per item, labelled AA, BB, and CC. After the test, he tried to recall his answers to the items. He only remembered that he never answered three consecutive AA's, he never answered three consecutive BB's, and he did not leave any item blank. How many possible sets of answers could Gari have had?

Solution

Solution:

The problem is equivalent to that of finding the number of ternary strings of length 66 that do not contain any 33 consecutive 00's or 33 consecutive 11's. Using the principle of inclusion and exclusion, it suffices to count the number of ternary strings of length 66 that contain at least 33 consecutive 00's, multiply the number by 22 (by symmetry), and then subtract the number of ternary strings of length 66 that contain at least 33 consecutive 00's and 33 consecutive 11's.

Note that there are 6060 such strings with exactly 33 consecutive 00's, 1616 with exactly 44 consecutive 00's, 44 with exactly 55 consecutive 00's, and 11 with exactly 66 00's. This gives a total of 60+16+4+1=8160+16+4+1=81 strings of length 66 that contain at least 33 consecutive 00's.

The total number of ternary strings of length 66 is 363^{6} while the number of ternary strings of length 66 that contain both 33 consecutive 00's and 33 consecutive 11's is 22. Thus, the number of strings that satisfy the problem are 36(2)(81)+2=5693^{6}-(2)(81)+2=569.

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.