0 votes 0 votes explain why it is CFL? altamash asked Dec 25, 2018 altamash 203 views answer comment Share Follow See all 2 Comments See all 2 2 Comments reply Satbir commented Dec 25, 2018 reply Follow Share 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 votes 0 votes altamash commented Dec 25, 2018 reply Follow Share @satbir thanks got it 0 votes 0 votes Please log in or register to add a comment.