3

When converting a DFA to a regular expression using the transitive closure method, what is the significance of state $k$ and what values $k$ takes? If $k$ represents the intermediate states then what are the values for $k$? That is while applying the method, for which value of $k$ should we stop finding the regular expressions?

Bharati
  • 31
  • 2

1 Answers1

2

One way you can think about the transitive closure method of converting DFAs to regular expressions (suggested by Michael Sipser in "Introduction to the Theory of Computation") is to think about converting a DFA to a regular expression by progressively ripping out states from the DFA and replacing transitions into and out of that state with new transitions labeled with regular expressions that have the same effect as entering and leaving the state. Once you have ripped out a sufficiently large number of states, you can directly read off the regular expression from the resulting automaton.

$k$ in this algorithm is used to indicate what states you have eliminated so far. You number all of the states $1, 2, 3, ..., n$, then use $k$ to indicate the numbers of all states you have eliminated at a particular point. First you eliminate state 1; then states 1 and 2; then states 1, 2, and 3; etc. Once you have $k = n$, you've eliminated all states and can just read off the answer.

If you'd like a graphical presentation of how this works, I have a set of lecture slides I used when teaching this construction. It doesn't formally specify the algorithm or prove correctness, but should give you a visual representation of what the algorithm is doing.

Hope this helps!

templatetypedef
  • 9,102
  • 1
  • 30
  • 60