简体   繁体   English

归纳为弦乐? (与自动机有关)

[英]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." 提示一下,令P(k)为“任何具有正好k个字符串的语言都是常规语言”。 Using your induction idea, you'd need to do the following: 使用归纳想法,您需要执行以下操作:

  1. Prove that any language with 0 strings in it is regular. 证明其中任何带有0字符串的语言都是正常的。 What can you say about a language with no strings in it? 对于没有字符串的语言,您能说些什么? Can you build a DFA, NFA, or regex for such a language? 您可以为这种语言构建DFA,NFA或正则表达式吗?

  2. Assume that any language with n-1 strings is regular, then prove that any language with n strings is regular. 假定具有n-1个字符串的任何语言都是常规语言,然后证明具有n个字符串的任何语言都是常规语言。 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. 如果一种语言中包含n个字符串,则可以将其拆分为包含n-1个字符串的语言和包含一个字符串的语言。 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? 如果您有一个正则表达式,您可以怎么做才能将它改编为包含多于一个字符串的语言的正则表达式?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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