Context Free Grammars & Languages PYQ QUIZ GATE CS (original) (raw)

Consider the languages L1, L2 and L3 as given below.

LI= {0P1q |p, q∈N}

L2={0p1q |p, q∈ N and p=q} and

L3= {0P1q0r |p, q, r∈ N and p =q = r}

Which of the following statements is **NOT TRUE?

[GATE | CS | 2011 |]

The grammar S → aSa | bS | c is

Consider the languages -
L1 = {0i1j | i != j}.
L2 = {0i1j | i = j}.
L3 = {0i1j | i = 2j+1}.
L4 = {0i1j | i != 2j}.

Suppose that L1 is a regular language and L2 is a context-free language. Which one of the following languages is NOT necessarily context-free?

Consider the following languages.

**L 1 = { wxyx ∣ w,x,y ∈ (0+1)+ }
*L 2 = { xy ∣ x,y ∈ (a+b), ∣x∣=∣y∣, x≠y }

Which one of the following is TRUE ?

For a string w, we define wR to be the reverse of w. For example, if w = 01101 then wR = 10110.

Which of the following languages is/are context-free?

The language L= {0i21i | i≥0 } over the alphabet {0,1, 2} is:

Here, wr is the reverse of the string w. Which of these languages are deterministic Context-free languages?

Consider the following statements about the context free grammar

G = {S → SS, S → ab, S → ba, S → Ε}
I. G is ambiguous
II. G produces all strings with equal number of a’s and b’s
III. G can be accepted by a deterministic PDA.

Which combination below expresses all the true statements about G?

Which one of the following grammars generates the language L = {ai bj | i ≠ j}

There are 32 questions to complete.

Take a part in the ongoing discussion