Problem

Source: Tournament of Towns Spring 2016

Tags: combinatorics



Recall that a palindrome is a word which is the same when we read it forward or backward. (a) We have an infinite number of cards with words $\{abc, bca, cab\}$. A word is made from them in the following way. The initial word is an arbitrary card. At each step we obtain a new word either gluing a card (from the right or from the left) to the existing word or making a cut between any two of its letters and gluing a card between both parts. Is it possible to obtain a palindrome this way? (4 points) (b) We have an infinite number of red cards with words $\{abc, bca, cab\}$ and of blue cards with words $\{cba, acb, bac\}$. A palindrome was formed from them in the same way as in part (a). Is it necessarily true that the number of red and blue cards used was equal? (6 points) Alexandr Gribalko, Ivan Mitrofanov