[Math] Drawing a state diagram for a Turing Machine

turing-machines

I'm a bit rusty since it's been a couple weeks since I've last done this, but I could really use some help with starting out the Turing Machine for $\{a^i b^j c^k \mid i = j + k\}$

I'm confused on how I can make the number of a's = b's+c's since presumably I will be going through the a's first.

Best Answer

Broadly once you get to the point of designing state diagrams for turning machines you are basically should treat it as a programming task that you then translate into state rules.

The strategy I would employ for your language acceptor would be to zig zag along your string removing an 'a' from the start and a 'c' or 'b' from the end. If by the time you have erased all the 'a's the entire string has been erased then your i = j + k condition has been fulfilled.

To ensure that the $b^jc^i$ condition is heald you basically need two copies of your zig zag program. The first removes 'c' from the end and when it first encounters a 'b' transitions into the second program.

The second program removes 'b' and if it encounters a 'c' it fails.