- MU puzzle
The MU puzzle is a puzzle stated by
Douglas Hofstadter and is found in "Gödel, Escher, Bach ". As stated, it is an example of aPost canonical system and can be reformulated as aterm rewriting system .The puzzle
Let's suppose to have the symbols
M
,I
, andU
which can be combined to produce strings of symbols or "words". The "MU puzzle" asks to start with a the "axiomatic" wordMI
and transform it into the wordMU
using in each step one of the following transformation rules:
# At the end of any string ending inI
, you can add aU
, such as changingMI
toMIU
.
# You can double any string after theM
(that is, changeMx
, toMxx
), such as changingMIU
toMIUIU
.
# You can replace anyIII
with aU
, such as changingMUIIIU
toMUUU
.
# You can remove anyUU
, such as changingMUUU
toMU
.Using these 4 rules is it possible to changeMI
intoMU
in a finite number of steps?We can write the production rules in a more schematic way. Suppose
x
andy
behave as variables (standing for a string of symbols) then the production rules can be written as:
#xI → xIU
#Mx → Mxx
#xIIIy → xUy
#xUUy → xy
can we obtain the wordMU
, using these rules?Solution
The puzzle's solution is no. None of the rules allows us to create a string whose total number of "I"s is a multiple of three, except by starting with another such string. Since we can only start with "MI" which contains one "I", we can never produce such a string. In particular, we can never produce a string containing no "I"s, such as "MU".
To see this, notice that the only rule which allows us to add "I"s to our string is rule 2, which will double the number of "I"s in the string, while the only rule which allows us to remove "I"s from our string is rule 3, which will remove 3 "I"s from the string.
Thus, the total number of "I"s in a string must be of the form
:
where and are constants, and is the number of "I"s in our axiom. For example, for the axiom MI, . Now, consider the above equation modulo 3. Since "3" unicode|≡ "0" (mod "3"), and "2" unicode|≡ "-1" (mod "3"), we can express the number of "I"s in our string (modulo 3) as
:.
Clearly, this equation is congruent to zero (mod 3)
if and only if is also congruent to 0 (mod 3), but because is congruent to 1 given the axiom MI, a string without "I"s, (in particular, MU), cannot be formed.ee also
*
Invariant (computer science)
Wikimedia Foundation. 2010.