retagged by
1,401 views

2 Answers

Best answer
3 votes
3 votes

wxw

see take w as 001

x as 101

w will be 100

001 101 100

above string will be accepted in non deterministically way only ,at each step we have  two copies  (i e one for push and other for pop ) to match 001 with reverse of it .therefore 

so it is cfl  but not dcfl .

selected by
0 votes
0 votes

Both of them will DCFL and none of them will CFL.

For first language there exist DPDA,

Bcz whenever we encounter 'a' we simply push on the stack,when all 'a' are over then we start pushing 'b' when all 'b' are finish and after getting first 'c' and subsequent 'c' we pop all 'b' from the top of the stack.When all 'c' and all 'b' are over and only stack contains 'a' and input remaining 'd' ,then we pop each 'a' against all 'b'..Therefore, first languages is accepted by DCFl.

L={wxw^r/w belong to (a,b)+}

It is nothing but string starting with same symbol.For varification put some binary data and check

Therefore it must be DCFL.

Related questions

1 votes
1 votes
1 answer
1
1 votes
1 votes
2 answers
2
ggwon asked Dec 29, 2022
729 views
L = {$a^{n+m}b^{n}a^{m} | n,m \geq 0$}Is the above language DCFL or CFL ?
0 votes
0 votes
3 answers
4
vishal8492 asked Dec 4, 2016
606 views
It seemed like , this is textbook example of non-CFL language ; will require 2 comparisons . That means no complement exist was the answer , I was expecting. Why answer g...