Home > Computer Engineering > Quizzes > Theory of Computer Science: Context Free Grammars (CFG)
Theory of Computer Science: Context Free Grammars (CFG)
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 36% Most missed: “A->aA| a| b | The number of steps to form aab:”
Theory of Computer Science: Context Free Grammars (CFG)
Time left 00:00
25 Questions

1. Every grammar in Chomsky Normal Form is:
2. Let G be a grammar: S->AB|e, A->a, B->b. Is the given grammar in CNF?
3. Let p be the number of variables in CNF form of the context free grammar. The value of n in terms of p :
4. Which of the following is called Bar-Hillel lemma?
5. Which of the production rule can be accepted by Chomsky grammar?
6. Which of the following gives a positive result to the pumping lemma restrictions and requirements?
7. In which of the following, does the CNF conversion find its use?
8. Which of the following cannot be filled in the blank below? Statement: There are CFLs L1 nad L2 so that ___________is not a CFL.
9. Which of the following is true for a predictive parser?
10. The most suitable data structure used to represent the derivations in compiler:
11. Which among the following is the correct option for the given grammar?->X111|G1,X->X0|00
12. __________ is the acyclic graphical representation of a grammar.
13. Which among the following cannot be accepted by a regular grammar?
14. Which of the following is not a notion of Context free grammars?
15. Which of the following parsers do not relate to Bottom up parsing?
16. Given grammar G:
1)S->AS
2)S->AAS
3)A->SA
4)A->aa
Which of the following productions denies the format of Chomsky Normal Form?
17. Which of the following parser reaches the root symbol of the tree at last?
18. For the given Regular expression, the minimum number of variables including starting variable required to derive its grammar is:011+1)*(01)*
19. Which of the following does not have left recursions?
20. Which of the following can be a LALR parser generator?
21. The format: A->aB refers to which of the following?
22. Is the following statement correct? Statement: Recursive inference and derivation are equivalent.
23. Which of the following is true for shift reduce parsers?
24. Statement: Every right-linear grammar generates a regular language.
25. Grammar is checked by which component of compiler