3

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.

Magdiragdag
  • 15,049
george
  • 33

1 Answers1

0

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.

Magdiragdag
  • 15,049
  • So I can choose any L? Also, being able to make a NFA for a regular language, does that prove that it's regular? I don't really understand the "proof". – george Feb 20 '14 at 22:36
  • 1 - \sigma, what is the symbol for, it's just the same transition but to an equivalent state in A1 from A0. – user539484 Feb 20 '14 at 22:54
  • @george $L$ is a given regular language and the goal is to show that $\text{Neighbor}(L)$ is regular as well. And yes, building an NFA that accepts some language proves that that language is regular. – Magdiragdag Feb 21 '14 at 07:46
  • @user539484 $1 - \sigma$ is just $0$ if $\sigma=1$ and conversely. – Magdiragdag Feb 21 '14 at 07:47