MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

THEORY OF COMPUTATION

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Inorder to simplify a context free grammar, we can skip the following operation:
A
Removal of null production
B
Removal of useless symbols
C
Removal of unit productions
D
None of the mentioned
Explanation: 

Detailed explanation-1: -Step 1: First find out all nullable non-terminal variable which derives . Step 2: For each production A → a, construct all production A → x, where x is obtained from a by removing one or more non-terminal from step 1. Step 3: Now combine the result of step 2 with the original production and remove productions.

Detailed explanation-2: -Which of the following is not context free? Explanation: a*b*c* and (c) are regular languages while option (a) is not context free language.

Detailed explanation-3: -Which among the following can parse a context free grammar? Explanation: We use certain algorithms to parse a context free grammar which include the most popular CYK algorithm which employs the concept of bottom up parsing and dynamic parsing.

There is 1 question to complete.