Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Test  >  Theory of Computation  >  Test: Context Free Grammar Derivations & Definitions - Computer Science Engineering (CSE) MCQ

Context Free Grammar Derivations & Definitions - MCQ Practice Test


MCQ Practice Test & Solutions: Test: Context Free Grammar Derivations & Definitions (10 Questions)

You can prepare effectively for Computer Science Engineering (CSE) Theory of Computation with this dedicated MCQ Practice Test (available with solutions) on the important topic of "Test: Context Free Grammar Derivations & Definitions". These 10 questions have been designed by the experts with the latest curriculum of Computer Science Engineering (CSE) 2026, to help you master the concept.

Test Highlights:

  • - Format: Multiple Choice Questions (MCQ)
  • - Duration: 20 minutes
  • - Number of Questions: 10

Sign up on EduRev for free to attempt this test and track your preparation progress.

Test: Context Free Grammar Derivations & Definitions - Question 1

 The entity which generate Language is termed as:

Detailed Solution: Question 1

The entity which accepts a language is termed as Automata while the one which generates it is called Grammar. Tokens are the smallest individual unit of a program.

Test: Context Free Grammar Derivations & Definitions - Question 2

 Production Rule: aAb->agb belongs to which of the following category?

Detailed Solution: Question 2

Context Sensitive Language or Type 1 or Linearly Bounded Non deterministic Language has the production rule where the production is context dependent i.e. aAb->agb.

Test: Context Free Grammar Derivations & Definitions - Question 3

Which of the following statement is false?

Detailed Solution: Question 3

Every regular language can be produced by context free grammar and context free language can be produced by context sensitive grammar and so on.

Test: Context Free Grammar Derivations & Definitions - Question 4

The Grammar can be defined as: G=(V, ∑, p, S)In the given definition, what does S represents?

Detailed Solution: Question 4

G=(V, ∑, p, S), here V=Finite set of variables, ∑= set of terminals, p= finite productions, S= Starting Variable.

Test: Context Free Grammar Derivations & Definitions - Question 5

Which among the following cannot be accepted by a regular grammar?

Detailed Solution: Question 5

There exists no finite automata to accept the given language i.e. 0n1n. For other options, it is possible to make a dfa or nfa representing the language set.

Test: Context Free Grammar Derivations & Definitions - Question 6

 Which of the expression is appropriate? For production p: a -> b where a ∈ V and b ∈  _______

Detailed Solution: Question 6

According to the definition, the starting variable can produce another variable or any terminal or a variable which leads to terminal.

Test: Context Free Grammar Derivations & Definitions - Question 7

 For S->0S1|e for ∑={0,1}*, which of the following is wrong for the language produced?

Test: Context Free Grammar Derivations & Definitions - Question 8

The minimum number of productions required to produce a language consisting of palindrome strings over ∑={a,b} is

Detailed Solution: Question 8

The grammar which produces a palindrome set can be written as:
S-> aSa | bSb | e | a | b
L={e, a, b, aba, abbbaabbba…..}

Test: Context Free Grammar Derivations & Definitions - Question 9

Which of the following statement is correct?

Detailed Solution: Question 9

 Regular grammar is a subset of context free grammar and thus all regular grammars are context free.

Test: Context Free Grammar Derivations & Definitions - Question 10

 Are ambiguous grammar context free?

Detailed Solution: Question 10

 A context free grammar G is ambiguous if there is atleast one string in L(G) which has two or more distinct leftmost derivations.

18 videos|95 docs|44 tests
Information about Test: Context Free Grammar Derivations & Definitions Page
In this test you can find the Exam questions for Test: Context Free Grammar Derivations & Definitions solved & explained in the simplest way possible. Besides giving Questions and answers for Test: Context Free Grammar Derivations & Definitions, EduRev gives you an ample number of Online tests for practice
18 videos|95 docs|44 tests
Download as PDF