0% found this document useful (0 votes)
24 views

Construction of Tms

A Turing machine can be constructed to accept or compute functions by drawing a transition diagram or table defining the state transitions. For example, a Turing machine can be constructed to accept the language "aba" with states q0, qa where q0 upon reading a moves right and changes the tape symbol to b, then moves to qa and halts. Similarly, a Turing machine can accept the language anbn with states q0, q1, q2, q3 by reading inputs and marking them with symbols, then verifying equality between a's and b's before halting. Transition functions define the state changes based on input symbols.

Uploaded by

Ram Anand
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Construction of Tms

A Turing machine can be constructed to accept or compute functions by drawing a transition diagram or table defining the state transitions. For example, a Turing machine can be constructed to accept the language "aba" with states q0, qa where q0 upon reading a moves right and changes the tape symbol to b, then moves to qa and halts. Similarly, a Turing machine can accept the language anbn with states q0, q1, q2, q3 by reading inputs and marking them with symbols, then verifying equality between a's and b's before halting. Transition functions define the state changes based on input symbols.

Uploaded by

Ram Anand
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Construction of TMs

Turing Machines as Acceptors: If we construct a turing machine that accepts a given language.
Turing Machines as Transducers: If we construct a turing machine that computes a function.
A Turing Machine can be constructed by drawing a suitable Transition Diagram(TD)
or Transition Table(TT)or by writing suitable delta transitions(DT).
Examples for constructing Turing Machines as Acceptors:

{a, b}
1. Construct a turing machine which accepts the language of aba over
Ans:

...

q0

qa=Halt; S=Stop; =blank


Fig: Turing Machine for aba
Note: q0 upon a, changes it to b, moves Right(R), and goes to q1 can be
represented,
-in TD as,
-in TT as,

and

(q0,a) =(q1,b,R)

Note: While writing

transitions, change state only when it is absolutely required.

That is, change state only when you want to redefine a

transition in a different

way.

2. Construct a TM that accepts the language L={anbn} where n>=1.


Ans:
Logic: Read out first a, mark it by A and then move ahead along the input tape and find
out first b and mark it B. Repeat this process for all as and bs. If there is some kind of
inequality in number of as and bs the TM will not end up in HALT state.
The corresponding

transitions are:

(q0 , a) ( q1 , A, R)

(q1 , a ) (q1 , a, R)
(q1 , b) (q2 , B, L)
(q2 , a) (q2 , a, L)

(q2 , A) ( q0 , A, R)
(q1 , B) (q1 , B, R)
( q2 , B ) ( q 2 , B , L )

(q0 , B) ( q3 , B, R)
(q3 , B ) (q3 , B, R )

(q3 , ) (qa , , )
qa
where
state.

is the final

You might also like