1
$\begingroup$

When converting from a GNFA to a regular expression, we systematically remove states from the GNFA until we are left with just the start and accept state such that the transition arrow from the former to the latter has the equivalent regular expression on it.

This can be done by choosing a state $q_{rip}$ to remove. Then, for every pair of states $q_i$ and $q_j$, we can modify the arrow in order to include the string pattern that would have arisen had we transitioned from $q_i$ to $q_{rip}$, then $q_{rip}$ to $q_j$, as the image below indicates.

So if the regular expression $R_1$ goes from $q_i$ to $q_{rip}$, $R_2$ goes from $q_{rip}$ to $q_{rip}$, $R_3$ goes from $q_{rip}$ to $q_j$, and $R_4$ goes from $q_i$ to $q_j$, the new arrow between $q_i$ and $q_j$ would have to consider that the string may either go directly or indirectly through $q_{rip}$, and may repeat the transition from $q_{rip}$ to itself an arbitrary number of times. So it would have $(R_1)(R_2)^*(R_3) \cup (R_4)$.

The following image shows the GNFA and equivalent regular expression

My question is, what if a string is described by going from $q_i$ to $q_{rip}$, then from $q_{rip}$ to $q_i$ through a transition we'll call $R_5$, then back to $q_{rip}$, and finally from $q_{rip}$ to $q_j$. Such a string would be accepted by the previous stage's GNFA, but what about the new GNFA? The described string pattern requires a regular expression $(R_1)(R_5)(R_1)(R_3)$, which is not covered by the expression $(R_1)(R_2)^*(R_3) \cup (R_4)$.

My theory as to why that may be is that such a case can always be avoided when constructing the GNFA from the NFA. Like, if a string pattern requires going from state one to two, then back to state one, then back to state two, the two arrows between the states can always have a regular expression between state one and two that describes the pattern without needing to retread the same path twice. I have a hard time believing this to be the case however, since the book I am using (Introduction To The Theory Of Computation by Michael Sipser) makes no mention of such a step when converting a NFA to a GNFA.

Edit: Nevermind, I think i figured it out. The operation described above applies when $i = j$, so if the arrow from $q_i$ to itself had $R_6$ on it, it would now have $(R_1)(R_2)^*(R_5) \cup (R_6)$. This covers the case, as we can now repeat the $(R_1)(R_5)$ retread as many times as we want before leaving $q_i$.

$\endgroup$

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.