简体   繁体   中英

Automata - Construct NFA using copies of DFA - formal definition of NFA

I'm trying to learn how to solve the following exercise. I don't understand how to start, it's overwhelming. I do understand DFA's, NFA's and how to convert DFA's to NFA's. I also understand the formal notations.

This is not a homework exercise, it's just for studying. I do have the solution, but I can't make sense out of it either..

If someone could ELI5 the exercise that would be amazing, examples on solving exercises like these (with proper explanations) would be great too, I have yet to find a similar exercise on the web.

Given:

  • Alphabet Σ

  • A symbol c ∈ Σ

  • Regular language L over Σ

Language Lc = {uv | ucv ∈ L}

Let D = (Q, Σ, 𝛿, q0, F) be a DFA with ℒ(D)=L.

Show how to construct an NFA N using copies of D such that ℒ(N)=Lc. Provide a formal definition of N.

I am not going to write down the formal definition in detail. Basically you can use two copies of the DFA. In the first one you start, it does not have final states. For every transition from a state p to a state q that reads c, you add a transition not reading anything that goes from p in the first copy to q in the second copy. This way you skip exactly one c. Once you are in the second copy, you know that ac has been skipped and you can accept if the remaining inputleads to an accepting state.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM