Question

In: Computer Science

each one of the following languages defined over {0,1}, give the transition diagram of a deterministic,...

each one of the following languages defined over {0,1}, give the transition diagram of a deterministic, single tape Turing Machine.

{03i 1 02i 1 0i | i > 0}

Solutions

Expert Solution

We will start processing string from left to right, where in each scan from left to right, we will convert three 0s in leftmost substring before 1 into symbol XXX, then we convert two 0s in middle substring into XX and we covert one 0 in last substring to X. Thus if string is in the form of 03i102i10i then accept else reject.

Till now we have converted three 0s of leftmost substring to X

Now we will convert two 0s to XX

Now we have come to rightmost substring, where we replace one 0 by X

//Now start moving left

So one scan from left to right is completed, now we move back to left input position

//Now we are in rightmost position of leftmost substring

//If there is still 0, it means some more portion of string are yet to process

//Now repeat the task of scanning from left to right

//This means entire leftmost substring has been processed and hence we need to verify whether all other substring has been processed

//simply pass over the processed inputs

Now we are in rightmost substring

//simply pass over the processed input

//B indicate blank

Hence above Turing machine will enter into state qaccept if and only if input is in the form of 03i102i10i where i > 0.

Please comment for any clarification.


Related Solutions

The first five questions give languages over {0,1}. In each case decide whether the language is...
The first five questions give languages over {0,1}. In each case decide whether the language is regular or not, and prove your answer is correct The set of all strings x beginning with a non-null string of the form ww.
Formal Languages Give a regular expression for each of the following languages: L2a = {w ?...
Formal Languages Give a regular expression for each of the following languages: L2a = {w ? {0,1}* | w corresponds to the binary encoding of non-negative integers that are evenly divisible by 4 L2b = {w ? {a,b}* | w contains at least one 'a' and exactly two b's} L2c = {w ? {0, 1, 2}* | w starts with a 2, ends with a 1 and contains an even number of 0's}.
a. Write out – draw the diagram with states and arrows – for a one-tape deterministic...
a. Write out – draw the diagram with states and arrows – for a one-tape deterministic Turing machine that accepts the language over {a,b, !}   L = {w!x!w: x,w in (a|b)*} = {!!, a!!a, …, aba!a!aba, … bbba!aa!bbba, …. (strings in L have three parts divided by !.   First and third parts must be equal.) b. Write out the sequence of configurations for some string of length at least 5 (can be in L or not in L) c. What...
Draw PDA transition diagram for the following language: The set of strings over the alphabet {x,...
Draw PDA transition diagram for the following language: The set of strings over the alphabet {x, y} where 2 * (# of x's) = 3 * (#y's) That is, if we let nx be the number of x's and ny be the number of y's, then the strings in these language are those where 2nx = 3ny Try to find a PDA that is as simple and elegant as possible (do not convert from CFG). ------------------------------------------------------------------------------------------------------------------ USE Notation between transition:...
Automata Theory and Formal Languages Instructions: Draw the DFA (Deterministic Finite Automaton) of the following: DFA...
Automata Theory and Formal Languages Instructions: Draw the DFA (Deterministic Finite Automaton) of the following: DFA in which set of all strings can be accepted which end with ‘a’ DFA in which set of all strings can be accepted which start with ab DFA in which set of all strings can be accepted which contain ab DFA in which set of all strings can be accepted which ends with ab
Automata Theory and Formal Languages Instructions: Draw the DFA (Deterministic Finite Automaton) of the following: DFA...
Automata Theory and Formal Languages Instructions: Draw the DFA (Deterministic Finite Automaton) of the following: DFA for binary number divisible by 2 DFA for binary number divisible by 3 DFA in which set of all strings can be accepted which start with a DFA in which set of all strings can be accepted which contains ‘a’
Give reasons why one might conjecture that the following language is not deterministic. L = {anbmck:...
Give reasons why one might conjecture that the following language is not deterministic. L = {anbmck: n = m or m = k}.
The first five questions give languages over {0, 1}. In each case decide whether the language...
The first five questions give languages over {0, 1}. In each case decide whether the language is regular or not, and prove your answer is correct. 5. The set of strings in which the number of 0's is a perfect square.
Are the following languages over {a, b} regular? If they are then prove it. If they...
Are the following languages over {a, b} regular? If they are then prove it. If they are not prove it with the Pumping Lemma a) {ap | p is a prime number} b) {xax | x Î{a,b}*} (start by listing some strings in, not in, the language
Give a grammar that generates each of the following languages: (1) L = {a2n cm bm...
Give a grammar that generates each of the following languages: (1) L = {a2n cm bm | m ≥ 0, n ≥ 0} (2) L = {an b2m cn | m ≥ 0, n ≥ 0} (3) L = {an bm | n+m is even} (4) L = {an bm | n ≤ m+3} (5) The complement of the language L = {anbn | n ≥ 0}
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT