Sei sulla pagina 1di 1

Max Marks: 4

Quiz 1 Theory of Computation (CSL0616)

Time: 40 min

Note: Question number 1 to 10 every que stion carrying 0.2 marks and 11 to 15 every question carrying 0.4 marks.

 1. Which one of the following regular e xpressions over 8. minimum state DFA accepting A the language L = {w | {0,1} denotes the set of all strings no t containing 100 w (0,1)*, number of 0 s and 1 s in w are divisible by as a substring? 3 and 5 respectively} has
 a) 0*(1+0)* c) 0*1010* a) 15 states c) 11 st ates b) 0*1*01* d) 0*(10+1)* b) 10 states d) 9 sta tes

2. Let L be the set of all binary strings symbols are the same. The number

whose last two of states in the

minimum state deterministic finite s tate automaton

9.

Consider the regular language L

minimum number of states in a ny DFA accepting this languages is

= (111 +11111)*. The

 accepting L is a) 3 c) 5 a) 2 c) 5 b) 8 d) 9 b) 8 d) 3

3.

Let

R1

and

R2

be

regular

sets

de fined

over

the

10. Given the language L = {ab,a a,baa}, which of the following strings are in L*?

 alphabet then (i) abaabaaabaa (iii) baaaaabaaaab a) R1 U R2 is not regular (ii) aaaabaaaa (iv) baaaaabaa b) R1 R2 is not regular a) (i), (ii) and (iii) c) (ii), (iii) and (iv) c) * - R1 is regular b) (i), (ii) and (iv) d) (i), (iii) and (iv) d) R1* is not regular 11. A regular grammar G gener ating the regular set
 4. Which of the following regular expres sion identifies is represented by a*b(a+b)* is true? a) A aA | bB | b, B aB | bB | a | b a) r(*) = r* c) (r+s)*=r*+s * b) A aB | bB | a, B aB | bB | a b) (r*s*)*=(r+s)* d) r*s* = r*+s * c) A aA | bB | a, B aA | bA | a | b d) A aA | bB | b, B aA | bB | a | b

5. Which two of the following four reg ular expressions are equivalent?

12. The minimum number of state

in DFA equivalent to

 (i) (00)*( + 0) (iii) (00)* the regular expression (0+1)*(0 0+11)(0+1)* is (ii) 0* (iv) 0(00)* a) 3 b) 4 c) 5 d) 6 a) (i) and (iii) c) (ii) and (iii) b) (i) and (ii) d) (ii) and (iv) 13. The set of strings over {a,b} h aving exactly 3 b s is represented by the regular expr ession
 6. Let L is defined over = {a,b}, which of the following a) a*bbb c) ba*b a*b is true? b) a*ba*ba*b d) a*ba *ba*ba* a) L = {x | x has an equal number of a s and b s} is
 regular. 14. How many states are there in a DFA equivalent to the b) L = { a n b n | n>=1} is regular. grammar S aS, A bA |bS | a c) L = {x | x has more a s than b s} is regular. a) 3 c) 4 d) L = { a m b n | m>=1, n>=1} is regula r. b) 2 d) 5 7. What can be said about a regular lan guage L over {a} 15. The following DFA accepts the set of all strings over whose minimal finite state autom aton has two {0,1} that states? a) Can be {a n | n is odd} b) Can be {a n | n is even} c) Can be {a n | >=0}

d) Either L can be {a n | n is odd} or is even}

L can be {a n | n

a) begin either with 0 or 1

b) end with 0

c) end with 00

d) contains the substring 00