Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
8. Construct a Finite Automata for on/off switch. 10. Construct a Finite Automata to accept the following
language. L=an where n mod 4 = 3.
A0 B 1 | 1 B 1 | 01 |11
B0 B | 1 B | 0| 1
PART - A
4.What are the different types of language acceptances
1. Mention the components of PDA by PDA and define them
A push down automaton is usually described as Two types:
consisting of four components 1. acceptance by final state
A control unit 2. acceptance by empty stack
A read unit
An input tape and 5.What is the informal definition of PDA?
A memory unit A PDA is a computational machine to recognize a
context free language. computational power of a PDA is
2. Write down the formal definition of PDA. between finite automaton and turing machines. The PDA has a
A push down automaton computational model is a 7 finite control and the memory is organized as a stack.
tuple (Q,, , ,q0,Z0,F) where,
Q- Finite set of states.q0Q is the initial state
-set of alphabet called input alphabet
-stack alphabet 6. Compare NFA and PDA.
- Mapping from Qx(U{})x to finite subsets of Qx NFA PDA
* The language accepted by NFA The language accepted by
q0- starting state is the regular language PDA is the context free
Z0- start symbol of a stack language
F- Set of final states where F is a subset of Q NFA has no memory PDA is essentially an NFA
with stack memory
3. Write down instantaneous description of PDA. It can store only limited It stores unbounded limit of
Let A= (Q, , , , q0, Z0, F) be a PDA. An instantaneous amount of information information
description is (q,x,) where qQ,x * and *. A language/string is accepted It accepts a language either
only by reaching the final state by empty stack or by
reaching a final state
HINDUSTHAN COLLEGE OF ENGG & TECH, CBE -32.
DEPARTMENT OF COMPUTER SCIENCE AND ENGG
CS6503 THEORY OF COMPUTATION (REGULATION 2013) SMART MATERIAL
STAFF IN CHARGE: DR.P.EZHILARASU
UNIT - IV
4. Define Halting Problem
PART - A The halting problem is the problem of determining, from a
description of an arbitrary computer program and an input,
1. What is a Turing machine?
whether the program will finish running or continue to run
Turing machine is a simple mathematical model of a
forever.
computer.TM has unlimited and unrestricted memory and is a
much more accurate model of a general purpose computer. The
5. Define Subroutines in Turing machine
TM is a FA with a R/W head .It has an infinite tape divided into
A Turing machine subroutine is a set of states that
cells, each cell holding one symbol
performs some useful process. This set of states includes a start
state and another state that temporarily has no moves, and that
2. List out different types of TMs.
serves at the return state to pass control to whatever other set of
Multi tape Turing machine, off-line Turing Machine ,
states called the subroutine
Multi track Turing machine & Universal TM .
7. What are the required fields of an ID or configuration of a accepts L, and recursive if there is a TM that recognizes L,
TM. then it is called L- Turing acceptable(or) Turing Decidable
It requires languages. No, the language accepted by a non deterministic
i)the state of the TM. TM is same as the recursively enumerable language.
ii)the contents of the tape.
iii)the position of the tape head on the tape.
10.Define Rules of Context sensitive languages
8. Define Instantaneous description of turing machine The CSG may have more than one symbol on the left hand
ID of turing machine is represented as side of their production rules.
X1 X2......Xi-1 q Xi Xi+1.....Xn The number symbols on left side must not exceed the
i) where q is the state of turing machine. number of symbols on right side
ii) The tape head is scanning the ith symbol from left The rule of the form A is not allowed unless
iii) X1 X2....Xn is the portion of the tape between the A is a start symbol
leftmost and the rightmost non blank
PART - A
4. Define the classes P and NP.
1. What do you mean by Universal TM.
P consists of all those languages or problems accepted by
Universal TM is a type of TM which is capable of doing
some TM that runs in some polynomial amount of time, as a
anything that any other TM can do. That means universal TM is a
function of its input length.
TM that imitates any TM.
NP is the class of languages or problems that are accepted
by some nondeterministic TMs with a polynomial bound on time
2. When a problem is said to be decidable and give an
taken along any sequence of nondeterministic choices.
example of undecidable problem?
A problem whose language is recursive is said to be
5. Define NP complete problem.
decidable. Otherwise the problem is undecidable . i.e there is no
A language is NP-complete if the following statements are
algorithm that takes as input an instance of the problem and
true.(i)L is in NP (ii)For every language L in NP there is a
determines whether the answer to that instance is yes or no. Eg.
polynomial time reduction of L to L.
Halting problem