78.4k views
2 votes
Consider the following language. L={ww|w∈{0,1}∗} When proving that L is not context-free by using the Pumping Lemma for context-free languages one must decide on a counterexample s . For each of the following, argue why or why not s is a successful choice to serve as counterexample. s=0p1p s=0p110p11 s=02p12p02p12p s=00010001

User Hisam
by
8.6k points

1 Answer

5 votes

Final answer:

Counterexample s=02p12p02p12p is suitable to prove that the language L is not context-free using the Pumping Lemma because it correctly follows the form ww and can be pumped to get a contradiction, while the other suggested strings do not meet the criteria.

Step-by-step explanation:

  • The correct answer is option not context-free.
  • Considering a language L where L={ww|w∈{0,1}∗}, the Pumping Lemma for context-free languages can be applied to prove that L is not context-free. When choosing a counterexample s, it's essential that s be in L and sufficiently long that it can be pumped according to the lemma.
  • s=0p1p is not a suitable counterexample because it doesn't conform to the format ww required by the language L; it has two different halves rather than the same word twice.
  • s=0p110p11 is also not a suitable counterexample, as it doesn't represent a repetition of w.
  • s=02p12p02p12p is a successful counterexample as it is a repetition of 02p12p, which can be pumped to derive a contradiction with the Pumping Lemma, showing that L is not context-free.
  • s=00010001 fails as a counterexample because it is not parametrized by p and thus cannot be pumped appropriately.

User VoidDweller
by
7.5k points