SlideShare a Scribd company logo
THEORY OF AUTOMATAAND
FORMAL LANGUAGES
UNIT-I
ABHIMANYU MISHRA
ASSISTANT PROF.(CSE)
JETGI
Abhimanyu Mishra(CSE) JETGI12/31/2016
What is Automata?
AUTOMATA
An Automation derived from the Greek word which means "self-acting". An
automaton (Automata in plural) is an theoretical self-propelled
computing device which follows a predetermined sequence of operations
automatically.
“A set of string all of which are chosen form some ∑*,where ∑ is particular
alphabet, is called a language". If ∑ is an alphabet, and L<= ∑*, then L is
said to be language over alphabet ∑.
KLEENE CLOSURE
“If S is a set of words then by S* we mean the set of all finite strings
formed by concatenating words from S, where any word may be used as
often we like, and where the null string is also included”
For example if ∑={0,1}
∑* ={ €,0,1,00,01,10,11,000,001,…………}
Abhimanyu Mishra(CSE) JETGI12/31/2016
Finite automation is called “finite” because number of possible states and
number of letter in the alphabet are both finite, and “automation” because
the change of the state is totally governed by the input. it is deterministic,
since, what state is next is automatic not will-full, just as the motion of the
hands of the clock is automatic, while the motion of hands of a human is
presumably the result of desire and thought.
THERE ARE TWO TYPES OF FINITE AUTOMATA
(A) DETERMINISTIC FINITE AUTOMATA(DFA)
(B) NON DETERMINISTIC FINITE AUTOMATA(NDFA)
FINITE AUTOMATA
Abhimanyu Mishra(CSE) JETGI12/31/2016
DETERMINISTIC FINITE AUTOMATA(DFA) IS A QUINTUPLE
(Q,Σ, δ,q0,F)
1. where :Q is a finite set of states.
2. Σ is a finite set of symbols, called the alphabet of the automaton.
3. δ is the transition function, that is, δ: q × Σ → Q.
4. q0 is the start state, that is, the state of the automaton before any input has been
processed, where q0∈ Q.
5. F is a set of states of q (i.e. F⊆Q) called accept states.
(A) DETERMINISTIC FINITE AUTOMATA(DFA)
Abhimanyu Mishra(CSE) JETGI12/31/2016
A.1 PROCESSING OF STRINGS BY DFA
• Suppose a1,a2,………………… an is a sequence of input
symbols. We start out with deterministic finite automata having
q1,q2,………………… qn states where q0 is the initial state and qn is
the final state and transition function and processed as………..
δ(q0, a1 ) = q1
δ(q1, q2 ) = q2
. .
. .
δ(qn-1 , qn ) = qn
Input a1,a2,………………… an is said to be “accepted” since qn is the
member of the final states, and if not then it is “ rejected”
Abhimanyu Mishra(CSE) JETGI12/31/2016
A.2 TRANSITION GRAPH
• A transition graph is a collection of three things:
1. A finite set of states, at least one of which is designated as the start state.
start state
final state
2. An alphabet Σ of possible input letters from which input strings are
formed.
3. A finite set of transitions that show how to go from some states.
Abhimanyu Mishra(CSE) JETGI12/31/2016
A.3 TRANSITION DIAGRAM
Transition Diagram Notations: A transition diagram for DFA, M=(Q,Σ, δ,q0,F) is a
graph defined as follows:
(a) For each state in Q there is a node represented by the circle.
(b) For each state q in Q and each input symbol a in Σ, let δ(q,a)=P.
a
a a,b
or or
b
(c) If any state q in Q is the starting state then it represented by the circle with
arrow as
q P q P q P
q
Abhimanyu Mishra(CSE) JETGI12/31/2016
A transition table is a conventional, tabular representation of a function like δ that
takes two arguments and return a state. The rows of the table correspond to the
states, and the columns correspond to the input.
State δ(q,a).
For example:
q0 is the starting state and q2 is the final state
A.4 TRANSITION TABLES
δ/ Σ a b
q0 q1 q2
q1 q2 q0
q2 q2 q2
Abhimanyu Mishra(CSE) JETGI12/31/2016
And the transition diagram:
b
a
a
a,b
Q={q0, q1, q2 }
F={q2 }
δ(q0 , a) = q1 , δ(q0 , b) = q2
δ(q0 , a) = q2 , δ(q0 , b) = q0
δ(q0 , a) = q2 , δ(q0 , b) = q2
q0
q0
q1
q2
Abhimanyu Mishra(CSE) JETGI12/31/2016
Example 1:-
• Design a FA that accepts set of strings such that every string end in 00,
over alphabet:
{0,1} Σ = { 0,1}
Sol:-
We have M= (Q,Σ, δ,q0,F) be the DFA
q0 : initial state, Σ : {0,1} is given
0,1
Start 0 0
First we will decide the approach to design FA. It is not an easy
task to think FA as a whole, So first we have to fulfill minimum condition i.e
every string end in 00.
q0 q1
q2
Abhimanyu Mishra(CSE) JETGI12/31/2016
Facts in Designing Procedure of Finite Automata
(a) In the designing of FA, First of all we have to analyze the set strings
language which is accepted by the FA.
(b) Make sure that every state is check for the output state for every symbol
of Σ.
(c) Make sure, that there is one initial state and at least one final state in
transition diagram of FA.
(d) Make sure that no state must have two different output state for a single
input symbol.
Abhimanyu Mishra(CSE) JETGI12/31/2016
Nondeterministic finite automaton with ε-moves (NFA-ε) is a further
simplification to NFA. this automaton replaces the transition function with
the one that allows the empty string ε as a possible input. the transitions
without overwhelming an input symbol are called ε-transitions.
Let M be NFA then M is Defined as:
M = (Q,Σ, δ,q0,F)
(1) a finite set of states q0
(2) a finite set of input symbol Σ
(3) a transition function δ : q × Σ → P(q).
(4) an initial (or start) state q0 ∈ Q
(5) a set of states f distinguished as accepting (or final) states F ⊆ Q
(B) NON DETERMINISTIC FINITE AUTOMATA(NDFA)
Abhimanyu Mishra(CSE) JETGI12/31/2016
0,1
0,1 0 0
START
0,1
1
1
according to analysis it is clear that NFA will accepts the strings of the pattern
00,11,101000,101100,……………………..
Example 1: Design a NFA for the language L= all strings over {0,1} that
have at least two consecutive 0 and 1.
q0
q1
q2
q2
q4
Abhimanyu Mishra(CSE) JETGI12/31/2016
Procedure for converting NFA to equivalent DFA.
1) intially Q=ɸ.
2) Put {q0 } into Q.
3) Then for each state q in Q do the following add this new state, add
δ(q,a) = ᴜp€q δ(p,a) to δ on the right hand side is that of NFA
4) Repeat step 3 till new states.
TRANSFORMATION OF NFA TO DFA
Abhimanyu Mishra(CSE) JETGI12/31/2016
Example:1 Convert the following NFA in to DFA
a,b b
• Start a a
a,b
b
q0
q3
q2q1
Abhimanyu Mishra(CSE) JETGI12/31/2016
Solution
Step 1 ( We get new state)
δ(q0, a ) = {q0, q1 } New single state
δ(q0, b ) = {q0 }
Step 2 In step 1 we are getting a new state {q0, q1 }. Now repat step 1 for
this new state only, so all transition of a and b from {q0, q1 } as
δ({q0 , q1 },a) = δ(q0, a ) U δ(q1, a ) = {q0, q1 } U {q0 }
= {q0, q1, q2 } New single state
δ({q0 , q1 },b) = δ(q0, b ) U δ(q1, b ) = {q0, q1 }
Step3 Repeat step 2
δ({q0 , q1, q2 },a) = δ(q0, a ) U δ(q1, a ) U δ(q2, a)
= {q0, q1 } U {q2 }U {q3 }
= {q0 , q1, q2, q3 } New single state
δ({q0 , q1, q2 },b) = δ(q0, b ) U δ(q1, b ) U δ(q2, b)
= {q0 , q1, q3 } New single state
Abhimanyu Mishra(CSE) JETGI12/31/2016
Step 4: Repeat Step 3
δ({q0 , q1, q2, q3 },a) = {q0 , q1, q2, q3 } OLD STATE
δ({q0 , q1, q2, q3 },b) = {q0 , q1, q2, q3 } OLD STATE
Step 5: Repeat Step 4
δ ({q0 , q1, q3 },a) = {q0 , q1, q2, q3 } OLD STATE
δ ({q0 , q1, q3 },b) = {q0 , q1, q2, q3 } OLD STATE
Now Transition table
δ/ Σ a b
q0 {q0, q1 } {q0 }
{q0, q1 } {q0, q1, q2 } {q0, q1 }
{q0, q1, q2 }* {q0 , q1, q2, q3 } {q0 , q1, q3 }
{q0 , q1, q2, q3 }* {q0 , q1, q2, q3 } {q0 , q1, q2, q3 }
{q0 , q1, q3 }* {q0 , q1, q2, q3 } {q0 , q1, q2, q3 }
Abhimanyu Mishra(CSE) JETGI12/31/2016
Lets Mark the whole structure in Alphabets
q0 A
{q0, q1 } B
{q0, q1, q2 } C
{q0 , q1, q2, q3 } D
{q0 , q1, q3 } E
Abhimanyu Mishra(CSE) JETGI12/31/2016
A is initial state and C,D and E are final states since they contain q2, q3
as member which are final states of NFA
• Transition Table
δ/ Σ a b
A B A
B C B
*C D E
*D D D
*E D D
Abhimanyu Mishra(CSE) JETGI12/31/2016
Final Transition Diagram
• b b
• Start a
• a
• b
• a a
• b
• a,b
A
D
E
C
B
Abhimanyu Mishra(CSE) JETGI12/31/2016
NFA with ∈ -Transitions
• IF a FA is modified to permit transition without input symbols, along with
zero, one or more transition on input symbols, then we get NFA with ∈-
transition, because the transition made without symbols are called as ∈-
transitions.
0 1 0
Start ∈ ∈
Abhimanyu Mishra(CSE) JETGI
q0 q1
q2
12/31/2016
Example:2
Consider the NFA with ∈-transition M =(Q,Σ, δ,q0,F)
Q={q0, q1, q2 }
Σ={a,b,c} and ∈ moves
Initial state ={q0 }
F= { q2 }
δ/ Σ a b c ∈
q0 {q0} {ɸ} {ɸ} {q1}
q1 {ɸ} {q1} {ɸ} {q2}
*q2 {ɸ} {ɸ} {q2} {ɸ}
Abhimanyu Mishra(CSE) JETGI12/31/2016
And the transition Diagram: NFA with ∈-transition
a b c
Start ∈ ∈
Abhimanyu Mishra(CSE) JETGI
q0 q1
q2
12/31/2016
SOLUTION:-
Step 1- Find the states of NFA without ∈-transition including initial state and
final states as follows:
(i) Initial state will be ∈ -closure of initial state of NFA with ∈-transitions in
∈-closure(q0) = {q0, q1, q2 } (New Initial state for NFA
without ∈ transition)
(ii) Rest of the states are:
∈-closure(q1) ={q1, q2 } New State
∈-closure(q2) ={q2} New State
(iii) The final states of NFA without ∈-transition are all those new states which
contains final state of NFA with ∈- transition as members.
M’ =(Q’,Σ’, δ’,q0’,F’)
Q’ =({q0, q1, q2 } ,{q1, q2 }, {q2} )
Step 2-Now we have to decide δ’ to find out the transition as follows
δ’ ({q0, q1, q2},a) = ∈-closure(δ(q0, q1, q2 ),a)
= ∈-closure(δ(q0, a)U(δ(q1, a)U(δ(q2, a))
= ∈-closure(δ(q0U ɸU ɸ)
= ∈-closure(q0)
= {q0, q1, q2 }
Abhimanyu Mishra(CSE) JETGI12/31/2016
Similarly, δ’ ({q0, q1, q2},b) = ∈-closure(δ(q0, q1, q2 ),b)
= ∈-closure(δ(q0, b)U(δ(q1, b)U(δ(q2, b))
= ∈-closure(δ(ɸ U q1U ɸ)
= ∈-closure(q1)
= {q1, q2 }
δ’ ({q0, q1, q2},c) = ∈-closure(δ(q0, q1, q2 ),c)
= ∈-closure(δ(q0, c)U(δ(q1, c)U(δ(q2, c))
= ∈-closure(δ(ɸ U ɸU q2)
= ∈-closure(q2)
= { q2}
So we write same for others,
δ’ ({q1, q2},a) = ɸ
δ’ ({q1, q2},b) = {q1, q2}
δ’ ({q1, q2},c) = {q2}
δ’ ({q2},a) = ɸ
δ’ ({q2},b) = ɸ
δ’ ({q2},c) = {q2}
Abhimanyu Mishra(CSE) JETGI12/31/2016
So, transition table for NFA ∈-transition will be as:
δ/ Σ a b c
{q0, q1, q2}* {q0, q1, q2} {q1, q2 } { q2}
{q1, q2 }* ɸ {q1, q2 } { q2}
{ q2}* ɸ ɸ { q2}
Abhimanyu Mishra(CSE) JETGI12/31/2016
{q0, q1, q2} as qx
{q1, q2 } as qy
{ q2} as qz
• a b
start b
c c
c
NFA without ∈-transition
Abhimanyu Mishra(CSE) JETGI
qx
qz
qy
12/31/2016
MINIMIZATION ALGORITHM FOR DFA
(i) all states are unreachable from the initial state via any set of transition
of DFA M are removed
(ii) draw the transition tables for rest states, after removing the
unreachable states
(iii) split the transition table in two tables
(iv) find the similar rows
(v) Repeat the same process
(vi) Now combined the Reduced tables, and removing non reachable
states, dead states.
Minimization of DFA’S
Abhimanyu Mishra(CSE) JETGI12/31/2016
Example 1 : Minimize the DFA given below
• Start b a b
b a
a b a a
b
a
a b
a b
b
Abhimanyu Mishra(CSE) JETGI
q0
q4
q7
q6
q1
q0
q3
q2
12/31/2016
STEP 1: Remove the unreachable states from the given DFA. the DFA
given in diagram q3 is unreachable state so remove it.
STEP 2: Draw the Transition table for rest states.
Solution :
Abhimanyu Mishra(CSE) JETGI
δ/ Σ a b
q0 q5 q1
q1 q2 q6
*q2 q2 q0
q4 q5 q7
q5 q6 q2
q6 q7 q6
q7 q2 q6
12/31/2016
Step 3: Now divide rows of transition table in two sets as:
• (i)
• (ii)
Abhimanyu Mishra(CSE) JETGI
q0 q5 q1
q1 q2 q6
q4 q5 q7
q5 q6 q2
q6 q7 q6
q7 q2 q6
*q2 q2 q0
12/31/2016
row 2 and row 6,are similar since q1 and q7 transit to same states on a
and b, so skip of them row 6 then q7 is replaced by q1 in the rest
Step 4: Apply step 4 on both the sets individually. Now consider set (i)
Abhimanyu Mishra(CSE) JETGI
q0 q5 q1
q1 q2 q6
q4 q5 q7
q5 q6 q2
q6 q7 q6
q7 q2 q6
12/31/2016
Abhimanyu Mishra(CSE) JETGI
q0 q5 q1
q1 q2 q6
q4 q5 q1
q5 q6 q2
q6 q4 q6
12/31/2016
Step 5 Repeat step 4 same process
Again Row 1 and Row 3 Similar
q0 q5 q1
q1 q2 q6
q4 q5 q1
q5 q6 q2
q6 q4 q6
Abhimanyu Mishra(CSE) JETGI
q0 q5 q1
q1 q2 q6
q5 q6 q2
q6 q0 q6
12/31/2016
Step 6 Combined Set minimized sets
Now below minimized Transition table.
δ/ Σ a b
q0 q5 q1
q1 q2 q6
q5 q6 q2
q6 q0 q6
*q2 q2 q0
Abhimanyu Mishra(CSE) JETGI12/31/2016
Transition Diagram of Minimized DFA
Start b
b
a b a
a
a b
b a
Abhimanyu Mishra(CSE) JETGI
q6
q0
q2q5
q1
12/31/2016
Myhill-Nerode theorem is used to eliminate useless states from a DFA.
Myhill-Nerode Theorem says the three statements are equivalent:
(i) The language L, a subset of Σ*, is accepted by a DFA
(ii) L is the union of some of the equivalence classes of right invariant
equivalence relation of finite index.
(iii) Let equivalence relation RL be defined by: xRLy if and only if for all Z in
Σ*, xz is in L exactly when yz is in L. Then RL is of finite index
THANKS
MYHILL-NERODE THEOREM
Abhimanyu Mishra(CSE) JETGI12/31/2016

More Related Content

What's hot

Automata theory
Automata theoryAutomata theory
Automata theory
Pardeep Vats
 
CONTEXT FREE GRAMMAR
CONTEXT FREE GRAMMAR CONTEXT FREE GRAMMAR
CONTEXT FREE GRAMMAR
Zahid Parvez
 
Pda
PdaPda
Finite automata(For college Seminars)
Finite automata(For college Seminars)Finite automata(For college Seminars)
Finite automata(For college Seminars)
Naman Joshi
 
Finite automata
Finite automataFinite automata
Finite automata
Bipul Roy Bpl
 
Push down automata
Push down automataPush down automata
Push down automataSomya Bagai
 
Theory of Automata and formal languages unit 2
Theory of Automata and formal languages unit 2Theory of Automata and formal languages unit 2
Theory of Automata and formal languages unit 2
Abhimanyu Mishra
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notationsNikhil Sharma
 
Topological Sorting
Topological SortingTopological Sorting
Topological Sorting
ShahDhruv21
 
NFA to DFA
NFA to DFANFA to DFA
NFA to DFA
Animesh Chaturvedi
 
Push Down Automata (PDA) | TOC (Theory of Computation) | NPDA | DPDA
Push Down Automata (PDA) | TOC  (Theory of Computation) | NPDA | DPDAPush Down Automata (PDA) | TOC  (Theory of Computation) | NPDA | DPDA
Push Down Automata (PDA) | TOC (Theory of Computation) | NPDA | DPDA
Ashish Duggal
 
Turing machine-TOC
Turing machine-TOCTuring machine-TOC
Turing machine-TOC
Maulik Togadiya
 
1.7. eqivalence of nfa and dfa
1.7. eqivalence of nfa and dfa1.7. eqivalence of nfa and dfa
1.7. eqivalence of nfa and dfa
Sampath Kumar S
 
2.8 normal forms gnf &amp; problems
2.8 normal forms   gnf &amp; problems2.8 normal forms   gnf &amp; problems
2.8 normal forms gnf &amp; problems
Sampath Kumar S
 
NFA or Non deterministic finite automata
NFA or Non deterministic finite automataNFA or Non deterministic finite automata
NFA or Non deterministic finite automata
deepinderbedi
 
simple problem to convert NFA with epsilon to without epsilon
simple problem to convert NFA with epsilon to without epsilonsimple problem to convert NFA with epsilon to without epsilon
simple problem to convert NFA with epsilon to without epsilon
kanikkk
 
Regular expressions
Regular expressionsRegular expressions
Regular expressions
Ratnakar Mikkili
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
Rajendran
 
Deterministic Finite Automata (DFA)
Deterministic Finite Automata (DFA)Deterministic Finite Automata (DFA)
Deterministic Finite Automata (DFA)
Animesh Chaturvedi
 
FInite Automata
FInite AutomataFInite Automata
FInite Automata
Mobeen Mustafa
 

What's hot (20)

Automata theory
Automata theoryAutomata theory
Automata theory
 
CONTEXT FREE GRAMMAR
CONTEXT FREE GRAMMAR CONTEXT FREE GRAMMAR
CONTEXT FREE GRAMMAR
 
Pda
PdaPda
Pda
 
Finite automata(For college Seminars)
Finite automata(For college Seminars)Finite automata(For college Seminars)
Finite automata(For college Seminars)
 
Finite automata
Finite automataFinite automata
Finite automata
 
Push down automata
Push down automataPush down automata
Push down automata
 
Theory of Automata and formal languages unit 2
Theory of Automata and formal languages unit 2Theory of Automata and formal languages unit 2
Theory of Automata and formal languages unit 2
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notations
 
Topological Sorting
Topological SortingTopological Sorting
Topological Sorting
 
NFA to DFA
NFA to DFANFA to DFA
NFA to DFA
 
Push Down Automata (PDA) | TOC (Theory of Computation) | NPDA | DPDA
Push Down Automata (PDA) | TOC  (Theory of Computation) | NPDA | DPDAPush Down Automata (PDA) | TOC  (Theory of Computation) | NPDA | DPDA
Push Down Automata (PDA) | TOC (Theory of Computation) | NPDA | DPDA
 
Turing machine-TOC
Turing machine-TOCTuring machine-TOC
Turing machine-TOC
 
1.7. eqivalence of nfa and dfa
1.7. eqivalence of nfa and dfa1.7. eqivalence of nfa and dfa
1.7. eqivalence of nfa and dfa
 
2.8 normal forms gnf &amp; problems
2.8 normal forms   gnf &amp; problems2.8 normal forms   gnf &amp; problems
2.8 normal forms gnf &amp; problems
 
NFA or Non deterministic finite automata
NFA or Non deterministic finite automataNFA or Non deterministic finite automata
NFA or Non deterministic finite automata
 
simple problem to convert NFA with epsilon to without epsilon
simple problem to convert NFA with epsilon to without epsilonsimple problem to convert NFA with epsilon to without epsilon
simple problem to convert NFA with epsilon to without epsilon
 
Regular expressions
Regular expressionsRegular expressions
Regular expressions
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
 
Deterministic Finite Automata (DFA)
Deterministic Finite Automata (DFA)Deterministic Finite Automata (DFA)
Deterministic Finite Automata (DFA)
 
FInite Automata
FInite AutomataFInite Automata
FInite Automata
 

Viewers also liked

Introduction to fa and dfa
Introduction to fa  and dfaIntroduction to fa  and dfa
Introduction to fa and dfa
deepinderbedi
 
Os2 2
Os2 2Os2 2
Os2 2issbp
 
Class9
 Class9 Class9
Class9issbp
 
Os5 2
Os5 2Os5 2
Os5 2issbp
 
Lecture 7: Definite Clause Grammars
Lecture 7: Definite Clause GrammarsLecture 7: Definite Clause Grammars
Lecture 7: Definite Clause Grammars
CS, NcState
 
Ch11 input output systems
Ch11 input output systemsCh11 input output systems
Ch11 input output systemsissbp
 
Class5
 Class5 Class5
Class5issbp
 
Os6 2
Os6 2Os6 2
Os6 2issbp
 
Os4 2
Os4 2Os4 2
Os4 2issbp
 
Theory of Automata and formal languages Unit 5
Theory of Automata and formal languages Unit 5Theory of Automata and formal languages Unit 5
Theory of Automata and formal languages Unit 5
Abhimanyu Mishra
 
Towards an RDF Validation Language based on Regular Expression Derivatives
Towards an RDF Validation Language based on Regular Expression DerivativesTowards an RDF Validation Language based on Regular Expression Derivatives
Towards an RDF Validation Language based on Regular Expression Derivatives
Jose Emilio Labra Gayo
 
Automated Web Service Change Management (AWSCM) A tool published at IEEE Clou...
Automated Web Service Change Management (AWSCM) A tool published at IEEE Clou...Automated Web Service Change Management (AWSCM) A tool published at IEEE Clou...
Automated Web Service Change Management (AWSCM) A tool published at IEEE Clou...
Animesh Chaturvedi
 
Pattern detection in mealy machine
Pattern detection in mealy machinePattern detection in mealy machine
Pattern detection in mealy machine
Animesh Chaturvedi
 
Cspc final
Cspc finalCspc final
Cspc final
BBDITM LUCKNOW
 
Os10 2
Os10 2Os10 2
Os10 2issbp
 

Viewers also liked (20)

Introduction to fa and dfa
Introduction to fa  and dfaIntroduction to fa  and dfa
Introduction to fa and dfa
 
Os2 2
Os2 2Os2 2
Os2 2
 
Class9
 Class9 Class9
Class9
 
Os5 2
Os5 2Os5 2
Os5 2
 
Lecture 7: Definite Clause Grammars
Lecture 7: Definite Clause GrammarsLecture 7: Definite Clause Grammars
Lecture 7: Definite Clause Grammars
 
Ch11 input output systems
Ch11 input output systemsCh11 input output systems
Ch11 input output systems
 
Class5
 Class5 Class5
Class5
 
Os6 2
Os6 2Os6 2
Os6 2
 
Os6
Os6Os6
Os6
 
Os4 2
Os4 2Os4 2
Os4 2
 
Os4
Os4Os4
Os4
 
Os2
Os2Os2
Os2
 
Theory of Automata and formal languages Unit 5
Theory of Automata and formal languages Unit 5Theory of Automata and formal languages Unit 5
Theory of Automata and formal languages Unit 5
 
Design1
Design1Design1
Design1
 
Towards an RDF Validation Language based on Regular Expression Derivatives
Towards an RDF Validation Language based on Regular Expression DerivativesTowards an RDF Validation Language based on Regular Expression Derivatives
Towards an RDF Validation Language based on Regular Expression Derivatives
 
Os5
Os5Os5
Os5
 
Automated Web Service Change Management (AWSCM) A tool published at IEEE Clou...
Automated Web Service Change Management (AWSCM) A tool published at IEEE Clou...Automated Web Service Change Management (AWSCM) A tool published at IEEE Clou...
Automated Web Service Change Management (AWSCM) A tool published at IEEE Clou...
 
Pattern detection in mealy machine
Pattern detection in mealy machinePattern detection in mealy machine
Pattern detection in mealy machine
 
Cspc final
Cspc finalCspc final
Cspc final
 
Os10 2
Os10 2Os10 2
Os10 2
 

Similar to Theory of Automata and formal languages unit 1

Formal Languages and Automata Theory Unit 1
Formal Languages and Automata Theory Unit 1Formal Languages and Automata Theory Unit 1
Formal Languages and Automata Theory Unit 1
Srimatre K
 
Deterministic finite automata
Deterministic finite automata Deterministic finite automata
Deterministic finite automata
Muhammad Love Kian
 
Teori automata lengkap
Teori automata lengkapTeori automata lengkap
Teori automata lengkap
Muhammad Love Kian
 
Materi 3 Finite State Automata
Materi 3   Finite State AutomataMateri 3   Finite State Automata
Materi 3 Finite State Automata
ahmad haidaroh
 
NFAvsDFA.ppt
NFAvsDFA.pptNFAvsDFA.ppt
NFAvsDFA.ppt
ARITRACSE0078
 
Dfa h11
Dfa h11Dfa h11
Dfa h11
Rajendran
 
Fsa
FsaFsa
FiniteAutomata.ppt
FiniteAutomata.pptFiniteAutomata.ppt
FiniteAutomata.ppt
RohitPaul71
 
FiniteAutomata (1).ppt
FiniteAutomata (1).pptFiniteAutomata (1).ppt
FiniteAutomata (1).ppt
ssuser47f7f2
 
0227 regularlanguages
 0227 regularlanguages 0227 regularlanguages
0227 regularlanguagesissbp
 
Theory of automata
Theory of automataTheory of automata
Theory of automata
Arslan905905
 
Automata theory introduction
Automata theory introductionAutomata theory introduction
Automata theory introduction
NAMRATA BORKAR
 
Dfa
DfaDfa
Finite automata examples
Finite automata examplesFinite automata examples
Finite automata examplesankitamakin
 
Finite automata examples
Finite automata examplesFinite automata examples
Finite automata examples
ankitamakin
 
Nfa egs
Nfa egsNfa egs
Nfa egs
ankitamakin
 
Theory of Computation FSM Conversions and Problems
Theory of Computation FSM Conversions and ProblemsTheory of Computation FSM Conversions and Problems
Theory of Computation FSM Conversions and Problems
Rushabh2428
 
Nondeterministic Finite Automata AFN.pdf
Nondeterministic Finite Automata AFN.pdfNondeterministic Finite Automata AFN.pdf
Nondeterministic Finite Automata AFN.pdf
SergioUlisesRojasAla
 

Similar to Theory of Automata and formal languages unit 1 (20)

Formal Languages and Automata Theory Unit 1
Formal Languages and Automata Theory Unit 1Formal Languages and Automata Theory Unit 1
Formal Languages and Automata Theory Unit 1
 
Deterministic finite automata
Deterministic finite automata Deterministic finite automata
Deterministic finite automata
 
Teori automata lengkap
Teori automata lengkapTeori automata lengkap
Teori automata lengkap
 
Finite automata
Finite automataFinite automata
Finite automata
 
Materi 3 Finite State Automata
Materi 3   Finite State AutomataMateri 3   Finite State Automata
Materi 3 Finite State Automata
 
O2
O2O2
O2
 
NFAvsDFA.ppt
NFAvsDFA.pptNFAvsDFA.ppt
NFAvsDFA.ppt
 
Dfa h11
Dfa h11Dfa h11
Dfa h11
 
Fsa
FsaFsa
Fsa
 
FiniteAutomata.ppt
FiniteAutomata.pptFiniteAutomata.ppt
FiniteAutomata.ppt
 
FiniteAutomata (1).ppt
FiniteAutomata (1).pptFiniteAutomata (1).ppt
FiniteAutomata (1).ppt
 
0227 regularlanguages
 0227 regularlanguages 0227 regularlanguages
0227 regularlanguages
 
Theory of automata
Theory of automataTheory of automata
Theory of automata
 
Automata theory introduction
Automata theory introductionAutomata theory introduction
Automata theory introduction
 
Dfa
DfaDfa
Dfa
 
Finite automata examples
Finite automata examplesFinite automata examples
Finite automata examples
 
Finite automata examples
Finite automata examplesFinite automata examples
Finite automata examples
 
Nfa egs
Nfa egsNfa egs
Nfa egs
 
Theory of Computation FSM Conversions and Problems
Theory of Computation FSM Conversions and ProblemsTheory of Computation FSM Conversions and Problems
Theory of Computation FSM Conversions and Problems
 
Nondeterministic Finite Automata AFN.pdf
Nondeterministic Finite Automata AFN.pdfNondeterministic Finite Automata AFN.pdf
Nondeterministic Finite Automata AFN.pdf
 

More from Abhimanyu Mishra

Cd unit i
Cd unit iCd unit i
Cd unit i
Abhimanyu Mishra
 
Presentation1(JIT gnomio)
Presentation1(JIT gnomio)Presentation1(JIT gnomio)
Presentation1(JIT gnomio)
Abhimanyu Mishra
 
Sta unit 5(abimanyu)
Sta unit 5(abimanyu)Sta unit 5(abimanyu)
Sta unit 5(abimanyu)
Abhimanyu Mishra
 
Sta unit 3(abimanyu)
Sta unit 3(abimanyu)Sta unit 3(abimanyu)
Sta unit 3(abimanyu)
Abhimanyu Mishra
 
Sta unit 4(abimanyu)
Sta unit 4(abimanyu)Sta unit 4(abimanyu)
Sta unit 4(abimanyu)
Abhimanyu Mishra
 
Sta unit 3(abimanyu)
Sta unit 3(abimanyu)Sta unit 3(abimanyu)
Sta unit 3(abimanyu)
Abhimanyu Mishra
 
Sta unit 2(abimanyu)
Sta unit 2(abimanyu)Sta unit 2(abimanyu)
Sta unit 2(abimanyu)
Abhimanyu Mishra
 
Unit1
Unit1Unit1
Daa unit 5
Daa unit 5Daa unit 5
Daa unit 5
Abhimanyu Mishra
 
Daa unit 4
Daa unit 4Daa unit 4
Daa unit 4
Abhimanyu Mishra
 
Daa unit 3
Daa unit 3Daa unit 3
Daa unit 3
Abhimanyu Mishra
 
Daa unit 2
Daa unit 2Daa unit 2
Daa unit 2
Abhimanyu Mishra
 
Daa unit 1
Daa unit 1Daa unit 1
Daa unit 1
Abhimanyu Mishra
 
Software Engineering unit 5
Software Engineering unit 5Software Engineering unit 5
Software Engineering unit 5
Abhimanyu Mishra
 
Software Engineering unit 4
Software Engineering unit 4Software Engineering unit 4
Software Engineering unit 4
Abhimanyu Mishra
 
Software Engineering unit 3
Software Engineering unit 3Software Engineering unit 3
Software Engineering unit 3
Abhimanyu Mishra
 
Software Engineering unit 2
Software Engineering unit 2Software Engineering unit 2
Software Engineering unit 2
Abhimanyu Mishra
 
Software Engineering Unit 1
Software Engineering Unit 1Software Engineering Unit 1
Software Engineering Unit 1
Abhimanyu Mishra
 
Theory of automata and formal languages Unit 4
Theory of automata and formal languages Unit 4Theory of automata and formal languages Unit 4
Theory of automata and formal languages Unit 4
Abhimanyu Mishra
 

More from Abhimanyu Mishra (19)

Cd unit i
Cd unit iCd unit i
Cd unit i
 
Presentation1(JIT gnomio)
Presentation1(JIT gnomio)Presentation1(JIT gnomio)
Presentation1(JIT gnomio)
 
Sta unit 5(abimanyu)
Sta unit 5(abimanyu)Sta unit 5(abimanyu)
Sta unit 5(abimanyu)
 
Sta unit 3(abimanyu)
Sta unit 3(abimanyu)Sta unit 3(abimanyu)
Sta unit 3(abimanyu)
 
Sta unit 4(abimanyu)
Sta unit 4(abimanyu)Sta unit 4(abimanyu)
Sta unit 4(abimanyu)
 
Sta unit 3(abimanyu)
Sta unit 3(abimanyu)Sta unit 3(abimanyu)
Sta unit 3(abimanyu)
 
Sta unit 2(abimanyu)
Sta unit 2(abimanyu)Sta unit 2(abimanyu)
Sta unit 2(abimanyu)
 
Unit1
Unit1Unit1
Unit1
 
Daa unit 5
Daa unit 5Daa unit 5
Daa unit 5
 
Daa unit 4
Daa unit 4Daa unit 4
Daa unit 4
 
Daa unit 3
Daa unit 3Daa unit 3
Daa unit 3
 
Daa unit 2
Daa unit 2Daa unit 2
Daa unit 2
 
Daa unit 1
Daa unit 1Daa unit 1
Daa unit 1
 
Software Engineering unit 5
Software Engineering unit 5Software Engineering unit 5
Software Engineering unit 5
 
Software Engineering unit 4
Software Engineering unit 4Software Engineering unit 4
Software Engineering unit 4
 
Software Engineering unit 3
Software Engineering unit 3Software Engineering unit 3
Software Engineering unit 3
 
Software Engineering unit 2
Software Engineering unit 2Software Engineering unit 2
Software Engineering unit 2
 
Software Engineering Unit 1
Software Engineering Unit 1Software Engineering Unit 1
Software Engineering Unit 1
 
Theory of automata and formal languages Unit 4
Theory of automata and formal languages Unit 4Theory of automata and formal languages Unit 4
Theory of automata and formal languages Unit 4
 

Recently uploaded

power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
ongomchris
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
Vijay Dialani, PhD
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 

Recently uploaded (20)

power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 

Theory of Automata and formal languages unit 1

  • 1. THEORY OF AUTOMATAAND FORMAL LANGUAGES UNIT-I ABHIMANYU MISHRA ASSISTANT PROF.(CSE) JETGI Abhimanyu Mishra(CSE) JETGI12/31/2016
  • 2. What is Automata? AUTOMATA An Automation derived from the Greek word which means "self-acting". An automaton (Automata in plural) is an theoretical self-propelled computing device which follows a predetermined sequence of operations automatically. “A set of string all of which are chosen form some ∑*,where ∑ is particular alphabet, is called a language". If ∑ is an alphabet, and L<= ∑*, then L is said to be language over alphabet ∑. KLEENE CLOSURE “If S is a set of words then by S* we mean the set of all finite strings formed by concatenating words from S, where any word may be used as often we like, and where the null string is also included” For example if ∑={0,1} ∑* ={ €,0,1,00,01,10,11,000,001,…………} Abhimanyu Mishra(CSE) JETGI12/31/2016
  • 3. Finite automation is called “finite” because number of possible states and number of letter in the alphabet are both finite, and “automation” because the change of the state is totally governed by the input. it is deterministic, since, what state is next is automatic not will-full, just as the motion of the hands of the clock is automatic, while the motion of hands of a human is presumably the result of desire and thought. THERE ARE TWO TYPES OF FINITE AUTOMATA (A) DETERMINISTIC FINITE AUTOMATA(DFA) (B) NON DETERMINISTIC FINITE AUTOMATA(NDFA) FINITE AUTOMATA Abhimanyu Mishra(CSE) JETGI12/31/2016
  • 4. DETERMINISTIC FINITE AUTOMATA(DFA) IS A QUINTUPLE (Q,Σ, δ,q0,F) 1. where :Q is a finite set of states. 2. Σ is a finite set of symbols, called the alphabet of the automaton. 3. δ is the transition function, that is, δ: q × Σ → Q. 4. q0 is the start state, that is, the state of the automaton before any input has been processed, where q0∈ Q. 5. F is a set of states of q (i.e. F⊆Q) called accept states. (A) DETERMINISTIC FINITE AUTOMATA(DFA) Abhimanyu Mishra(CSE) JETGI12/31/2016
  • 5. A.1 PROCESSING OF STRINGS BY DFA • Suppose a1,a2,………………… an is a sequence of input symbols. We start out with deterministic finite automata having q1,q2,………………… qn states where q0 is the initial state and qn is the final state and transition function and processed as……….. δ(q0, a1 ) = q1 δ(q1, q2 ) = q2 . . . . δ(qn-1 , qn ) = qn Input a1,a2,………………… an is said to be “accepted” since qn is the member of the final states, and if not then it is “ rejected” Abhimanyu Mishra(CSE) JETGI12/31/2016
  • 6. A.2 TRANSITION GRAPH • A transition graph is a collection of three things: 1. A finite set of states, at least one of which is designated as the start state. start state final state 2. An alphabet Σ of possible input letters from which input strings are formed. 3. A finite set of transitions that show how to go from some states. Abhimanyu Mishra(CSE) JETGI12/31/2016
  • 7. A.3 TRANSITION DIAGRAM Transition Diagram Notations: A transition diagram for DFA, M=(Q,Σ, δ,q0,F) is a graph defined as follows: (a) For each state in Q there is a node represented by the circle. (b) For each state q in Q and each input symbol a in Σ, let δ(q,a)=P. a a a,b or or b (c) If any state q in Q is the starting state then it represented by the circle with arrow as q P q P q P q Abhimanyu Mishra(CSE) JETGI12/31/2016
  • 8. A transition table is a conventional, tabular representation of a function like δ that takes two arguments and return a state. The rows of the table correspond to the states, and the columns correspond to the input. State δ(q,a). For example: q0 is the starting state and q2 is the final state A.4 TRANSITION TABLES δ/ Σ a b q0 q1 q2 q1 q2 q0 q2 q2 q2 Abhimanyu Mishra(CSE) JETGI12/31/2016
  • 9. And the transition diagram: b a a a,b Q={q0, q1, q2 } F={q2 } δ(q0 , a) = q1 , δ(q0 , b) = q2 δ(q0 , a) = q2 , δ(q0 , b) = q0 δ(q0 , a) = q2 , δ(q0 , b) = q2 q0 q0 q1 q2 Abhimanyu Mishra(CSE) JETGI12/31/2016
  • 10. Example 1:- • Design a FA that accepts set of strings such that every string end in 00, over alphabet: {0,1} Σ = { 0,1} Sol:- We have M= (Q,Σ, δ,q0,F) be the DFA q0 : initial state, Σ : {0,1} is given 0,1 Start 0 0 First we will decide the approach to design FA. It is not an easy task to think FA as a whole, So first we have to fulfill minimum condition i.e every string end in 00. q0 q1 q2 Abhimanyu Mishra(CSE) JETGI12/31/2016
  • 11. Facts in Designing Procedure of Finite Automata (a) In the designing of FA, First of all we have to analyze the set strings language which is accepted by the FA. (b) Make sure that every state is check for the output state for every symbol of Σ. (c) Make sure, that there is one initial state and at least one final state in transition diagram of FA. (d) Make sure that no state must have two different output state for a single input symbol. Abhimanyu Mishra(CSE) JETGI12/31/2016
  • 12. Nondeterministic finite automaton with ε-moves (NFA-ε) is a further simplification to NFA. this automaton replaces the transition function with the one that allows the empty string ε as a possible input. the transitions without overwhelming an input symbol are called ε-transitions. Let M be NFA then M is Defined as: M = (Q,Σ, δ,q0,F) (1) a finite set of states q0 (2) a finite set of input symbol Σ (3) a transition function δ : q × Σ → P(q). (4) an initial (or start) state q0 ∈ Q (5) a set of states f distinguished as accepting (or final) states F ⊆ Q (B) NON DETERMINISTIC FINITE AUTOMATA(NDFA) Abhimanyu Mishra(CSE) JETGI12/31/2016
  • 13. 0,1 0,1 0 0 START 0,1 1 1 according to analysis it is clear that NFA will accepts the strings of the pattern 00,11,101000,101100,…………………….. Example 1: Design a NFA for the language L= all strings over {0,1} that have at least two consecutive 0 and 1. q0 q1 q2 q2 q4 Abhimanyu Mishra(CSE) JETGI12/31/2016
  • 14. Procedure for converting NFA to equivalent DFA. 1) intially Q=ɸ. 2) Put {q0 } into Q. 3) Then for each state q in Q do the following add this new state, add δ(q,a) = ᴜp€q δ(p,a) to δ on the right hand side is that of NFA 4) Repeat step 3 till new states. TRANSFORMATION OF NFA TO DFA Abhimanyu Mishra(CSE) JETGI12/31/2016
  • 15. Example:1 Convert the following NFA in to DFA a,b b • Start a a a,b b q0 q3 q2q1 Abhimanyu Mishra(CSE) JETGI12/31/2016
  • 16. Solution Step 1 ( We get new state) δ(q0, a ) = {q0, q1 } New single state δ(q0, b ) = {q0 } Step 2 In step 1 we are getting a new state {q0, q1 }. Now repat step 1 for this new state only, so all transition of a and b from {q0, q1 } as δ({q0 , q1 },a) = δ(q0, a ) U δ(q1, a ) = {q0, q1 } U {q0 } = {q0, q1, q2 } New single state δ({q0 , q1 },b) = δ(q0, b ) U δ(q1, b ) = {q0, q1 } Step3 Repeat step 2 δ({q0 , q1, q2 },a) = δ(q0, a ) U δ(q1, a ) U δ(q2, a) = {q0, q1 } U {q2 }U {q3 } = {q0 , q1, q2, q3 } New single state δ({q0 , q1, q2 },b) = δ(q0, b ) U δ(q1, b ) U δ(q2, b) = {q0 , q1, q3 } New single state Abhimanyu Mishra(CSE) JETGI12/31/2016
  • 17. Step 4: Repeat Step 3 δ({q0 , q1, q2, q3 },a) = {q0 , q1, q2, q3 } OLD STATE δ({q0 , q1, q2, q3 },b) = {q0 , q1, q2, q3 } OLD STATE Step 5: Repeat Step 4 δ ({q0 , q1, q3 },a) = {q0 , q1, q2, q3 } OLD STATE δ ({q0 , q1, q3 },b) = {q0 , q1, q2, q3 } OLD STATE Now Transition table δ/ Σ a b q0 {q0, q1 } {q0 } {q0, q1 } {q0, q1, q2 } {q0, q1 } {q0, q1, q2 }* {q0 , q1, q2, q3 } {q0 , q1, q3 } {q0 , q1, q2, q3 }* {q0 , q1, q2, q3 } {q0 , q1, q2, q3 } {q0 , q1, q3 }* {q0 , q1, q2, q3 } {q0 , q1, q2, q3 } Abhimanyu Mishra(CSE) JETGI12/31/2016
  • 18. Lets Mark the whole structure in Alphabets q0 A {q0, q1 } B {q0, q1, q2 } C {q0 , q1, q2, q3 } D {q0 , q1, q3 } E Abhimanyu Mishra(CSE) JETGI12/31/2016
  • 19. A is initial state and C,D and E are final states since they contain q2, q3 as member which are final states of NFA • Transition Table δ/ Σ a b A B A B C B *C D E *D D D *E D D Abhimanyu Mishra(CSE) JETGI12/31/2016
  • 20. Final Transition Diagram • b b • Start a • a • b • a a • b • a,b A D E C B Abhimanyu Mishra(CSE) JETGI12/31/2016
  • 21. NFA with ∈ -Transitions • IF a FA is modified to permit transition without input symbols, along with zero, one or more transition on input symbols, then we get NFA with ∈- transition, because the transition made without symbols are called as ∈- transitions. 0 1 0 Start ∈ ∈ Abhimanyu Mishra(CSE) JETGI q0 q1 q2 12/31/2016
  • 22. Example:2 Consider the NFA with ∈-transition M =(Q,Σ, δ,q0,F) Q={q0, q1, q2 } Σ={a,b,c} and ∈ moves Initial state ={q0 } F= { q2 } δ/ Σ a b c ∈ q0 {q0} {ɸ} {ɸ} {q1} q1 {ɸ} {q1} {ɸ} {q2} *q2 {ɸ} {ɸ} {q2} {ɸ} Abhimanyu Mishra(CSE) JETGI12/31/2016
  • 23. And the transition Diagram: NFA with ∈-transition a b c Start ∈ ∈ Abhimanyu Mishra(CSE) JETGI q0 q1 q2 12/31/2016
  • 24. SOLUTION:- Step 1- Find the states of NFA without ∈-transition including initial state and final states as follows: (i) Initial state will be ∈ -closure of initial state of NFA with ∈-transitions in ∈-closure(q0) = {q0, q1, q2 } (New Initial state for NFA without ∈ transition) (ii) Rest of the states are: ∈-closure(q1) ={q1, q2 } New State ∈-closure(q2) ={q2} New State (iii) The final states of NFA without ∈-transition are all those new states which contains final state of NFA with ∈- transition as members. M’ =(Q’,Σ’, δ’,q0’,F’) Q’ =({q0, q1, q2 } ,{q1, q2 }, {q2} ) Step 2-Now we have to decide δ’ to find out the transition as follows δ’ ({q0, q1, q2},a) = ∈-closure(δ(q0, q1, q2 ),a) = ∈-closure(δ(q0, a)U(δ(q1, a)U(δ(q2, a)) = ∈-closure(δ(q0U ɸU ɸ) = ∈-closure(q0) = {q0, q1, q2 } Abhimanyu Mishra(CSE) JETGI12/31/2016
  • 25. Similarly, δ’ ({q0, q1, q2},b) = ∈-closure(δ(q0, q1, q2 ),b) = ∈-closure(δ(q0, b)U(δ(q1, b)U(δ(q2, b)) = ∈-closure(δ(ɸ U q1U ɸ) = ∈-closure(q1) = {q1, q2 } δ’ ({q0, q1, q2},c) = ∈-closure(δ(q0, q1, q2 ),c) = ∈-closure(δ(q0, c)U(δ(q1, c)U(δ(q2, c)) = ∈-closure(δ(ɸ U ɸU q2) = ∈-closure(q2) = { q2} So we write same for others, δ’ ({q1, q2},a) = ɸ δ’ ({q1, q2},b) = {q1, q2} δ’ ({q1, q2},c) = {q2} δ’ ({q2},a) = ɸ δ’ ({q2},b) = ɸ δ’ ({q2},c) = {q2} Abhimanyu Mishra(CSE) JETGI12/31/2016
  • 26. So, transition table for NFA ∈-transition will be as: δ/ Σ a b c {q0, q1, q2}* {q0, q1, q2} {q1, q2 } { q2} {q1, q2 }* ɸ {q1, q2 } { q2} { q2}* ɸ ɸ { q2} Abhimanyu Mishra(CSE) JETGI12/31/2016
  • 27. {q0, q1, q2} as qx {q1, q2 } as qy { q2} as qz • a b start b c c c NFA without ∈-transition Abhimanyu Mishra(CSE) JETGI qx qz qy 12/31/2016
  • 28. MINIMIZATION ALGORITHM FOR DFA (i) all states are unreachable from the initial state via any set of transition of DFA M are removed (ii) draw the transition tables for rest states, after removing the unreachable states (iii) split the transition table in two tables (iv) find the similar rows (v) Repeat the same process (vi) Now combined the Reduced tables, and removing non reachable states, dead states. Minimization of DFA’S Abhimanyu Mishra(CSE) JETGI12/31/2016
  • 29. Example 1 : Minimize the DFA given below • Start b a b b a a b a a b a a b a b b Abhimanyu Mishra(CSE) JETGI q0 q4 q7 q6 q1 q0 q3 q2 12/31/2016
  • 30. STEP 1: Remove the unreachable states from the given DFA. the DFA given in diagram q3 is unreachable state so remove it. STEP 2: Draw the Transition table for rest states. Solution : Abhimanyu Mishra(CSE) JETGI δ/ Σ a b q0 q5 q1 q1 q2 q6 *q2 q2 q0 q4 q5 q7 q5 q6 q2 q6 q7 q6 q7 q2 q6 12/31/2016
  • 31. Step 3: Now divide rows of transition table in two sets as: • (i) • (ii) Abhimanyu Mishra(CSE) JETGI q0 q5 q1 q1 q2 q6 q4 q5 q7 q5 q6 q2 q6 q7 q6 q7 q2 q6 *q2 q2 q0 12/31/2016
  • 32. row 2 and row 6,are similar since q1 and q7 transit to same states on a and b, so skip of them row 6 then q7 is replaced by q1 in the rest Step 4: Apply step 4 on both the sets individually. Now consider set (i) Abhimanyu Mishra(CSE) JETGI q0 q5 q1 q1 q2 q6 q4 q5 q7 q5 q6 q2 q6 q7 q6 q7 q2 q6 12/31/2016
  • 33. Abhimanyu Mishra(CSE) JETGI q0 q5 q1 q1 q2 q6 q4 q5 q1 q5 q6 q2 q6 q4 q6 12/31/2016
  • 34. Step 5 Repeat step 4 same process Again Row 1 and Row 3 Similar q0 q5 q1 q1 q2 q6 q4 q5 q1 q5 q6 q2 q6 q4 q6 Abhimanyu Mishra(CSE) JETGI q0 q5 q1 q1 q2 q6 q5 q6 q2 q6 q0 q6 12/31/2016
  • 35. Step 6 Combined Set minimized sets Now below minimized Transition table. δ/ Σ a b q0 q5 q1 q1 q2 q6 q5 q6 q2 q6 q0 q6 *q2 q2 q0 Abhimanyu Mishra(CSE) JETGI12/31/2016
  • 36. Transition Diagram of Minimized DFA Start b b a b a a a b b a Abhimanyu Mishra(CSE) JETGI q6 q0 q2q5 q1 12/31/2016
  • 37. Myhill-Nerode theorem is used to eliminate useless states from a DFA. Myhill-Nerode Theorem says the three statements are equivalent: (i) The language L, a subset of Σ*, is accepted by a DFA (ii) L is the union of some of the equivalence classes of right invariant equivalence relation of finite index. (iii) Let equivalence relation RL be defined by: xRLy if and only if for all Z in Σ*, xz is in L exactly when yz is in L. Then RL is of finite index THANKS MYHILL-NERODE THEOREM Abhimanyu Mishra(CSE) JETGI12/31/2016