Redirected
• edited by
2,506 views
0 0 votes

Given the following two statements:

  1. $L=\{w\mid n_{a}(w)=n_{b}(w)\}$ is deterministic context free language, but not linear.
  2. $L=\{a^{n}b^{n}\} \cup \{a^{n}b^{2n} \}$ is linear, but not deterministic context free language.

Which of the following options is correct?

  1. Both (i) and (ii) are false.
  2. Both (i) and (ii) are true.
  3. (i) is true, (ii) is false.
  4. (i) is false, (ii) is true.

2 Answers

1 1 vote

Ans: B Both I and II are true

                                L={w∣na(w)=nb(w)}L={w∣na(w)=nb(w)} 

is deterministic context free language, but not linear.

                               L={anbn}∪{anb2n}L={anbn}∪{anb2n} 

is linear, but not deterministic context free language.

ref: peter linz

(it is an snapshot of peter linz book.  page no. 306)

Answer:
Position:
Show:

Related questions

0 0 votes
5 5 answers
2.8k
2.8k views
go_editor asked Mar 24, 2020
2,772 views
Which of the following are not regular?Strings of even number of a’sStrings of a’s , whose length is a prime number. Set of all palindromes made up of a’s and b’s. String...
1 1 vote
7 7 answers
2.9k
2.9k views
go_editor asked Mar 24, 2020
2,922 views
Consider the languages $L_{1}= \phi$ and $L_{2}=\{1\}$. Which one of the following represents $L_{1}^{\ast}\cup L_{2}^{\ast} L_{1}^{\ast}$?$\{\in \}$$\{\in,1\}$$\phi$$1^{...
3 3 votes
7 7 answers
5.6k
5.6k views
go_editor asked Mar 24, 2020
5,597 views
Given the following statements:A class of languages that is closed under union and complementation has to be closed under intersectionA class of languages that is closed ...
0 0 votes
2 2 answers
2.4k
2.4k views
go_editor asked Mar 24, 2020
2,404 views
Let $G= (V,T,S,P)$ be a context-free grammer such that every one of its productions is of the form $A\rightarrow v$, with $\mid v \mid=K 1$. The derivation tree for any ...