- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

# Explain about pumping lemma for context free language?

### Problem

Explain the pumping lemma for context free language by showing that the language of strings in the form x^{n}y^{n}z^{n} is not a context free language.

### Solution

Pumping lemma (Context free grammar)

We can prove that a particular language is not context free grammar using pumping lemma.

Let’s take the concept of proof by contradiction

Here we assume that language is CFG

**Conditions of pumping lemma**

First of all consider a string and split into 5 parts those are pqrst it must satisfy the following conditions −

|qs|>=1

|qrs|=n (“ n” is pumping length)

pq

^{i}rs^{i}t € L for different values of i

Let the L be the CF language.

Now we can take a string such that S={x^{n}y^{n}z^{n}}

We divide S in five parts.

**Case 1** − let n=4 so S=x^{4}y^{4}z^{4}

q and s each contain only one type of symbols

xxxxyyyyzzzz

p=x , q=xx, r=xyyyyz, s=z, t=zz

Let take i=2

Pq^{2}rs^{2}t

xxxxxxyyyyzzzzz

x

^{6}y^{4}z^{5}≠L

Because, it is not in the form of x^{n}y^{n}z^{n}

- Related Questions & Answers
- Explain Pumping lemma for context free language
- What is the pumping lemma for regular language?
- Explain about CYK Algorithm for Context Free Grammar
- Explain the context free language closure under concatenation?
- Explain the context free language closure under union operation?
- How to generate the language for context free grammar?
- What are the closure properties for context free language?
- What is context free grammar? Explain with examples
- Explain removing unit productions in context free grammar
- Generate a Context-free grammar for the language L = {anbm| m≠n}?
- Explain the simplification of context free grammar in TOC
- Generate a CNF for a given context free grammar
- What is Context-Free Grammar?
- Give the examples of a context free language that are not regular?
- Explain about link and definition section in C language