3,529 views
3 3 votes

Q1. {an bn } U { an b2n } U {an b3n } U{an b4n} ...Is it in DCFL OR CFL?

Q2. {an} U {an bn} is it in DCFL OR CFL? Please explain with solution....

2 Answers

Best answer
3 3 votes

1. NCFL ===> Here , if a input is given then there is no chance to deterministically know that which language will operate (actually all are DCFL particularly, but DCFL are not closed under union ).Hence , all of them  will parallely operate , making their union a NCFL.

2. DCFL ===>  Count a's and increment stack. If no b comes go to final state even if stack is not empty . If b comes then decrement the stack and go to final state only if stack is empty. No, non-determinism required. Hence , DCFL .

• edited by
0 0 votes
Q1)CFL but not DCFL

Q2)DCFL
• edited by
Position:
Show:

No related questions found