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.