0% found this document useful (0 votes)
29 views2 pages

P13CS43 JB

This document is an examination paper for the Theory of Computation course at P.E.S. College of Engineering, Mandya, for the Fourth Semester, B.E. in Computer Science and Engineering. It includes various questions from five units covering topics such as DFA, NFA, regular expressions, context-free grammars, pushdown automata, and Turing machines. Students are required to answer five full questions, selecting one from each unit, within a time limit of three hours.

Uploaded by

mp4248728
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)
29 views2 pages

P13CS43 JB

This document is an examination paper for the Theory of Computation course at P.E.S. College of Engineering, Mandya, for the Fourth Semester, B.E. in Computer Science and Engineering. It includes various questions from five units covering topics such as DFA, NFA, regular expressions, context-free grammars, pushdown automata, and Turing machines. Students are required to answer five full questions, selecting one from each unit, within a time limit of three hours.

Uploaded by

mp4248728
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/ 2

P13CS43 Page No...

1
U.S.N

P.E.S. College of Engineering, Mandya - 571 401


(An Autonomous Institution affiliated to VTU, Belagavi)
Fourth Semester, B.E. - Computer Science and Engineering
Semester End Examination; May/June - 2018
Theory of Computation
Time: 3 hrs Max. Marks: 100
Note: Answer FIVE full questions, selecting ONE full question from each unit.
UNIT - I
1 a. Design a DFA for the following languages :

{
i) L = w(ab + ba ) | w ∈ {a, b }* } ii) L = {w | w mod 5 ≠ 0 where w ∈ {a, b }* }
10

b. Convert the below NFA into its equivalent DFA.


7

c. Mention the difference between DFA, NFA and ∈-NFA. 3


2 a. Convert the ∈-NFA to equivalent DFA.
10

b. Define distinguishable and indistinguishable pairs: Minimize the following DFA.


0 1
→ Q1 Q2 Q3
Q2 Q3 Q5 10
Q3 Q4 Q3
Q4 Q3 Q5
* Q5 Q2 Q5
UNIT - II
3 a. Obtain the regular expression for the following finite automata using Kleen’s theorem.

10

b. Obtain the regular expression for the following :


i) Strings of 0’s and 1’s with no two consecutive Zero’s 4
ii) Strings a’s and b’s whose length is either even or multiple of 3 or both
c. Prove that if R is a regular expression, then there exists a finite automation that accepts L(R). 6
4 a. State and prove Pumping Lemma for regular language. 8

b. Show that L= {wwR | w∈ {0 + 1} *} is not regular. 6

c. Show that regular languages are closed under compliment and difference. 6

Contd…2
P13CS43 Page No... 2
UNIT - III
5 a. Define CFG. Obtain the CFG for the following languages :
i ) L = {a n b n | n ≥ 0} ii) L = {ww R | w ∈ {a, b }*}
5

b. Obtain the leftmost and rightmost derivation for the string ‘abababa’ from the grammar
5
S →SbS | a
c. Define the term ambiguity and show that E → E + E | E * E | a is ambiguous. 5
d. Show that CFL are not closed under intersection. 5
6 a. Eliminate epsilon unit and useless production from the following grammar :
S → ABC | BaB
A → aA | BaC | aaa 10
B → bBb | a | D
C → CA | AC
D→C
b. Define CNF and GNF. Convert the following grammar into CNF :
S → aBa |abba 10
A → ab |AA
B → aB | a
UNIT - IV

7 a. Construct a PDA for the language L= {wwR | w ∈ {a, b }*} and show the string acceptance. 10

b. Construct a PDA for the language L = {a n b 2 n | n ≥ 1} and show the string acceptance. 10
8 a. Convert the following grammar:
S → aSa | aa
10
S → bSb | bb
to PDA that accepts the same language by empty stack.

b. Check whether the PDA for the language L = {w ⊂ wR | w ∈ {a, b }*} is deterministic or not. 10

UNIT - V
9 a. Design a Turing machine to accept the language :
10
L = {na ( w) = nb ( w), where w ∈ {a, b }*} .

b. Design a Turing machine to accept the language


10
L = {w | w is a palindrome, where w ∈ {a, b }} .

10. Write a short note on the following :


i) Multi tape Turing machine
ii) Post correspondence problem 20
iii) Problem of decidable
iv) Halting problem

****

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