返回题库

HMMT 二月 2022 · COMB 赛 · 第 3 题

HMMT February 2022 — COMB Round — Problem 3

专题
Contest Math / 竞赛数学
难度
L3
来源
HMMT

题目详情

英文原题

  1. Michel starts with the string HM M T . An operation consists of either replacing an occurrence of Hwith HM , replacing an occurrence of M M with M OM , or replacing an occurrence of T with M T .
    For example, the two strings that can be reached after one operation are HM M M T and HM OM T .
    Compute the number of distinct strings Michel can obtain after exactly 10 operations.
解析

英文解析

  1. Michel starts with the string HM M T . An operation consists of either replacing an occurrence of Hwith HM , replacing an occurrence of M M with M OM , or replacing an occurrence of T with M T .
    For example, the two strings that can be reached after one operation are HM M M T and HM OM T .
    Compute the number of distinct strings Michel can obtain after exactly 10 operations.
    Proposed by: Gabriel Wu
    Answer: 144
    Solution: Each final string is of the form HM x m T , where x is a string of length 10 consisting of
    M s and O s. Further, no two O s can be adjacent. It is not hard to prove that this is a necessary andsufficient condition for being a final string.
    Let f ( n ) be the number of strings of length n consisting of M s and O where no two O s are adjacent.
    Any such string of length n + 2 must either end in M , in which case removing the M results in a validstring of length n + 1, or M O , in which case removing the M O results in a valid string of length n .
    Therefore, f ( n + 2) = f ( n ) + f ( n + 1). Since f (1) = 2 and f (2) = 3, applying the recursion leads tof (10) = 144.