A nondeterministic finite automaton, allowing the epsilon transitions used in this paper, is a tupleHere is a nonempty finite set of automaton states, is a finite alphabet, is the power set of , is the initial automaton state, and is the set of accepting automaton states. The symbol denotes the empty word. Membership permits an automaton transition from to consuming when , or consuming nothing when .
The recognized formal language isThe label of a graph path is the concatenation of its labels with all occurrences of omitted. Thus acceptance requires consuming the entire input word; a single successful choice of automaton transitions suffices. A path of length zero is allowed, so the empty word is accepted whenever , or an accepting automaton state is reachable by epsilon transitions. If epsilon transitions are excluded from the definition of a nondeterministic finite automaton, the displayed version is called an Epsilon-NFA.
For , there is an accepting graph pathIts nonempty labels spell , and its last automaton state is accepting. Therefore is accepted. The last epsilon transition matters: finishing the consumed input at does not prevent a subsequent move to .
For , track all possible automaton states, including their epsilon closure, after each input prefix:
| Input prefix | Possible automaton states after epsilon closure |
|---|---|
The final set contains no accepting automaton state, and has no outgoing epsilon transition. Therefore is rejected.
Use state elimination for finite automata, with regular expression labels on a generalized finite automaton. Add a fresh initial automaton state with , and a fresh final automaton state with . Only is now accepting. Missing labels represent the empty language, and parallel alternatives are combined by union.
When eliminating an internal automaton state , update every surviving label byThe added regular expression describes entering , traversing its loop zero or more times by Kleene star, and leaving it. This accounts for exactly the graph paths newly bypassing .
First eliminate . Its only incoming and outgoing labels are both , and it has no loop. The graph path through it contributes , so the label from to becomesThe other relevant labels are still , , and .
Next eliminate . It has no loop, so the new loop at and the new label to areFinally eliminate . The label from to isThus an equivalent regular expression isFor an independent interpretation, every completed return to consumes either or : the latter traverses before returning. The last visit to consumes either nothing or . Consequently every run of ones has length exactly two, and successive such runs require at least one zero between them. In particular, consecutive copies of without a separating zero are not accepted.
Let be a deterministic finite automaton recognizing . Construct a nondeterministic finite automaton with automaton state set . Its second coordinate records whether the extra zero has already been consumed. Start at and make exactly the automaton states in accepting.
For each , , and , include the ordinary automaton transitionAlso include the extra automaton transitionThis consumes the inserted zero without changing the simulated automaton state of . At a zero in layer zero, both the ordinary and extra choices are available. There are no automaton transitions from layer one back to layer zero.
If , run on in layer zero, consume the extra zero by the displayed automaton transition, and run on in layer one. The resulting run accepts in .
Conversely, every accepting run of starts in layer zero and finishes in layer one, so it uses exactly one extra automaton transition. Split its input as at that move. Removing that consumed zero leaves precisely a run of on , ending in . Hence . The construction also permits an insertion at either end, including insertion into the empty word.
Therefore . Since has automaton states, is a regular language. This is a single-symbol insertion into a regular language.
No: regular languages are not closed under countably infinite intersection. Let and putThe first term in has regular expression , where the fixed power means copies. The second term is a finite language, a finite union of single words. Their union is therefore a regular language.
If , then for each either or belongs to the second term, so . If , choose . It belongs to neither term of . ConsequentlyThe formal language is not a regular language. Indeed, for a proposed pumping length , the pumping lemma for regular languages applied to must pump a nonempty block consisting only of zeros. Repeating that block increases the number of zeros without increasing the number of ones, leaving . This contradiction proves the counterexample. Finite intersection closure does not extend to this infinite intersection of regular languages.
Articles by others on the same topic
There are currently no matching articles.