简体   繁体   English

语言L的补语= {a ^ nb ^ n | n!= 100}

[英]The complement of the language L={a^n b^n | n !=100}

I dont need a proof, since this is an objective exam question and allowed 2 mins only. 我不需要证明,因为这是一个客观的考试问题,只允许2分钟。 The options are regular or cfl or csl . 选项是regularcflcsl I dont understand how to tackle this. 我不明白该如何解决。

If we I write it as 如果我们写成

(a^n b^n | n<100) UNION (a^n b^n | n>100)

Now call first part L1 and second part L2 and then try to compliment using, 现在叫第一部分L1和第二部分L2,然后尝试称赞使用,

De-morgons Law L'= L1' INTERSECTION L2' 底蕴定律L'= L1'交点L2'

I dont think thats the right way or a quick way considering the fact we need to spend 2-3 mins only. 考虑到我们只需要花费2-3分钟的时间,我认为这不是正确的方法还是快速的方法。 Any better approch to this? 有更好的办法吗?

That is the right way to do, L = {a^nb^n | 这是正确的方法,L = {a ^ nb ^ n | n<100} UNION {a^nb^n | n <100} UNION {a ^ nb ^ n | n>100} N> 100}

The first part is regular and second part is DCFL. 第一部分是常规的,第二部分是DCFL。 Now, L' = COMP({a^nb^n | n<100}) INTERSECT COMP({a^nb^n | n>100}) 现在,L'= COMP({a ^ nb ^ n | n <100})相交COMP({a ^ nb ^ n | n> 100})

regular complement is always regular and DCFL complement is always DCFL and hence CFL. 常规补码始终是常规补码,DCFL补码始终是DCFL,因此也就是CFL。

So, Regular intersect CFL gives CFL. 因此,常规相交CFL就是CFL。

声明:本站的技术帖子网页,遵循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? 是L = {a ^ nb ^ m | n&gt; m}常规或不规则的语言? - Is L = {a^n b^m | n>m} a regular or irregular language? 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? 为什么 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 语言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 = {0^(n)1^(n) | 的证明中发现错误 n&gt;0} 是一个正则表达式 - Finding error in proof stating the language L = {0^(n)1^(n) | n>0} is a regular expression 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? 这是语法{a ^ nb ^ 2n | n&gt; = 0}是否正常? - Is this grammar {a^n b^2n | n >= 0} regular or not? 语言0 ^ m.0 ^ n是否为0 &lt;= m &lt;= n常规语言? - Is the language 0^m.0^n , 0<=m<=n regular? 为什么{a ^ nb ^ n | n&gt; = 1}是不是普通语言? - Why {a^nb^n | n>=1} is not a regular language?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM