Synonymous words
Source: Central American Olympiad 2007, Problem 4
June 12, 2007
algorithm
Problem Statement
In a remote island, a language in which every word can be written using only the letters , , , , , , is spoken. Let's say two words are synonymous if we can transform one into the other according to the following rules:
i) Change a letter by another two in the following way:
ii) If a letter is between other two equal letters, these can be removed. For example, .
Show that all words in this language are synonymous.