Turing machine (A-B)

//A – B Turing program

_tape =

new char[] { ‘|’, ‘|’, ‘|’, ‘|’,‘|’,‘-‘, ‘|’,‘|’ };

_machineState =

‘A’;

_commands.Add(

new Command(‘A’, ‘|’, ‘|’, Direction.Right, ‘A’));

_commands.Add(

new Command(‘A’, ‘-‘, ‘-‘, Direction.Left, ‘B’));

_commands.Add(

new Command(‘B’, ‘|’, , Direction.Right, ‘C’));

_commands.Add(

new Command(‘B’, , , Direction.Left, ‘B’));

_commands.Add(

new Command(‘C’, , , Direction.Right, ‘C’));

_commands.Add(

new Command(‘C’, ‘-‘, ‘-‘, Direction.Right, ‘D’));

_commands.Add(

new Command(‘D’, ‘|’, ‘|’, Direction.Right, ‘D’));

_commands.Add(

new Command(‘D’, , , Direction.Left, ‘E’));

_commands.Add(

new Command(‘E’, , , Direction.Left, ‘E’));

_commands.Add(

new Command(‘E’, ‘|’, , Direction.Left, ‘F’));

_commands.Add(

new Command(‘F’, ‘|’, ‘|’, Direction.Left, ‘G’));

_commands.Add(

new Command(‘F’, ‘-‘, ‘-‘, Direction.Left, ‘_’));

_commands.Add(

new Command(‘G’, ‘-‘, ‘-‘, Direction.Left, ‘B’));

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s