in Theory of Computation
711 views
1 vote
1 vote

Is the following language a DCFL? Please explain your reasoning.

in Theory of Computation
by
711 views

6 Comments

my thinking:

We can design a DPDA that pops ‘a’ for every ‘b’ and pops both ‘b’ and ‘a’ for every ‘c’. In the end we’ll have an empty stack and the string will be accepted if it’s in the language. Hence, it’s a DCFL.

Is my logic correct?
0
0

@atulcse Let’s check your logic

Let m = 2, n=3 and p=4

L = {$a^5 b^7 c^6$}

First all the a’s has been push onto the stack then for every b, a is popped

Now there will be 2 b’s and no a’s onto the stack and #c = 6. How will you match that?

 

1
1
I see, we can't match in that case. Thanks for the example
1
1
CFL not DCFL.
0
0
Language is CFL but not DCFL
2
2
What is the CFG for this language? If it is CFL.
0
0

2 Answers

2 votes
2 votes
it is CFL language  here pop and push not determinsitic

let us suppose you pushing all a in stack after that b become then how you decide  how many b    a pop  and remaining of b push in stack  to compare with c so here nondetermenism exist so it is cfl not dcfl
edited by
0 votes
0 votes
it is CFL language  here pop and push not determinsitic

let us suppose you pushing all a in stack after that b become then how you decide  how many b    a pop  and remaining of b push in stack  to compare with c so here nondetermenism exist so it is cfl not dcfl

Related questions