简体   繁体   English

如何证明 L = {a^jb^kc^kd^k: j, k ≥ 1} ∪ {b^jc^kd^l: j, k, l ≥ 0} 满足 CFL 的泵浦引理?

[英]How to prove that L = {a^j b^k c^k d^k: j, k ≥ 1} ∪ {b^j c^k d^l : j, k, l ≥ 0} satisfies the pumping lemma for CFL’s?

I have to prove that L satisfies the pumping lemma for CFL's.我必须证明 L 满足 CFL 的抽水引理。 The language L is not context-free but satisfies the pumping lemma for context-free languages.语言 L 不是上下文无关的,但满足上下文无关语言的抽水引理。 Let L be: L = {a^jb^kc^kd^k: j, k ≥ 1} ∪ {b^jc^kd^l: j, k, l ≥ 0}设 L 为: L = {a^jb^kc^kd^k: j, k ≥ 1} ∪ {b^jc^kd^l: j, k, l ≥ 0}

I have previously tried doing proof by pumping lemma but I always end up messing up.我以前尝试过通过抽引理来证明,但我总是搞砸了。 I am hoping someone can explain to me how to solve this question.我希望有人可以向我解释如何解决这个问题。 I am struggling a lot.我很挣扎。

To show this, we must show that for any string in L satisfying the hypothesis of the pumping lemma, the conclusion holds: that is, for any string w in L where |w|为了证明这一点,我们必须证明对于 L 中的任何字符串满足泵引理的假设,结论成立:也就是说,对于 L 中的任何字符串 w,其中 |w| >= p, w can be rewritten as uvxyz such that |vxy| >= p, w 可以重写为 uvxyz 使得 |vxy| <= p, |vy| <= p, |vy| > 0 and for all n >= 0, u(v^n)x(y^n)z is also in L. > 0 并且对于所有 n >= 0,u(v^n)x(y^n)z 也在 L 中。

Let w be any string of length at least p in L. Either w begins with some a's or it doesn't.令 w 是 L 中长度至少为 p 的任意字符串。 w 要么以某个 a 开头,要么不以 a 开头。 Consider these cases separately.分别考虑这些情况。

  1. if w begins with some a's, let vxy be some substring of a's only.如果 w 以某个 a 开头,则令 vxy 为仅 a 的某个 substring。 Pumping the number of a's must keep the string in the language since the number of a's is arbitrary and we're not changing the numbers of b's, c's or d's, which must have been the same if our string had a's in it originally.抽取 a 的数量必须使字符串保持在语言中,因为 a 的数量是任意的,并且我们不会更改 b、c 或 d 的数量,如果我们的字符串最初包含 a,那么它们必须是相同的。

  2. if w doesn't begin with any a's, let vxy be any substring of a single kind of character.如果 w 不以任何 a 开头,则令 vxy 为单一字符的任何 substring。 Pumping the number of that character doesn't matter since if our original string had no a's in it, the number of b's, c's and d's doesn't matter anyway.抽取那个字符的数量并不重要,因为如果我们的原始字符串中没有 a,那么 b、c 和 d 的数量无论如何都无关紧要。 Because we're just pumping one symbol the order will be maintained and the string remains in the language.因为我们只是抽取一个符号,所以将保持顺序并且字符串保留在语言中。

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

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