 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.

 61. The language {a^m b^n C^(m+n) | m, n ≥ 1} is a. regular b. context-free but not regular c. context sensitive but not context free d. type-0 but not context sensitive

 62. Consider the following grammar G: S → bS | aA | b A → bA | aB B → bB | aS | a Let Na(w) and Nb(w) denote the number of a's and b's in a string w respectively. The language L(G) ⊆ {a, b}+ generated by G is a. { w | Na(w) > 3Nb(w)} b. { w | Nb(w) > 3Nb(w)} c. { w | Na(w) = 3k, k ∈ {0, 1, 2, ...}} d. { w | Nb(w) = 3k, k ∈ {0, 1, 2, ...}}

 63. L1 is a recursively enumerable language over Σ. An algorithm A effectively enumerates its words as w1, w2, w3, ... Define another language L2 over Σ Union {#} as {wi # wj : wi, wj ∈ L1, i < j}. Here # is a new symbol. Consider the following assertions. S1 : L1 is recursive implies L2 is recursive S2 : L2 is recursive implies L1 is recursive Which of the following statements is true ? a. Both S1 and S2 are true b. S1 is true but S2 is not necessarily true c. S2 is true but S1 is not necessarily true d. Neither is necessarily true

 64. Consider the languages L1 = and L2 = {a}. Which one of the following represents L1 L2* U L1* a. A b. B c. C d. D

 65. Consider the DFA given. Which of the following are FALSE? 1. Complement of L(A) is context-free. 2. L(A) = L((11*0+0)(0 + 1)*0*1*) 3. For the language accepted by A, A is the minimal DFA. 4. A accepts all strings over {0, 1} of length at least 2. a. 1 and 3 only b. 2 and 4 only c. 2 and 3 only d. 3 and 4 only

 66. What is the complement of the language accepted by the NFA shown below? a. A b. B c. C d. D

 67. Consider the set of strings on {0,1} in which, every substring of 3 symbols has at most two zeros. For example, 001110 and 011001 are in the language, but 100010 is not. All strings of length less than 3 are also in the language. A partially completed DFA that accepts this language is shown below. Missing arcs in the DFA are  a. A b. B c. C d. D
 68. A deterministic finite automation (DFA)D with alphabet {a,b} is given below. Which of the following finite state machines is a valid minimal DFA which accepts the same language as D?  a. A b. B c. C d. D
 69. Given the following state table of an FSM with two states A and B, one input and one output. If the initial state is A=0, B=0, what is the minimum length of an input string which will take the machine to the state A=0, B=1 with Output = 1? a. 3 b. 4 c. 5 d. 6
 70. Given below are two finite state automata (→ indicates the start state and F indicates a final state)Which of the following represents the product automaton Z×Y? a. A b. B c. C d. D