287 views
0 votes
0 votes

Consider the following statement:

S : {$a^{n}b^{n+k} | n\geq 0,k\geq 1$} $\cup$ {$a^{n+k}b^{n} | n\geq 0,k\geq 3$}

Which of the following is TRUE about S? (Also explain HOW)

  1. S is Regular, but not DCFL
  2. S is CFL, but not DCFL
  3. S is DCFL, but not Regular
  4. None of these

1 Answer

1 votes
1 votes

@Jaideepyadav910

When languages are given don’t go by the general 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$.

similarly the other language is also $DCFL$.

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.

Related questions

1 votes
1 votes
1 answer
2
0 votes
0 votes
0 answers
3
raj_uddeshya157 asked Dec 27, 2023
80 views
Can $\Sigma^{*}$ be called DCFL? If yes, what would the state transition diagram of its PDA look like?
2 votes
2 votes
0 answers
4
h4kr asked Feb 2, 2023
464 views
Can DCFL be ambiguous?