Decompiling a regular expression from an NFA [017Z]

We want to “decompile” any NFA to an equivalent regular expression; it is not easy to do so directly, so we will actually solve a more general problem first.

A region {\mathopen {}\left (q,S,q'\right )\mathclose {}} in an NFA M is meant to encode a language whose strings consist of those that can be consumed starting from states q and ending in state q' passing only through states that lie in S. We define this more formally below.

Context

Lecture 23: regular languages and Kleene’s theorem [017X]

Related

Definition. Region of an NFA [0181]

Definition. Non-deterministic finite automaton [017H]

Regular expressions [0178]

Definition. Formal language [016M]