This document is an examination paper for the course 'Theory of Automata' at the National University of Computer and Emerging Sciences. It includes instructions for the exam, a total of six questions covering recursive definitions, regular expressions, finite automata, and transition graphs, with specific marks allocated to each question. The exam is closed book, and students are instructed on how to handle rough work and submissions.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0 ratings0% found this document useful (0 votes)
18 views13 pages
Automata Sessional-I (Solution) (Fall-2014)
This document is an examination paper for the course 'Theory of Automata' at the National University of Computer and Emerging Sciences. It includes instructions for the exam, a total of six questions covering recursive definitions, regular expressions, finite automata, and transition graphs, with specific marks allocated to each question. The exam is closed book, and students are instructed on how to handle rough work and submissions.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 13
~ hi f Aut Serial No:
CS 301 Theory of Automata Sessional I .
Total Time: 1 Hour
Saturday, September 27, 2014 Tetal Marks: 55
Course Instructor
Dr. Aftab Maroof, Dr, Waseem Shahzad and eee
MS. Humaira Ehsan Signature of Invigilator
Student Name RollNo- Section Signature
DO NOT OPEN THE QUESTION BOOK OR START UNTIL INSTRUCTED.
Instructions:
1, Attempt on question paper. Attempt all of them. Read the question carefully,
understand the question, and then attempt it
2. Examination is closed books/notes. No notes, cheat sheets, textbook, or printed
material allowed.
3. No additional sheet will be provided for rough work. Use the back of the last page for
rough work.
4, If you need more space write on the back side of the paper and clearly mark question
and part number ete.
5. Alter asked to commence the exam, please verily that you have nine (9) different
printed pages including this title p.
6. Lf you believe that some
e. There are total of 6 questions,
ntial piece of information is missing, make an
sumption and use it to solve the problem
ippropria
Use permanent ink pens only. Any part done using soft peneil will not be marked and
cannot be claimed for rechecking
Marks
Obtained |
0146National University of Computer and Emerging Sciences
School of Computer Science Fall 2014 Islamabad Campus
Question 1:- Marks 5.
Give recursive definitions for the following language L over the alphabet fa, bj, the
Janguage EVENSTRING of all words of even length
2
Benton ef ES
Bose [Kale + » aa, ab, ba, bb wew ES.
Racereye Step Rule? :
Ls a A aren ES thopRr Ves
Q) xy
Gi) x
Rules:
Neale atrny OF me ES
Page 2 of 9bad )
fat pack b
oh 6 a = :
ee
x
ab (a-+bact’h) Carb pads baa)
ath cat bat) (At b+a4bd)
Se geese (ce)National University of Computer and Emerging Sciences
School of Computer Science Fall 2014 _Istamabad Campus
‘Question 2:- Marks +5.
Construct a regular expression defining each of the following languages over the alphabet
De {a b}.
a. All words in which no triple b is allowed i.e bbb never comes in language.
b. All words in which the total number of ‘b’ is divisible by 4 no matter how they are
distributed and ‘a’ are only found in clumps that is divisible by 3.
eg. -bbaaabaaaaaaaaab
-aaaaaabbbbaaabaaabbb
* nV
Grad b (asst (aoatb eogh- Gash )
Page 3 0f9National University of Computer and Emerging Sciences
School of Computer Science Fall 2014 Islamabad Campus
‘Question 3:- Marks S+5,
Determine the regular expression of the languages accepted by following FA's.
a
22 Fa wot
Page 4 of 9O, elias abe:National University of Computer and Emerging Sciences
School of Computer Science Fall 2014 Islamabad Campus
(xb Gabf, Labbe bey)
He +
x 4 2
Ge ba) abb (@ bayabb ra bb)
7
Page Sof(ee veer)National University of Computer and Emerging Sciences
School of Computer Science Fall 2014 ___Islamabad Campus
Question 4:- Marks 545.
‘a. Build an FA that accepts only those words that do not end with ba.
b. Build an FA that accepts all strings in which any b's that occur are found ig
clumps ofan odd number at a time ‘ea
PeNational University of Computer and Emerging Sciences
School of Computer Science Fall 2014 Islamabad Campus
‘Question S:-
Marks 5+5.
‘Determine the languages of following NFAs.
SA
oda
rw
Raa
Pap Apa panne
: napa saad
. AleAlA =
pa Ba we moe
Gat oe bra Bo
Niewbec f) ob5 Us alives Ben
Pave 7af9National University of Computer and Emerging Sciences
School of Computer Science Fall 2014 Islamabad Campus
Question 6:- Marks ‘5+5,
For the following transition graph use the algorithm discussed in class to find an equivalent
regular expression.
QL wens
O aal(bta Wat bb thFb os
~ Page 8 of 9