简体   繁体   English

是L = {a ^ nb ^ m | n> m}常规或不规则的语言?

[英]Is L = {a^n b^m | n>m} a regular or irregular language?

I have troubles in solving/proving this problem. 我在解决/证明这个问题时遇到了麻烦。 Any ideas please? 有什么想法吗?

L = {a n b m | L = {a n b m | n > m} is not regular language. n> m} 不是常规语言。

Yes, the problem is tricky at first few try and deserve vote-up. 是的,这个问题在最初几次尝试时很棘手 ,值得投票。

Pumping Lemma a necessary property of regular language is tool for formal proof that language is not regular language. 抽取引理常规语言的必要属性是用于正式证明语言不是常规语言的工具。

Formal definition: Pumping lemma for regular languages 正式定义: 常规语言的抽取引理

Let L be a regular language. L成为常规语言。 Then there exists an integer p ≥ 1 depending only on L such that every string w in L of length at least p ( p is called the "pumping length") can be written as w = xyz (ie, w can be divided into three sub-strings), satisfying the following conditions: 则存在仅在L根据一个整数p≥1,使得每个字符串 w的长度L至少P(p被称为“泵送长度”)可以写为w = XYZ(,W可以被分成三个子字符串),满足以下条件:

  1. | | y | y | ≥ 1 ≥1
  2. | | xy | xy | p ≤p
  3. for all i ≥ 0, xy i zL 对于所有的i≥0,XY I Z∈ 大号

Suppose, if you choose string W = a n b m where (n + m) ≥ p and n > m + 1 . 假设,如果选择字符串W = a n b m ,其中(n + m) ≥ pn > m + 1 Choice of W is valid but this choice you are not able to show that language is not regular language. 选择W是有效的,但是这个选择你无法证明该语言不是常规语言。 Because with this W you always have at-least one choice of y=a to pump new strings in language by repeating a for all values of i (for i =0 and i > 1) . 因为有了这个W你总是至少有一个y=a选择,通过重复a所有 i (对于i = 0和i> 1)来在语言中抽取新的字符串。

Before I writing my solution to proof the language is not regular. 在我编写解决方案证明之前,语言不规律。 Please understand following points and notice: I made bold every string w and all i in formal definition of pumping lemma above. 请理解以下几点并注意:我在every string wall i在上面的抽取引理的正式定义中做了大胆。

  • Although with Some Sufficiently large W in language you are able to generate new string in Language but NOT possible WITH ALL ! 虽然语言中有一些足够大的W ,但你可以在语言中生成新的字符串,但不可能全部使用 There are many possible choices for W (below in my proof) with that you can't find any choice of y to generate new string in language for all i >=0 . W有许多可能的选择(在我的证明下面),你找不到任何 y的 选择来为所有i> = 0生成语言的新字符串。 So because every Sufficiently large W not able to generate new string in language hence language is NOT regular. 因此,因为每个足够大的W都无法在语言中生成新的字符串,因此语言常规。

read: what pumping lemma formal definition says 阅读: 什么抽样引理形式定义说

Proof: using pumping lemma 证明:使用泵浦引理

Step (1): Choose string W = a n b m where (n + m) ≥ p and n = m + 1 . 步骤(1):选择字符串W = a n b m其中(n + m) ≥ pn = m + 1

Is this choice of W is valid according to pumping lemma? is valid according to pumping lemma? Is this choice of W Is this choice of is valid according to pumping lemma?

Yes, such W is in language because number of a = n > number of b =m . 是的,这样的W是语言,因为a = n >的数量b = m。 W is in language and sufficiently large >= p . W是语言并且足够大> = p

Step (2): Now chose a y to generate new string for all i >= 0 . 步骤(2):现在选择y所有 i >= 0生成新字符串。

And no choice is possible for y this time! 没有选择是可能的y这一次! Why? 为什么?

First , it is essay to understand that we can't have b symbol in y because it will either generate new strings out of pattern or in resultant string total number of b will be more than total number of a symbols. 首先 ,它是作文明白,我们不能有b y中的符号,因为它要么产生新的字符串出的图形在得到的线总数b将超过总数多a符号。

Second , we can't chose y = some a 's because with i=0 you would get a new string in which number of a s will be less then number b s that is not possible in language.( remember number of a in W was just one more then b so removing any a means in resultant string N(a)=N(b) that is not acceptable because n>m ) 其次 ,我们不能选择Y =一些一个因为与i=0 ,你会得到一个新字符串,其中的数a旨意是小于号b s表示是不可能的语言。( 记住的号码a中W只是一个b所以在结果字符串N(a)= N(b)中删除任何不可接受的均值,因为n> m

So in we could find some W those are sufficiently large but using that we can't generate new string in language that contradict with pumping lemma property of regular language hence then language {a n b m | 所以我们可以找到一些足够大的W,但是使用它们我们不能用与常规语言的泵浦引理属性相矛盾的语言生成新的字符串,因此语言{a n b m | n > m} is not a regular language indeed. n> m}确实不是常规语言。

暂无
暂无

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

相关问题 L = {a^na^nb^m |m, n ≥ 0} 是规则语言还是不规则语言? - Is L = {a^n a^n b^m |m, n ≥ 0} a regular or irregular language? 为什么 a^mb^n where m,n &gt; 0 是常规语言但 a^nb^n where n &gt; 0 是非常规语言 - why a^m b^n where m,n > 0 is a regular language but a^n b^n where n > 0 is non regular language 语言0 ^ m.0 ^ n是否为0 &lt;= m &lt;= n常规语言? - Is the language 0^m.0^n , 0<=m<=n regular? 语言L = {a ^(n)b ^(m)c ^(k)的无上下文语法:m = | i-k |} - Context-free grammar for the language L = {a^(n)b^(m)c^(k): m = |i - k|} L = {a ^ nb ^ nc ^ md ^ m:n&gt; = 1,m&gt; = 1} U {a ^ nb ^ mc ^ md ^ n:n&gt; = 1,m&gt; = 1} isRegular? - L = { a^n b^n c^m d^m : n >= 1, m >= 1 } U { a^n b^m c^m d^n : n >= 1, m >= 1 } isRegular? 这是普通语言吗? {0 ^ n 1 ^ m | m!= n},我不理解抽水长度的直接证明 - Is this language regular? {0^n 1^m | m != n}, I don't understand the direct proof by pumping length 上下文无关语言(泵引理a ^ nb ^ mc ^ min(n,m)) - Context free language (Pumping lemma a^n b^m c^min(n,m)) 抽引引理以显示`{a ^ nb ^ m | n = km对于N中的k是不规则的 - Pumping lemma to show that `{a^n b^m | n=km for k in N}` is not regular 语言L的补语= {a ^ nb ^ n | n!= 100} - The complement of the language L={a^n b^n | n !=100} L1 = {a ^ n b ^ n | n <4}且L2 = {a ^ n b ^ n | n <10 ^ 10 ^ 10},常规语言? - Are L1 = {a^n b^n | n < 4 } and L2 = {a^n b^n | n < 10^10^10 }, regular languages?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM