MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

THEORY OF COMPUTATION

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Match the following:a. Context sensitive language i. Deterministic finite automationb. Regular grammar ii. Recursive enumerablec. Context free grammar iii. Recursive languaged. Unrestricted grammar iv. Pushdown automationCodes:a b c d
A
ii i iv iii
B
iii iv i ii
C
iii i iv ii
D
ii iv i iii
Explanation: 

Detailed explanation-1: -Examples. : the language of all strings consisting of n occurrences of the symbol “a", then n “b"’s, then n “c"’s (abc, aabbcc, aaabbbccc, etc.).

Detailed explanation-2: -A context-sensitive grammar (CSG) is a formal grammar in which the left-hand sides and right-hand sides of any production rules may be surrounded by a context of terminal and nonterminal symbols.

Detailed explanation-3: -In context sensitive grammar, there is either left context or right context (A i.e. is left context and is right) with variables. But in context free grammar (CFG) there will be no context. We cannot replace B until we get B0. Therefore, CSG is harder to understand than the CFG.

Detailed explanation-4: -In unrestricted grammars, productions have form u → v where u and v are any strings of terminals and/or variables. In context-sensitive grammars, productions have form xAz → xyz where x, y and z are strings of terminals and/or variables, and A is a vari-able.

There is 1 question to complete.