• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

Context free languages and Push-down automata

Question 91

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?
  • {wxwRxR ∣ w,x∈{0,1}*}
  • {wwRxxR ∣ w,x∈{0,1}*}
  • {wxwR ∣ w,x∈{0,1}*}
  • {wxxRwR ∣ w,x∈{0,1}*}

Question 92

Consider the following languages.

L1 = {ai bj ck | i = j, k ≥ 1}
L1 = {ai bj | j = 2i, i ≥ 0}
Which of the following is true?
  • L1 is not a CFL but L2 is
  • L1 ∩ L2 = ∅ and L1 is non-regular
  • L1 ∪ L2 is not a CFL but L2 is
  • There is a 4-state PDA that accepts L1, but there is no DPDA that accepts L2

Question 93

Which of following statement(s) is/are not correct? (I) Languages generated by the grammar S→aSa ∣ aa is not regular. (II) Languages generated by the grammar S→aSb ∣ aa is not regular. (III) Languages generated by the grammar S→S1|S3, S1→aS1c |S2|λ, S2→aS2b|λ, S3→aS3b|S4| λ, S4→bS4c|λ is {a^nb^mc^k | k = |n - m|, n≥0, m≥0, k≥0}. (IV) Languages generated by the grammar S→S1S3, S1→aS1c |S2|λ, S2→aS2b|λ, S3→aS3b|S4| λ, S4→bS4c|λ is {a^nb^mc^k | k = |n - m|, n≥0, m≥0, k≥0}.

  • Only (II), (IV)

  • Only (I), (III), (IV)

  • Only (I), (II), (III)

  • All of the above

There are 93 questions to complete.

Last Updated :
Take a part in the ongoing discussion