Docsity

Example on DFA Minimization Algorithms - Languages and Computation | CS 3240, Assignments of Computer Science

Toggle sidebar
bg1
Example on DFA minimization algorithm from the book “Introduction to automata
theory, languages, and computation” John E Hopcroft Jeffery Ullman ( example 3.8 on
first edition it should appear on the following editions too).
b X
c X X
d X X X
e X X X
f X X X X
g X X X X X X
h X X X X X X
a b c d e f g
Let M be the finite automaton if the figure and we have constructed a table with an entry
for each pair of states . An X is placed in the table each time we discover a pair of states
that cannot be equivalent . Initially an X is placed in each entry corresponding to one
final state and one nonfinal state. In our example, we place an X in the entries (a,c), (b,c),
(c,d), (c,e)m (c,f), (c,g) and (c,h). Next for each pair of states p and q that are not already
known to be distinguishable we consider the pairs of states r = (p,q) and s= (q,a) forδ δ
each input symbol a. If states r and s have been shown to be distinguishable by some
string “x”, then p and q are distinguishable by string “ax”. Thus in the entry (r,s) in the
table has an X, an X is also placed at the entry (p,q). If the entry (r. s) does not yet have
an X, then the pair (p. q) is placed on a list associated with the (r, s)-entry. At some future
time, if the (r, s) entry receives an X, then each pair on the list associated with the (r, s)
entry also receives an X.
Continuing with the example, we place an X in teh entry (a, b), since the entry ( (b,1),δ
pf2

Partial preview of the text

Download Example on DFA Minimization Algorithms - Languages and Computation | CS 3240 and more Assignments Computer Science in PDF only on Docsity!

Example on DFA minimization algorithm from the book “Introduction to automata theory, languages, and computation” John E Hopcroft Jeffery Ullman ( example 3.8 on first edition it should appear on the following editions too). b X c X X d X X X e X X X f X X X X g X X X X X X h X X X X X X a b c d e f g Let M be the finite automaton if the figure and we have constructed a table with an entry for each pair of states. An X is placed in the table each time we discover a pair of states that cannot be equivalent. Initially an X is placed in each entry corresponding to one final state and one nonfinal state. In our example, we place an X in the entries (a,c), (b,c), (c,d), (c,e)m (c,f), (c,g) and (c,h). Next for each pair of states p and q that are not already known to be distinguishable we consider the pairs of states r = δ(p,q) and s= δ(q,a) for each input symbol a. If states r and s have been shown to be distinguishable by some string “x”, then p and q are distinguishable by string “ax”. Thus in the entry (r,s) in the table has an X, an X is also placed at the entry (p,q). If the entry (r. s) does not yet have an X, then the pair (p. q) is placed on a list associated with the (r, s) entry. At some future time, if the (r, s) entry receives an X, then each pair on the list associated with the (r, s) entry also receives an X. Continuing with the example, we place an X in teh entry (a, b), since the entry ( δ(b,1),

δ(a,1))==(c,f) already has an X. Similarly, the (a,d) entry receives an X since the entry ( δ(a,0), δ(d,0))=(b,c) already has an X. Consideration of the ( a,e) entry on input 0 results in the pair (a,e) being placed on the list associated with (b,h). Observe that on input 1 , both a and e go to the same state g and hence no string starting with a 1 can distinguish a from e. Because on the 0 input, the pair (a, g) is placed on the list associated with (b,g). When the (b, g) entry is considered, it receives an X on account of a 1 input, and hence the pair (a, g) receives an X since it was on the list of (b, g). the string 01 distinguishes a from g. On Completion of the table , we conclude that the equivalent states are a≡b b≡h d ≡ f And the minimum state finite automaton follows