DFA Minimization - PowerPoint PPT Presentation

About This Presentation
Title:

DFA Minimization

Description:

DFA Minimization Strings over {a,b} with even number of a s Strings over {a,b} with even number of a s Observation The states among the state sets {[Ea,Eb], [Ea ... – PowerPoint PPT presentation

Number of Views:150
Avg rating:3.0/5.0
Slides: 12
Provided by: cecsWrig9
Learn more at: http://cecs.wright.edu
Category:
Tags: dfa | minimization

less

Transcript and Presenter's Notes

Title: DFA Minimization


1
DFA Minimization
2
Strings over a,b with even number of as
S
Ea
Oa
Eb
Ob
Ob
Eb
b
Ea,Eb
Ea,Ob
b
a
a
a
a
b
Oa,Ob
Oa,Eb
b
3
Strings over a,b with even number of as
S
Ea
Oa
a
Oa
Ea
a
b
b
4
Observation
  • The states among the state sets Ea,Eb,
    Ea,Ob and Oa,Eb, Oa,Ob differ on aspect
    immaterial for the problem at hand.
  • Why not collapse these state sets into one state
    each, to get a smaller DFA?

5
Equivalent or Indistinguishable States
  • Recall that a DFA state summarizes the substring
    consumed so far (that is, the past history).
  • Two states qi and qj are equivalent or
    indistinguishable (for the future), if, when
    started in these states, every string causes the
    machine to either end up in an accepting state
    for both or end up in a non-accepting state for
    both.
  • In other words, there is no string that can tell
    the equivalent states apart for the given
    language.

6
Main Idea
qi
qm
a
qn
qj
a
If qm and qn are distinguishable, then so are qi
and qj
7
Example DFA
b
a
b
a
q1
q2
q0
q3
a
a,b
b
a,b
a
q4
q7
q5
a,b
a
b
q6
(a u b)(a u b)
b
8
Refinement of State Partitions
  • q0,q7 , q1,q2,q3,q4,q5,q6
  • q0,q7, q1,q2,q3,q4,q5,q6
  • On any transition
  • q0,q7, q1,q2,q3,q4,q5,q6
  • q0,q7, q1,q4, q2,q3,q5,q6
  • On a transition
  • q0,q7, q1,q4, q2,q5,q3,q6
  • On b transition

9
Example DFA showing equivalent states
b
a
b
a
q1
q2
q0
q3
a
a,b
b
a,b
a
q4
q7
q5
a,b
a
b
q6
(a u b)(a u b)
b
10
Example Minimum DFA
q0
a,b
a,b
a
q7
q2,q5
q1,q4
a,b
a
b
q3,q6
(a u b)(a u b)
b
11
  • For an efficient way of determining minimal DFA,
    see the details in Algorithm 5.7.2
Write a Comment
User Comments (0)
About PowerShow.com