DFA Minimization - Advanced Theory of Computation - Lecture Slides, Slides of Theory of Computation

This lecture is part of complete lecture series on Advanced Theory of Computation. Key points in this lecture are: Dfa Minimization, Algorithms, Second Iteration of Main Loop, John Hopcraft, Combine Equivalent States, Equivalent Pairs, Nfa

Typology: Slides

2013/2014

Uploaded on 01/31/2014

samiksha
samiksha 🇮🇳

4.2

(9)

102 documents

1 / 23

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
DFA Minimization
docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17

Partial preview of the text

Download DFA Minimization - Advanced Theory of Computation - Lecture Slides and more Slides Theory of Computation in PDF only on Docsity!

DFA Minimization

DFA 

Deterministic Finite Automata (DFSA) 

Q

δ

q 0

F

 Q – (finite) set of states  Σ

  • alphabet – (finite) set of input symbols  δ
    • transition function  q 0
      • start state  F – set of final / accepting states

DFA Minimization 

Some states can be redundant: 

The following DFA accepts (a|b)+  State s1 is not necessary

DFA Minimization 

So these two DFAs are

equivalent

DFA Minimization 

The task of

DFA minimization

, then, is to

automatically transform a given DFA into astate-minimized DFA 

Several algorithms and variants are known  Note that this also in effect can minimize an NFA(since we know algorithm to convert NFA to DFA)

DFA Minimization Algorithm 

Recall that a DFA

M

Q

q

F

Two states

p

and

q

are distinct if

p in F and q not in F or vice versa, or  for some α in

δ

p

α ) and δ

q

α ) are distinct 

Using this inductive definition, we cancalculate which states are distinct

Very Simple Example

s0 s1 s s0 s1 s

Very Simple Example

s0 s ε s ε s0 s1 s Label pairs with ε where one is a final state and the other is not

Very Simple Example

s0 s ε s ε s0 s1 s DISTINCT(s1, s2) is empty, so s1 and s2 are equivalent states

Very Simple Example

Merge s1 and s

More Complex Example 

Check for pairs with one state final and one not:

More Complex Example 

First iteration of main loop:

More Complex Example 

Third iteration makes no changes 

Blank cells are equivalent pairs of states

More Complex Example 

Combine equivalent states for minimized DFA: