简体   繁体   中英

Induction on String? (automata related)

Honestly, all I know about mathematical induction is as follow:

1. prove P(0) - base step
2. for all n ≥ 1, prove (P(n − 1) -> P(n)) - inductive step

And here is image of my induction problem that I am struggling now (please click)

I am currently trying to solve the problem from above image, but I just can't. I just new to this kind of thing, I have no idea and I cannot also infer anything from my only little knowledge.

I don't know how to start it and I also don't know how can I apply my little knowledge described above into that problem.

Thank you very much if you can help me on above problem with careful explanation..

As a hint, let P(k) be the statement "any language with exactly k strings is regular." Using your induction idea, you'd need to do the following:

  1. Prove that any language with 0 strings in it is regular. What can you say about a language with no strings in it? Can you build a DFA, NFA, or regex for such a language?

  2. Assume that any language with n-1 strings is regular, then prove that any language with n strings is regular. If a language has n strings in it, you can split it into a language with n-1 strings in it and a language with one string in it. What can you say about the first language? If you had a regex for it, what could you do to adapt it into a regex for a language with one more string in it?

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