The task at hand is to construct a set of instructions for a Turing machine that changes consecutive (i.e. at substrings of at least two) 1's into 0's, leaving everything else on the tape untouched in five or fewer states, halting at standard position. The machine is moving left to right, and the only characters on the tape are 0's and 1's. I was wondering how to go about this -- I was able to come up with a set of instructions in five states that performs the task at hand but either halts at the first blank to the right of the tape or the first blank to the left of the tape but not proceed beyond that. Any suggestions would be very helpful!
For clarity, here are some examples of what the machine is supposed to do:
1) 1010 --> 1010
2) 1100 --> 0000
3) 001101 --> 000001
Here is a start based on Javi's suggestion:
State $0$ is the 'top' of the loop: here, you just skip all $0$'s until you see a $1$. Then when you see a $1$, leave that $1$ alone, but go to a new state (state $1$) that represents "I have seen a $1$"
In state $1$, you see if there is another $1$ rioght next to the $1$ you just saw. If not, go back to state $0$. But if you do see a $1$, then it's time to replace the $1$ with $0$, but to do this, leave that second $1$ alone and move back to the first $1$ .. but go to a new state (state $2$) that says "time to replace the $1$'s with $0$'s!
OK, so in state $2$ you keep replacing all $1$'s with $0$'s until you are done with that string of consecutive $1$'s ... and then you return to state $0$.
Now, what you need to do is extend/modify this machine to account for the fact that at some point you will get to the end of the $0$'s and $1$'s ... at which point you of course just need to return to the leftmost $0$ or $1$.