Professional Documents
Culture Documents
Course Name: Theory of Computation April 5, 2022 11:00: Thapar Institute of Engineering and Technology, Patiala
Course Name: Theory of Computation April 5, 2022 11:00: Thapar Institute of Engineering and Technology, Patiala
Note: Attempt any five questions with proper justification. Assume missing data, if any,
suitably. All questions carry equal weightage.
Q3(b) Prove that regular languages are closed under intersection. (3)
Q5(a) Construct a deterministic finite automaton over E = fa, b} that will accept all (4)
strings such that number of a's is divisible by two and number of b's is
divisible by three.
QS(b) Minimize the following DFA (Consider A as initial and C as final state) (3)
Next State
Present State L'P = 0 VF' = 1
A F B
B C G
C C A
D G C
E F H
F G C
G E G
H C G
Q6(b)
Using Pumping Lemma, prove that L={(ab)nak / n>k, k_?0} is not a regular (3)
language.
Q7(a) Write down regular expression corresponding to the finite state machine. (2)
Q7(b) Construct a finite state machine that will represent L' where L represent the (2)
language represented by the language and L' represents the complement of
L.
Q7(C) Write down regular expression for the language L'. (3)
***********E nd of Paper***************
Roll Number: Name: Group •
Thapar Institute of Engineering and Technology
Department of Computer Science and Engineering
B E- COE, CSE (VI Semester) MST Course Code: UCS701
Course Name: Theory of Computation
April 5, 2022 10:45 Time: 15 Mins Marks: 15
Note: Attempt all questions with proper.justification. Assume missing data, if any, suitably. All
questions carry equal weightage. In case you think no option is correct write option (e).
Q.1 The given DFA accepts the set of all strings over {0, 1} that
a) O*1*
b) 0(01)*1
c) (00* + 11*)
d) 00*11*
Q9 For an input string of length n, the length of the outputs generated by Moore and Mealy
machine are and , respectively.
a) n, n b) n, n+1 c) n+1, n d) n+1, n+1
Q10 The minimized Mealy and Moore machine to find 1's complement of a binary string
will have and number of states, respectively.
a) 1, 1 b) 1, 2 c) 2, 1 d) 2, 2
Q1 1 The Moore machine constructed from a Mealy machine with p states and q outputs will
have at most states.
a) pq (b) pq+1 (c) p(q+1) (d) (p+1)q
Q14 A regular expression (0+1)(0+1)...(0+1) k times represents all the strings over {0,1} of
length
a) exactly k b) up to k c) below k d) above k
QI5 The set of all strings over {0,1} starting with 00 and ending with 11
a) 00(0+1)*11 b) 00(0+1)* c) (0+1)*11 d) none