Professional Documents
Culture Documents
UNIT I - Introduction To Finite Automata: Basappa B. Kodada Asst. Professor, Dept. of CSE
UNIT I - Introduction To Finite Automata: Basappa B. Kodada Asst. Professor, Dept. of CSE
Basappa B. Kodada
Asst. Professor, Dept. of CSE
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
Outlines
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
What do you mean by FLAT?
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
Why is it called as Theory of Computation?
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
Definition of Finite Automata
push
off on
push
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
Mathematical Background - Basic Set Theory
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
Mathematical Background - Induction Hypothesis
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
Mathematical Background - Graphs and Trees
e1 a
P Q P Q
e2 e3 b c
e4 d
R S e5 R S e
a
P Q
b c
d
R S e
S
a A b c
a b c d
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
Central Concept of Finite Automata
Symbols
Alphabets
Strings
The Problems
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
Central Concept of Finite Automata - Symbols
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
Central Concept of Finite Automata - Alphabets
Power of an Alphabet:
P It can be defined
Pi as set of all possible
length of i over and it is denoted
P by
Example:
P0 if the input alphabet is = {0, 1} then
P1 = {ǫ}
P2 = {0, 1}
P3 = {00, 01, 10, 11}
= {000, 001, 010, 011, 100, 101, 110, 111} ...etc.
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
Central Concept of Finite Automata - Alphabets
Kleene Properties:
P∗
1. represents the kleene star property which can be defined
as Union of all possible power of an alphabet
P+
2. represents the kleene plus property which can bePdefined
as Union of all possible power of an alphabet except 0
shown below.
Examples:
P∗ P0 P1 P2 P3
= ∪ ∪ ∪ ∪......
P∗
= {ǫ}
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
Central Concept of Finite Automata - Alphabets
Kleene Properties:
P∗
1. represents the kleene star property which can be defined
as Union of all possible power of an alphabet
P+
2. represents the kleene plus property which can bePdefined
as Union of all possible power of an alphabet except 0
shown below.
Examples:
P∗ P0 P1 P2 P3
= ∪ ∪ ∪ ∪......
P∗
= {ǫ, 0, 1}
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
Central Concept of Finite Automata - Alphabets
Kleene Properties:
P∗
1. represents the kleene star property which can be defined
as Union of all possible power of an alphabet
P+
2. represents the kleene plus property which can bePdefined
as Union of all possible power of an alphabet except 0
shown below.
Examples:
P∗ P0 P1 P2 P3
= ∪ ∪ ∪ ∪......
P∗
= {ǫ, 0, 1, 00, 01, 10, 11}
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
Central Concept of Finite Automata - Alphabets
Kleene Properties:
P∗
1. represents the kleene star property which can be defined
as Union of all possible power of an alphabet
P+
2. represents the kleene plus property which can bePdefined
as Union of all possible power of an alphabet except 0
shown below.
Examples:
P∗ P0 P1 P2 P3
= ∪ ∪ ∪ ∪......
P∗
= {ǫ, 0, 1, 00, 01, 10, 11, 000, 001, 010, 011, 111...etc}
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
Central Concept of Finite Automata - Alphabets
Kleene Properties:
P∗
1. represents the kleene star property which can be defined
as Union of all possible power of an alphabet
P+
2. represents the kleene plus property which can bePdefined
as Union of all possible power of an alphabet except 0
shown below.
Examples:
P+ P1 P2 P3
= ∪ ∪ ∪......
P+
= {0, 1}
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
Central Concept of Finite Automata - Alphabets
Kleene Properties:
P∗
1. represents the kleene star property which can be defined
as Union of all possible power of an alphabet
P+
2. represents the kleene plus property which can bePdefined
as Union of all possible power of an alphabet except 0
shown below.
Examples:
P+ P1 P2 P3
= ∪ ∪ ∪......
P+
= {0, 1, 00, 01, 10, 11}
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
Central Concept of Finite Automata - Alphabets
Kleene Properties:
P∗
1. represents the kleene star property which can be defined
as Union of all possible power of an alphabet
P+
2. represents the kleene plus property which can bePdefined
as Union of all possible power of an alphabet except 0
shown below.
Examples:
P+ P1 P2 P3
= ∪ ∪ ∪......
P+
= {0, 1, 00, 01, 10, 11, 000, 001, 010, 011, 111...etc}
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
Central Concept of Finite Automata - Strings
P
String is a finite sequence of symbols obtain from the alphabet ,
denoted by W.
P
W∈ ∗
P
Example: if = {a, b, 0, 1} then
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
Central Concept of Finite Automata - Strings
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
Central Concept of Finite Automata - Languages, Problems
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
Deterministic Finite Automata(DFA)
Definition of DFA
Notations of DFA
How DFA Process the strings?
Extended Transitions Function to the DFA
The Language of DFA
Solved Problems on DFA
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Definition
push
off on
push
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Definition
push
off on
push
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Definition
push
off on
push
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Definition
push
off on
push
Input: Push
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Definition
push
off on
push
Input: Push
Set of States: off, on
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Definition
push
off on
push
Input: Push
Set of States: off, on
Initial State: off
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Definition
push
off on
push
Input: Push
Set of States: off, on
Initial State: off
Transitions: on to off
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Definition
push
off on
push
Input: Push
Set of States: off, on
Initial State: off
Transitions: on to off
off to on
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Definition
push
off on
push
Input: Push
Set of States: off, on
Initial State: off
Transitions: on to off
off to on
Accepting State: off, on
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Definition
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Definition
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Definition
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Definition
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Definition
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Definition
That is
P
D = (Q, , δ, q0 , F)
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Definition
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Definition
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Definition
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Definition
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Definition
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Definition
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Definition
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Definition
Hence DFA can be defined as
P
D = (Q, , δ, q0 , F )
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Definition
Hence DFA can be defined as
P
D = (Q, , δ, q0 , F )
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Notations of DFA
δ Push
off
→ on
on
off
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Notations of DFA
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Notations of DFA
push
start off on
push
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Notations of DFA
Example:
P Finite automata to accept at least one a over the
= {a}
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Notations of DFA
Example:
P Finite automata to accept at least one a over the
= {a}
P
Input Alphabet : {a}
Set of States Q: {q0 , q1 }
Initial State: q0
Final State F: q1
Transition Function δ δ(q0 , a) = q1
. δ(q1 , a) = q1
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Notations of DFA
Example:
P Finite automata to accept at least one a over the
= {a}
P
Input Alphabet : {a}
Set of States Q: {q0 , q1 }
Initial State: q0
Final State F: q1
Transition Function δ δ(q0 , a) = q1
. δ(q1 , a) = q1
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Notations of DFA
Example:
P Finite automata to accept at least one a over the
= {a}
P
Input Alphabet : {a}
Set of States Q: {q0 , q1 }
Initial State: q0
Final State F: q1
Transition Function δ δ(q0 , a) = q1
. δ(q1 , a) = q1
a
start q0 q1
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - How DFA processes the string
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - How DFA processes the string
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - How DFA processes the string
a
start q0 q1
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - How DFA processes the string
a
start q0 q1
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - How DFA processes the string
a
start q0 q1
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - How DFA processes the string
a
start q0 q1
δ(q1 , a) = q1
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - How DFA processes the string
a
a
start q0 q1
a a a
δ(q0 , a) = q1
a
δ(q1 , a) = q1
δ(q1 , a) = q1
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Extended Transition Function (δ̂) to DFA
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Extended Transition Function (δ̂) to DFA
W = xα
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Extended Transition Function (δ̂) to DFA
W = xα
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Extended Transition Function (δ̂) to DFA
W = xα
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Extended Transition Function (δ̂) to DFA
W = xα
W = |0010
{z}
x
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Extended Transition Function (δ̂) to DFA
W = xα
W = |0010
{z} 1
|{z}
x α
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Extended Transition Function (δ̂) to DFA
W = xα
W = |0010
{z} 1
|{z}
x α
W = |{z}
001
x
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Extended Transition Function (δ̂) to DFA
W = xα
W = |0010
{z} 1
|{z}
x α
W = |{z}
001 0
|{z}
x α
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Extended Transition Function (δ̂) to DFA
W = xα
W = |0010
{z} 1
|{z}
x α
W = |{z}
001 0
|{z}
x α
W = |{z}
00
x
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Extended Transition Function (δ̂) to DFA
W = xα
W = |0010
{z} 1
|{z}
x α
W = |{z}
001 0
|{z}
x α
W = |{z}
00 1
|{z}
x α
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Extended Transition Function (δ̂) to DFA
W = xα
W = |0010
{z} 1
|{z}
x α
W = |{z}
001 0
|{z}
x α
W = |{z}
00 1
|{z}
x α
W = |{z}
0
x
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Extended Transition Function (δ̂) to DFA
W = xα
W = |0010
{z} 1
|{z}
x α
W = |{z}
001 0
|{z}
x α
W = |{z}
00 1
|{z}
x α
W = |{z}
0 0
|{z}
x α
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Extended Transition Function (δ̂) to DFA
W = xα
W = |0010
{z} 1
|{z}
x α
W = |{z}
001 0
|{z}
x α
W = |{z}
00 1
|{z}
x α
W = |{z}
0 0
|{z}
x α
W = |{z}
ǫ
x
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Extended Transition Function (δ̂) to DFA
W = xα
W = |0010
{z} 1
|{z}
x α
W = |{z}
001 0
|{z}
x α
W = |{z}
00 1
|{z}
x α
W = |{z}
0 0
|{z}
x α
W = |{z}
ǫ 0
|{z}
x α
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Extended Transition Function (δ̂) to DFA
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Extended Transition Function (δ̂) to DFA
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Extended Transition Function (δ̂) to DFA
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Extended Transition Function (δ̂) to DFA
W = xα
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Extended Transition Function (δ̂) to DFA
W = xα
x = xα until x ∈ ǫ
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Extended Transition Function (δ̂) to DFA
W = xα
x = xα until x ∈ ǫ
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Extended Transition Function (δ̂) to DFA
W = xα
x = xα until x ∈ ǫ
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Extended Transition Function (δ̂) to DFA
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Extended Transition Function (δ̂) to DFA
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Extended Transition Function (δ̂) to DFA
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Extended Transition Function (δ̂) to DFA
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Extended Transition Function (δ̂) to DFA
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Extended Transition Function (δ̂) to DFA
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Extended Transition Function (δ̂) to DFA
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Extended Transition Function (δ̂) to DFA
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Extended Transition Function (δ̂) to DFA
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Extended Transition Function (δ̂) to DFA
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Extended Transition Function (δ̂) to DFA
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Extended Transition Function (δ̂) to DFA
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - The Language of DFA
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - The Language of DFA
Definition
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - The Language of DFA
Definition
The Language of Deterministic Finite State Machine can be
defined as
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - The Language of DFA
Definition
The Language of Deterministic Finite State Machine can be
defined as
L = {W
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - The Language of DFA
Definition
The Language of Deterministic Finite State Machine can be
defined as
P∗
L = {W|W ∈
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - The Language of DFA
Definition
The Language of Deterministic Finite State Machine can be
defined as
P∗
L = {W|W ∈ and δ̂(q0 , W ) ∈ F }
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Solved Examples
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Solved Examples
P
Problems on Atleast and Atmost
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Solved Examples
P
Problems on Atleast and Atmost
P
Problems on Starting and/or Ending
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Solved Examples
P
Problems on Atleast and Atmost
P
Problems on Starting and/or Ending
Problems on Sub-string
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Solved Examples
P
Problems on Atleast and Atmost
P
Problems on Starting and/or Ending
Problems on Sub-string
P
Problems on Even and/or Odd
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Solved Examples
P
Problems on Atleast and Atmost
P
Problems on Starting and/or Ending
Problems on Sub-string
P
Problems on Even and/or Odd
P
Problems on Consecutive
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Solved Examples
P
Problems on Atleast and Atmost
P
Problems on Starting and/or Ending
Problems on Sub-string
P
Problems on Even and/or Odd
P
Problems on Consecutive
P
Problems on Followed by
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Solved Examples
P
Problems on Atleast and Atmost
P
Problems on Starting and/or Ending
Problems on Sub-string
P
Problems on Even and/or Odd
P
Problems on Consecutive
P
Problems on Followed by
P
Problems on Combination on
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Solved Examples
P
Problems on Atleast and Atmost
P
Problems on Starting and/or Ending
Problems on Sub-string
P
Problems on Even and/or Odd
P
Problems on Consecutive
P
Problems on Followed by
P
Problems on Combination on
P
Problems on Divisible by k on
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Solved Examples
P
Problems on Atleast and Atmost
P
Problems on Starting and/or Ending
Problems on Sub-string
P
Problems on Even and/or Odd
P
Problems on Consecutive
P
Problems on Followed by
P
Problems on Combination on
P
Problems on Divisible by k on
P
Problems on Modulo K-Counter on
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - General Procedure to solve the problems
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - General Procedure to solve the problems
P
1. Identify the Input Alphabet , minimum String (MS)
required to design the Machine and Draw the State Transition
Diagram for the minimum string with initial State.
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - General Procedure to solve the problems
P
1. Identify the Input Alphabet , minimum String (MS)
required to design the Machine and Draw the State Transition
Diagram for the minimum string with initial State.
2. Construct the Transition function δ for each input symbol on
each state except transitions of the MS transition Diagram.
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - General Procedure to solve the problems
P
1. Identify the Input Alphabet , minimum String (MS)
required to design the Machine and Draw the State Transition
Diagram for the minimum string with initial State.
2. Construct the Transition function δ for each input symbol on
each state except transitions of the MS transition Diagram.
3. Identify the Final State by testing the input symbols and
Construct the Final Transition Table, State Transition
Diagram.
Note: This procedure can be used to construct the DFSA except
Divisible by K-Problems and Modulo K-Counter Problems.
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Simple Solved Problem
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata
DFA - Simple Solved Problem
Example
Design a DFSA to accept the strings of a’s having atleast two a or
Design the DFSA for the Language L={an |n > 2} .
Solution:P
Step 1: = {a}, MS= aa
a a
start q0 q1 q2
Step 2:
Basappa B. Kodada Asst. Professor, Dept. of CSE UNIT I - Introduction to Finite Automata