Question

In: Computer Science

Give turing Machine for L= a*i b*2j a*i b*2j where i,j>=0. Also provide the logic, show...

Give turing Machine for L= a*i b*2j a*i b*2j where i,j>=0. Also provide the logic, show 1 or 2 strings for accept, reject .

Solutions

Expert Solution

given turing machine is:

L=a*i b*2j a*i b*2j

this is easy to understand if we take one example:

L=abbabb L

1 2 3 4 5 6

blank a b b a b b blank

let say our pointer is on index 1 check the element which is 'a' put the 'X' on its place then our resultant sequence will be

1 2 3 4 5 6

blank X b b a b b blank

Now move the pointer to right until you don't find 'a' when you find it replace it with 'X'

1 2 3 4 5 6

blank X b b X b b blank

as we find 'a' and we replaced it with "x" now again move toward left until you don't find X when you find "x" move one step in right direction and u will find b replace it with 'Y' again move in right direction until you don't find 'b' replace it with "Y" too.

similar steps we need to repeat our resultant sequence will be:

1 2 3 4 5 6

blank X Y Y X Y Y blank

it will traverse completely.

it means above language is accepted by given turning machine.

if we use example abba it will rejected by turning machine.

For the case of "aa" we will start from left from B ie blank as we do move toward right and try to find b if u don't find b but blank it means there is not any b in the language all the character are "a" just replace them with X. Similarly in case of "bbbb" as start from blank first character encountered is b it means there is not "a" just put all b as Y


Related Solutions

Let L = {aibj | i ≠ j; i, j ≥ 0}. Design a CFG and...
Let L = {aibj | i ≠ j; i, j ≥ 0}. Design a CFG and a PDA for this language. Provide a direct design for both CFG and PDA (no conversions from one form to another allowed).
Show that the language F={M| M is a Turing machine , and L(M) contains infinite elements}...
Show that the language F={M| M is a Turing machine , and L(M) contains infinite elements} is not Turing recognizable.
Show that L = { (a2)^i | i ≥ 0} is not accepted by a finite...
Show that L = { (a2)^i | i ≥ 0} is not accepted by a finite automata.
Show that the following problem i undecidable: Input: A Turing machine M. Output: Yes if M...
Show that the following problem i undecidable: Input: A Turing machine M. Output: Yes if M eventually halts when started on a blank tape, no otherwise Input: A Turing machine M and a tape symbol a. Output: Yes if M eventually writes a when started on an blank tape, no otherwise. Input: A Turing machine M. Output: Yes if M ever writes a nonblank symbol when started on a blank tape, No otherwise. Input: A Turing machine M and a...
Can you give me a turing machine for the language c* n b*2n a* n+2 for...
Can you give me a turing machine for the language c* n b*2n a* n+2 for n>=0 . Please give the entire diagram with states, transition function, alphabet. Can use either one-tape or two-tape (both infinite). Describe the logic used to build the machine. Run the TM that accepts for any string of length > 1. Also run for string cbba.
Show details and write answers using 2S+1LJ notation, where S, L, J are the total values...
Show details and write answers using 2S+1LJ notation, where S, L, J are the total values for each atom: a) Use Hund’s 1st rule to show that Si atom can be described by 3 P. b) Use Hund’s 2nd rule to show that Ti atom can be described by 3 F. c) Use Hund’s 3rd rule to show that Si atom can be described by 3 P0.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT