Formal Languages and Automata Theory: Designed by K.Geeta Asst - Professor Dept. of CSE RGUKT Basar
Formal Languages and Automata Theory: Designed by K.Geeta Asst - Professor Dept. of CSE RGUKT Basar
Formal Languages and Automata Theory: Designed by K.Geeta Asst - Professor Dept. of CSE RGUKT Basar
• This subject gives us the theory behind the work that has
been carried out in the field of computer science.
• It allows us to think systematically about what machine do
without going into hardware details I.e how machine
works and process data without entering into its hardware
concept.
• It gives theoretical machine design.
• It is an area of computer science that deals with the study
of abstract machines as well as the computation problem
that can be solving using them.
1 2 3 4 5 6 7
Develop a formal Design finite Prove that a given Design context free Prove equivalence of Identify the Distinguish between
notation for strings, automata to accept language is regular grammars to languages accepted hierarchy of formal computability and
languages and a set of strings of a and apply the generate strings by Push Down languages, non-computability
machines. language. closure properties of from a context free Automata and grammars and and Decidability and
languages. language and languages generated machines. undecidability.
convert them into by context free
normal forms. grammars.
1 2 3 4 5 6 7
Write a formal Design finite For a given language Design context free Determine Write the hierarchy Distinguish between
notation for strings, automata to accept determine whether grammars to equivalence of of formal languages, computability and
languages and a set of strings of a the given language generate strings of languages accepted grammars and non-computability
machines. language. is regular or not. context free by Push down machines. and Decidability and
language. Automata and undecidability.
languages
generated by
context free
grammars.
• String
• Set of symbols from alphabet.
• Example: 001,110,111 strings from binary alphabet.
• English alpha bet={ a,b,c,…..}
• Strings :abc,aaa,gf
• Language:
• :is set of words.
• An empty string denoted by ε
• length is =0
Designed by K.Geeta Asst.Professor Dept. of CSE RGUKT Basar
Examples:Σ={0,1}
• L1={set of strings of length 2}
• L1={00,01,10,11}
• L2={set of all strings of length 3 over Σ}
• L2={000,001,010,011,100,101,110,111}
• L3={set of all strings beginning with 1}
• L3={1,10,100,11,110,101,111,…..}
• G(S,a,S->aS->aS,S)
• V:S
• T:a
• P:S->a
• S->aS
• S:S
• Language acceptance:
• Start with start symbol and at every step replace the
Language acceptance: nonterminal by right hand side of the rule.Continue this
untill string of terminals is derived.
Type-3
grammar-
Regular • -generate regular languages.
Grammar
• -A->aA|a
• A->Aa|a
• -recognized by finite automaton
Finite automata
• -is mathematical model of a digital computer.
• -are used as string or language acceptors.
• -used in pattern matching tools like LEX and text editors.
a b c d a a a a a B
Input tape
reading
head
Finite control
Designed by K.Geeta Asst.Professor Dept. of CSE RGUKT Basar
Lexical analyser behavior can be shown as FA.Consider the lexical
analyser that matches words like "to","this","the"
A)Transitio B)Transition
n diagram table
Designed by K.Geeta Asst.Professor Dept. of CSE RGUKT Basar
Designed by K.Geeta Asst.Professor Dept. of CSE RGUKT Basar
Transitio • Contains
n
• Set of states as circles
• Start state q0 with arrow
• Final state by double circle
• M={{q0,q1,q2},{a,b},δ,q0,{q2}}
• δ(q0,a)=q1, δ(q0,b)=q2,
• δ(q1,a)=q2, δ(q1,b)=q0, Δ/Σ a b
• δ(q2,a)=q2, δ(q2,b)=q2
q0 q1 q2
q1 q2 q0
q2 q2 q2