Home / Engineering / Theory of Computation and Compiler Design MCQs / Page 1

# Theory of Computation and Compiler Design MCQs | Page - 1

Dear candidates you will find MCQ questions of Theory of Computation and Compiler Design here. Learn these questions and prepare yourself for coming examinations and interviews. You can check the right answer of any question by clicking on any option or by clicking view answer button.

M

##
Q. 1) Let L={w \in (0 + 1)*|w has even number of 1s}, i.e. L is the set of all bit strings with even number of 1s. Which one of the regular expression below represents L?

M

##
Q. 2) Consider the languages
L1={0^{i}1^{j}|i != j},
L2={0^{i}1^{j}|i = j},
L3 = {0^{i}1^{j}|i = 2j+1},
L4 = {0^{i}1^{j}|i != 2j}.
Which one of the following statements is true?

M

##
Q. 3) Let w be any string of length n is {0,1}*. Let L be the set of all substrings of w. What is the minimum number of states in a non-deterministic finite automaton that accepts L?

M

##
Q. 4) Let L = L1 \cap L2, where L1 and L2 are languages as defined below: L1 = {a^{m}b^{m}ca^{n}b^{n} | m, n >= 0 } L2 = {a^{i}b^{j}c^{k} | i, j, k >= 0 } Then L is

M

##
Q. 5) Consider the language L1,L2,L3 as given below.
L1={0^{p}1^{q} | p,q \in N}
L2={0^{p}1^{q} | p,q \in N and p=q} L3={0^{p}1^{q}1^{r} | p,q,r \in N and p=q=r}
Which of the following statements is NOT TRUE?

M

##
Q. 6) Definition of a language L with alphabet {a} is given as following. L= { a^{nk} | k > 0, and n is a positive integer constant} What is the minimum number of states needed in a DFA to recognize L?

M

##
Q. 7) Which of the following problems are decidable?
1) Does a given program ever produce an output?
2) If L is a context-free language, then is L’ (complement of L) also context-free?
3) If L is a regular language, then is L’ also regular?
4) If L is a recursive language, then, is L’ also recursive?

M

##
Q. 8) Consider the set of strings on {0,1} in which, every substring of 3 symbols has at most two zeros. For examples, 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. The missing arcs in the DFA are

M

##
Q. 9) The minimum state automaton equivalent to the above FSA has the following number of states

M

##
Q. 10) Which of the following languages is regular?

### Explore Sets

Theory of Computation and Compiler Design MCQs Set 1

Theory of Computation and Compiler Design MCQs Set 2

Theory of Computation and Compiler Design MCQs Set 3

Theory of Computation and Compiler Design MCQs Set 4

Theory of Computation and Compiler Design MCQs Set 5

Theory of Computation and Compiler Design MCQs Set 6

Theory of Computation and Compiler Design MCQs Set 7

Theory of Computation and Compiler Design MCQs Set 8

### Explore More Categories

Click on category to learn MCQs of that category.Electronics and Communication Engineering