Question: Let T be a Turing Machine that decides the following language L 1 over the alphabet { 0 , 1 } . L 1 =

Let T be a Turing Machine that decides the following language L1 over the
alphabet {0,1}.
L1={w | w is string of at least length 3 and contains twice as many 0s and 1s}
For example, T will accept strings such as 001,100,010,010100,011000, etc.,
but it will reject strings such as 000,011,111,1100,0010,00011,00001, etc.
Please use Morphett's Turing Machine Simulator to write a code that implements this turning machine, taking into account these guidelines:
Syntax:
1. Each line should contain one tuple of the form ''.
2. You can use any number or word for and , eg.10, a, state1. State labels are case-sensitive.
3. You can use almost any character for and , or '_' to represent blank (space). Symbols are case-sensitive. You can't use ';','*','_' or whitespace as symbols.
4. should be 'l','r' or '*', denoting 'move left', 'move right' or 'do not move', respectively.
5. Anything after a ';' is a comment and is ignored.
6. The machine halts when it reaches any state starting with 'halt', eg. halt, halt-accept.
Also:
1.'*' can be used as a wildcard in or to match any character or state.
2.'*' can be used in or to mean 'no change'.
3.'!' can be used at the end of a line to set a breakpoint, eg '1 a b r 2!'. The machine will automatically pause after executing this line.
4. You can specify the starting position for the head using '*' in the initial input.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!