2,608 views

2 Answers

Best answer
12 votes
12 votes
Let $L_1$ and $L_2$ be two DCFLs.

Now u want to find whether $L_1-L_2$ is dcfl or not? (if DCFL is closed under set-difference, this must be TRUE for ANY such $L_1$ and $L_2$).

To prove this we make use of the fact that DCFL is not closed under intersection. (For example take $L_1 = \left\{a^*b^n c^n \mid n \geq 0 \right\}$ and  $L_2 = \left\{ a^nb^* c^n \mid n \geq 0 \right \}$ which gives $L_1 \cap L_2 = \left \{ a^n b^n c^n \mid n \geq 0 \right \}$, which is not even a CFL.)

Now we can $L_1 \cap L_2  = L_1 - \bar{L_2}$

DCFL is closed under complement (If we complement the accept states of DPDA for L we get DPDA for the complement of L, but this is not true for a general PDA.) So, $\bar{L_2}$ is a DCFL, let it be $R$. So,

$L_1 \cap L_2 = L_1 - R$, where $L_1, L_2$ and $R$ are DCFLs. Now, if DCFL is closed under set difference it must also be closed under complement. But we already showed that it is not. So, DCFL is not closed under set difference.
selected by
0 votes
0 votes

Let's say we have a DCFL

L={ anbmc| m,n>=0 } , this is a DCFL .

Now , let's have another DCFL

L2 = {anc| n>=0 } 

Now if we do L1 - L2  , we will have  {an bm c| m>0 , n>=0 } . It is DCFL.

Related questions

0 votes
0 votes
1 answer
1
8 votes
8 votes
4 answers
4
Himanshu1 asked Jan 9, 2016
9,031 views
DCFLs are not closed under ________a. Complement operationb. Inverse homomorphism operationc. Reversal operationd. Prefix operation