Dec 05, 2005 20:45
A string is defined as sequence of letters M, U, and I.
Rule 1: if a string has "I" at the end, you may add an "U".
ex. MUI => MUIU
Rule 2: if a string is in the form "Mx" (with x representing everything that's after M), you may form Mxx.
ex. MUIU => MUIUUIU
Rule 3: if a string has "III" together anywhere, you may turn it into a "U".
ex. MUIIIIU => MUUIU
Rule 4: if a string has "UU" together anywhere, you may remove it from the string.
ex. MIUUIU => MIIU
Given MI as your starting string, your goal is to form the string MU.
Don't spend too much time on this puzzle, especially if your first name begins with D and end with A.