in Theory of Computation
200 views
0 votes
0 votes

explain why it is CFL?

in Theory of Computation
200 views

2 Comments

whenever there is 1 comparison condition and we can do it with help of  1 or 0 stack then it is CFL.

a.  when a comes we do push(a) and put them in stack and when b comes we do pop(a). at end of input string  stack will be empty -> it is CFL

b. it is non deterministic CFL. u and w are of finite length so could be treated as constant so language could be reduced to vcv^r where c = {ab,ba,bb,ba}.  

c. for this we can compare w1 with w2  which would require only 1 stack for comparison. At last if stack is not empty tthen we accept the input else reject it -> cfl

Correct me if i am wrong.
0
0
@satbir

thanks got it
0
0

Please log in or register to answer this question.