I am trying to make a deterministic turing machine to do the following: find the middle letter of any word. it needs to take as input, a word containing only a's and b's and once it finds the middle character it needs to halt and accept. the machine needs to reject any word with an even number of letters and only accept odd length words. Left/right/stay moves are all allowed to be used in this machine.
The following notation is to be used: STATE, SYMBOL -> STATE, SYMBOL, DIRECTION
(_) = blank space
(l) = left move
(r) = right move
(s) = stay
I can't visualize this machine at all and need help starting. I have tried to build the machine myself but it never works for all inputs and I can only get it to work for specific words. if you can help me I would appreciate it. Thanks