You are on page 1of 1

Government College Peshawar

BS Computer Science 6th semester

Paper: Automata Theory

Method of paper witting: Open book (internet, notes, slides etc.)

Time allowed: 5 hours Marks: 20

Q1. Write short answers for the questions.

i. What are formal and informal languages?


ii. What are finite and infinite languages?
iii. Write regular expression for the following languages.
{˄, a, a, aa, aaa, .....}
{a, a, aa, aaa, .....}
Language of all strings starts with m and contains any n letters.
Language of all strings contains any m or any n letters.
Language of all strings starts with aaa and end with bbb
iv. Encircle the permissible strings of a language which start with ‘a’ and end with ‘b’ from
alphabet {a,b}.
aaa, abbb, abaa, baaa, abab, abba, abba, baba

Q2. A) Write recursive definition of the following languages.

Language of ODD positive integers


Language of EVEN positive integers
Language of Factorial

B) Define the cardinality of the following sets.

∑0= { € }
∑1={ 0,1 }
∑2={00, 01, 10, 11}
∑3 = {000, 001, 010, 011, 100, 101, 110, 111}
∑4 = {0000, 0001, 0010, …, 1110, 1111}

You might also like