Turing Machine That Follows Transition That Reads Symbol X From Tape While Processing Input String W

Turing Machine was invented by Alan Turing in 1936 and information technology is used to take Recursive Enumerable Languages (generated by Type-0 Grammar).

A turing machine consists of a tape of infinite length on which read and writes operation tin can be performed. The tape consists of infinite cells on which each cell either contains input symbol or a special symbol called blank. It also consists of a head pointer which points to prison cell currently being read and it can move in both directions.

Figure: Turing Machine

A TM is expressed as a 7-tuple (Q, T, B, ∑, δ, q0, F) where:

  • Q is a finite set of states
  • T is the tape alphabet (symbols which can be written on Record)
  • B is bare symbol (every jail cell is filled with B except input alphabet initially)
  •  is the input alphabet (symbols which are function of input alphabet)
  • δ is a transition function which maps Q × T → Q × T × {L,R}. Depending on its present country and present tape alphabet (pointed by head pointer), it will move to new state, modify the record symbol (may or may not) and move caput pointer to either left or right.
  • q0 is the initial country
  • F is the set of final states. If any land of F is reached, input cord is accustomed.

Let usa construct a turing car for L={0^n1^north|due north>=1}

  • Q = {q0,q1,q2,q3} where q0 is initial state.
  • T = {0,1,X,Y,B} where B represents bare.
  • ∑ = {0,1}
  • F = {q3}

Transition function δ is given in Table one equally:

table1

Analogy

Allow us see how this turing machine works for 0011. Initially head points to 0 which is underlined and state is q0 equally:

turing2

The motion will be δ(q0, 0) = (q1, X, R). It means, it will go to state q1, replace 0 by X and head will motion to right as:

turing3

The movement will exist δ(q1, 0) = (q1, 0, R) which means it will remain in same state and without irresolute any symbol, it will move to right equally:

turing4

The motion volition be δ(q1, 1) = (q2, Y, Fifty) which ways it will move to q2 land and changing one to Y, it will move to left as:

turing5

Working on information technology in the aforementioned way, the machine volition reach state q3 and caput will point to B equally shown:

turing6

Using move δ(q3, B) = halt, information technology will stop and accepted.

Note:

  • In non-deterministic turing motorcar, there tin can be more than one possible move for a given state and tape symbol, but not-deterministic TM does not add any ability.
  • Every non-deterministic TM tin exist converted into deterministic TM.
  • In multi-tape turing machine, there can be more than than 1 tape and corresponding head pointers, only it does not add any power to turing machine.
  • Every multi-record TM tin be converted into unmarried tape TM.

Question: A single tape Turing Machine M has ii states q0 and q1, of which q0 is the starting land. The tape alphabet of Chiliad is {0, 1, B} and its input alphabet is {0, 1}. The symbol B is the blank symbol used to bespeak end of an input string. The transition role of M is described in the following table.

turing7

The tabular array is interpreted equally illustrated beneath. The entry (q1, 1, R) in row q0 and cavalcade 1 signifies that if Yard is in country q0 and reads 1 on the current tape square, then it writes one on the aforementioned tape square, moves its record head one position to the right and transitions to state q1. Which of the post-obit statements is true about M?

  1. M does non halt on whatever string in (0 + i)+
  2. Thousand does not halt on whatsoever string in (00 + i)*
  3. M halts on all cord catastrophe in a 0
  4. M halts on all cord ending in a one

Solution:  Let usa see whether motorcar halts on string '1'. Initially state will be q0, head volition bespeak to i every bit:

turing9

Using δ(q0, ane) = (q1, 1, R), it will move to country q1 and head will motion to right as:

turing11

Using δ(q1, B) = (q0, B, 50), information technology will motility to country q0 and caput will move to left as:

turing12

Information technology will run in the aforementioned mode once more and once again and not halt.

Option D says M halts on all cord catastrophe with 1, but it is non halting for 1. And then, option D is wrong.

Allow us meet whether machine halts on string '0'. Initially land will be q0, head will point to 1 as:

turing13

Using δ(q0, 0) = (q1, 1, R), information technology volition move to state q1 and head will move to right as:

turing14

Using δ(q1,B)=(q0,B,L), it volition motility to country q0 and head will movement to left every bit:

turing15

It will run in the same way again and again and non halt.

Option C says M halts on all cord ending with 0, only it is non halting for 0. And so, option C is incorrect.

Option B says that TM does not halt for any string (00 + 1)*. But NULL cord is a office of (00 + one)* and TM will halt for Nothing string. For NULL string, tape volition be,

turing16

Using δ(q0, B) = halt, TM will halt. Every bit TM is halting for NULL, this option is also incorrect.
So, option (A) is correct.

This commodity is contributed by Sonal Tuteja. Please write comments if you observe anything incorrect, or you desire to share more information virtually the topic discussed above

lammwhave1953.blogspot.com

Source: https://www.geeksforgeeks.org/turing-machine-in-toc/

0 Response to "Turing Machine That Follows Transition That Reads Symbol X From Tape While Processing Input String W"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel