I'm stuck on "For any language $A$, let $A^R = {w^R | w \in A}$ Show that if A is regular, so is $A^R$."
According to my research (see references), the steps required to prove this question, are:
- Reverse all the links in the automaton
- Add a new state (call it $q_s$)
- Draw a link labeled with ϵ from state $q_s$ to every final state
- Turn all the final states into normal states
- Turn the initial state into a final state
- Make $q_s$ the initial state
Anyway, I decided to make a toy-example to check if those steps made sense to me.
So here it is :
Consider $\Sigma = \{a,b\}$
I want to read $w = {ab}$, However, I'm extrapolating that we can also read $w = \{ab\}^+$.
So I have built an DFA for it :
Then, I followed the instructions and built this NFA :
Now the questions :
1- Why do I have to make it as an NFA instead of making an DFA that recognizes $w = {ba}$ or $w = \{ab\}^+$ ?
2- Can i kill the state $q_3$ of this NFA ? It's dead so why it should be there anyway?
3- Why the first state of the NFA transitions with $\epsilon$ ?
Whats really bothering me is the first question. I can make an DFA that recognizes the Reverse of w = "ab". So why everywhere I research says that I must do it as an NFA?
Here's the DFA that recognizes $w = {ba}$, Once Again, I'm extrapolating that we can also read $w = \{ba\}^+$. Not sure if i should assume that, anyway :
"You need at least 10 reputation to post more than 2 links."
So why isnt that DFA enough to prove that if A is regular, so is $A^r$ ?
References :
"You need at least 10 reputation to post more than 2 links." cs.stackexchange.com/questions/3251/how-to-show-that-a-reversed-regular-language-is-regular