Description

This mock test of Test: The Language of a Grammar, Inferences & Ambiguity for Computer Science Engineering (CSE) helps you for every Computer Science Engineering (CSE) entrance exam.
This contains 10 Multiple Choice Questions for Computer Science Engineering (CSE) Test: The Language of a Grammar, Inferences & Ambiguity (mcq) to study with solutions a complete question bank.
The solved questions answers in this Test: The Language of a Grammar, Inferences & Ambiguity quiz give you a good mix of easy questions and tough questions. Computer Science Engineering (CSE)
students definitely take this Test: The Language of a Grammar, Inferences & Ambiguity exercise for a better result in the exam. You can find other Test: The Language of a Grammar, Inferences & Ambiguity extra questions,
long questions & short questions for Computer Science Engineering (CSE) on EduRev as well by searching above.

QUESTION: 1

Which of the following is not a notion of Context free grammars?

Solution:

The following are the notions to express Context free grammars:

a) Recursive Inferences

b) Derivations

c) Sentential form

d) Parse trees

QUESTION: 2

State true or false:Statement: The recursive inference procedure determines that string w is in the language of the variable A, A being the starting variable.

Solution:

We apply the productions of CFG to infer that certain strings are in the language of a certain variable.

QUESTION: 3

Which of the following is/are the suitable approaches for inferencing?

Solution:

Two inference approaches:

1. Recursive inference, using productions from body to head

2. Derivations, using productions from head to body

QUESTION: 4

If w belongs to L(G), for some CFG, then w has a parse tree, which defines the syntactic structure of w. w could be:

Solution:

Parse trees are an alternative representation to derivations and recursive inferences. There can be several parse trees for the same string.

QUESTION: 5

Is the following statement correct?Statement: Recursive inference and derivation are equivalent.

Solution:

Yes, they are equivalent. Both the terminologies represent the two approaches of recursive inferencing.

QUESTION: 6

A->aA| a| bThe number of steps to form aab:

Solution:

A->aA=>aaA=>aab

QUESTION: 7

An expression is mentioned as follows. Figure out number of incorrect notations or symbols, such that a change in those could make the expression correct.

L(G)={w in T*|S→*w}

Solution:

For the given expression, L(G)={w in T*|S→*w}, If G(V, T, P, S) is a CFG, the language of G, denoted by L(G), is the set of terminal strings that have derivations from the start symbol.

QUESTION: 8

The language accepted by Push down Automaton:

Solution:

Push down automata accepts context free language.

QUESTION: 9

Which among the following is the correct option for the given grammar?

G->X111|G1,X->X0|00

Solution:

Using the recursive approach, we can conclude that option a is the correct answer, and its not possible for a grammar to have more than one language.

QUESTION: 10

Choose the correct option:

Statement 1: Recursive Inference, using productions from head to body.

Statement 2: Derivations, using productions from body to head.

Solution:

Both the statements are false. Recursive Inference, using productions from body to head. Derivations, using productions from head to body.

### Inferences

Doc | 6 Pages

### Relationship Between Grammar & Language

Doc | 1 Page

### Context-Sensitive Grammar (CSG) & Language (CSL)

Doc | 1 Page

### Context Free Grammar & Context Free Language

Video | 07:52 min

- Test: The Language of a Grammar, Inferences & Ambiguity
Test | 10 questions | 10 min

- Test: Context Free Grammar
Test | 10 questions | 10 min

- Test: Egular Grammar
Test | 15 questions | 15 min

- Test: Grammar Modals - 2
Test | 10 questions | 20 min

- Inferences MCQ
Test | 20 questions | 15 min