 A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

 51. Which of the following is FALSE ? a. The grammar S→aS|aSbS|Î, where S is the only non-terminal symbol, and Î is the null string, is ambiguous. b. An unambiguous grammar has same left most and right most derivation. c. An ambiguous grammar can never be LR(k) for any k. d. Recursive descent parser is a top-down parser.

 52. The regular grammar for the language L = {a^nb^m | n + m is even} is given by (A) S → S1 | S2 S1 → a S1 | A1 A1 → b A1 | λ S2 → aaS2 | A2 A2 → b A2 | λ (B) S → S1 | S2 S1 → a S1 | a A1 S2 → aa S2 | A2 A1 → bA1 | λ A2 → bA2 | λ (C) S → S1 | S2 S1 → aaa S1 | aA1 S2 → aaS2 | A2 A1 → bA1 | λ A2 → bA2 | λ (D) S → S1 | S2 S1 → aa S1 | A1 S2 → aaS2 | aA2 A1 → bbA1 | λ A2 → bbA2 | b a. A b. B c. C d. D

 53. Let Σ = {a, b} and language L = {aa, bb}. Then, the complement of L is a. {λ, a, b, ab, ba} U {w ϵ {a, b}* | |w| > 3} b. {a, b, ab, ba} U {w ϵ {a, b}* | |w| ≥ 3} c. {w ϵ { a, b}* | |w| > 3} U {a, b, ab, ba} d. {λ, a, b, ab, ba} U {w ϵ {a, b}* | |w| ≥ 3}

 54. Consider the following identities for regular expressions : (a) (r + s)* = (s + r)* (b) (r*)* = r* (c) (r* s*)* = (r + s)* Which of the above identities are true ? a. (a) and (b) only b. (b) and (c) only c. (c) and (a) only d. (a), (b) and (c)

 55. Given the following two languages: L1 = {uww^Rn | u, v, w ϵ {a, b}+} L2 = {uwwR^n | u, v, w ϵ {a, b}+, |u| ≥ |v|} Which of the following is correct ? a. L1 is regular language and L2 is not regular language b. L1 is not regular language and L2 is regular language c. Both L1 and L2 are regular languages d. Both L1 and L2 are not regular languages

 56. Given a Turing Machine: M = ({q0, q1}, {0, 1}, {0, 1, B}, δ, B, {q1}) Where δ is a transition function defined as δ (q0, 0) = (q0, 0, R) δ (q0, B) = (q1, B, R) The language L(M) accepted by Turing machine is given as : a. 0* 1* b. 00* c. 10* d. 1*0*

 57. Let G = (V, T, S, P) be a context-free grammar such that every one of its productions is of the form A → n, with |v| = k > 1. The derivation tree for any string W ϵ L (G) has a height such that a. A b. B c. C d. D