Question

A) Let $L$ be a regular language. according to the theorem there is an DFA which accepts the language.

Describe shortly how to change the DFA to NFA which Accepts $L^R$, where R is reverse.

There is no need to write how to build formally or proof or correctness.

B) True or False: if $L$ is not regular then $L^R$ is not regular

My solution:

A) First of all because we want Reverse the accepting state would become the start and the rejecting states will become accepting, also change the direction of the edges to the oppositse side. but when it comes to changing it to NFA im a bit stuck.

B) I think its true since it doesnt matter if it reversed if its regular then of course $L^R$ will be regular as well.

Is this the way for A and B?

Was it helpful?

Solution

A)

First of all because we want Reverse the accepting state would become the start and the rejecting states will become accepting, also change the direction of the edges to the oppositse side.

You're almost there. What happens if you have multiple accepting states in the original DFA? That's where you need NFA capabilities to convert them.

Here is a spoiler in case you want to check your answer: Designing a DFA and the reverse of it on ComputerScience.SE.

B)

Your answer is true although you might want to phrase it a bit more carefully. We want to prove "if $L$ is not regular, $L^R$ is not regular". So let $L$ be not regular. If $L^R$ were regular, so were $(L^R)^R = L$, which is a contradiction. Hence, $L^R$ is not regular.

Licensed under: CC-BY-SA with attribution
Not affiliated with cs.stackexchange
scroll top