Upload
saiteja1234
View
239
Download
3
Embed Size (px)
DESCRIPTION
dsdsdsdsdsds
Citation preview
COURSE OBJECTIVE:
The major objective of this course is to introduce the student to the concepts of theory of computation in computer science. The student should acquire insights into the relationship among formal languages, formal grammars, and automata. Applications such as designing compilers, software engineering, concurrent systems, etc. The properties of these models will be studied and various rigorous techniques for analyzing and comparing them will be discussed, by using both formalism and examples.From this course the student will able to Introduce concepts in automata theory and theory of computation Identify different formal language classes and their relationships
Design grammars and recognizers for different formal languages
Prove or disprove theorems in automata theory using its properties Determine the decidability and intractability of computational problems
SYLLABUS:
UNIT I :
Fundamentals : Strings, Alphabet, Language, Operations, Finite state machine, definitions, finite automaton model, acceptance of strings, and languages, deterministic finite automaton and non deterministic finite
automaton, transition diagrams and Language recognizers.
UNIT II :
Finite Automata : NFA with transitions - Significance, acceptance of languages. Conversions and Equivalence : Equivalence between NFA with and without transitions, NFA to DFA conversion, minimisation of FSM, equivalence between two FSMs, Finite Automata with output- Moore and Melay machines.
UNIT III :
Regular Languages : Regular sets, regular expressions, identity rules, Constructing finite Automata for a given regular expressions, Conversion of Finite Automata to Regular expressions. Pumping lemma of regular sets, closure properties of regular sets (proofs not required).
UNIT IV :
Grammar Formalism : Regular grammars-right linear and left linear grammars, equivalence between regular linear grammar and FA, inter conversion, Context free grammar, derivation trees, sentential forms.
Right most and leftmost derivation of strings.
UNIT V :
Context Free Grammars : Ambiguity in context free grammars. Minimisation of Context Free Grammars. Chomsky normal form, Greiback normal form, Pumping Lemma for Context Free Languages. Enumeration of properties of CFL (proofs omitted).
UNIT VI :
Push Down Automata : Push down automata, definition, model, acceptance of CFL, Acceptance by final state and acceptance by empty state and its equivalence. Equivalence of CFL and PDA, interconversion. (Proofs not required). Introduction to DCFL and DPDA.
UNIT VII :
Turing Machine : Turing Machine, definition, model, design of TM, Computable functions, recursively enumerable languages. Churchs hypothesis, counter machine, types of Turing machines (proofs not required).
UNIT VIII
Computability Theory : Chomsky hierarchy of languages, linear bounded automata and context sensitive language, LR(0) grammar, decidability of, problems, Universal Turing Machine, undecidability of posts. Correspondence problem, Turing reducibility, Definition of P and NP problems, NP complete and NP hard problems.
TEXT BOOKS :
1. Introduction to Automata Theory Languages and Computation. Hopcroft H.E. and Ullman J. D.
Pearson Education
2. Introduction to Theory of Computation Sipser 2nd edition Thomson
REFERENCES :
1. Introduction to Computer Theory, Daniel I.A. Cohen, John Wiley.
2. Introduction to languages and the Theory of Computation ,John C Martin, TMH
3. Elements of Theory of Computation, Lewis H.P. & Papadimition C.H. Pearson /PHI.
WEB REFERENCES:LECTURE PLAN OF FORMAL LANGUAGES AND AUTOMATA THEORY
Lecture NoTopic NameNo.of HoursTeaching Methodology
UNIT-1
1,2Fundamentals : Strings, Alphabet, Language, Operations,2Black Board and Chalk
3,4Finite state machine, definitions2Black Board and Chalk
5finite automaton model,1Black Board and Chalk
6acceptance of strings,1Black Board and Chalk
7acceptance of languages1Black Board and Chalk
8deterministic finite automaton1Black Board and Chalk
9Non deterministic finite automaton1Black Board and Chalk
10transition diagrams and Language recognizers1Black Board and Chalk
UNIT-2
11Finite Automata : NFA with transitions - Significance1Black Board and Chalk
12,13acceptance of languages.2Black Board and Chalk
14,15Conversions and Equivalence : Equivalence between NFA with and without transitions,2Black Board and Chalk
16,17NFA to DFA conversion2Black Board and Chalk
18,19Minimization of FSM2Black Board and Chalk
20equivalence between two FSMs1Black Board and Chalk
21Finite Automata with output- Moore and Mealy machines.
1Black Board and Chalk
UNIT-3
22Regular Languages : Regular sets, regular expressions
1Black Board and Chalk
23identity rules, Constructing finite Automata for a given regular expressions1Black Board and Chalk
24,25Conversion of Finite Automata to Regular expressions
2Black Board and Chalk
26Pumping lemma of regular sets2Black Board and Chalk
27,28closure properties of regular sets (proofs not required).
1Black Board and Chalk
UNIT-4
29Grammar Formalism : Regular grammars-right linear and left linear grammars2Black Board and Chalk
30,31equivalence between regular linear grammar and FA2Black Board and Chalk
32inter conversion1Black Board and Chalk
33.34Context free grammar2Black Board and Chalk
35,36derivation trees, sentential forms.
2Black Board and Chalk
37Right most and leftmost derivation of strings1Black Board and Chalk
UNIT-5
38,39Context Free Grammars : Ambiguity in context free grammars.2Black Board and Chalk
40Minimisation of Context Free Grammars1Black Board and Chalk
41,42Chomsky normal form, Greiback normal form2Black Board and Chalk
43Pumping Lemma for Context Free Languages1Black Board and Chalk
44Enumeration of properties of CFL (proofs omitted).
1Black Board and Chalk
UNIT-6
45,46Push Down Automata : Push down automata2Black Board and Chalk
47definition1Black Board and Chalk
48,49model, acceptance of CFL2Black Board and Chalk
50Acceptance by final state and acceptance by empty state and its equivalence.1Black Board and Chalk
51Equivalence of CFL and PDA1Black Board and Chalk
52interconversion. (Proofs not required1Black Board and Chalk
53Introduction to DCFL and DPDA.1Black Board and Chalk
UNIT -7
54Turing Machine : Turing Machine1Black Board and Chalk
55definition, model,1Black Board and Chalk
56design of TM1Black Board and Chalk
57Computable functions1Black Board and Chalk
58recursively enumerable languages1Black Board and Chalk
59Churchs hypothesis1Black Board and Chalk
60counter machine1Black Board and Chalk
UNIT-8
61Computability Theory : Chomsky hierarchy of languages1Black Board and Chalk
62linear bounded automata and context sensitive language1Black Board and Chalk
63LR(0) grammar, decidability of, problems1Black Board and Chalk
64Universal Turing Machine1Black Board and Chalk
65undecidability of posts,Correspondence problem, Turing reducibility1Black Board and Chalk
66Definition of P and NP problems1Black Board and Chalk
Text Books:
T1.Introduction to Automata theory ,Languages and computation, John E. Hopcroft, Jeffery D. UllmanT2.Thoery of Computaions K.L.P.Mishra and Chandrashekar.
UNIT-I:Fundamentals : Strings, Alphabet, Language, Operations, Finite state machine, definitions, finite automaton model, acceptance of strings, and languages, deterministic finite automaton and non deterministic finite automaton, transition diagrams and Language recognizers.
Learning Objectives
At the end of this unitstudents must be able to
Define strings, Alphabet, language
Demonstrate the functioning of Finite state machine
Define finite automata model
Demonstrate the acceptance of strings and languages
Differentiate between Deterministic and non deterministic finite automata
Lecture Schedule
Lecture NoTopic NameNo.of HoursTeaching Methodology
1,2Fundamentals : Strings, Alphabet, Language, Operations,2Black Board and Chalk
3,4Finite state machine, definitions2Black Board and Chalk
5finite automaton model,1Black Board and Chalk
6acceptance of strings,1Black Board and Chalk
7acceptance of languages1Black Board and Chalk
8deterministic finite automaton1Black Board and Chalk
9non deterministic finite automaton1Black Board and Chalk
10Transition diagrams and Language recognizers1Black Board and Chalk
DESCRIPTIVE / ASSIGNMENT QUESTIONS:1. Define String, Alphabet and Language.2. Prove that if (q, x) =(q, y), then (q, xz) =(q, yz) for all strings z in + .3. Construct DFA and NFA accepting the set of all strings with three consecutive0s.4. Find NFA which accepts the set of all strings over {0, 1} in which the number of occurances of 0 is divisible by 3 and the number of occurrences of 1 is divisible by 2.
5. Differentiate NFA and DFA.6. Give NFA accepting the set of all strings of 0s and 1s such that the 10th symbol from the right is a 17. Give DFA accepting the set of all strings with 3 consecutive 0s over the input {0, 1}.
8. Define Finite Automata. Give an example.
9. Construct a NFA accepting ab, ba and use it to find a deterministic automation accepting the same set.OBJECTIVE:UNIT II :
Finite Automata : NFA with transitions - Significance, acceptance of languages. Conversions and Equivalence : Equivalence between NFA with and without transitions, NFA to DFA conversion, minimisation of FSM, equivalence between two FSMs, Finite Automata with output- Moore and Melay machines.Learning Objectives
At the end of this unitstudents must be able to
Define strings, Alphabet, language
Demonstrate the functioning of Finite state machine
Define finite automata model
Demonstrate the acceptance of strings and languages
Differentiate between Deterministic and non deterministic finite automata
Lecture Schedule
Lecture NoTopic NameNo.of HoursTeaching Methodology
1Finite Automata : NFA with transitions - Significance1Black Board and Chalk
2,3acceptance of languages.2Black Board and Chalk
4,5Conversions and Equivalence : Equivalence between NFA with and without transitions,2Black Board and Chalk
6,7NFA to DFA conversion2Black Board and Chalk
8,9Minimization of FSM2Black Board and Chalk
10equivalence between two FSMs1Black Board and Chalk
11Finite Automata with output- Moore and Mealy machines.
1Black Board and Chalk
DESCRIPTIVE / ASSIGNMENT QUESTIONS:
1. M = ({q1, q2, q3} , {0, 1} , ,q1, {q3}) is a NFA where is given by (q1, 0) = {q2, q3} , (q1, 1) = {q1} (q2, 0) = {q1, q2} , (q2, 1) = (q3, 0) = {q2} , (q3, 1) = {q1, q2}
construct an equivalent DFA.
2. Write the steps in minimization of FA.
3. Construct a Moore machine to determine the residue mod 3 for each binary string treated as a binary integer. [8+8]4. Construct a Mealy machine which is equivalent to the Moore machine given in table.5. Construct the corresponding Mealy machine to the Moore machine described by the transition table given. [8+8]Present StaateNext StateOutput
a=0 a=1
q1q1q20
q2q1q30
q3q1q31
6.(a) Find NFA which accepts the set of all strings over {0, 1} in which the number of occurances of 0 is divisible by 3 and the number of occurances of 1 is divisible by 2.
(b) Draw the transition diagram for a NFA which accepts all strings with either two consecutive 0s or two consecutive 1s.
(c) Differentiate NFA and DFA. [6+6+4]7.(a) Construct a Mealy machine which is equivalent to the Moore machine given in table.(b) Construct the corresponding Mealy machine to the Moore machine described by the transition table given. [8+8]Present StaateNext StateOutput
a=0 a=1
q1q1q20
q2q1q30
q3q1q31
8.(a) If G=({S}, {0, 1}, {S0S1, S }, S), find L(G). (b) If G=({S}, {a}, {SSS}, S) find the language generated by G. [8+8]9.(a) Construct DFA and NFA accepting the set of all strings not containing 101 as a substring. (b) Draw the transition diagram of a FA which accepts all strings of 1s and 0s in which both the number of 0s and 1s are even.
[6+6+4]10.(a) Construct a NFA accepting ab, ba and use it to find a deterministic automation accepting the same set.(b) M = ({q1, q2, q3} , {0, 1} , ,q1, {q3}) is a NFA where is given by (q1, 0) = {q2, q3} , (q1, 1) = {q1} (q2, 0) = {q1, q2} , (q2, 1) = (q3, 0) = {q2} , (q3, 1) = {q1, q2}construct an equivalent DFA. [8+8UNIT III :
Regular Languages : Regular sets, regular expressions, identity rules, Constructing finite Automata for a given regular expressions, Conversion of Finite Automata to Regular expressions. Pumping lemma of regular sets, closure properties of regular sets (proofs not required).
Learning Objectives
At the end of this unitstudents must be able to
Define strings, Alphabet, language
Demonstrate the functioning of Finite state machine
Define finite automata model
Demonstrate the acceptance of strings and languages
Differentiate between Deterministic and non deterministic finite automata
Lecture Schedule
Lecture NoTopic NameNo.of HoursTeaching Methodology
1Regular Languages : Regular sets, regular expressions
1Black Board and Chalk
2identity rules, Constructing finite Automata for a given regular expressions1Black Board and Chalk
3Conversion of Finite Automata to Regular expressions
2Black Board and Chalk
4Pumping lemma of regular sets2Black Board and Chalk
5,6closure properties of regular sets (proofs not required).
1Black Board and Chalk
DESCRIPTIVE / ASSIGNMENT QUESTIONS:
1. Describe, in the English language, the sets represented by the following regular expressions:(a) a(a+b)*ab(b) a*b + b*a2. Construct the automata for the following regular expressions:(a) 101(10+01)*+10(b) (1+0)*100+ 101
3. Construct a FA recognizing L (G), where G is the grammar SaS | bA | b and AaA| bS | a4. Construct a DFA equivalent to the grammar SaS | bS | aA, AbB, BaC, C [8+85. Find regular expressions representing the following sets(a) The set of all stings over {0, 1} having at most one pair of 0s or atmost of one pair 1s
(b) The set of all strings over{a, b} in which the number of occurrences of a is devisible by 3
(c) The set of all strings over {a, b} in which there are at least two occurrences of b between any two occurrences of a.(d) The set of all strings over{a, b} with three consecutive bs[16]
6.(a) Give regular expression for representing the set L of strings in which every 0 is immediately followed by at least two 1s
(b) Construct a FA equivalent to the regular expression (0 + 1) * (00+11)(0+1)*UNIT IV :
Grammar Formalism : Regular grammars-right linear and left linear grammars, equivalence between regular linear grammar and FA, inter conversion, Context free grammar, derivation trees, sentential forms, Right most and leftmost derivation of strings.Learning Objectives
At the end of this unitstudents must be able to
Define strings, Alphabet, language
Demonstrate the functioning of Finite state machine
Define finite automata model
Demonstrate the acceptance of strings and languages
Differentiate between Deterministic and non deterministic finite automata
Lecture Schedule
Lecture NoTopic NameNo.of HoursTeaching Methodology
1,2Grammar Formalism : Regular grammars-right linear and left linear grammars2Black Board and Chalk
3,4equivalence between regular linear grammar and FA2Black Board and Chalk
5inter conversion1Black Board and Chalk
6,7Context free grammar2Black Board and Chalk
8,9derivation trees, sentential forms.
2Black Board and Chalk
10Right most and leftmost derivation of strings1Black Board and Chalk
DESCRIPTIVE / ASSIGNMENT QUESTIONS:
1. Construct a FA recognizing L (G), where G is the grammar SaS | bA | b and AaA| bS | a2. Construct a DFA equivalent to the grammar SaS | bS | aA, AbB, BaC, C 3. Let G be the grammer S aB | bA, A a | aS | bAA, Bb | bS | aBB for the string aaabbabbba Find
(a) Left most derivation(b) Right most derivation(c) Parse Tree.4. Construct a DFA equivalent to the grammar AaB, \B Bc, Ca/Aa/bB \ \5. Construct a FA recognizing L (G), where G is the grammar SaS1, S1aB, \ AS2a, S2aS1,A b,Ba6. Check whether grammer with productions S-(aSb/SbbS/bb is ambiguous or notUNIT V :
Context Free Grammars : Ambiguity in context free grammars. Minimisation of Context Free Grammars. Chomsky normal form, Greiback normal form, Pumping Lemma for Context Free Languages. Enumeration of properties of CFL (proofs omitted).
Learning Objectives
At the end of this unitstudents must be able to
Define strings, Alphabet, language
Demonstrate the functioning of Finite state machine
Define finite automata model
Demonstrate the acceptance of strings and languages
Differentiate between Deterministic and non deterministic finite automata
Lecture Schedule
Lecture NoTopic NameNo.of HoursTeaching Methodology
1,2Context Free Grammars : Ambiguity in context free grammars.2Black Board and Chalk
3Minimisation of Context Free Grammars1Black Board and Chalk
4,5Chomsky normal form, Greiback normal form2Black Board and Chalk
6Pumping Lemma for Context Free Languages1Black Board and Chalk
7Enumeration of properties of CFL (proofs omitted).
1Black Board and Chalk
1. Convert the following Context Free Grammar to Greibach Normal FormG={( {S,A,B},{a,b},P,S)}P is SAB ABS / a BSA / b [16]
2 Eliminate -productions from the grammar G given asA aBb | bBaB aB | bB | 3. Convert the following grammar to Greibach Normal FormS ABA | AB | BA | AA | B A aA | aB bB | b 4. What is Chomsky Normal Form? Convert the following Context Free Grammar toChomsky Normal Form SAaB / aaBA B bbA /
5. Convert the following grammar to Greibach Normal Form S SS S0S1 | 016. Show that grammar is ambiguousSaSbS | bSaS |
7.Eliminate productions from
S(aaaB/AaB
A(ABA/BB
B(bbA/
8.Find equivalent grammer in CNF for the following CFG
S( bA /aB
A(bAA/aS/a
B(aBB/bS/b
UNIT-6
UNIT VI :
Push Down Automata : Push down automata, definition, model, acceptance of CFL, Acceptance by final state and acceptance by empty state and its equivalence. Equivalence of CFL and PDA, interconversion. (Proofs not required). Introduction to DCFL and DPDA.
Learning Objectives
At the end of this unitstudents must be able to
Define strings, Alphabet, language
Demonstrate the functioning of Finite state machine
Define finite automata model
Demonstrate the acceptance of strings and languages
Differentiate between Deterministic and non deterministic finite automata
Lecture Schedule
Lecture NoTopic NameNo.of HoursTeaching Methodology
1,2Push Down Automata : Push down automata2Black Board and Chalk
3definition1Black Board and Chalk
4,5model, acceptance of CFL2Black Board and Chalk
6Acceptance by final state and acceptance by empty state and its equivalence.1Black Board and Chalk
7Equivalence of CFL and PDA1Black Board and Chalk
8interconversion. (Proofs not required1Black Board and Chalk
9Introduction to DCFL and DPDA.1Black Board and Chalk
1. Convert the following Context Free Grammar to Push Down AutomataS0AA0ABC | 1B | 0B 1C 2(b) Verify the string 001112 is accepted by equivalent Push Down Automata[10+6]2.(a) Explain the procedure to Convert the Context Free Grammar to Push DownAutomata(b) Convert the following Context Free Grammar to Push Down AutomataS aSbb | aab 3. Convert the following Context Free Grammar to Push Down AutomataS aAAAaS | bS | a [8+8]4. Design Push Down Automata for L = {a2n bn | n1}[16]
5.(a) Construct a grammar G generating {xx | x {a, b}*} (b) Construct a grammar generating L = {wcwR | w {a, b}* }[8+8]6.Show that the set of all strings over{a,b} consisting of equal no. of as and bs is accepted bya PDA.
7.Construct a PDA eqyuivalent to the following CFG
S( 0BB
B(0S/1S/0.Check whether 010000 is accepted by PDA or notUNIT VII :
Turing Machine : Turing Machine, definition, model, design of TM, Computable functions, recursively enumerable languages. Churchs hypothesis, counter machine, types of Turing machines (proofs not required).
Learning Objectives
At the end of this unitstudents must be able to
Define strings, Alphabet, language
Demonstrate the functioning of Finite state machine
Define finite automata model
Demonstrate the acceptance of strings and languages
Differentiate between Deterministic and non deterministic finite automata
Lecture Schedule
Lecture NoTopic NameNo.of HoursTeaching Methodology
1Turing Machine : Turing Machine1Black Board and Chalk
2definition, model,1Black Board and Chalk
3design of TM1Black Board and Chalk
4Computable functions1Black Board and Chalk
5recursively enumerable languages1Black Board and Chalk
6Churchs hypothesis1Black Board and Chalk
7counter machine1Black Board and Chalk
1. Design Turing Machine which recognizes the words of the formL = { 0n 1n | n>=1}[16]2. Design Turing Machine for L = { 0n 1n 0n | n 1 }[16]
3. Design Turing Machine for L = { an bn cn | n 1 }[16]
4. Design Turing Machine which will recognize strings containing equal number of 0s and 1s[16]
5. Find the language generated by the following grammars. (a) S0S1 | 0A1, A1A | 1
6.Find the language generated by following grammer:
S0S1 | 0A | 0 | 1B | 1, A0A | 0 , B1B | 1[8+8]UNIT VIII
Computability Theory : Chomsky hierarchy of languages, linear bounded automata and context sensitive language, LR(0) grammar, decidability of, problems, Universal Turing Machine, undecidability of posts. Correspondence problem, Turing reducibility, Definition of P and NP problems, NP complete and NP hard problems.
Learning Objectives
At the end of this unitstudents must be able to
Define strings, Alphabet, language
Demonstrate the functioning of Finite state machine
Define finite automata model
Demonstrate the acceptance of strings and languages
Differentiate between Deterministic and non deterministic finite automata
Lecture Schedule
Lecture NoTopic NameNo.of HoursTeaching Methodology
1Computability Theory : Chomsky hierarchy of languages1Black Board and Chalk
2linear bounded automata and context sensitive language1Black Board and Chalk
3LR(0) grammar, decidability of, problems1Black Board and Chalk
4Universal Turing Machine1Black Board and Chalk
5undecidability of posts,Correspondence problem, Turing reducibility1Black Board and Chalk
6Definition of P and NP problems1Black Board and Chalk
1. Construct LR(0) items for the following grammarE E + T | T T T * F | FF ( E ) | id
2. Write about the following
(a) Linear-Bounded Automata(b) Context-Sensitive Language(c) Decidability of PCP. 3. Construct LR(0) items for the grammar given find its equivalent DFA.S| SS AS | aA aA | b
Present StateNext StateOutputa=0 a=1 q0q3q10q1q1q21q2q2q30q3q3q00
Present StateNext StateOutputa=0 a=1 q0q3q10q1q1q21q2q2q30q3q3q00