Every step cuts the number of ones in half.
- If this is possible without a remainder (number of ones is even), a one is added to the front of the binary number.
- If the number of ones is odd, a zero is added to the front of the binary number.
Solution steps:
- Cut the unary number in half (state "half").
- Check if the number of ones was even or odd (state "test").
- Add a zero or a one to the front of the binary number (blue states)
- Erase the blank fields within the unary number (green states)
- Check if the unary number has ones left. If yes start again (yellow states)
