Maths Olympiad Prep

Library / /56 of 69

Combinatorics Difficulty 6.9 National olympiad Prove it 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.

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.

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 and solution reproduced as published; topic and difficulty added by this site.