Prove that 0m 1n m n 1 and m is divisible by n is not contex

Prove that {0^m 1n |m, n 1 and m is divisible by n} is not context-free.

Solution

We prove using parkhs theorem..
If language is contect free grammar, then it need to be satisfy condition w = uvxyz

* |vxy| <= p
* |vy| > 0
For all i>=0 we have wv^i xy^i z belongs to L

But in our situtation, we cannot generate sequence as above rules,
Since as per condition m,n divisible by n following strings are can generate which are regular

if n = 2
01
0011
0000011
The strings generated are irregular and we got contradiction as per our assumption.
So given {0^m1^n | m,n >=1 and m is divisible by n} is non-context free.

 Prove that {0^m 1n |m, n 1 and m is divisible by n} is not context-free.SolutionWe prove using parkhs theorem.. If language is contect free grammar, then it ne

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site