Pumping lemma for regular language is generally used for proving :

2017

Pumping lemma for regular language is generally used for proving :

  1. A.

    whether two given regular expressions are equivalent

  2. B.

    a given grammar is ambiguous

  3. C.

    a given grammar is regular

  4. D.

    a given grammar is not regular

Attempted by 112 students.

Show answer & explanation

Correct answer: D

Conclusion: The pumping lemma for regular languages is used to prove that a language (and thus a grammar generating that language) is not regular.

Pumping lemma (informal statement): If a language L is regular, then there exists a pumping length p such that every string s in L with length at least p can be written as s = x y z with |xy| ≤ p and |y| ≥ 1, and for all integers i ≥ 0 the string x y^i z is also in L.

How to use the pumping lemma to prove a language is not regular:

  1. Assume for contradiction that the language L is regular. Let p be the pumping length given by the lemma.

  2. Choose a specific string s in L with |s| ≥ p (choose s strategically so that any allowed decomposition forces a useful structure).

  3. Consider all possible decompositions s = x y z satisfying |xy| ≤ p and |y| ≥ 1, and show that there exists some i (often 0 or 2) for which x y^i z is not in L.

  4. This contradicts the pumping lemma's requirement that all pumped strings remain in L, so L cannot be regular.

Example (classic): Let L = { a^n b^n : n ≥ 0 }. Assume L is regular and let p be the pumping length. Choose s = a^p b^p. Any decomposition s = x y z with |xy| ≤ p must have y consisting only of a's and |y| ≥ 1. Pumping down with i = 0 removes at least one a, producing a string with fewer a's than b's, which is not in L. This contradiction shows L is not regular.

Important note: Failing to apply the pumping lemma successfully does not prove regularity. To prove a language is regular you must construct a finite automaton, a regular expression, or otherwise show it meets the definition of regular languages.

Why the other answer choices are incorrect:

  • Checking whether two regular expressions are equivalent is done by converting to automata and comparing their languages, not by the pumping lemma.

  • Proving a grammar is ambiguous involves demonstrating multiple distinct parse trees for the same string; ambiguity is a context-free grammar property and is not addressed by the pumping lemma for regular languages.

  • Proving a grammar (or its language) is regular requires constructing a right/left-linear grammar, a finite automaton, or a regular expression; the pumping lemma cannot be used to establish regularity.

Explore the full course: Mppsc Assistant Professor