Vous êtes sur la page 1sur 23

MLR Institute of Technology

Dundigal, Hyderabad -500 043


COMPUTER SCIENCE AND ENGINEERING

COURSE DESCRIPTION FORM

Course Title THEORY OF COMPUTATION


Course Code A10512
Regulation R13 – JNTUH
Course Structure Lectures Tutorials Practicals Credits
5 1 - 4
Course Coordinator Mr G Kiran Kumar Professor,
Mrs N.Prameela Asst Professor
Mr Amarendra reddy Asst Professor,
Team of Instructors

I. COURSE OVERVIEW:

Formal languages and automata theory deals with the concepts of automata, formal languages, grammar,
computability and decidability. The reasons to study Formal Languages and Automata Theory are Automata
Theory provides a simple, elegant view of the complex machine that we call a computer. Automata Theory
possesses a high degree of permanence and stability, in contrast with the ever-changing paradigms of the
technology, development, and management of computer systems. Further, parts of the Automata theory
have direct bearing on practice, such as Automata on circuit design, compiler design, and search
algorithms; Formal Languages and Grammars on compiler design; and Complexity on cryptography and
optimization problems in manufacturing, business, and management. Last, but not least, research-oriented
students will make good use of the Automata theory studied in this course.

II. PREREQUISITES:

Level Credits Periods / Week Prerequisites


Discrete mathematics, data
UG 4 5
structures and algorithms

III. COURSE ASSESSMENT METHODS:


Marks Distribution:
Session Marks University Total
End Marks
Exam Marks
There shall be 2 mid term examinations. Each midterm examination 75 100
consists of subjective type and Objective type tests.

The subjective test is for 10 marks, with duration of 1 hour.


Subjective test of each semester shall contain 4 questions; the
student has to answer 2 questions, each carrying 5 marks.
The objective type test is for 10 marks with duration of 20 minutes.
It consists of 10 Multiple choice and 10 objective type questions, the
student has to answer all the questions and each carries half mark.

1|Page
First mid term examination shall be conducted for the first two and half
units of syllabus and second midterm examination shall be conducted for
the remaining portion.

Five marks are earmarked for assignments. There shall be two


assignments in every theory course. Marks shall considering the average
of two assignments in each course.

IV. EVALUATION SCHEME:

S. No Component Duration Marks


1 I Mid Examination 90 minutes 20
2 I Assignment - 05
3 II Mid Examination 90 minutes 20
4 II Assignment - 05
5 External Examination 3 hours 75

V.COURSE OUTCOMES

COURSE OBJECTIVES COURSE OUTCOMES BLOOMS


LEVEL
I. To give an overview of the theoretical a)To use basic concepts of formal languages of finite BL 1&2

foundations of computer science from automata techniques


the perspective of formal languages

II.To illustrate finite state machines to b)To Design Finite Automata‘s for different Regular BL 3,4&5
Expressions and Languages
solve problems in computing

III.To explains the hierarchy of problems c)To Construct context free grammar for various BL 6

arising in the computer sciences. languages

VI.To familiarize Regular grammars, d)To solve various problems of applying normal form BL6
techniques, push down automata and Turing
context frees grammar.
Machines

e)To participate in GATE, PGECET and other


competitive examinations
IV.HOW PROGRAM OUTCOMES ARE ASSESSED

Leve
Program Outcomes l Proficiency
assessed by
a H Lectures,
An ability to apply the knowledge of mathematics, Computing, Science and engineering to
solve Computer Science and Engineering problems.
Assgnments,

An ability to design and conduct engineering experiments, as well as to analyze and


b interpret data N --

An ability to design and construct a hardware and software system


c H Lectures,

Graduates will demonstrate an ability to visualize and work on laboratory and Multi
d N --

An ability to demonstrate skills to use the techniques, modern engineering Tools,


e Software and equipments necessary to analyze computer engineering Problems N Lectures,
f An understanding of professional, social and ethical responsibility N Assignments,
Exercises
An ability to recognize the global issues like green initiatives and alternate energy sources
and to take technology to villages and to recognize the rural requirements.
g N --
The broad education necessary to understand the impact of engineering solutions in a global,
economic, environmental, and societal context.
h N --

Graduate will develop confidence for self education and acquire new knowledge in the
computing discipline and ability and practice for Multi-disciplinary tasks as a member within
i the teams S Assignments,
Exercises

j
To communicate effectively N --
An ability to use the techniques, skills and modern engineering tools necessary for
k Engineering practice H Assignments,
Exercises

Graduates are able to participate and succeed in competitive examination like GRE, GATE,
TOEFL, GMAT etc.
l N
N

The use of current application software and the design and use of operating systems and the
analysis, design, testing and documentation of computer programs for the use in Computer
Science and engineering technologies.
m
n An ability to setup an enterprise N
N= None S= Supportive H = Highly Related

VII.SYLLABUS:

UNIT - I
FINITE AUTOMATA (FA): Introduction, Deterministic Finite Automata (DFA) -Formal definition, simpler notations (state
transition diagram, transition table), language of a DFA. Nondeterministic Finite Automata (NFA)- Definition of NFA, language
of an NFA, Equivalence of Deterministic and Nondeterministic Finite Automata, Applications of Finite Automata, Finite
Automata with Epsilon Transitions, Eliminating Epsilon transitions, Minimization of Deterministic Finite Automata, Finite
automata with output (Moore and Mealy machines) and Inter conversion .
UNIT - II
REGULAR EXPRESSIONS (RE): Introduction, Identities of Regular Expressions, Finite Automata and Regular
Expressions- Converting from DFA‘s to Regular Expressions, Converting Regular Expressions to Automata,
applications of Regular Expressions. REGULAR GRAMMARS: Definition, regular grammars and FA, FA for
regular grammar, Regular grammar for FA. Proving languages to be non-regular -Pumping lemma, applications,
Closure properties of regular languages.
UNIT - III
CONTEXT FREE GRAMMER (CFG): Derivation Trees, Sentential Forms, Rightmost and Leftmost derivations
of Strings. Ambiguity in CFG‘s, Minimization of CFG‘s, CNF, GNF, Pumping Lemma for CFL‘s, Enumeration of
Properties of CFL ( Proof‘s omitted ).
UNIT – IV
PUSHDOWN AUTOMATA: Definition, Model, Acceptance of CFL, Acceptance by Final State and Acceptance by
Empty stack and its Equivalence, Equivalence of CFG and PDA. TURING MACHINES (TM): Formal definition
and behaviour, Languages of a TM, TM as accepters, and TM as a computer of integer functions, Types of TMs.
UNIT V
RECURSIVE AND RECURSIVELY ENUMERABLE LANGUAGES (REL): Properties of recursive and
recursively enumerable languages, Universal Turing machine, The Halting problem, Undecidable problems about
TMs. Context sensitive language and linear bounded automata (LBA), Chomsky hierarchy, Decidability, Post's
correspondence problem (PCP), undecidability of PCP.
TEXT BOOKS: 1. John E. Hopcroft, Rajeev Motwani, Jeffrey D. Ullman (2007), Introduction to Automata Theory
Languages andComputation, 3rdedition, Pearson Education, India.
REFERENCE BOOKS: 1. K. L. P Mishra, N. Chandrashekaran (2003), Theory of Computer Science-Automata
Languages and Computation, 2nd edition, Prentice Hall of India, India.
VIII. COURSE PLAN:
The course plan is meant as a guideline. There may probably be changes.

Lecture Learning Objectives Topics to be covered Reference Blooms Level


No.
1-2 Understand Finite state Finite state machine, definitions, finite T1:2.1 -2.2
machine automaton model, acceptance of strings, R1: 2.2 – 2.3 BL-1
and languages
3–4 Illustrate Deterministic Deterministic finite automaton. T1:2.2 BL-2
finite automaton R1: 2.4
5 -6 Illustrate Non Non deterministic finite automaton T1:2.3
deterministic finite R1: 2.5 BL-2
automaton
7-8 Illustrate Transition Transition diagrams and Language T1:2.2 BL-2
diagrams recognizers R1: 2.2 -2.3
9 - 10 Illustrate Non Finite Automata : Non deterministic finite T1:2.4 BL-2
deterministic finite automaton with ε transitions - Significance, R1: 2.7
automaton with ε acceptance of languages.
transitions
11 Illustrate NFA with ε to Conversions and Equivalence : T1:2.4 BL-2
NFA conversions Equivalence between NFA with and R1: 2.8
without ε transitions
12 - 13 Illustrate NFA to DFA NFA to DFA conversion T1:2.3
conversion R1: 2.6.1 BL-2
14 - 15 Understand Minimization of Finite state machine T1:3.4
Minimization of Finite R1: 2.6.2 , 2.13 BL-2
state machine
16 Illustrate Equivalence Equivalence between two Finite state T1:3.4
between two Finite state machine’s R1: 2.12 BL-2
machine’s
17 - 18 Illustrate Finite Finite Automata with output- Moore and T1:2.7
Automata with output Melay machines R1: 2.10 BL-2
machines.
19 Understand Regular Regular Languages : Regular sets, regular T1:2.5 BL-2
languages expressions, identity rules, R1: 3.2 -3.3
20 - 21 Illustrate Constructing Constructing finite Automata for a given T1:2.5 BL-3
Finite Automata for given regular expressions R1: 3.4
RE
22 Illustrate Conversion of Conversion of Finite Automata to Regular T1:2.5
finite automaton to expressions. R1: 3.4 BL-6
Regular expressions
23 Apply Pumping Pumping lemma of regular sets T1:3.1 BL-3
lemma R1: 3.6
24 Understand blClosure Closure properties of regular sets (proofs T1:3.2
properties not required). R1:3.5.2 BL-2
25 Understand Regular Grammar Formalism : Regular T1:9.1 BL-2
Grammars grammars-right linear and left linear R1: 5.11.4
Lecture Learning Objectives Topics to be covered Reference Blooms Level
No.
grammars
26 – 27 Illustrate Equivalence of Equivalence between regular linear T1:9.1
regular linear grammar & grammar and Finite Automata, inter R1: 5.12 – 5.13 BL-2
Finite Automata conversion
28 Understand Context Context free grammar, derivation trees T1:4.2 BL-2
free
grammar R1: 5.6 , 5.7
29 Illustrate Derivation of Sentential forms, Right most and leftmost T1:4.3
strings derivation of strings R1: 5.5 BL-2
30 Understand Ambiguity Context Free Grammars: Ambiguity in T1:4.3 BL-2
in context free grammars context free grammars. R1: 5.8
31 Understand Minimization of Context Free Grammars. T1:4.4
Minimizatio BL-2
n R1: 5.9
32 Understand Chomsky Chomsky normal form T1:4.5
normal form R1: 5.10.1 BL-2
33 Understand Greiback Greiback normal form T1:4.6 BL-2
normal form R1: 5.10.2
34 Apply Pumping Pumping Lemma for Context Free T1:6.1
Lemma Languages. R1: 5.14 BL-3
35 UnderstandContext Free Enumeration of properties of CFL (proofs T1:6.2 BL-2
Language properties omitted). R1: 6.8
36 -40 Understand Push down Push Down Automata Push down T1:5.2
automata automata, definition, model, acceptance of R1: 6.2 – 6.3
CFL. Acceptance by final state and T1:5.2 BL-2
acceptance by empty state and its R1: 6.5
equivalence.
40 - 41 Understand Equivalence of CFL and PDA, inter T1:5.3
Equivalence BL-2
s conversion. (Proofs not required). R1: 6.7
42 Illustrate DCFL,DPDA Introduction to DCFL and DPDA T1:10.1 – 10.2
R1: 6.6 BL-2
43- 46 Understand Turing Turing Machine : Turing Machine, T1:7.2
machines definition, Model, design of TM R1: 4.2 – 4.3
T1:7.2 BL-2
R1: 4.4 – 4.5

47 -49 Illustrate Computable Computable functions T1:7.3 BL-2


functions R1: 4.6
50 Understand Recursively Recursively enumerable languages. T1:7.3 , 8.2 BL-2
enumerable languages R1: 4.15
51 Understand Cchurch’s Church’s hypothesis, counter machine T1:7.6
hypothesis R1: 4.17 BL-2
52 IllustrateTypes of Turing Types of Turing machines (proofs not T1:7.5
machines required) R1: 4.8 – 4.12 BL-2
53 - 54 Understand Chomsky Computability Theory : Chomsky T1:9.1 – 9.4
hierarchy hierarchy of languages, Linear bounded R1: 5.11
automata and context sensitive languages T1:9.3 BL-2
R1: 4.20 , 5.11.2

55 - 56 Illustrate LR(0) LR(0) grammar, decidability of, problems T1:10.6 BL-2


R1: 7.5.1
57 Understand Universal Universal Turing Machine T1:8.3 BL-2
Turing Machine R1: 4.9

Undecidability of posts. Correspondence T1:8.5


58 - 60 Understand PCP, P, NP, problem,Turing reducibility, Definition of R1: 4.18 BL-2
NP complete problems P and NP problems,NP complete and NP T1:13.1
hard problems. T1:13.2
X. MAPPING COURSE OBJECTIVES LEADING TO THE ACHIEVEMENT OF
COURSE OUTCOMES:

Course Outcomes
Course Objectives
a b c d e

H H S S H
I

S S H S S
II

S H
III

S H S
VI

S= Supportive H = Highly Related

Program Outcomes
Course Objectives a b c d e f g h i j k l m n

1 s H S H

2 S H H S

3 H S S H H
H
4 S H S

Prepared by: Mr G Kiran Kumar Professor,


Mr Amarendra reddy Asst Professor,
Mrs N.Prameela Asst Professor

OBJECTIVE QUESTIONS:
UNIT-1:

1 .Which of the following string has length 0 ? d


a) s b) a c) a b c d) є
2 .If є= {a} then є*= d
a) { є , a , a b) { є } c) { a , a a d) { , a ,
a } ----- aa , - -
- } - }
3 .We formally denote a finite automat on by ( Q , є, Δ , q0 , F )
Where Δ is the transition function mapping from Q X є to
a) s b) a c) a b c d) є
4. In transition diagrams a state pointed by an arrow represents
the state .
a) final or start b)final c) start
d) interior

5 .NFA stands for


a) Non b) Non c) Non d) Non
determini determini determini determini
stic finite stic finite stic finite stic finite
automato analysis authoriza acceptan
n tion ce
6 .Let maximum number of states in a DFA =64. Then its equivalent
NFA has states.
a) 2 b) 8 c) 4 d) 6
7. |є| =
a) 1 b) 2 c) 0 d) infinity
8 Application of Finite automata is
a) Scanner b) Lexical c) semantic d) parser
analyzer analyzer
9. An automation is a device
a) cognitive b) generativ c) acceptor d) can’t say
e
10. In transition diagrams a state encircled by another represents
state .
a) final or b) final c) start d) interior
start

UNIT-2:
1. In mo or e machine shows the out put alphabet
a)  b) Δ c) Q d) λ
2. 3. A melay machine is a tuple.
a) 4 b) 7 c) 6 d) 5
4. Any given transition graphs has an equivalent
a) DFA b) NFA c) RE d) DFA , N
FA & RE
5. The DFA start state =
a) Closure b) closure c) NFA d) NFA
(NFA (NFA start final
final start state state
state) state)
6. In a moore machine λ is a mapping from to
a) Q , є
b) є, Q
c) Δ , Q
d) Q , Δ
7. The smallest FA which accepted the language L={x| length X is divisible by 3} has
a) 2 States b) 3 States c) 4 States d) 5 States
8. Given an arbitrary NFA with N States ,the maximum number of
states In an equivalent minimized DFA is at least

a) N2 b)N c) N! d)2N
9.But S donate the set of seven bit binary strings in which the first
,the fourth ,and the last bits are 1, the number of strings in S that
are accepted by M is
a) 1 b)2 c)5 d)7
10. Can a DFA simulate NFA?
a) DFA b)NFA c)mealy
d)moore

UNIT-3:
1. In case of regular sets the question is ‘ L1 subset or equal to L2? ’
is
a) Decidabl b) Cant say c) Un d) trivially
e decidable decidable
2. Let r and s are languages R and c) R +
regular S. Then (rs) a) R * d) R U S
expressions denote
denoting the b) R S
3. Let r , s , t are regular expressions . Φ * =
a) Φ b) { Φ } c) { ε } d) ε
4. Consider the following automata as shown in figure 14 for the
above NFA regular
Expression is center line Figure 14
a) 11 * b) 1* c) 1 d) 01*
5. ’The regular sets are closed under union’ is
a) True b) True or c) False d) can‘t say
False
6. L= {an bn an | n = 1 , 2 , 3, - - - - } is an example of a
language that is
a) not also not c) context ent is not
context CF free and CF
free and whose
b) not d) context
complem complem
context free
ent is free
7. Let r, s, t are regular expressions. (ε+ r)* =
a) r * b) ε r c) ε d) r
8. 1 + 01 =
a) ε + 0 b) ( ε + 0 ) c) 1 01 d) 1 ( ε + 0
1 )
9. ‘The regular sets are
b) closed
True under kleene closure’ is d) False
a) can’ t say c) True or
False
10. Let L1 be 0*10 * and L2 be 10*1 The quotient of L1 and L2 is
a) empty b) 1 c) 10* d) 0 *

UNIT-4:

1.The left linear grammar S → S10/ 0 generate


a) 010 * b) 010 c) 0(10)* d) 0*10
2 .A grammar is b) generativ c) cognitive
a device e
a) acceptor d) can’t say
3. Choose the wrong statement
a) Any b) Some c) So me d) All
regular non regular language
language regular language s can be
has an languges s can be generate
equivale Cant be simulate d by
nt CFG generate d by an CFG
d by FSM
CFG
4. Choose the correct statement
a) Some b) All c) Some d) Any
non language regular regular
regular s can be language language
language generate s can’t has an
s can be d by be equivale
generate CFG simulate nt CFG
d by d by an
CFG FS M
5. Regular grammar is a subset of grammar .
a) Type 0 b) Type 0, 1 c) Type 2 d) Type 1
&2
6. 18. The following CFG S → aS | bS | a | b Is not equivalent to
the regular
expression
a) ( a + b ) + b) ( a *+ b* c) ( a + b ) d) ( a + b ) (
)* * ( a+ b ) a+ b ) *
7. Any string of terminals that can be generated by the following
CFG is
S → XY , X → ax | b X | a , Y → Ya | Yb| a
a) has at b) has at c) has no
least one least two consecut
b a ’s ive a ’ s should
or b ’ s end in a ’
a’
8. The language 0 (1 0) * is generated by the left linear grammar
a) S → 0 1 0A / Є b) S → c) S → S
A,A → 10S , S 1 0, S
→ 0 → 0
d) S → 0
A,A →
A10
9.

For the DFA the equivalent regular grammar


a) AOA|1B|1 , B0B|1B|1|0
b) AA0|A1|0|1, BBO|B1|O|1
c) AOA|1B, BOB|1B
d) AAO|A1, BBO|B1

10. 12. ---- Denotes all strings of 0,s and 1, s.


a) 0 1 b) ( 0 + 1) * c) ( 0 + 1) d) 0 * 1

UNIT-5:

1. A grammar G is known to have GNF representation then


a) G can’t b) G may right d) We can
be be linear write G
written written as left
c) We can
left or as left linear or
write G
right linear or right
as left
linear linear
linear
2. . Pumping lemma for CFL : Let L be any CFL .Then there is a
constant n depending only on L , such that if z is in L and | z|>= n
then we may write
z= u v w x y such that 1) | vx|>= 1 2) | vwx|<= n 3) for all i>=0
---------is in L
a) u vi w xi
y

b) vi xi
c) u vi w xi

d) u vi w xi
3. A CFL for which every CFG is ambiguous is said to be an
ambiguous----- CFL.
a) inherentl b) inequal c) implicitl d) Explicitl
y y y

4. The following CFG S aB |bA,A b| aS |bAA ,Bb| bS |


aBB
Generates strings of terminals that have
a) equal b) even c) odd d) odd
number number number number
of a’s of a’s of a’s of a’s
and b’s and even and even and odd
number number number
of b’s of a’s of b’s
5. Pumping lemma for CFL : Let L be any CFL .Then there is a
constant n depending only on L ,such that if z is in
L and | z|>= n then we may write z= u v w x y such that
1) | vx|>= 1
2) | vwx| is----------
3) for all i>=0 u vi w xi y is in L
a) <n b) >=n c) <=n d) >n
6. Context free languages are closed under ”union” is
a) can’t say b) False c) True d) True or
False
7. A CFG is ambiguous if some word has left most derivations
a) < 1 b) 1 c) exactly 5 d) >1
8. Let two kinds of grammars be defined as follows
i) Aa, ABC
ii) A aa
a) ii b) i denote c) i denote d) ii
denotes CNF and CNF and denotes
CNF and ii does ii CNF and
i does n’t n’t denotes i denotes
denote denote GNF GNF
GNF GNF
9. Context free languages are closed under “Concatenation” is
a) False b) True c) True or d) Can’t
False say
10.From the below grammar the useless the variables are
SAB|CA, BBC |AB , Aa, CaB|b
a) A,B b) A,C c) B d) A
10. 12 TUTORIAL QUESTIONS:
Group - A (Short Answer Questions)

S. No. Questions Blooms Course


Taxonomy Outcomes
Level
UNIT - I
1. Explain transition diagram, transition table with example. Understand 1
2. Define transition function of DFA. Remember 2
3. Define ε –transitions. Remember 2
4. Construct a DFA to accept even number of 0’s. Apply 2
5. Define Klean closure. Remember 1
6. Construct a DFA to accept empty language. Apply 2
7. Explain power of an alphabet? Understand 1
8. Write transition diagram for DFA accepting string ending with 00. Apply 2
9. Write transition diagram for DFA to accept exactly one a. Apply 2
10. Define the language of NFA. Remember 2
UNIT – II
1. Define Regular Languages. Remember 1
2. Define Pumping Lemma. Remember 1
3. Write the applications of pumping lemma for regular languages. Apply 2
4. List any two applications of regular expression. Remember 2
5. Define Context Free Grammars. Remember 2
6. Write through an intermediate state whose number is not greater than Apply
K-1. 2
7. Write regular expression for denoting language containing empty Apply
string. 2
8. Differentiate LMD and RMD. Understand 2
9. Define ambiguous grammar. Remember 2
S. No. Questions Blooms Course
Taxonomy Outcomes
Level
10. State the following grammar is ambiguous. Remember 3
S-> AB|aaB
A->a / Aa
B->b
UNIT – III
1. Define Greibach normal form. Remember 1
2. Define nullable Variable. Remember 1
3. State the nullable variables from the following CFG. Remember

S ABCa | bD 2

A BC |b

B b|ε

C Đ|ε

D d
4. State the symbol is used to label the interior node of the parse tree. Remember 1
5. Define the language of PDA accepted by final state. Remember 4
6. List the steps to convert CFG to PDA. Remember 3
7. Define CNF. Remember 3
8. Define PDA. Remember 4
9. Define NPDA. Remember 4
10. Differentiate between deterministic and nondeterministic PDA. Understand 4
UNIT - IV
1. Write the Turing Machine model. Apply 4
2. Explain the moves in Turing Machine Understand 4
3. Define an ID of a Turing Machine? Remember 4
4. Define the Language of Turing Machine. Remember 4
5. List types of TM Remember 4
6. Define Turing Machine. Remember 4
7. Write the difference between Pushdown Automata and Turing Apply
Machine. 4
8. Explain Church’s Hypothesis. Understand 4
9. Define Context sensitive language. Remember 3
10. Define multi head Turing Machine, multi dimensional Turing Remember
Machine. 3
UNIT - V
1. Define Chomsky hierarchy of languages. Remember 1
2. Define Universal Turing Machine Remember 1
3. Define LR(0) grammars. Remember 5
4. Define decidability & undecidability Remember 5
5. Define P,NP problems. Remember 5
6. Define Rice ‘s theorem Remember 4
7. Give examples for Undecidable Problems Understand 5
8. Define Turing Machine halting problem. Remember 5
9. Define Turing Reducibility Remember 5
10. Define PCP. Remember 4

2. Group - II (Long Answer Questions)

S. No. Questions Blooms Course


Taxonomy Outcomes
Level
10 Marks Questions
UNIT - I
1. Define language over an alphabet with examples. Remember 2
Write a DFA to accept set of all strings ending with 010.
2. Give example for Minimize the DFA . Understand 2
3. Construct a Moore machine to accept the following language. Apply 3
L = { w |w mod 3 = 0} on ∑ = { 0,1,2}
4. Write any four differences between DFA and NFA Apply 2
5. Understand 2
Convert NFA with Ɛ to NFA with an example.
6. Construct NFA for (0 + 1)*(00 + 11)(0 + 1)* and Convert to DFA. Apply 2
7. Construct NFA for (0 +1)*(00 + 11)(0 + 1)* and Draw the transition Apply 2
table and transition diagram and example strings.
8. Illustrate given 2 FA‘s are equivalent or not with an example. Apply 2
9. Construct Mealy machine for (0 + 1)*(00 + 11) and convert to Moore Apply 3
machine.
10. Convert Moore machine to Mealy machine with an example. Understand 3
UNIT - II
1. Convert Regular Expression 01* + 1 to Finite Automata. Understand 1
2. Convert given Finite Automat to Regular Expression using Arden’s Understand 2
theorem.
3. Convert given Finite Automat to Regular Expression using standard Understand
method(RijK method) 2
4. Explain Identity rules . Give an example using the identity rules for Understand 1
the simplification.
Construct Regular grammar for the given Finite Automata. Apply 1
6. Use G be the grammar Apply
SaBbA 2
Aa aS bAA
Bb bS aBB
For the string aaabbabbba ,
Find
a. Leftmost Derivation.
b . Rightmost Derivation.
c. Derivation Tree.
7. Explain the properties, applications of Context Free Languages Understand 2
8. Construct right linear and left linear grammars for given Regular Apply 2
Expression.
9. Construct a Transition System M accepting L(G) for a given Apply 2
Regular Grammar G.
10. Discuss the properties of Context free Language. Explain the Understand 2
pumping lemma with an example.
UNIT – III
1. Write a short notes on Chomsky Normal Form and Griebach Normal Apply
Form. 2
2. Show that the following grammar is ambiguous with respect to the Understand
string aaabbabbba.

S aB | bA

A aS| bAA| a 3

B bS | aBB | b
3. Use the following grammar : Apply

S ABC | BbB

A aA | BaC|aaa

B bBb| a|D 3

C CA|AC

D ɸ
Eliminate ε-productions.
Eliminate any unit productions in the resulting grammar.
Eliminate any useless symbols in the resulting grammar.
Convert the resulting grammar into Chomsky Normal Form
4. Illustrate the construction of Griebach normal form with an example. Apply 3
5. Show that the following CFG ambiguous. Apply

S iCtS | iCtSeS | a 3

C b
6. Discuss the Pumping lemma for Context Free Languages concept Understand 3
with example {anbncn where n>0}
7. Write the procedure to convert CFG to PDA and also convert the Apply
following CFG to PDA. 3

S B| aAA

A aBB | a

B bBB|A

C a
8. Construct a PDA to accept the language L ={ anbn | n >= 1} Apply
by a final state. Draw the graphical representation of the PDA. 4
Also show the moves made by the PDA for the string aaabbb
9. Construct NPDA for L = { W WR /W ϵ ( 0 + 1)*} Apply
M = ({q1,q2},{0,1}.{R,B,G},δ,q1,R
1
10. Write the procedure to convert from the given PDA to a CFG. Apply
Convert the following example.
δ(q0,b,z0)={q0,zz0)
δ(q0, b, z)=(q0,zz) 3
δ(q0, ϵ ,z0)=(q0,ϵ)
δ(q0,a,z) = (q1,z)
δ(q1,b,z)=(q1,ϵ)
δ(q1,a,z0)=(q0,z0)
UNIT – IV
1. Define a Turing Machine. With a neat diagram explain the working Remember 4
of a Turing Machine.
2. Construct a Turing Machine which shift non block symbols 3 cells Apply
to the right. 4
3. Construct a Turing Machine to accept the following language. Apply
L = { 0n1n0n | n ≥1} 4
4. Construct a Turing Machine that accepts the language Apply
L = {0n1 n | n ≥1}. Give the transition diagram for the Turing 4
Machine obtained and also show the moves made by the
Turing machine for the string 000111.
5. Construct a Turing Machine to accept the language Apply
L= { w#wR | w ϵ ( a + b ) *}
4
6. Write short notes on Recursive and Recursively Enumerable Apply
languages? 4
7. Write the properties of recursive and recursively enumerable Apply
languages 4
8. Construct a Turing Machine to accept strings formed with 0 Apply 4
and 1 and having substring 000.
9. Construct a Turing Machine that accepts the language Apply
L = {1n2 n3n | n ≥1}. Give the transition diagram for the Turing 4
Machine obtained and also show the moves made by the
Turing machine for the string 111222333.
10. Construct a Turing Machine to implement Subtraction ( m-n ). Apply 4
UNIT – V
1. Explain the concept of undecidability problems about Turing Understand 5
Machine
2. Write a note on Modified PCP and Multi tape Turing machine. Apply 4
3. Explain individually classes P and NP Understand 4
4. Write a shot notes on post's correspondence problem Apply
and check the following is PCP or not.
I A B
1 11 111 5
2 100 001
3 111 11
5. Explain the Halting problem and Turing Reducibility. Understand 5
6. Write a short notes on universal Turing machine Apply 5
7. Write a short notes on Chomsky hierarchy. Apply 5
8. Write a short notes on Context sensitive language and linear Apply 3
bounded automata.
9. Write a short notes on NP complete , NP hard problems. Apply 4
10. Define LR(0) items. Find LR(0) for the following example. Remember

S’  Sc, S  SA / A, A aSb/ab 4
3. Group - III (Analytical Questions)
S. No. Questions Blooms Course
Taxonomy Outcomes
Level
PROBLEM SOLVING/ANALYTICAL/CRITICAL THINKING QUESTIONS
UNIT - I
1 Construct NFA for (0 + 1)*0(0 + 1)0(0 + 1)* and convert to DFA. Apply 2
2 Construct NFA for (0 + 1)*010(0 + 1)* and Convert to DFA. Apply 2
3 Construct NFA with Ɛ for 0*1*12* and Convert to NFA . Apply 2
4 Explain the steps for the minimization of given DFA with an Understand 2
example.
5 Construct Mealy Machine for Residue Modulo of 5 for the ternary Apply 2
number system and convert to Moore Machines.
UNIT - II
1 Convert Regular Expression (11 + 0)*(00 + 1)* to NFA with Ɛ. Understand 7
2 Convert Regular Expression (a + b)*(aa + bb)(a + b)* to DFA. Understand 7
3 Construct Regular Grammars for Finite Automata 0*(1(0 + 1))* . Apply 7
4 Construct Finite Automata for Apply 7

A0 a A1

A1 b A1

A1 a

A1 bA0
UNIT - III
1 Construct PDA for equal number of x’s and y’s Apply 10
2 Convert the following grammar into GNF Understand 9

A1 A2 A3

A2 A3 A1 /b

A3 A1 A2 /a
3 Construct NPDA for L = { W WR /W ϵ ( X + Y)*}
Apply 10
M = ({q1,q2},{x,y}.{R,B,G},δ,q1,R, ϕ}

4 Convert the following PDA to CFG Understand 11


δ(q0,0,z0)={q0,xz0)
δ(q0,0,x)=(q0,xx)
δ(q0,1,x)=(q1,ϵ)

δ(q1,1,x) = (q1,ϵ)

δ(q1,ϵ,x)=(q1,ϵ)

δ(q1,ϵ,z0)=(q1,ϵ)

UNIT - IV
1 Construct a Turing Machine that accepts the language Apply 12
L = {a2nbn| n ≥0}. Give the transition diagram for the
Turing Machine obtained.
2 Construct a Turing Machine that gives two’s compliment for the Apply 12
given binary representation.
3 Construct a Turing Machine to accept the following language. Apply 12
L = { wnxnynzn | n ≥1}
4 Construct a Turing Machine which shift non block symbols 2 cells Apply 12
to the right.
UNIT - V
1 Explain PCP and MPCP with examples. Understand 13
2 Explain Turing theorem ,Halting problems, Turing Reducibility. Understand 13
3 Construct LR(0) for Apply 5

S E

E E*B

E E+B

E id
4 Construct LR(0) for Apply 5

A aAa/B

B b
ASSIGNMENT QUESTIONS:
ASSIGNMENT - I

Blooms
Course
S. No. Question Taxonomy
Outcome
Level
UNIT – II
Explain Identity rules. Give an example using the identity rules for the
1
simplification
Remember 1
2 Construct Regular grammar for the given Finite Automata Apply 2
Convert given Finite Automat to Regular Expression using standard
3 method(RijK method) Understand 2
4 Convert Regular Expression ab* + b to Finite Automata. Understand 2
5 Convert given Finite Automat to Regular Expression using Arden’s theorem. Understand 2
Use G be the grammar

S aBbA
 
A a aS bAA B b bS aBB 3
6 For the string aaabbabbba , Apply
Find
a. Leftmost Derivation.
b . Rightmost Derivation.
c. Derivation Tree.
7 Convert Regular Expression (bb + a)*(aa + b)* to NFA with ε. Understand 2
8 Construct Regular Grammars for Finite Automata a*(b (a + b))* . Apply 2
Construct Finite Automata for

A0 a A1
9  Apply 2
A1 b A1

A1 a

A1 bA0.
10 Convert Regular Expression (a + b)*(aa + bb)(a + b)* to DFA. Understand 2
UNIT - III
1 Discuss the Pumping lemma for Context Free Languages concept with Understand 2
example.
2 Show that the following grammar is ambiguous with respect to the string Understand
aaabbabbba.

S aB | bA 3

A aS| bAA| a

B bS | aBB | b
3 Use the following grammar : Apply

S ABC | BbB,

A aA | BaC|aaa

B bBb| a|D

C CA|AC 3

D ε
Eliminate ε-productions.
Eliminate any unit productions in the resulting grammar.
Eliminate any useless symbols in the resulting grammar.
Convert the resulting grammar into Chomsky Normal Form (CNF).
4 Convert the following grammar to GNF Understand

A1 A2 A3 3

A2 A3 A1 /b

A3 A1 A2 /a
5 Write the procedure to convert CFG to PDA and also convert the following Apply
CFG to PDA. PDA.

S aABB | aAA 4

A aBB | a

B bBB | A

C a
6 Construct PDA for equal number of x’s and y’s Apply 4
7 Convert the following PDA to CFG Understand
δ(q0,0,z0)={q0,xz0)
δ(q0,0,x)=(q0,xx)
δ(q0,1,x)=(q1,ϵ)
4
δ(q1,1,x) = (q1,ϵ)

δ(q1,ϵ,x)=(q1,ϵ)

δ(q1,ϵ,z0)=(q1,)

8 Construct a PDA to accept the language L ={anbn | n >= 1} by a final Apply


state. Draw the graphical representation of the PDA. Also show the 4
moves made by the PDA for the string aaabbb
9 Construct NPDA for L = { W WR /W ϵ ( X + Y)*} Apply
M = ({q1,q2},{0,1}.{R,B,G},δ,q1,R, } 3
10 Show that the following CFG ambiguous. Understand

S iCtS | iCtSeS | a 3

C b
ASSIGNMENT - II

UNIT – IV
1 Construct a Turing Machine to accept the language Apply
L= { wwR | w € ( 0 + 1 ) *} 4
2 Construct a Turing Machine that accepts the language Apply
L = {anbn | n ≥1}. Give the transition diagram for the Turing 4
Machine obtained
3 Construct a Turing Machine which shift non block symbols 2 cells to the Apply 4
right.
4 Construct a Turing Machine that accepts the language L = {0n1n | n ≥1}. Apply 4
Give the transition diagram for the Turing Machine obtained and also
show the moves made by the Turing machine for the string 000111.
5 Define a Turing Machine. With a neat diagram explain the working of a Turing Remember 4
Machine.
6 Define Recursive and Recursively Enumerable languages? Write the properties Remember 4
of recursive and recursively enumerable languages.
7 Construct a Turing Machine that gives two’s compliment for the given Apply
binary representation. 4
8 Construct a Turing Machine that accepts the language Apply
L = {02n1n| n ≥0}. Give the transition diagram for the Turing 4
Machine obtained.
9 Construct a Turing Machine that accepts the language L = {1n2n3n | n ≥1}. Apply
Give the transition diagram for the Turing Machine obtained and also 4
show the moves made by the Turing machine for the string 111222333.
10 Construct a Turing Machine to implement Subtraction (m-n ). Apply 4
UNIT – V
1 Explain the concept of undecidability problems about Turing Machine Remember 1
2 Write a short notes on Context sensitive language and linear bounded Apply
automata 1
3 Explain individually classes P and NP Remember 5
4 Write a shot notes on post's correspondence problem Apply 5
5 Explain the Halting problem with an example. Write short notes on universal Apply
Turing machine. 5
6 Construct LR(0) for Apply

A aAa/B 5

B b
7 Write a short notes on Chomsky hierarchy Apply 1
8 Write a note on Modified PCP and Multi stack Turing machine. Apply 4
9 Write a short notes on NP complete , NP hard problems Apply 5
10 Construct LR(0) for Apply

S E

E E*B 5

E E+B

Vous aimerez peut-être aussi