in Theory of Computation
614 views
0 votes
0 votes

How to understand such problems?

in Theory of Computation
614 views

2 Comments

For this problem, check how many comparisons you need to do.

L1: Number of 0 in the beginning should be equal to sum of the number of 1 & 0 thereafter. Only one comparison needed which can be solved using single stack. So, CFL.

L2: Number of 0 in the beginning should be equal to  number of 1 thereafter & number of 0 should be less than both of them. Two comparisons needed which can be solved using two stacks. So, CSL.

L3: Number of 0 in the beginning should be equal to  number of 1 & number of 0 thereafter. Two comparisons needed which can be solved using two stacks. So, CSL.

0
0

Please log in or register to answer this question.

Related questions