Get premium membership and access revision papers, questions with answers as well as video lessons.
Got a question or eager to learn? Discover limitless learning on WhatsApp now - Start Now!

Automa And Formal Language Question Paper

Automa And Formal Language 

Course:Bachelor Of Computing Information Systems

Institution: Kenya Methodist University question papers

Exam Year:2012



KENYA METHODIST UNIVERSITY
CISY 402: AUTOMATA AND FORMAL LANGUAGES
Continuous assessment test.
Answer all questions.
a) Design the context free grammar for the following language:
i) The set {0n1n|n=1}, that is, the set of all strings of one or more 0’s followed by an equal number of 1’s. [5 marks]
ii) The set {aibjck|i?j or j?k}, that is, the set of strings of a’s followed by b’s followed by c’s, such that there are either a different number of a’s and b’s or a different number of b’s and c’s, or both. [7 marks]
b) Prove that theorem; If L is a regular language, so is LR. [8 marks]
c) Prove that the following is not a regular language:
{0n1n|n=1. This language, consisting of a string of 0’s followed by an equal length string of 1’s. Hint: you should use the pumping lemma. [10 marks]
d) Construct a DFA for the language over the alphabet {0, 1, 2} in which every 1 is immediately followed by at least one 2. [5 marks]
e) Build a DFA that recognizes exactly the word in {0, 1} ending with the string 1010. [5 marks]
f) Convert the following NFA to a DFA
[10 marks]






More Question Papers


Popular Exams



Return to Question Papers