[英]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
. 选项是
regular
或cfl
或csl
。 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.