Theory of Computation - Context free languages

1. Correct hierarchical relationship among context- free, right-linear, and context-sensitive language is

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


2. In the following grammar :
x : : = x ⊕ y | 4
y : : = z * y I 2
z : : = id
which of the following is true?

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


3. Which of the following CFG's can't be simulated by an FSM?

  • Option : B
  • Explanation :
    Option (B) generates the set {an bn, n=1,2,3 ....} which is not regular, Option (A) is left linear where as option (C) is right linear .
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


4. ADG is said to be in Chomsky Form (CNF), if all the productions are of the form A --> BC or A --> a. Let G be a CFG in CNF. To derive a string of terminals of length x, the number of productions to be used is

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


5. Which of the following statements is correct?

  • Option : C
  • Explanation :
    If we include A and B in a set and if we write A* it means except then A i.e. B same as B* means except then B i.e.A so if we intersect (A*B*) and B then get A because in any regular language
    if we write A-B then A-B=A intersection B' so if we intersect A and B means A-B So intersection of (A*B*) and B = (BA) intersection B means (BA)-B' and B'=A so (BA) intersection(A)=A So ans is (C)
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *