0% found this document useful (0 votes)
68 views2 pages

Mid Semester Examination (Sep 2018) B. E. - III Year, Semester V

1. The document is a mid-semester exam for a Theory of Computation course. It contains 7 questions testing students' knowledge of regular languages and finite automata. 2. Question 1 asks students to design deterministic finite automata for certain languages defined over the alphabets {a,b}. Question 2 asks for regular expressions for languages with certain substring properties. 3. Question 3 asks about properties of regular languages being closed under operations and defines exclusive-or of two languages. Question 4 asks to convert a DFA to a regular expression.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views2 pages

Mid Semester Examination (Sep 2018) B. E. - III Year, Semester V

1. The document is a mid-semester exam for a Theory of Computation course. It contains 7 questions testing students' knowledge of regular languages and finite automata. 2. Question 1 asks students to design deterministic finite automata for certain languages defined over the alphabets {a,b}. Question 2 asks for regular expressions for languages with certain substring properties. 3. Question 3 asks about properties of regular languages being closed under operations and defines exclusive-or of two languages. Question 4 asks to convert a DFA to a regular expression.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Roll Number:

Thapar Institute of Engineering & Technology, Patiala


Department of Computer Science & Engineering
MID SEMESTER EXAMINATION (Sep 2018)
B. E. - III Year, Semester V Course Code: UCS701
Sep 22, 2018, Saturday, 8:00 - 10:00 AM Course Name: Theory of Computation
Time: 2 Hours, M. Marks: 30 Name of Faculty: AKU, NKA, NS, RAH

Note: Attempt all questions. Assume missing data, if any, suitably.

Q1(a) Design a deterministic finite automaton over E = {a, b} for the following (3)
languages. Give a description for your answer. na and nb denote the number of
a and number of b respectively.
L, = {w I na(w) mod 3 > nb (w) mod 3}

Q1(b) Design a minimized deterministic finite automaton for the set of string (3)
defined over E = {0,1}.
Every 00 is followed by one 1. For example, the strings 101, 0010,
0010011001 are accepted strings, but 0001 and 00100 are rejected string.
Q2 Write down regular expression for the following languages over alphabet (a, (6)
b} that accept all strings having:
i) Two substring aa and bb.
ii) Every a is followed by at least one b.
iii) All string except aa and aaa.

Regular Languages are closed under union, intersection, concatenation, (3)


Q3.
Kleene closure and Complement.
Given two languages, L and M, define the exclusive-or of L and M as the set of
all strings w such that w is in L and not in M or w is in M and not in L. Show
that the exclusive-or of two regular languages is regular using the above
mentioned closed properties.
Q.4 Convert DFA into regular expression using state elimination method. (3)
a
b
b .
b

(4)
Q5 Using pumping lemma, prove that L = {d" I n 0} is not a regular language.

Q6 Construct regular grammar for the following languages and derive one string (4)
using the generated grammar:
i) ad (ab + a)*
ii) (aa)* (bas)*
1 of 2
Q7 Minimized the following DFA: (4)

**** End of Paper ****

You might also like