Chapter 1
Chapter 1
Finite Automata
FLAT CHAPTER 2 1
Finite Automata
• The Finite Automata is the simplest machine which is used to
recognize patterns.
• It has a finite set of states with which it accepts or rejects strings.
• It is an abstract machine which has five elements or tuples.
• It is good for devices which have an extremely limited amount of
memory.
• It has a set of states and rules for moving from one state to
another, but it relies upon the applied input symbol.
• It has finite memory and an input tape.
• The machine accepts the input if it is in the accepting state at the
end of the string; otherwise, it rejects the input.
FLAT CHAPTER 2 2
Concepts of Finite Automata
• The basic concept behind finite automata through an example-
• Suppose you want to recognize the word 'Yes' as an input string in a
program.
• Then the steps of the program something like this-
• Initialization
• Looking for the first word, i.e., "Y" and recognized "Y"
• Looking for the next word, i.e., "e" and recognized "Ye"
• Looking for the next word, i.e., "s" and recognized "Yes"
• Real life example of Finite Automata
– An automatic door is a good example of finite automata.
– It is sensing a person's appearance and accordingly open & close the door.
– It has two states OPEN and CLOSE and the controller works on the input signals.
– If it receives input either from FRONT or REAR or from both, it opens the door long
enough to pass the person and then close the door.
FLAT CHAPTER 2 3
Finite State Automata/Machine
• A FSM is a mathematical model used to design algorithms, powerful tools
when designing digital circuits.
• FSA is a simple machine model with finite memory.
• The class of language recognized by FSA is regular languages.
• A language is regular, or FA-recognizable, if it is recognized by some finite
automaton.
• FSA is a simple machine which reads an input string one letter at a time and
then, after the input is completely read, decides to accept or reject the input.
• FSA consists of three parts: a tape, a tape head (or, simply, head), and a finite
control.
• The tape is used to store the input data. It is divided into a finite number of
cells. Each cell holds a symbol from a given alphabet ∑ .
FLAT CHAPTER 2 4
Finite State Automata/Machine
• The tape head scans the tape, reads symbols from the tape, and
passes the information to the finite control.
• At each move of the FSA, the head scans one cell of the tape
and reads the symbol in the cell and then moves to the next
cells to the right.
• The finite control has finite number of states which form the
state set Q.
• At the beginning of a move, the control is in one of the states.
Then it determines, from the current state and the symbol read
by the tape head, how the state is changed to a new state.
• More precisely, the change of state at each move is governed by
a state transition function (or, simply, transition function).
FLAT CHAPTER 2 5
Finite State Automata/Machine
FLAT CHAPTER 2 6
Finite State Automata
• A finite automata has several parts. It has a set of states and
rules for going from one state to another, depending on the
input symbol.
• The list of five objects is sets of states, start state, input
alphabet, rules for moving and accept state. In a mathematical
language, a list of five objects is obtained called five tuples-
• where
Q - Finite set of states,
∑ - alphabet of input symbols,
δ: Q × ∑ → Q - transition function,
q0 (q0 ∈ Q) - initial state,
F - A set of final state (F ⊆ Q) (Accept states) .
FLAT CHAPTER 2 7
FSA Representation
• A finite state automata is a model of behavior composed of
finite number of states, transitions between those states and
actions.
• The finite automata are generally represented by the
transition diagram having the following states.
• FSA components:
FLAT CHAPTER 2 8
State Diagram of Finite Automata
• Suppose, here is a state diagram of finite automaton M.
0 1
q0 q1 q0
q1 q1 q2
q2 q1 q1
FLAT CHAPTER 2 9
Example of FSA
• We can describe the given FA (M1) formally by writing M 1 =
(∑, Q, δ, ql, F), where
FLAT CHAPTER 2 10
How Machine M operates.
• M “reads” one letter at a time from the input string (going
from left to right)
• M starts in state q0.
• If M is in state qi reads the letter a then
– If (qi, a) is undefined then CRASH.
– Otherwise M moves to state (qi,a)
FLAT CHAPTER 2 11
Example
• Example computation:
• Input word w: 1 0 1 1 0 1 1 1 0
• States: a b a b c a b c d d
• We say that M accepts w, since w leads to d, an accepting
state.
FLAT CHAPTER 2 12
FSA Usage
• FSA can be used for two purposes:
Recognition – Finite-state Acceptor (recognizer)
• Accept some strings of symbols.
• Recognize a language, which is the set of strings it
accepts.
Generation – Finite-state Transducer.
• A finite state generator is a simple computing machine
that outputs a sequence of symbols.
FLAT CHAPTER 2 13
Finite State Acceptors (Recognizers)
• FSR classifies input strings into two classes:
Strings it accepts and strings it rejects.
• Finite-state Recognizer:
– Equivalent to a string of input symbols that enter the
machine at successive times.
– A string is accepted by FSM: if and only if the state the
FSM enters after having read rightmost symbol is an
accepting state.
– Set of strings recognized by an FSM: all input strings that
take the FSM from its starting state to an accepting state.
FLAT CHAPTER 2 14
Finite State Acceptors (Recognizers)
FLAT CHAPTER 2 15
Finite State Acceptors (Recognizers)
FLAT CHAPTER 2 16
FSA
EXAMPLE: Consider the finite-state automaton M defined by the state
diagram shown below:
•a. What are the states (Q) of M?
•b. What is the alphabet ( ) of M?
•c. What is the start state of M?
•d. What are the accept states (F) of M?
•e. Find T(q2, 1).
•f. Create the transition table of M.
FLAT CHAPTER 2 17
FSA
Consider the finite-state automaton A defined by the following transition
table.
a. What are the states (Q) of A?
b. What is (the alphabet of A)?
c. What is the start state of A?
d. What are the accept states (F) of A?
e. Find T(q2, b).
f. Draw a state diagram for A.
FLAT CHAPTER 2 18
FSA
• Example: Design a finite-state automaton that accepts the set of all strings of 0's and 1's c.
• The automaton M must have at least four distinct states: q0: the start state;
• q1: the state to which M goes when the first 1 is read from the string;
• q2: the state to which M goes when the second 1 is read from the string;
• q3: the state to which M goes when the third 1 is read from the string;
• If M is in state q0 and a 0 is input, M stays in state q0, but as soon as a 1 is input , M moves to
state q1.
• At state q1, if a 0 is input, M stays in state q1, but as soon as a 1 is input, M moves to state q2.
• As above, M stays in state q2, until a 1 is input, then M moves to q3.
• At state q3, if a 0 is input, the input string still has three 1s. so M stays in state q3. But if a 1 is
input (i.e., the fourth 1 in the string), then the input string contains more then three 1's, so M
must leave q3 (as no string with more than three 1s is to be accepted by M). M cannot go back to
any of the previous states q0, q1, or q2 because those states can go to q3 again. So M must go to a
fifth state, q4, from which there is no return to q3. The complete state diagram for M is shown
below.
FLAT CHAPTER 2 19
Finite State Transducers
• A finite state transducer (FST) is essentially an FSA finite state
automaton that works on two (or more) tapes.
• The most common way to think about transducers is as a kind of
translating machine which works by reading from one tape
and writing onto the other.
FLAT CHAPTER 2 20
Finite State Transducers
• Formal Definition of finite state transducer (FST)
• FSR - finite state automaton with initial and final states, and
output is a 7-tuple: < ∑, Q, δ, q0, F, O, η>
∑ is a finite set called the alphabet,
Q is a finite set called states,
q0 ϵ Q is the start state,
F ⊆ Q is the set of final states (Accept states)
δ A transition function: δ : Q x ∑ → Q
O is a finite set of output symbols, and
η is the (possibly partial) output function: η: Q x ∑ → O*
FLAT CHAPTER 2 21
Finite State Transducers
• In the graph representation of FST, the value of η is
added as a new label on arcs.
• Let δ (q, a) = q’ and η(q, a) = b ∈ O*, Then a/b labels
an arc connecting q and q’.
• Example: FST that produces an output b for a single a
a/b
q q’
FLAT CHAPTER 2 22
Classification of Finite Automata
• Finite Automata is classified into two types -
• Deterministic Finite Automata (DFA)
• On each input there is one and only one state to which the
automaton can transition from its current state.
• Nondeterministic Finite Automata(NFA)
• An automaton can be in several states at once
FLAT CHAPTER 2 23
Deterministic Finite Automata (DFA)
• The term Deterministic means the uniqueness of the computation.
• It is a finite state machine that either accepts or rejects strings of symbols,
and for each input string it returns a unique computation.
• It has a set of states and rules for going from one state to another,
depending on the input symbol.
• When the machine is in a given state and reads the next input symbol, we
know what the next state will be - it is determined.
• It reads only one input symbol at a time from the tape, and after that it
decides whether to accept or reject the input.
• A DFA is defined as an abstract mathematical concept, but is often
implemented in hardware and software for solving different specific
problems such as lexical analysis and pattern matching.
FLAT CHAPTER 2 24
Deterministic Finite Automata (DFA)
Parts of DFA
– A deterministic finite automata has three parts-
• A tape to hold the input string.
• A tape head to read the input symbols.
• A control that contains three main parts – set of start states, set of transition
functions and final states.
•Formal Definition of DFA
•A DFA is five tuple, consisting of (Q, ∑, δ, q0, F) where
Q- A finite set of states.
∑- Alphabet of input symbols.
δ- A transition function that takes as argument a state and a symbol and
returns a state. Q×Σ→Q
q0- A start state.
F- A set of final or accept states.
FLAT CHAPTER 2 25
Deterministic finite state automaton
A DFA is five tuple, consisting of (Q, ∑, δ, q0, F) where,
1.A finite set of states, often denoted Q
2.A finite set of input symbols, often denoted Σ
3. A transition function that takes as arguments a state and an
input symbol and returns a state.
–The transition function is commonly denoted δ
–If q is a state and a is a symbol, then δ(q, a) is a state p(and in the
graph that represents the automaton there is an arc from q to p
labeled a).
4. A start state, one of the states in Q
5. A set of final or accepting states F(F⊆Q)
FLAT CHAPTER 2 26
Other notations for DFAs
1. Transition diagrams
• Each state is a node
• For each state q∈Q and each symbol a∈Σ, let δ(q, a) =p
• Then the transition diagram has an arc from q top, labeled a
• There is an arrow to the start state q0
•Nodes corresponding to final states are marked with doubled circle.
2. Transition tables
• Tabular representation of a function
• The rows correspond to the states and the columns to the inputs
• The entry for the row corresponding to state qand the column
corresponding to input a is the state δ(q, a).
FLAT CHAPTER 2 27
Graphical Representation of a DFA
FLAT CHAPTER 2 28
DFA- Example
• Let a deterministic finite automaton be →
• Q = {a, b, c},
• ∑ = {0, 1},
• q0 = {a},
• F = {c}, and
• Transition function δ as shown by the following table −
Its graphical representation would be as
Next follows −
Present Next State for
State for
State Input 1
Input 0
a a b
b c a
c b c
FLAT CHAPTER 2 29
Language accepted by DFA
• The language L(M), accepted and recognized by a DFA is the set of all strings
w accepted by M - L(M) = {w ∈ Σ* | M accepts w}
• Every state of a DFA always has exactly one existing transition arrow for
each symbol in the alphabet. (one transition per input per state)
• No ε-moves (DFA can not use Empty String transition.)
• DFA can be understood as one machine.
• DFA will reject the string if it end at other than accepting state.
FLAT CHAPTER 2 30
DFA-Example
• Example : String 101 is in the language of the DFA below. Start at A.
0 0,1
1 1
A B C
Start 0
• Example: Construction of a DFA for the set of string over {a, b} such that
length of the string |w|=2 i.e, length of the string is exactly 2.
• L = {aa, ab, ba, bb} . The state transition diagram of the language will be
like:
FLAT CHAPTER 2 31
DFA-Example
• Example: Write a description of the DFA shown above. Describe in words
what it does.
• Q={s1,s2} , Σ ={0,1}\Sigma\ = \{0,1\}Σ ={0,1}
CURRENT INPUT
NEW STATE
STATE SYMBOL
s1 1 s1
s1 0 s2
s2 1 s2
s2 0 s1 32
DFA
• Example: What string cannot be generated by the finite state machine below?
• abacdaac
• abac
• aaaaac
• aaaacd
• Example: Draw a diagram for a DFA that recognizes the following language:
The language of all strings that end with a 1.
• Solution:
FLAT CHAPTER 2 33
Non Deterministic Automata(NDFA)
• In a Non Deterministic Finite Automata, there are several choices may exist at any
point in the next state.
• So, every Deterministic Finite Automata is automatically a Non Deterministic Finite
Automata. NDFAs are used in the implementation of regular expressions.
• In NDFA, each state can have zero, one, two, or more transitions corresponding to a
particular input symbol.
• It can also have an empty (ε) transition, where NFA can change state without
consuming an input symbol.
• Features of NFA
• NFA can perform parallel computation, multiple processes can be running
concurrently.
• It can permit null or empty (ε) string transition.
• In a NFA, a state may have zero, one or many exciting arrows for each alphabet
symbol. It has a choice of where to move to the next state.
• We can easily convert every NFA into an equivalent DFA.
• It is easy to understand and functionality may be easier than a DFA.
FLAT CHAPTER 2 34
NFA
• A NFA has the power to be in several states at once
• This ability is often expressed as an ability to “guess” something about its
input.
• Each NFA accepts a language that is also accepted by some DFA.
• NFA are often more succinct and easier than DFAs
• We can always convert an NFA to a DFA, but the latter may have
exponentially more states than the NFA (a rare case).
• The difference between the DFA and the NFA is the type of transition
function δ
• For a NFA δ is a function that takes a state and input symbol as arguments
(like the DFA transition function), but returns a set of zero or more states
(rather than returning exactly one state, as the DFA must)
FLAT CHAPTER 2 35
NDFA
• A NDFA accepts a string x, if and only if there is a path from
the starting state to one of accepting states that edge labels
along this path spell out x.
• A language is accepted by an NDFA if and only if it is accepted
by DFA.
• NFA can be understood as
multiple little machines
computing at the same time.
FLAT CHAPTER 2 36
NDFA
• A non-deterministic finite automaton is a 5-tuple:< ∑, Q, δ, q0, F>
∑ is a finite set called the alphabet,
Q is a finite set called states,
q0 ϵ Q is the start state,
F ⊆ Q is the set of final states (Accept states)
δ A transition function: δ : Q x ∑ε → P(Q ) is the transition
function, ∑ε = ∑ ∪ {ε}
• In a NFA the transition function takes a state and an input symbol
or the empty string and produces the set of possible next states.
• For any set Q we write P(Q) to be the collection of all subsets of Q
(Power ser of Q).
FLAT CHAPTER 2 37
NFA Example
• Let a non-deterministic finite automaton be →
• Q = {a, b, c}
• ∑ = {0, 1}
• q0 = {a}
• F = {c}
• The transition function δ as shown below −
Next Its graphical representation would be
Present Next State for as follows −
State for
State Input 0
Input 1
a a, b b
b c a, c
c b, c c
FLAT CHAPTER 2 38
NDFA with ε -Transition
• A NDA is allowed to make a transition spontaneously, without
receiving an input symbol.
• Epsilon (ε) is the zero length string, so it can be any where
in the input string, front, back, between any symbols.
• There is a conversion algorithm from a NFA with epsilon
transitions to a NDFA without epsilon transitions.
• This capability does not expand the class of languages that
can be accepted by finite automata, but it does give us some
added programming convenience.
FLAT CHAPTER 2 39
NDFA
• Represent with Transition Table
• Here is an example of an NFA using transition table and graph.
0 1 ε
q0 {q0} {q0,q1} ∅
q1 {q2} {q2} {q2}
q2 {q3} {q3} ∅
q3 ∅ ∅ ∅
FLAT CHAPTER 2 40
NDFA
• An NDFA accepts a string xxx if there exists a path that is
compatible with that string that ends in an accept state.
• NDFAs can be represented by diagrams of this form:
FLAT CHAPTER 2 41
NDFA
Describe the language that the NDFA above recognizes.
•The NDFA above recognizes strings that end in “10” and strings that end in
“01.”
•State a is the start state, and from there, we can create a string with
however many 1’s and 0’s in any order, and then transfer to state b or state
e, or we can immediately transfer to state b or state e.
•In any case, the NDFA will only accept a string that reaches state d or state g.
•In order to reach state d or state g, the string must end with a “01” (for state
d) or a “10” (for state g).
•For example, the following strings are all recognized by this NDFA.
– 00000000010
– 10
– 01
– 1111101
FLAT CHAPTER 2 42
NDFA
• Example: Which string cannot be generated by the finite state
machine below?
• 1, 01001, 1011101, 1000, 0
FLAT CHAPTER 2 43
NDFA with ε-Transitions
• Below shows the transition diagram for an NFA M with ε -
transitions; it is not hard to see that it accepts the language
corresponding to the regular expression (a∗ab(ba)∗)∗.
FLAT CHAPTER 2 44
Eliminating ε-Transitions from an NDFA
FLAT CHAPTER 2 45
Epsilon NDFA Exercise
• Exercise: Design an ε-NFA for the language
consisting of zero or more a’s followed by zero or
more b’s followed by zero or more c’s.
FLAT CHAPTER 2 46
DFA vs NDFA
• The following table lists the differences between DFA and NDFA.
DFA NDFA
The transition from a state is to a The transition from a state can be to
single particular next state for each multiple next states for each input
input symbol. Hence it is called symbol. Hence it is called non-
deterministic. deterministic.
Empty string transitions are not seen NDFA permits empty string
in DFA. transitions.
In NDFA, backtracking is not always
Backtracking is allowed in DFA
possible.
Requires more space. Requires less space.
A string is accepted by a NDFA, if at
A string is accepted by a DFA, if it
least one of all possible transitions
transits to a final state.
ends in a final state.
FLAT CHAPTER 2 47
Acceptors, Classifiers, and Transducers
• Acceptor (Recognizer)
– An automaton that computes a Boolean function is called an acceptor. All
the states of an acceptor is either accepting or rejecting the inputs given to
it.
• Classifier
– A classifier has more than two final states and it gives a single output when it
terminates.
• Transducer
– An automaton that produces outputs based on current input and/or
previous state is called a transducer.
– Transducers can be of two types −
• Mealy Machine − The output depends both on the current state and the
current input.
• Moore Machine − The output depends only on the current state.
FLAT CHAPTER 2 48
Acceptability by DFA and NDFA
• Acceptability by DFA and NDFA
– A string is accepted by a DFA/NDFA if the DFA/NDFA starting at the initial state ends in
an accepting state (any of the final states) after reading the string wholly.
• A string S is accepted by a DFA/NDFA (Q, ∑, δ, q0, F), if
– δ*(q0, S) ∈ F
• The language L accepted by DFA/NDFA is
– {S | S ∈ ∑* and δ*(q0, S) ∈ F}
• A string S′ is not accepted by a DFA/NDFA (Q, ∑, δ, q0, F), iff
– δ*(q0, S′) ∉ F
• The language L′ not accepted by DFA/NDFA (Complement of accepted language L) is
– {S
Example:
| S ∈ ∑* and δ*(q , S) ∉ F}
Let us consider the0DFA shown in Figure 1.3. From the DFA, the acceptable
strings can be derived.
FLAT CHAPTER 2 49
Properties of FSA
a) Let A = < ∑, Q, δ, q0, F> be a FA and let n be the cardinality
of Q. The language recognized by A is nonempty if and only
if A accepts a string x with |x| < n.
b) Let A = < ∑, Q, δ, q0, F> be a FA and let n be the cardinality
of Q. The language recognized by A is infinite if and only if
A accepts a string x with n ≤ |x| < 2. n.
c) Let A be the set of finite-state acceptors that recognize a
given language L ⊆ ∑*. Let A = < ∑, Q, δ, q0, F>
be a minimum-state automata of A, that is, such that
|Q| ≤|Q| for each A = < ∑, Q, δ, q0, F> . Then A is unique up
to an isomorphism, i.e., a renaming of states.
FLAT CHAPTER 2 50
Properties of FSA
d) The class of languages accepted by finite-state automata is
closed under: Intersection, Union, Complement,
Concatenation and Star *.
FLAT CHAPTER 2 51
Properties of FSA
FLAT CHAPTER 2 52
Properties of FSA
• Closure under intersection, general rule
• Assume:
M1= ( Q1, Σ, δ1, q01, F1)
M2= ( Q2, Σ, δ2, q02, F2)
• Define M3= ( Q3, Σ, δ3, q03, F3), where
• Q3 =Q1 ×Q2
• Cartesian product, {(q1,q2) | q1∈Q1and q2∈Q2}
• δ3 ((q1,q2), a) = (δ1(q1, a), δ2(q2, a))
• q03 =(q01, q02)
• F3 =F1 ×F2 = {(q1,q2) | q1 ∈F1and q2 ∈F2}
FLAT CHAPTER 2 53
Properties of FSA
FLAT CHAPTER 2 54
Properties of FSA
• Closure under union, general rule
• Assume:
M1= ( Q1, Σ, δ1, q01, F1)
M2= ( Q2, Σ, δ2, q02, F2)
• Define M3= ( Q3, Σ, δ3, q03, F3), where
• Q3 =Q1 ×Q2
• Cartesian product, {(q1,q2) | q1∈Q1and q2∈Q2}
• δ3 ((q1,q2), a) = (δ1(q1, a), δ2(q2, a))
• q03 =(q01, q02)
• F3 ={(q1,q2) | q1 ∈F1or q2 ∈F2}
FLAT CHAPTER 2 55
Conversion of NDFA to DFA
• The conversion from NDFA to DFA:
• Create a new state for each equivalent class in NDFA.
• The max number of states in DFA is 2N, where N is the
number of states in NDFA.
• Steps to construct DFA that is an equivalent a given NDFA:
a. First determine DFA’s states.
b. Then, Determine the start and accept states of the DFA.
c. Finally, determine DFA’s transition function.
FLAT CHAPTER 2 56
Conversion of NDFA to DFA
Example:
Construct an equivalent DFA from the given NDFA.
• Step 1: Determine DFA’s number of states:
• NDFA {1, 2,3 } → DFA {Ø, {1}, {2}, {3}, {1,2}, {1,3}, {2,3},
{1,2,3}}.
• Step 2: Determine the start and accept states of DFA:
• Start states: the set of states that are reachable from NDFA’s start
state (1) by traveling ε arrow, plus the start state of NDFA (1).
Therefore {1,3} are start state.
• Accept states: The new accept states (of DFA) are those containing
NDFA’s accept state; thus {{1}, {1,2}, {1,3}, {1,2,3}}
• Step 3: Determine DFA’s transition function.
FLAT CHAPTER 2 57
Conversion of NFA to DFA
State a b
Ø Ø Ø
{1} Ø {2}
{2} {2,3} {3}
{3} {1,3} Ø
{1,2} {2,3} {2,3}
{1,3} {1,3} {2}
{2,3} {1,2,3} {3}
{1,2,3} {1,2,3} {2,3}
FLAT CHAPTER 2 58
Conversion of NFA to DFA
• Dead state: All those non-final states which transit to itself for all input
symbols in ∑, are called Dead State.
• Inaccessible states: All those states which
can never be reached from initial states are called Inaccessible States.
(Example: q2 is Inaccessible state)
• Hence, the previous DFA can be minimized by applying the above rules:
FLAT CHAPTER 2 59
Example
• Problem Statement
• Let X = (Qx, ∑, δx, q0, Fx) be an NDFA which accepts the language L(X). We have to design an
equivalent DFA Y = (Qy, ∑, δy, q0, Fy) such that L(Y) = L(X). The following procedure
converts the NDFA to its equivalent DFA −
Algorithm
• Input − An NDFA
• Output − An equivalent DFA
• Step 1 − Create state table from the given NDFA.
• Step 2 − Create a blank state table under possible input alphabets for the equivalent DFA.
• Step 3 − Mark the start state of the DFA by q0 (Same as the NDFA).
• Step 4 − Find out the combination of States {Q0, Q1,... , Qn} for each possible input alphabet.
• Step 5 − Each time we generate a new DFA state under the input alphabet columns, we have
to apply step 4 again, otherwise go to step 6.
• Step 6 − The states which contain any of the final states of the NDFA are the final states of the
equivalent DFA.
FLAT CHAPTER 2 60
Example(Conti..)
• Let us consider the NDFA shown in the figure below.
q δ(q,0) δ(q,1)
a {a,b,c,d,e} {d,e}
b {c} {e}
c ∅ {b}
d {e} ∅
e ∅ ∅
Using the above algorithm, we find its equivalent DFA. The
state table of the DFA is shown in below. q δ(q,0) δ(q,1)
[a] [a,b,c,d,e] [d,e]
[a,b,c,d,e] [a,b,c,d,e] [b,d,e]
[d,e] [e] ∅
[b,d,e] [c,e] [e]
[e] ∅ ∅
[c, e] ∅ [b]
[b] [c] [e]
FLAT CHAPTER 2 [c] ∅ [b] 61
DFA Minimization
• Some states can be redundant:
– The following DFA accepts (a|b)+
– State s1 is not necessary
FLAT CHAPTER 2 62
THANK YOU
FLAT CHAPTER 2 63