This is an old revision of the document!


5. Minimal DFAs

Consider the following DFAs:

DFA 1 DFA 2
The first DFA is the solution to exercise 4.3.4 from Lab4.

5.1.1. Identify a pair of states which are indistinguishable. (Solve the exercise for the 2 given DFAs.)

5.1.2. Identify a pair of final or non-final states which are distinguishable. The pair must be distinguished by a word different from the empty word. (Solve the exercise for the 2 given DFAs.) 5.1.3. Compute the table of indistinguishable states for the DFA. (Solve the exercise for the 2 given DFAs.)

5.2.1. Minimise the DFA. (Solve the exercise for the 2 given DFAs.)

5.2.2. How can we algorithmically determine if two minimal DFAs accept the same language?

5.2.3. Determine if the following regexes are equivalent: $ (1\cup\epsilon)(00^*1)^*0^*$ and $ (10\cup 0)^*(01 \cup 1)^*(0 \cup \epsilon)$

5.2.4. Remember exercise 3.3.4 from Lab3. Show that the two regexes are equivalent: $ E1 = ((ab^*a)^+b)^* $ and $ E2 = (a(b\mid aa)^*ab)^* $

5.2.5. (extra) Apply the Brzozowski minimisation algorithm on DFA 1.

Brzozowski minimisation: minDfa(A) = toDfa(reverse(toDfa(reverse(A))))
Now we can do a complete transformation of a regex into a minimal DFA.
  • Regex → NFA (Thomson's algorithm)
  • NFA → DFA (Subset Construction)
  • DFA → minDfa

To get a better performance, include minDfa conversion in your project.