in Theory of Computation retagged by
347 views
0 votes
0 votes

Determine whether or not the following language is context-free.

MY ANSWER : The given language is equivalent to L1 = { wwR : where w $\in$ {a,b}* } . And so the given language is Non-deterministic CFL.

Please verify ...

in Theory of Computation retagged by
347 views

1 comment

how are both equivalent??
1
1

1 Answer

2 votes
2 votes
Best answer

Actually for such languages what we do is : 

By appropriate substitution ( in this case n = 0 ) , if we are able to cover higher strings (like n = 1 , 2 etc here ) , then we can do such substitution.

For example to verify here , we can see that here we have any no of a's in the beginning and in the end also ..So the starting 'n' a's can be made part of 'w' part of string and trailing 'n' a's can be made part of 'wR'  part of string..

Hence the given language reduces to L = { w wR  |  w belongs to {a , b}* } which is an NCFL..Hence the given language is NCFL. 

selected by