• edited by
12,845 views

4 Answers

1 1 vote
REVERSAL
1 1 vote

c) reversal operation : consider the expression  "wcwrx" ,its a DCFL because it can be easily accepted by DPDA.

  • push w
  • bypass c
  • pop w^r
  • bypass x

Now as we reverse the expression what we have is "xwrcw" here we can see that the DPDA won't be able to accept the language because of the ambiguity.

 

0 0 votes

C, reversal operation.

Let G(V,T,S,P) be DCFL grammar, then

G(V,T,S,Pr) be the reversal of grammar G.

which can either be DCFL or NCFL. Hence, under reversal operation, DCFL are not closed.

EXAMPLE

L = {ac^n b^n} U {c^k b^2k}, this is DCFL as push & pop operation is haing no ambiguity.

The grammar for above language is (consider $ as NULL),

S->Y/Z

Y->aA

A->cAb/$

Z->cZbb/$

Now

Reverse the grammar,

S->Z/Y

Z->bbZc/$

Y->bAca/$

Corresponding reversed L will be,

L(reversal) = {b^2k c^k} U {b^n c^n a}, this becomes NCFL as after pushing b’s it will be ambiguous to compare it with c^k OR c^n.

• edited by
Position:
Show:

Related questions

0 0 votes
1 answers 1 answer
730
730 views
juuniversity asked Jun 22, 2022
730 views
$L=\{a^mb^n\mid m≠n\}∪{(a+b)^∗b(b+a)^*a(a+b)^∗}$$\implies L = \;\{a^mb^n\mid m<n\} \cup \{a^mb^n\mid m>n\} \cup (a+b)^*b(a+b)^*a(a+b)^*$ It is DCFL ∪ Regular, hence it s...
4 4 votes
2 2 answers
3.8k
3.8k views
srestha asked Jun 22, 2018
3,756 views
$\left \{ a^{m+n}b^{m+n}c^{n}|m,n\geq 1 \right \}$$\left \{ a^{m+n}b^{m+n}c^{k} |m,n,k\geq 1\right \}$$\left \{ a^{m+n}b^{m+k}c^{n+k} |m,n,k\geq 1\right \}$Which one DCFL...
1 1 vote
1 1 answer
1.5k
1.5k views
pranab ray asked Dec 9, 2017
1,549 views
0 0 votes
1 1 answer
1.4k
1.4k views
shivangi5 asked Dec 2, 2017
1,377 views
Consider the following languages:L1={abna2n|n>=0}L2={aabna3n|n>=0}Why L1UL2 is DCFL please explain?