0% found this document useful (0 votes)
18 views25 pages

Automata

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views25 pages

Automata

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 25

Block Diagram of Finite

Automata
a a b b b a a a b
Header

Q0 Q1

Q2
Control

Q4 Q3
String is accepted when control reach to the final state and all characters of the string are
scanned if not the string is not recognized and string is not accepted.
Book
Discrete Structure
and
Automata Theory
By Rakesh Dube Adesh pandey and Ritu Gupta
Automata
-It is study of abstract computing device or machine .it is study of mathemetical or logical model to
automatically accepted the string.
-It plays an important role to making a software for designing and checking the behavior of digital circuit.
-Lexical analyser of the compiler,that break text into logical units such as identifier ,keywords and
puncuation.
-software for checking large bodies of text ,such as web pages to find occurrence of words, phrases and
pattern
- it play an important role for making a software for natural language processing.
Real Time example of Automata us automatic photo printing machine, artificial card punching
machine, human detection and recognition,automatic washing machine.
-
Types of Automata
1. Automata with Output.------------------------------1.Melay machine
2.Moore machine
2.Automata without Output-------------------------1. Deterministic finite automata
2. Non Deterministic finite auotomata
3.Non Detrministic finite automata with ϵ-Move
4. Push down automata
5. Turing Machine
Symbols used in Automata
∑= Set of alphabet
∑*= set of string generatedΦ with alphabet including
∑+=set of strings excluding Φ

Example =∑={a,b,c}
∑*={Φ,a,b,c,ab,ac,abc,bc,ca
1*={Φ,1,11,111,11111…….}
Language= its is a strings accepted by the machine or model
* IS CALLED KLEEN STAR.
Transition Diagram and
transition table
b
a b a
Q0 - Q1 Start
Q0 Q1 Q2
Q2
Q1 Q1 Q2 b
b
Q2 - Q2

Transition diagram
Transition table

QO,Q1,Q2 IS STATE OF
MACHINE a,b is the input
to the machine
DFA
Finite automata is said to be DFD if for unique input, machine transmit to the next unique state
Mathematically ,DfA is represented as 5 tuples
M={Q,Qo,∑,Qf, δ} where Q = Set of states,Q0- initial state,∑- set of alphabets, Qf-final state,
δ-Transition function
δ : Qx∑->Q --- δ(QO,a)=Q1

Example- Make a DFD which accepts the String Generated with 0,1.
Start
Q0

1011110
0/1
Example 2
Make a DFD which ACCEPT the string starting with 1 and generate with 0 and 1 character.

0/1 0 1
Start Q0 1 1 Q1
Q1 start Q01 1 Q1 Q1
q1
10101
0
3. make a DFD which accepts the string ending with 1 and generated with 0 and 1.

4 .Make a DFD which accepts a string which have end character 10 and generated with 0 and 1 0
1 0 1
Q0 1 Q1 0 q2
Q2
11010
Start
0 0 1
Example 5
Make a DFD which ACCEPT the string containing odd Number of 1 but generated with 0 and 1.

0 0 0
Start 1 1 0 1 0011
Q0 Q1
Q1 Q0
q0 Q1

1 1
3. make a DFD which accepts the string containing even number of 1 and generated with 0
and 1.
4 .Make a DFD which accepts a string which have end character 10 and generated with 0 and 1
0 1
Start Q0 1 Q1 0 q2
Q2

0 0 1
NFA
In this automata machine go to more than one state with single input.
Mathematically it is defined as
M={Q,Qo,∑,Qf,ꭍ} where Q = Set of states,Q0- initial state,∑- set of alphabets, Qf-final state,
δ -Transition function
δ : Qx∑->2Q
Example - 1 0
QO 1 Q1
Q1
δ(Q0,1)={QO,Q1}
Example of NFA
1 Make a NFA which ACCEPT the string starting with 1 and
generate with 0 and 1 character
make a NFA which accepts the string ending with 1 and
2 generated with 0 and 1.
3 Make a NFA which accepts a string which have end character
10 and generated with 0 and 1

4 Make a NFA which accepts a string which have end character


01 and generated with 0 and 1
1 q0 1 q1 0/1
0/1
2 q0 1 q1
0/1
3 1 0
q0 q1 q2
Method to change from NFA to
DFA
1. Take Initial state
2. With each input Find the new state
3.if new state is not exist, repeat the 2 step for each input, if new state exist stop the process
and mark the final state of NFA.
Example ,change NFA to DFA
0/1
START
Q0 1 Q1

1.
0
START
Q0 1
{Q0,Q1}
Example ,change NFA to DFA
δ({Q0,Q1},0)=δ(Qo,0)Uδ(Q1,0)
=QO
1.
0 1 δ({Q0,Q1},1) =δ(Qo,1)Uδ(Q1,1)
START
Q0 1 {Q0,Q1} =({Q0.Q1}) uΦ
0 0 1 = {Q0,Q1}
1
START Q0 {QF}
1
Example 2.
start 1/0
q0
1 q1 0 q2 δ({Q0,Q2},1)=δ(Qo,1)Uδ(Q2,1)
={q0,q1}uΦ

1. 0 1 =QO
q0 1 0 [qo,q2
{q0,q1} }
}
1
0
Regular Set and Regular
Expression
Regular set= set of strings accepted by automata model
Regular Expression= mathematical expression to represent strings to be accepted by automata
model
0
start q0 1 q1
q1 regular set {1,10,100,1000,100000……….}
Regular Expression=10*
0
q0 0 q1 1 q2 regular={01,001,0001,00000000001…..0000…
exp=00*1
=o+1
EXAMPLES OF REGULAR
EXPRESSION
q0 0 q1 regular set={0 , 1}
regular exp= o+1
1

q0 q1 q1
regular set = {11}
1 1 regular exp =11
0 ϵ
1 1 1 q 1
q0 q1 q2 q3
1 1 4
0

0*1(11)*1
Regular expression
1. strings starting with 1 but generated with 0 and 1 =1(1+0)*
2.Strings end with 1 but generated with 0 and 1 =(1+O)*1
3. strings contains odd number of 1 =1(11)* TRY IT
4 strings contains even number of 1=(11)*
(11)*=Φ,11,1111,
NFA with ϵ-move
Finite automata is said to be NFA with ϵ-move if for any non input , machine can transmit to the
next unique state
Mathematically ,NFA with ϵ-move is represented as 5 tuples
M={Q,Qo,∑,Qf, δ} where Q = Set of states,Q0- initial state,∑- set of alphabets, Qf-final state,
δ-Transition function
δ : Qx(∑u ϵ)->2Q --- δ(QO, ϵ )=Q1
Example- Make a NFA with ϵ-move which accepts the String Generated with 0,1.
Start 0 ϵ
qo 1 q1
ϵ-closure
ϵ-closure(qo)=set of all the states in NFA which can be reached from q0 on a path labeled by ϵ
i.e without any input.
0
q0 1 q1 ϵ q2
ϵ
ϵ-closure(q0)={qo,q2}
ϵ-closure(q1)={q1,q2}
ϵ-closure(q2)={q2}
NFA with ϵ-move to NFA
NFA with ϵ-move = ={Q,Qo,∑,Qf, δ}

NFA = {Q’,Qo’,∑’,Qf,’ δ’}


Q’ = ϵ-closure(Q)
QO’=ϵ-closure(Q0)
Qf’ = ϵ-closure of those state which contains final state
δ’(q0,a) =ϵ-closure(δ(qo,a))
EXAMPLE
ϵ ε-CLOSURE(Q0)={Q0,Q1}
0 1
Q0 Q1 Q2
1 1/0
ϵ 1
STATES=({QO,Q1},Q2) {QO,Q1 Q2

δ’( {QO,Q1},1))= ε-CLOSURE(δ({QO,Q1}),1) ε-CLOSURE(Q1,Q2)


δ’( {QO,Q1},0))= ε-CLOSURE(δ({QO,Q1},0) ϵ-CLOSURE(δ(Q0,0) δ(Q1,0))
NFA ε -CLOSURE(Q1)
δ’( {Q2},0))= ε-CLOSURE(δ({Q2},0))
δ’( {Q2},1))= ε-CLOSURE(δ({Q2}),1)

You might also like