简体   繁体   English

由“斐波那契字符串”(在说明中给出)生成的语言L是否正常? 如果不是,则通过抽引法进行证明

[英]Is the language L generated by 'Fibonacci Strings' (as given in the desciption) regular? If not, disprove by Pumping Lemma

The Fibonacci strings are defined as follows: S1=a, S2=b and Sk=S k-1S k-2 for k>2 . 斐波那契弦定义如下:S1 = a,S2 = b和Sk = S k-1S k-2(对于k> 2)。 For example S3=ba , S4=bab etc . 例如S3 = ba,S4 = bab等。 Let L be the language generated by the Fibonacci strings. 令L为Fibonacci字符串生成的语言。 Is the language' L ' Regular? 语言是否为“ L”? If not, disprove by Pumping Lemma. 如果不是,则通过泵抽引力进行反证。

Consider the lengths of strings in this language. 考虑这种语言中字符串的长度。 They are the Fibonacci numbers themselves. 它们本身就是斐波那契数。 Consider S(i), the ith string in this set. 考虑S(i),这组中的第i个字符串。 It has length F(i), where F(i) is the ith Fibonacci number. 它的长度为F(i),其中F(i)是第i个斐波那契数。

Now consider S(i+1), the (i+1)th string in the language with length F(i+1). 现在考虑长度为F(i + 1)的语言中的第(i + 1)个字符串S(i + 1)。 What strings can we append to this language to get another string in the language? 我们可以在此语言后面附加什么字符串以获得该语言的另一个字符串? We can, of course, append the empty string. 我们当然可以追加空字符串。 The next smallest string we can append is S(i) to get S(i+2). 我们可以附加的下一个最小字符串是S(i)以得到S(i + 2)。 S(i) has length F(i). S(i)的长度为F(i)。 Therefore, the second shortest string we can append to any given string in the language to get another string in the language is unique for every S(i); 因此,对于每个S(i),我们可以将第二个最短的字符串追加到该语言的任何给定字符串中,以获得该语言的另一个字符串。 they are therefore all distinguishable with respect to the Myhill-Nerode theorem, and a minimal DFA for the language would require infinitely many states to distinguish them. 因此,就Myhill-Nerode定理而言,它们都是可区分的,并且针对该语言的最小DFA将需要无限多个状态来区分它们。 Since DFAs cannot have infinitely many states, there is no DFA for this language, and since there is no DFA for the language, the language is not regular. 由于DFA不能具有无限多个状态,因此该语言没有DFA,并且由于该语言没有DFA,因此该语言也不规则。

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

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