How do you prove that the set of neighbors of $L$ is regular if $L$ is regular?

163 Views Asked by At

enter image description here

I know that a regular language can be made into a DFA, so can I just make a DFA for the regular language? Also, someone told me I should make a e-NFA from the DFA, but I don't see what would be the point. I was at one of the tutorial and the tutorial leader explained this, but he did a really poor job at it. He doesn't really speak English, so basically I am completely clueless. Can't find any example either.

1

There are 1 best solutions below

4
On BEST ANSWER

Take a deterministic finite automaton $A$ for $L$. Construct a new (non-deterministic) automaton $B$ for $\text{Neighbor}(L)$ as follows.

First, take two disjoint copies of $A$, $A_0$ and $A_1$. The starting state of $B$ is the original starting state of $A_0$; the accepting states of $B$ are the original accepting states of $A_1$. Then, for every transition in $s \to t$ with symbol $\sigma$ in $A$, add a new transition (to $B$) from $s$ in $A_0$ to $t$ in $A_1$ with the symbol $1 - \sigma$.

This accepts $\text{Neighbor}(L)$: to get to an accepting state you must cross from $A_0$ into $A_1$ (and that can happen only once as you can't go back) and at that crossing you flip exactly one symbol.