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.

## 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?

(A) (0*10*1)*
(B) 0*(10*10*)*
(C) 0*(10*1*)*0*
(D) 0*1(10*1)*10*

## 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?

(A) Only L2 is context free
(B) Only L2 and L3 are context free
(C) Only L1 and L2 are context free
(D) All are context free

(A) n-1
(B) n
(C) n+1
(D) 2n-1

## 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

(A) Not recursive
(B) Regular
(C) Context free but not regular
(D) Recursively enumerable but not context free.

## 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?

(A) Push Down Automata (PDA) can be used to recognize L1 and L2
(B) L1 is a regular language
(C) All the three languages are context free
(D) Turing machine can be used to recognize all the three languages

(A) k+1
(B) n+1
(C) 2^(n+1)
(D) 2^(k+1)

(A) 1, 2, 3, 4
(B) 1, 2
(C) 2, 3, 4
(D) 3, 4

(A) A
(B) B
(C) C
(D) D

(A) 1
(B) 2
(C) 3
(D) 4

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

(A) {WW^R | W € {0,1}+ }
(B) {WW^R X | X W € {0,1}+ }
(C) {WW^R | X W € {0,1}+ }
(D) {XWW^R | X W € {0,1}+ }

Download our easy to use, user friendly Android App from Play Store. And learn MCQs with one click.