I have a task to build an enumerator (a turing machine which also prints to the output tape and outputs it by going to the print state) for the language {0 ^ (3 ^ n) | n >= 0} where:
1) The number of states must be at most 10 (including print and halt states, they are part of the 10 states)
2) Gamma, the printer alphabet is {0, x, space} and nothing more.
3) The output tape alphabet is {0}.
I've tried numerous times to build it with at most 10 states but managed to use 11 and not 10. My idea was to erase each 0 with a space, then iterate past a certain delimiter say X, and write 3 0s for each deleted 0 before the delimiter. For example space|x|space,space,space|x|000000000|x|. "|" is just to emphasize the delimiter for this question, the spaces are the previous 0's overwritten - after overwriting each 0 with space i iterate past the X and append 3 0s at the end.
Each time i failed miserably lacking one more state. I've run out of ideas...help ?
Thanks