ITT307 - Ktu Qbank

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

INFORMATION TECHNOLOGY

CODE COURSE NAME CATEGORY L T P CREDIT


FORMAL LANGUAGES AND
ITT307 PCC 3 1 0 4
AUTOMATA THEORY

Preamble: The course is considered as a core subject in the area of computer science. This
course introduces the formal languages and automata theory which includes various formal
languages, strings, finite automaton, grammar, regular expression, pushdown automaton;
Linear bounded automata and variants of Turing machine. Not only do they form basic
models of computation, they are also the foundation of many branches of computer science,
e.g. compilers, NLP, Program verification, Complexity theory. The properties of various
automata will be studied and various rigorous techniques for analyzing and comparing them
will be discussed, by using both formalism and examples.

Prerequisite: The students are expected to have basic knowledge in Set theory, Functions
and Relations.

Course Outcomes: After the completion of the course the student will be able to

CO Bloom’s
Course Outcomes (CO)
No. Category Level
CO Understand the formal language hierarchy and its Level 2:
1 applications in the field of computation. Understand
CO Construct automaton for any given regular language and
Level 3: Apply
2 find its equivalent regular expressions.
CO Design a context free grammar for any given context free
Level 3: Apply
3 language.
CO Construct Turing machines and understand their
Level 3: Apply
4 capability.
CO Analyze P,NP class and various undecidable problems.
Level 4: Analyze
5
Mapping of course outcomes with program outcomes:

PO PO PO PO PO PO PO PO PO PO PO PO
1 2 3 4 5 6 7 8 9 10 11 12
CO 3 2 2
1
CO 3 1 3
2
CO 1 3 2 1
3
CO 3 2 1 2
4
CO 3 3 3
5
3/2/1: High/Medium/Low
INFORMATION TECHNOLOGY

Assessment Pattern

Continuous Assessment
End Semester
Bloom’s Category Tests
Examination
1 2
BL 1: Remember 10 10 20
BL 2: Understand 30 30 60
BL 3: Apply 10 5 15
BL 4: Analyse 5 5
BL 5: Evaluate
BL 6: Create

Mark distribution

Total ESE
CIE ESE
Marks Duration

150 50 100 3 hours

Continuous Internal Evaluation Pattern:

Attendance : 10 marks
Continuous Assessment Test (2 numbers) : 25 marks
Assignment/Quiz/Course project : 15 marks

End Semester Examination Pattern: There will be two parts; Part A and Part B. Part A
contains 10 questions with 2 questions from each module, having 3 marks for each question.
Students should answer all questions. Part B contains 2 questions from each module of which
student should answer any one. Each question can have maximum 2 sub-divisions and carry
14 marks.

Course Level Assessment Questions

Course Outcome 1 (CO1):

1. Define grammar. How can we represent grammar in terms of an expression?


2. Check whether the given grammar is ambiguous or not.
3. Give a brief note on chomsky hierarchy for language classification

Course Outcome 2 (CO2):

1. Construct a DFA for the given regular language.


2. Consider the language for the NFA, strings ending with ‘ab’ over Σ = {a , b}. Convert
the NFA into equivalent DFA.
3. Prove that the following languages are regular or not (Ex: L = {an | n >= 0}
INFORMATION TECHNOLOGY

Course Outcome 3(CO3):

1. Construct context free grammar for the regular expression:

L = (a + b)* (aa + bb) (a+b)*

2. Which Normal form representation of CFG will you prefer in converting CFG to
NPDA? Why?
3. Can we construct a deterministic PDA for the language wwR . Justify your answer and
also design a NPDA machine for the above language.

Course Outcome 4 (CO4):

1. Write a note on recursively enumerable language.


2. “ For every language in the universe, there exists a TM”. Justify your answer with a
suitable example.
3. Discuss briefly about the halting problem of TM.

Course Outcome 5 (CO5):

1. Discuss on tractable problems.


2. Give a brief note on Universal Turing Machine(UTM).
3. Compare and contrast decidable problems and undecidable problems.

Model Question paper

Course Code: ITT307

Course Name: Formal Languages and Automata Theory

Max.Marks:100 Duration: 3 Hours

PART A

(10*3=30)
(Each Question carries 3 Marks)

1. Explain a) Language of DFA b) Extended transition function.


2. Design a DFA, which accepts the strings with even number of 0’s and even number of
1’s over {0,1}.
3. Construct the finite automaton equivalent to the regular expression i) R.S , ii) R*.
4. Design a Moore machine that takes a set of all strings over {a,b} as input and prints 1
as output for every occurrence of baa as a substring.
5. If a DFA D constructed from NFA N by the subset construction, then L(D) = L(N).
Prove it.
INFORMATION TECHNOLOGY

6. Design ε -NFA for the set of strings consisting of zero or more a’s followed by zero or
more b’s followed by zero or more c’s. Try to use ε transitions to simplify your
design.
7. Show that the language L={ 0 i 1 i | i is an integer and i>=1} is not regular using
Pumping Lemma.
8. Explain Closure properties of CFL.
9. Define CFG. Give CFG generating the set of palindromes over alphabet {a,b}.
10. Define PushDown Automata.

PART B (5*14=70)

11. State and prove the equivalence theorem between DFA and NFA.

OR

12. Construct a Moore machine that takes a set of all strings over { a, b } as input and
prints ‘1’ as output for every occurrence of ‘ ab ’ as a substring.

13. Convert the following NFA- ∈ to its equivalent DFA.

OR

14. State and prove myhill nerode theorem. Also minimize a dfa for any regular language.

15. Obtain CFG for the language " Set of all palindromes". Discuss it.

OR

16. Can we construct a deterministic PDA for the language wwR . Justify your answer.
Also design a NPDA machine for the above language.

17. Simplify the following grammar:

S->AB / a

A-> BC / b

B-> aC / B

C->aB/ C

OR
INFORMATION TECHNOLOGY

18. Discuss about Turing Machine Halting Problem with a suitable example.

19. With a neat sketch explain about Universal Turing Machine.

OR

20. Design a Turing Machine, which can compute the second complement of a given
binary number.

Syllabus

Module 1 – Finite automata ( 9 hours )


Family of formal languages - Finite automata – Type 3 formalism - Deterministic finite
automata (DFA) – Language acceptance - Non-deterministic finite automata (NFA) –
Finite automata with epsilon transitions – Applications - Finite automata with output -
NFA to DFA conversions - Equivalence theorem between DFA and NFA -
Minimization of DFA.

Module 2 - Regular languages & Regular expressions ( 10 hours )


Regular languages and Regular expressions: Myhill-Nerode theorem - Conversion of
DFA’s to Regular expressions by eliminating states - Conversion of Regular
expressions to Automata – Closure properties of Regular languages – Pumping lemma
for Regular languages - Applications of the Pumping lemma.

Module 3 – Type 2 formalism & Push Down Automata ( 10 hours )


Type 2 formalism: Context free grammars (CFG) and languages – Parse trees –
Ambiguity in grammars – Pushdown automata (PDA) – Acceptance by final state and
empty stack – Equivalence of PDA’s and CFG’s – Deterministic push down automata
(DPDA) – Simplification of CFG - Pumping lemma for CFG’s – Chomsky normal form
– Greibach normal form.

Module 4 – Type 1 formalism( 9 hours)


Closure properties of context free languages – Decision properties of CFL’s - Type 1
formalism: Context sensitive grammar – Linear bounded automata .Type 0 formalism:
Turing machine (TM) - Recursively enumerable language (REL) – Multitape TM –
Non-deterministic TM – Properties of TM.

Module 5 - Undecidability and Universal Turing Machine (7 hours)


Halting problem of TM – Recursive languages - Unrestricted grammars - Universal
Turing Machine (UTM) – Tractability - Undecidable problems - Introduction to P and
NP class problems.
INFORMATION TECHNOLOGY

Text Books

1. J.E.Hopcroft, R.Motwani and J.D.Ullman , "Introduction to Automata Theory


Languages and computation",3rd edition Pearson, 2008.
2. Michael Sipser, “Introduction to the Theory of Computation”, 3rd edition (or 1st
edition),Course Technology Inc, 2013.

Reference Books

1. Harry R. Lewis, Christos H. Papadimitriou, “ Elements of the Theory of Computation”,


Prentice-hall Publisher, 2nd edition, 1998.
2. K.Krithivasan and R.Rama; Introduction to Formal Languages, Automata Theory and
Computation ,Pearson Education, 2009.
3. John C . Martin, “Introduction to Languages and the Theory of Computation”,
McGraw-Hill Publisher, 4th edition, 2010.
4. Dexter C. Kozen, “Automata and Computability”, Springer.1997.

Course Contents and Lecture Schedule

No Topic No. of Lectures


1 Finite automata ( 9 hours )
1.1 Family of formal languages 1
1.2 Deterministic finite automata 2
1.3 Non-deterministic finite automata 2
1.4 Finite automata with epsilon transitions 1
1.5 Finite automata with output 1
1.6 Equivalence between DFA and NFA 1
1.7 Minimization of DFA 1
2 Regular languages & Regular expressions ( 10 hours )
2.1 Regular languages 1
2.2 Regular expressions 1
2.3 Myhill-Nerode theorem 1
2.4 Conversion of DFA’s to Regular expressions by state 2
elimination
2.5 Conversion of Regular expressions to Automata 1
2.6 Closure properties of Regular languages 1
2.7 Pumping lemma for Regular languages 2
2.8 Applications of the Pumping lemma. 1
3 Type 2 formalism & Push Down Automata ( 10 hours )
3.1 Context free grammars 1
3.2 Ambiguity in grammars 1
3.3 Push down automata(PDA) 2
3.4 String Acceptance by final state and empty stack 1
3.5 Equivalence of PDA’s and CFG’s 1
3.6 Deterministic push down automata (DPDA) 1
INFORMATION TECHNOLOGY

3.7 Simplification of CFG 1


3.8 Pumping lemma for CFG’s 1
3.9 CNF and GNF 1
4 Type 1 formalism( 9 hours)
4.1 Closure properties of context free languages 1
4.2 Context sensitive grammar 1
4.3 Linear bounded automata 1
4.4 Turing machine 2
4.5 Recursively enumerable languages , Properties 1
4.6 Non-deterministic TM 2
4.7 Properties of TM 1

5 Undecidability and Universal Turing Machine (7 hours)


5.1 Halting problem of TM 1
5.2 Recursive languages 1
5.3 Unrestricted grammars 1
5.4 Universal Turing machine 1
5.5 Tractability,Undecidable problems 1
5.6 P, NP class problems 2

*********

You might also like