We proceed by induction on the number of elements in S.
In the base case, we know that S is empty; the regional language \mathcal {L}_{M}{\mathopen {}\left (q,\varnothing ,q'\right )\mathclose {}} therefore consist of those strings u such that either u=\epsilon and q=q', or u=a for some a:\Sigma _M and q\mathrel {\xrightarrow {a}}q'. Writing this more formally, we have:
\mathcal {L}_{M}{\mathopen {}\left (q,\varnothing ,q'\right )\mathclose {}} =
{\mathopen {}\left \{\epsilon \,\middle \vert \,q=q'\right \}\mathclose {}}\cup \bigcup {\mathopen {}\left \{{\mathopen {}\left \{a\right \}\mathclose {}}\,\middle \vert \,q\mathrel {\xrightarrow {a}}q'\right \}\mathclose {}}
The above is a finite union of regular languages, and so it is evidently regular.
In the inductive step, we assume that any regional language whose interior state set has n elements is regular, and we must show the same for any regional language whose interior state set has n+1 elements. Fixing such a region {\mathopen {}\left (q,S,q'\right )\mathclose {}} with \#S=n+1, we will try to reduce the \mathcal {L}_{M}{\mathopen {}\left (q,S,q'\right )\mathclose {}} to something in terms languages that we know by our inductive hypothesis to be regular. Our strategy is to simply remove an arbitrary element from S.
To that end, we pick some arbitrary q_0\in S so that the set difference S' = S\setminus {\mathopen {}\left \{q_0\right \}\mathclose {}} has n elements. IF we think about all the ways taht we could get from q to q' passing through states lying only in S, there are a two possibilities in relation to the state q_0:
- We might have never pass through q_0 at all. This would correspond to the regional language \mathcal {L}_{M}{\mathopen {}\left (q,S',q'\right )\mathclose {}}, which we know to be regular by our induction hypothesis.
- If we do pass through q_0, we must first go from q to q_0 without passing through q_0, then we return to q_0 arbitrarily many times, and then we finally go from q_0 to q without passing through q_0. This corresponds to the following concatenation of languages, which we know to be regular by our induction hypothesis and the fact that regular languages are closed under concatenation and repetition:
\mathcal {L}_{M}{\mathopen {}\left (q,S',q_0\right )\mathclose {}}
\mathcal {L}_{M}{\mathopen {}\left (q_0,S',q_0\right )\mathclose {}}^\star
\mathcal {L}_{M}{\mathopen {}\left (q_0,S',q'\right )\mathclose {}}
We see the following by inspection:
\mathcal {L}_{M}{\mathopen {}\left (q,S,q'\right )\mathclose {}} =
\mathcal {L}_{M}{\mathopen {}\left (q,S',q\right )\mathclose {}} \cup
{\mathopen {}\left (
\mathcal {L}_{M}{\mathopen {}\left (q,S',q_0\right )\mathclose {}}
\mathcal {L}_{M}{\mathopen {}\left (q_0,S',q_0\right )\mathclose {}}^\star
\mathcal {L}_{M}{\mathopen {}\left (q_0,S',q'\right )\mathclose {}}
\right )\mathclose {}}
As regular languages are closed under finite unions, we are done.