You are on page 1of 38

UNIT IV TURING MACHINES

PART A
1. Define Turing Machine.
The Turing machine is denoted by M = (Q,,  ,,q0, B , F) Q -Finite set of states,- Finite set of input symbols
,  -finite set of allowable tape symbols,,q0 -the initial state, B-Blank symbol, F- a set of final state,  is the
transition function defined as :(Q ) ( Q L,R).
2. What is a multitape turing machine.
A multitape turing machine has a finite control with some finite number of tapes.Each tape is infinite
in both directions.It has it’s own initial state and some accepting states initially.

 The finite set of input symbols is placed on the first tape.

 All the other cells of all the tapes hold the blank.

 The control head of the first tape is at left end of the point.

3. Define halting problem .


The halting problem is the problem of determining, from a description of an arbitrary computer
program and an input, whether the program will finish running or continue to run forever.
Formally it is stated as :'Given an arbitrary machine M and a string w ,does M halt with w as the input
string?'

4. Define non deterministic Turing machine.


Non deterministic turing machine consist of a transition function  such that for each state q and tape
symbol X, (q, X) is a set of triples.

{(q1, Y1, D1), (q2, Y2, D2)..... (qk, Yk, Dk)} where k ia any integer. The NTM
can choose, at each step, any of the triples to be the next move
5. What are the different techniques of Turing machine construction
Storage in Finite Control
Sub routines
Multiple tracks
Checking off Symbols

6. Define Instantaneous description of Turing machine


ID of turing machine is represented as X1 X2......Xi-1 ├ q Xi Xi+1.....Xn

i) where q is the state of turing machine.

ii) The tape head is scanning the ith symbol from left
iii) X1 X2....Xn is the portion of the tape between the leftmost and the rightmost non
blank
7. What are the differences between Finite Automata and Turing machine.

FA TM

1. FA uses a tape that is finite 1. TM uses a tape that is infinite .

2.The language accepted by 2. Tm recognizes recursively

FA is Regular languages enumerable languages

8. List the primary objectives of Turing machines


Two primary objectives of a Turing machine
–Accepting a language
– Computing a function

9. What are the required fields of an Instantaneous description of a Turing machine

It requires i)the state of the TM. ii)the contents of the tape. iii)the position of the tape head on the
tape.

1 Give the configuration of Turing machine.


0. A finite state machine with storage is called a Turing machine
The Turing machine is denoted by M = (Q,,  ,,q0, B , F)
Q -Finite set of states,
- Finite set of input symbols ,
 -finite set of allowable tape symbols,
,q0 -the initial state,
B-Blank symbol,
F- a set of final state,
 is the transition function defined as :(Q ) ( Q L,R).
1 What is a Turing Machine
1. Turing machine is a simple mathematical model of a computer.TM has unlimited and unrestricted
memory and is a much more accurate model of a general purpose computer. The TM is a FA with a
R/W head .It has an infinite tape divided into cells, each cell holding one symbol
1 List out different types of TMs.
2. Multi tape Turing machine, off-line Turing Machine , Multi track Turing machine & Universal TM
1 Define Multi-head Turing machine
3. A multi-head TM is a single-tape TM having K heads reading symbols on the same tape. In one step
all the heads sense the scanned symbols and move or write independently

1 State the different types of grammars


4. The four classes of grammars are regular, context-free, context-sensitive, and unrestricted grammars
Define Chomsky Hierarchy
The four classes of languages regular, context-free, context-sensitive, and recursively enumerable is
often referred to as the Chomsky hierarchy. The Chomsky Hierarchy allows the possibility for the
understanding and use of a computer science model which enables a programmer to accomplish
meaningful linguistic goals systematically
1 When is a function f said to be Turing computable
6. A TM defines a fn: y = f(x) for string x, y * ,if q0  ├* qf y where q0 initial state, qf is
the final state. A function f is Turing computable if there exists a TM that performs a
specific function

1 What is a Regular grammar


7. A grammar is regular if it has rules of form A -> a or A -> aB or A -> ɛ where ɛ is a special symbol
called NULL.
1 Define Linear Bounded Automata
8. A linear bounded automaton is a nondeterministic Turing machine which
has a single tape whose length is not infinite but bounded by a linear function of the length
of the input string. The model can be described formally by the following set format:
M = (Q,Σ,├,δ,q0,B,F, ¢ $, )
All the symbols have the same meaning as in the basic model of Turing machines with the
difference that the input alphabet L contains two special symbols ¢ and $. ¢ is called the left-
end marker and $ is called the right-end marker .

1 Compare FM, PDA and TM


9.  Finite Machine is of two types - DFA and NFA. Both DFA and NFA accept regular language
only
 PDA has a memory and hence it accepts large class of language.
TM can be programmed. Hence TM accepts very large class of language. TM is therfore most
powerful computational model

2 Define the language of Turing machine


Let M= (Q,,  ,,q0, B , F) be a turing machine. Then L(M) is the set of strings w in * such that q0 w
0.
├ * α p β for some state p in F and any tape strings α and β.

PART -B
1. (i) Construct The Turing Machine For The Following LanguageL =
{0n1n/n≥1}Draw the transition diagram. Also specify the instantaneous description
to trace the string 0011[8]-
(ii) State the halting problem of Turing machine and also prove that halting problem
of Turing Machine is undecidable [10]
2. (i) Explain the programming techniques for Turing Machine Construction
[13]
3. (i) Explain the variants of Turing Machine (or) Explain the various types of Turing
Machine [13]
4. (i) Construct a Turing Machine for the language L={ wwR/w in (0+1)* }(or)
Construct a Turing machine to accept palindromes in an alphabet ∑¿ {a ,b } .
Trace the string abab and baab [13]
5. (i) Explain how Turing Machine can be used for function of computable
languages(Or) [8]
Explain how Turing Machine can be used as a computer of Integer functions
(ii) Construct a Turing machine for proper subtraction
6. (i) Construct Turing Machine (TM) that replace all occurrence of 111 by 101
from sequence of 0's and 1's [13]
 The turing machine will look for every occurrence of the string 111.

 The turing machine M is given by:


M=(Q,Σ,Ґ,δ,q0,B,F)
Q=q0,q1,q2,q3,q4,q5
Σ=0,1Σ=0,1
Ґ=0,1,B
δ=Transition function is shown using the transition diagram
B=Blank symbol for the tape 

F=q5, halting state.


 Working of the machine for input 01011101 is shown in fig below:
0101101 B |- 0101101 |- 0101101 B |- 0101101
q0q0q1q0q0q0q1q0
0101101 B |- 0101101
q1q2q1q2
0101111 B |- 0101101 B
q3q4q3q4
0101101 B |- 010111B |- 0101101 B
q0q1q5(halt)
7. (i) Construct a Turing machine to reverse the given string [13]

(ii) Construct a Turing Machine for the language L={ ww/w∈ {a,b} } [13]
8. (i)Construct a Turing machine that performs Unary multiplication
[13]
(Or)Design a Turing Machine that performs multiplication using subroutine copy

You might also like