• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

Context free languages and Push-down automata

Question 61

Given the following statements : (A) A class of languages that is closed under union and complementation has to be closed under intersection. (B) A class of languages that is closed under union and intersection has to be closed under complementation. Which of the following options is correct ?
  • Both (A) and (B) are false.
  • Both (A) and (B) are true.
  • (A) is true, (B) is false.
  • (A) is false, (B) is true.

Question 62

Let G = (V, T, S, P) be a context-free grammar such that every one of its productions is of the form A → v, with |v| = K > 1. The derivation tree for any W ∈ L(G) has a height h such that
  • logK|W| ≤ h ≤ logK((|W|-1)/k-1)
  • logK|W| ≤ h ≤ logK(K|W|)
  • logK|W| ≤ h ≤ K logK|W|
  • logK|W| ≤ h ≤ ((|W|-1)/k-1)

Question 63

Given the following two languages : L1 = {an bn | n ≥ 0, n ≠ 100} L2 = {w ∈ {a, b, c}*| na(w) = nb(w) = nc(w)} Which of the following options is correct ?
  • Both L1 and L2 are not context free language
  • Both L1 and L2 are context free language.
  • L1 is context free language, L2 is not context free language.
  • L1 is not context free language, L2 is context free language.

Question 64

What is the number of steps required to derive the string ((() ()) ())
S → SS
S → (S)
S → ε
  • 10
  • 15
  • 12
  • 16

Question 65

Consider the following grammar.
S -> AB
A -> a
A -> BaB
B -> bbA
Which of the following statements is FALSE?
  • The length of every string produced by this grammar is even
  • No string produced by this grammar has three consecutive a\'s
  • The length of substring produced by B is always odd
  • No string produced by this grammar has four consecutive b\'s

Question 66

Let G = (V, T, S, P) be a context-free grammar such that every one of its productions is of the form A → ν, with |ν| = k > 1. The derivation tree for any string W ∈ L (G) has a height such that
  • h<((|W| - 1)/k-1)
  • logk|W| < h
  • logk|W| < h < ((|W| - 1)/k-1)
  • logk|W| <= h <= ((|W| - 1)/k-1)

Question 67

Let L = {0n1n|n ≥ 0} be a context free language. Which of the following is correct ?
  • L` is context free and Lk is not context free for any k ≥ 1.
  • L` is not context free and Lk is not context free for any k ≥ 1.
  • Both L` and Lk is for any k ≥ 1 are context free.
  • Both L` and Lk is for any k ≥ 1 are not context free.

Question 68

Given a Turing Machine M = ({q0, q1, q2, q3}, {a, b}, {a, b, B}, δ, B, {q3}) Where δ is a transition function defined as δ(q0, a) = (q1, a, R) δ(q1, b) = (q2, b, R) δ(q2, a) = (q2, a, R) δ(q3, b) = (q3, b, R) The language L(M) accepted by the Turing Machine is given as:
  • aa*b
  • abab
  • aba*b
  • aba*

Question 69

The context free grammar given by S → XYX X → aX|bX|λ Y → bbb generates the language which is defined by regular expression:
  • (a + b)*bbb
  • abbb(a + b)*
  • (a + b)*(bbb)(a + b)*
  • (a + b)(bbb)(a + b)*

Question 70

Match the following: 24
  • (1)
  • (2)
  • (3)
  • (4)

There are 93 questions to complete.

Last Updated :
Take a part in the ongoing discussion