346 views

1 Answer

Best answer
1 votes
1 votes

When languages are given don’t go by the Closure property , check for the given languages.

$S$ : {$a^nb^{n+k}|n≥0,k≥1$} $∪$ {$a^{n+k}b^n|n≥0,k≥3$}

here , considering the first language

$L1$ $=$  {$a^nb^{n}b^{k}|n≥0,k≥1$}

Here there is only one dependency and k is independent  of n , it can be written as $a^nb^nb^+$ , clearly $DCFL$.

Here, in $L1$ push all a’s then pop all b’s for each a and push remaining b’s, thus a PDA can be constructed for this.

similarly the other language is also $DCFL$.

in $L2$ , after pushing all a’s and popping all b’s just check that 3 a’s are present or not,  if present then accept.

Union contains all the Strings from both the set of languages.

-------------------------------------------------------------------------------------------------------------------------------------------------

DCFL not closed in Union. Then how?

NOT CLOSED means it may or may not be DCFL.

edited by

Related questions

1 votes
1 votes
0 answers
1
srestha asked Apr 4, 2019
673 views
$\left \{ a^{n}.b^{n+k}\mid n\geq 0,k\geq 1 \right \}\cup \left \{ a^{n+k}.b^{n}\mid n\geq 0,k\geq 3 \right \}$ is DCFLIs it true? As we know union of two DCFL cannot be ...
1 votes
1 votes
1 answer
3
srestha asked Apr 23, 2019
979 views
How many number of $DFA$ states(minimal DFA) required which accepts the language $L=\left \{ a^{n}:n=\text{3 or n>= 2m for all m>= 1} \right \}$ ___________Answer will be...
0 votes
0 votes
1 answer
4
amitarp818 asked Nov 18, 2023
232 views
Given L1 = {a*baa*} and L2 = {ab*}The regular expression corresponding to language L3 = L1/L2 (right quotient) is given by