Theory of Computation (3160704) MCQs

MCQs of Regular Languages and Finite Automata

Showing 11 to 20 out of 65 Questions
11.
If =a then*=
(a) {^, a, aa,…..}
(b) {^ , a , aa}
(c) {^}
(d) {a, aa,…..}
Answer:

Option (a)

12.
Which of the following regular expression identity is true?
(a) (r+s)*=r*
(b) (r+s)*= r*+s*
(c) (r*s*)*=(r+s)*
(d) r* s*= r *+s*
Answer:

Option (c)

13.
Regular expression for all strings starts with ab and ends with bba is.
(a) aba*b*bba
(b) ab(a+b)*bba
(c) ab(ab)*bba
(d) All of the mentioned
Answer:

Option (b)

14.
Given the language L = {ab, aa, baa}, which of the following strings are in L*?
(a) abaabaaabaa
(b) aaaabaaaa
(c) baaaaabaa
(d) All of these
Answer:

Option (d)

15.
Which one of the following languages over the alphabet {0,1} is described by the regular expression: (0+1)*0(0+1)*0(0+1)*?
(a) The set of all strings containing the substring 00
(b) The set of all strings containing at most two 0’s.
(c) The set of all strings containing at least two 0’s
(d) The set of all strings that begin and end with either 0 or 1.
Answer:

Option (c)

16.
Regular expression for even length string:
(a) (0|1)(0|1)*
(b) (0|1)*
(c) (0|1)(0|1)(0|1)*
(d) (00|11|10|01)*
Answer:

Option (d)

17.
Reverse of (0+1)* will be
(a) Null
(b) (0+1)
(c) (0+1)*
(d) (0+1)(0+1)*
Answer:

Option (c)

18.
Which of the following regular expressions describes the language over {0, 1} consisting of strings that contain exactly two 1's?
(a) 0 * 10 * 10 *
(b) 0 * 110 *
(c) (0 + 1) * 11(0 + 1) *
(d) (0 + 1) * 1(0 + 1) * 1 (0 + 1) *
Answer:

Option (a)

19.
The string 1101 does not belong to the set represented by
(a) 110* (0+1)
(b) (00+(11)*0)*
(c) 1(0+1)* 101
(d) (11)* (01)* (00+11)*
Answer:

Option (b)

20.
Regular expression for all binary string with at least 3 characters and 3rd character should be zero
(a) (0|1) (0|1)0(0|1)
(b) (0|1) (0|1)0(0|1)*
(c) (0|1)* (0|1)(0|1)0
(d) (0|1) (0|1)0*
Answer:

Option (b)

Showing 11 to 20 out of 65 Questions