CS8501 Theory of Computation
CS8501 Theory of Computation
com
Anna University | Polytechnic | Schools
Reg. No. :
Fifth Semester
(Regulations 2017)
www.binils.com
2. Define extended transition diagram.
3. Write regular expression to recognize the set of strings over {a,b} having odd
number of a’s and b’s and that starts with ‘a’.
4. When two states are said to be distinguished? Give example.
5. Write CFG to accept the language defined by,
{ i j k
L = a b c i, j, k >= 0 and i = j + k . }
6. List out the steps for performing LL parsing.
7. Draw pushdown automata to accept all palindromes of odd length.
8. Formally define the pushdown automata based on the types of acceptance.
9. Draw Turing machine to compute double the value of an integer.
10. State Post’s correspondence problem.
PART B — (5 × 13 = 65 marks)
11. (a) Design an ε – NFA (Nondeterministic finite automaton) to recognize the
language L, containing only binary strings of non-zero length whose bits
sum to a multiple of 3. Convert ε – NFA into an equivalent minimized
deterministic finite automaton. Illustrate the computation of your model
on any sample input.
Or
www.binils.com
Anna University, Polytechnic & Schools
www.binils.com
Anna University | Polytechnic | Schools
(b) (i) State and prove the theorem of mathematical induction. (5)
(ii) In a programming language, all the following expressions represent
Integer and floating point literals. Construct a finite automata that
will accept all the different formats and convert the same to
deterministic finite automata, if required. (8)
12. (a) (i) Prove that regular expressions are closed under union, intersection
and Kleene closure. (8)
Or
(b) Find a minimum State Deterministic Finite Automata recognizing the
language corresponding to the regular expression (0*10 + 1 * 0) (01 )*.
13. (a) What language over {0, 1} does the CFG with productions
Or
www.binils.com
(b) Design an pushdown automata to recognize the language, L defined by, L
L = {wcw c w € {0,1}* and wc is the one’s complement of w}.
S → A | AB0| A1 A
A → A 0| Є
B → B1| BC
C → CB |CA |1B .
Or
Or
(b) State and prove that “Diagnoalization language is not recursively
enumerable”.
2 40395
www.binils.com
Anna University, Polytechnic & Schools
www.binils.com
Anna University | Polytechnic | Schools
PART C — (1 × 15 = 15 marks)
16. (a) Design appropriate automation model for the language defined by the
grammar given below.
S → aSBC
S → aBC
CB → BC
aB → ab
bB → bb
bC → bc
cC → cc
Or
(b) Design appropriate automation model for the language defined by the
grammar given below.
S → abc |aAbc
Ab → bA
Ac → Bbcc
bB → Bb
aB → aa |aaA.
www.binils.com ————––––——
3 40395
www.binils.com
Anna University, Polytechnic & Schools