You have the letters A B C, and a long string ABAABACCABBACBABCCBAABCA... . You apply the following rules:
XX -> X
(in other words, you can reduce duplicated letters)
XYX -> XX
(in other words you can remove a letter sandwiched between duplicate letters).
What are the terminal sequences?
XX -> X
(in other words, you can reduce duplicated letters)
XYX -> XX
(in other words you can remove a letter sandwiched between duplicate letters).
What are the terminal sequences?