0% found this document useful (0 votes)
120 views20 pages

Stucor QP-CS8501

The document is a question paper for the subject Computer Science and Engineering's Theory of Computation exam. It contains 3 parts - Part A with 10 short answer questions, Part B with 5 long answer questions, and Part C with 1 long question. The questions cover topics related to formal languages and automata theory like regular expressions, finite automata, context-free grammars, pushdown automata, Turing machines, and complexity classes. Students need to answer all questions which will be evaluated for a total of 100 marks.

Uploaded by

Clash Clan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
120 views20 pages

Stucor QP-CS8501

The document is a question paper for the subject Computer Science and Engineering's Theory of Computation exam. It contains 3 parts - Part A with 10 short answer questions, Part B with 5 long answer questions, and Part C with 1 long question. The questions cover topics related to formal languages and automata theory like regular expressions, finite automata, context-free grammars, pushdown automata, Turing machines, and complexity classes. Students need to answer all questions which will be evaluated for a total of 100 marks.

Uploaded by

Clash Clan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

DOWNLOADED FROM STUCOR APP

Reg. No. :

Question Paper Code : 40395

B.E./B.Tech. DEGREE EXAMINATIONS, NOVEMBER/DECEMBER 2021.

Fifth Semester

Computer Science and Engineering

CS 8501 –– THEORY OF COMPUTATION

(Regulations 2017)

Time : Three hours Maximum : 100 marks

Answer ALL questions.

PART A — (10 × 2 = 20 marks)


1. Write regular expression to represent exponential constants of ‘C’ language.
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

Refer STUCOR APP for Complete Notes


DOWNLOADED FROM STUCOR APP

(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)

(ii) Identify a language L, such that L* = L+. (5)

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

S → 00S |11S |S 00|S11|01S 01|01S10|10S10|10S 01|Є generate?


Justify your answer.

Or
(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}.

14. (a) Convert the following grammar to Chomsky Normal form.

S → A | AB0| A1 A
A → A 0| Є
B → B1| BC
C → CB |CA |1B .

Or

(b) Construct an appropriate model to recognize the language L defined by,


{ }
L = a nbm c m d n |n, m >= 0 .

15. (a) With proper examples, explain P and NP complete problems.

Or
(b) State and prove that “Diagnoalization language is not recursively
enumerable”.

2 40395

Refer STUCOR APP for Complete Notes


DOWNLOADED FROM STUCOR APP

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.

————––––——

3 40395

Refer STUCOR APP for Complete Notes


DOWNLOADED FROM STUCOR APP

*X10319* Reg. No. :

Question Paper Code : X 10319


B.E./B.Tech. Degree ExaminationS, november/december 2020
Fifth Semester
Computer Science and Engineering
CS 8501 – THEORY OF COMPUTATION
(Regulations 2017)

Time : Three Hours Maximum : 100 Marks

Answer all questions

Part – A (10×2 = 20 Marks)

1. Define Deterministic Finite Automaton.

2. State any four types of proofs.

3. Write the regular expression for all strings that contain no more than one
occurrence of aa.

4. Write a regular expression for even number of a’s and even number of b’s of a
string w = {a, b}*.

5. Write a Context Free Grammar for the language consisting of equal number of
a’s and b’s.

6. Define Deterministic PDA.

7. What are the two normal forms of CFG ? Write their productions format.

8. Define the language recognized by any Turing Machine.

9. What are recursive languages ?

10. Define the classes P and NP problem. Give example problems for both.

Part – B (5×13 = 65 Marks)

11. a) Prove that for every L recognized by an NFA, there exists an equivalent DFA
accepting the same language L.
(OR)
b) Prove that for every L recognized by an ∈-NFA, there exists an equivalent DFA
accepting the same language L.

Refer STUCOR APP for Complete Notes


DOWNLOADED FROM STUCOR APP

X 10319 *X10319*
12. a) Prove that the following languages are not regular using pumping lemma.
i) All unary strings of length prime. (7)
ii) L = {uu|u∈{0, 1}*}. (6)
(OR)
b) State and Prove any two closure properties of Regular Languages.

13. a) How ∈-productions are eliminated from a grammar whose language doesn’t
have empty string ? Remove ∈-productions from the grammar given below.

S → a|aA|B|C A → aB| ∈ B → Aa C → aCD D → ddd


(OR)
b) Write procedure to find PDA to CFG. Give an example for PDA and its CFG.

14. a) How a CFG for L is converted into CNF accepting the same language ? Convert
the following CFG into CFG in CNF.

S→bA|aB A→bAA|aS|a B→aBB|bS|b


(OR)
b) Construct a Turing Machine for proper subtraction, which is defined as m – n
if m > n and 0 otherwise.

15. a) Prove that Universal language is recursively enumerable but not recursive.
(OR)
b) Define PCP and prove that PCP is undecidable.

Part – C (1×15 = 15 Marks)

16. a) Construct a Turing Machine for multiplying two non negative integers using
subroutine.
(OR)
b) How PDA is converted into CFG ? Convert the following PDA into CFG.
P = ({p, q}, {0, 1}, {Z, X}, δ, p, Z, Φ)
δ (p, 1, Z) = {(p, XZ)}, δ (p, ∈, Z) = {(p,∈)} δ (p, 1, X) = {(p, XX)},
δ (q, 1, X) = {(q, ∈)}, δ (p, 0, X) = {(q, X)}, δ (q, 0, Z) = {(p, Z)}

–––––––––––––

Refer STUCOR APP for Complete Notes


Download STUCOR App for all subject Notes & QP's

P
AP
R
O
UC
ST
Access 3,000+ Study Materials for Semester Exams via STUCOR App

P
AP
R
O
UC
ST
Download STUCOR App for all subject Notes & QP's

P
AP
R
O
UC
ST
Access 3,000+ Study Materials for Semester Exams via STUCOR App

P
AP
R
O
UC
ST
Download STUCOR App for all subject Notes & QP's

P
AP
R
O
UC
ST
Access 3,000+ Study Materials for Semester Exams via STUCOR App

P
AP
R
O
UC
ST
Download STUCOR App for all subject Notes & QP's

P
AP
R
O
UC
ST
Access 3,000+ Study Materials for Semester Exams via STUCOR App

P
AP
R
O
UC
ST
Download STUCOR App for all subject Notes & QP's

P
AP
R
O
UC
ST
Access 3,000+ Study Materials for Semester Exams via STUCOR App

P
AP
R
O
UC
ST
Download STUCOR App for all subject Notes & QP's

P
AP
R
O
UC
ST
Access 3,000+ Study Materials for Semester Exams via STUCOR App

P
AP
R
O
UC
ST
Download STUCOR App for all subject Notes & QP's

P
AP
R
O
UC
ST
Access 3,000+ Study Materials for Semester Exams via STUCOR App

P
AP
R
O
UC
ST
Download STUCOR App for all subject Notes & QP's

P
AP
R
O
UC
ST

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy