Proof that its possible to generate NFA from DFA

In summary, the conversation discusses the process of proving that a nondeterministic finite automata can be generated to generate the reverse string of a given string accepted by a deterministic finite automata. The suggested approach is to use strong induction and consider all possible transitions and states in both the DFA and NFA. The conversation also suggests using a proof by contradiction to strengthen the proof.
  • #1
prov
3
0

Homework Statement


I am attempting to prove the following:

For a determenistic finite automata D = (Q, Ʃ, ∂,q0,A) that accepts w, prove that a nondeterministic finite automata can be generated to generate the reverse string of w.

Homework Equations


The Attempt at a Solution



I have figured out a general algorithm that works like so:
1. change the initial state to the final state in the DFA
2. Reverse all accepting states in DFA to non-accepting states
3. Set original starting state to accepting state and reverse all transitions

Now I need to prove this. It seems a strong induction proof will be required. I have setup the following inductive hypothesis: If string w is accepted by the DFA and the length of w = n, then w reverse can be generated from the NFA created from the algorithm above.

For my base case I use n = 0, which is ε ( sometimes noted as λ or empty string). The reverse of ε is ε which can be accepted by both the DFA and NFA above.

I am a bit confused where I need to go from here. Also, since I am using induction, I will need to prove the other direction as well, that is if the reverse of w is accepted by the NFA, the DFA accepts w. I don't quite understand how this will be much different than the first direction.

Any and all help is greatly appreciated!
 
Physics news on Phys.org
  • #2


Hello,

Thank you for sharing your algorithm and inductive hypothesis. Your approach seems to be on the right track. To prove your algorithm, you will need to show that it works for all possible inputs, not just the base case of ε.

One way to do this is to use strong induction, as you mentioned. In your inductive step, you will assume that your algorithm works for all strings of length n-1 and show that it also works for strings of length n. This will require you to consider all possible transitions and states in the DFA and NFA.

To prove the other direction, you can use a similar approach. Assume that the reverse of w is accepted by the NFA and show that the DFA accepts w. This will also require considering all possible transitions and states in both the DFA and NFA.

It may also be helpful to use a proof by contradiction, where you assume that your algorithm does not work and then show that this leads to a contradiction. This can help you identify any potential flaws in your algorithm and strengthen your proof.

I hope this helps guide you in your proof. Let me know if you have any further questions or need any clarification. Good luck!
 

FAQ: Proof that its possible to generate NFA from DFA

How is it possible to generate an NFA from a DFA?

It is possible to generate an NFA (Non-Deterministic Finite Automaton) from a DFA (Deterministic Finite Automaton) by using the subset construction method. This involves converting each state in the DFA into a set of states in the NFA, where the states in the NFA represent all possible combinations of transitions that the DFA state can make. This results in a more complex NFA with more states and transitions.

2. What are the benefits of generating an NFA from a DFA?

Generating an NFA from a DFA can be beneficial in certain situations where the complexity of the DFA makes it difficult to understand or work with. The resulting NFA may have fewer states and transitions, making it easier to analyze and modify. Additionally, some algorithms and problems are better suited for NFA than DFA, so converting a DFA to an NFA can open up new possibilities for solving problems.

3. Can any DFA be converted to an NFA?

Yes, any DFA can be converted to an NFA using the subset construction method. This is because every DFA is also a valid NFA, but with additional restrictions on the transitions. Therefore, the NFA generated from a DFA will have the same language recognition capabilities as the original DFA.

4. What is the time complexity of generating an NFA from a DFA?

The time complexity of generating an NFA from a DFA is O(n2) where n is the number of states in the DFA. This is because the subset construction method involves iterating through each state in the DFA and creating a set of states for each one. In the worst case, the resulting NFA will have 2n states, resulting in an O(n2) time complexity.

5. Are there any limitations to generating an NFA from a DFA?

While it is possible to generate an NFA from a DFA, there are some limitations to this process. For example, the resulting NFA may be more complex and difficult to understand than the original DFA. Additionally, the subset construction method may not always result in the most efficient NFA, as some states and transitions may be redundant or unnecessary. It is important to carefully consider the purpose and potential drawbacks before converting a DFA to an NFA.

Similar threads

Replies
1
Views
1K
Replies
1
Views
2K
Replies
1
Views
4K
Replies
1
Views
880
Replies
18
Views
3K
Replies
1
Views
2K
Replies
1
Views
2K
Replies
2
Views
13K
Back
Top