1 votes 1 votes Why is option d wrong? Prerna Chauhan asked Jan 14, 2017 Prerna Chauhan 485 views answer comment Share Follow See 1 comment See all 1 1 comment reply sudsho commented Jan 14, 2017 reply Follow Share d is right...both are CFL 3 votes 3 votes Please log in or register to add a comment.
0 votes 0 votes ans b) is right as when we popped out all the elements we are left with 2 and that to without comparisons so b is the right option Neeraj7375 answered Jan 14, 2017 Neeraj7375 comment Share Follow See all 5 Comments See all 5 5 Comments reply Prerna Chauhan commented Jan 14, 2017 reply Follow Share why do we need to compare 2's? there is no need to compare 2's. Only 1's and 0's need comparison which can be easily done by using DPDA. 0 votes 0 votes Neeraj7375 commented Jan 14, 2017 reply Follow Share for comparing 0 and 1 we had a stack after popping all 0's stack gets empty and when stack gets empty DPDA task is over but we are still left with 2 and that cant be done with DPDA so it is CSL clarify me if I am wrong Thanks in advance 0 votes 0 votes sudsho commented Jan 14, 2017 reply Follow Share ^ u just have to count 0 and 1...push 0s pop them for 1s..leave 2 as it is and accept...its even DCFL... 1 votes 1 votes Prerna Chauhan commented Jan 14, 2017 reply Follow Share @Neeraj here the comparison is between 0's and 1's. So we don't care about how many 2's we have. so firstly we will push all 0's then with each 1 we will pop one 0. if they are equal stack will be empty and we will left with two'son input tape. Now we don't need to push them (2's) into stack just read them, and once the tape is empty you accept the string. 0 votes 0 votes Aboveallplayer commented Jan 16, 2017 reply Follow Share No need to compare 2! and yes It is a vintage example of carelessness of ME 0 votes 0 votes Please log in or register to add a comment.