Theorey of Automata

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

THE SUPERIOR COLLEGE, LAHORE

(FINAL TERM EXAM)

Department: Computer Sciences Total Marks: 40


Resource Person: Muhammad Humair Time Allowed: 2 Hours
Programe: BS(CS/IT/SE) Date:
Course Name: Theory of Automata

**********************************************************
Note: Every Question has equal marks. Attempt all questions (40 Marks)

Question # 1: Design NFA’s to recognize the following sets of strings and convert each of
NFA’s into DFA’s.
a) abc, abd, and aacd. Assume the alphabet is {a, b, c, d}.
b) ab, bc, and ca. Assume the alpha bet is {a, b, c}.

Question # 2: Consider the CFG:


S AA , A AAA , A bA | Ab | a

Prove that the language generated by these productions is the set of all words with an even
number of a’s, but not no a’s.

Question # 3: Prove the given theorem


If L is a context-free language, then L* is one too. In other words, the context-free languages are
closed under the Kleene Star.

Question # 4:
Design a TM that accepts the language EQUAL, that is, the language of all strings with the same
number of a's and b's.

Question # 5:

Convert this Mealy machine into Moore machine.


Running this string abbabbba over Moore machine
and the corresponding output string will be
11011010 which can determine by the table as well.

You might also like