Maths Olympiad Prep

Library / /343 of 1394

, 2022

Combinatorics Difficulty 5.0 AIME, harder Find the answer United States

Problem:

Michel starts with the string HMMTH M M T. An operation consists of either replacing an occurrence of HH with HMH M, replacing an occurrence of MMM M with MOMM O M, or replacing an occurrence of TT with MTM T. For example, the two strings that can be reached after one operation are HMMMTH M M M T and HMOMTH M O M T. Compute the number of distinct strings Michel can obtain after exactly 10 operations.

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

Solution

Solution:

Each final string is of the form HMxMTH M x M T, where xx is a string of length 10 consisting of MM s and OO s. Further, no two OO s can be adjacent. It is not hard to prove that this is a necessary and sufficient condition for being a final string.

Let f(n)f(n) be the number of strings of length nn consisting of MM s and OO where no two OO s are adjacent. Any such string of length n+2n+2 must either end in MM, in which case removing the MM results in a valid string of length n+1n+1, or MOM O, in which case removing the MOM O results in a valid string of length nn. Therefore, f(n+2)=f(n)+f(n+1)f(n+2)=f(n)+f(n+1). Since f(1)=2f(1)=2 and f(2)=3f(2)=3, applying the recursion leads to f(10)=144f(10)=144.

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.