• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

Context free languages and Push-down automata

Question 11

[caption width="800"] [/caption]

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

  • None of the languages

  • Only L1

  • Only L1 and L2

  • All the three languages

Question 12

GATECS2006Q18
  • L1 only
  • L3 Only
  • L1 and L2
  • L2 and L3

Question 13

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?
  • I only
  • I and III only
  • II and III only
  • I, II and III

Question 14

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

[caption width="800"] [/caption]
  • A

  • B

  • C

  • D

Question 15

In the correct grammar of above question, what is the length of the derivation (number of steps starring from S) to generate the string albm with l ≠ m?

  • max(l,m) + 2

  • l + m + 2

  • l + m + 3

  • max(l, m) + 3

Question 16

Consider the languages:

L1 = {anbncm | n, m > 0} 
L2 = {anbmcm | n, m > 0} 

Which one of the following statements is FALSE?

  • L1 ∩ L2 is a context-free language

  • L1 U L2 is a context-free language

  • L1 and L2 are context-free language

  • L1 ∩ L2 is a context sensitive language

Question 17

Consider the languages:

L1 = {wwR |w ∈ {0, 1}*}
L2 = {w#wR | w ∈ {0, 1}*}, where # is a special symbol
L3 = {ww |  w ∈  (0, 1}*)

Which one of the following is TRUE?

  • L1 is a deterministic CFL

  • L2 is a deterministic CFL

  • L3 is a CFL, but not a deterministic CFL

  • L3 is a deterministic CFL

Question 18

The language {am bn Cm+n | m, n ≥ 1} is

  • regular

  • context-free but not regular

  • context sensitive but not context free

  • type-0 but not context sensitive

Question 19

If the strings of a language L can be effectively enumerated in lexicographic (i.e., alphabetic) order, which of the following statements is true ?
  • L is necessarily finite
  • L is regular but not necessarily finite
  • L is context free but not necessarily regular
  • L is recursive but not necessarily context free

Question 20

Let G = ({S}, {a, b} R, S) be a context free grammar where the rule set R is S → a S b | SS | ε Which of the following statements is true?

  • G is not ambiguous

  • There exist x, y, ∈ L (G) such that xy ∉ L(G)

  • There is a deterministic pushdown automaton that accepts L(G)

  • We can find a deterministic finite state automaton that accepts L(G)

There are 93 questions to complete.

Last Updated :
Take a part in the ongoing discussion