Maths Olympiad Prep

Track / Stage 6 / 368 of 400 #1848 of 2444

Problem 1848

National Olympiad, first round
Combinatorics Difficulty 6.9 Prove it Mongolian Mathematical Olympiad · Mongolia

One of the following three types of operations can be performed on a word. Let xx, yy, zz, aa, bb, and cc be letters.
(1) Any subword of the form xyxy can be changed to xzzyxzzy. For example, abcazzbcabc \rightarrow azzbc.
(2) Any subword of the form xyzxyz can be changed to zyxzyx. For example, cabcccbacabc \rightarrow ccba.
(3) Any subword of the form xyyxxyyx can be omitted. For example, abcaaccabccabcaacc \rightarrow abcc.
Can the word baccbabaccba be obtained from the word abccababccab using the above operations?
Note: For xyzxyz, the subwords are xx, yy, zz, xyxy, yzyz, and xyzxyz, but not xzxz.

This one wants a proof. Work it on paper, then read the official solution and mark yourself. Be honest about it: the record is only any use to you if it is.

Next problem →

Official solution

Answer: No.
Suppose the number of aa's in even positions is subtracted from the number of aa's in odd positions in the word. In that case, we obtain a quantity that remains invariant under the given operations. This invariant can be used to determine if one word can be transformed into another using the specified operations.
For the word abccababccab:
* Odd-positioned aa letters: 2 (positions 1 and 5)
* Even-positioned aa letters: 0
Thus, the invariant for abccababccab is 20=22 - 0 = 2.
For the word baccbabaccba:
* Odd-positioned aa letters: 0
* Even-positioned aa letters: 2 (positions 2 and 6)
Thus, the invariant for baccbabaccba is 02=20 - 2 = -2.
Since the invariant values for abccababccab and baccbabaccba are different (2 and 2-2, respectively), it is impossible to transform abccababccab into baccbabaccba using the given operations.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty, ordering) added by this project.