0% found this document useful (0 votes)
0 views7 pages

TOC_PYQ_

Toc

Uploaded by

Disha Prashar
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)
0 views7 pages

TOC_PYQ_

Toc

Uploaded by

Disha Prashar
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/ 7

_ _ _ _ _ oil _ _ _ _ __

This question paper contajns 7 printed pages]

Roll No. [ I I •I I I .j- I [, I I J


S. No. of Que.stion Pap~r . 6508

Uniq!Je Paper Code 3i341502 HC

Name of the Paper Thci>ry of Comput~tion


I
I.
Name of the Course • : . B.Sc. (H). Computer Science

Semester

Duration : 3 Hours Maximum Marks: 75

(1-Vriteyour Roll No. on the top fmine(iiately on receipt of this qllestion paper.)

I.
All questions. fr(?lTl Part A ~re comp_ulsory.

Attempt ··any four questi~ns fr_om _Part.. 8.

Assurn·e ! = {a. b} is the- underlying alphabet 1:m~ess '

m~ntioned otherwise. Parts of a quesflon: must be

an.sw~red together.

Part A
. .· . .
1. (a) ~onsider the language S*, where S = {aa, b}. How many·
w9rds does this language ··have of ien-gth 4 ? of
..
length· 5 • ? of length 6 .? What can be -·said ·in '·
general ? 2

·P.T.O. . ·. •

( 2 )
6508

(b) • Let S = {ab, l?b}: an4 let T = {ab, bb, bbbb}. _Show

that S* = T*.
2

(cf Give a regular I


expression for" the .language of all _the

words that do .not have 'aa' as substring. _3


. . .
(d) Gen·erate a CFG for. ·b*a*. •
. 3
. . .
(e) Design a Detenninistic Finite· Automa~a for the language

of all •the words that end in a double • letter. •4


. .
(/) Using Pumping •L~mma,. ,p~ove that langua~e a0 b20,
4
~

n>=O is. nQt regular. 4

(g) Co~vert . the follq.wing Transition .Ora·ph into its

equivalent ~egular Expression 4-

. a, b
(· j ) 6508.

· (h) Sllow that the cotnplet11ent of a recurs


ive language is

also recursive.
4

(i) • Construct a Push Down Au


tomata· for· a0bri+I where

n>-l.
4•

l. lf _L 1=(a+b)b(a+b)* and L =(a+b)*b,.


find_~a Regular
.. 2

I Expression and· Deterministic· Finite


Autom.ata for
~
I•
; l· 5

Part .B·

2. (a) Be_gin with .the ~ramti)ar : • 5

S ~ _A~C\~aB

A ➔ af.\\BaC\aaa
,
I, '

B ➔. bBli\a\D '
.,

C ➔ CA\AC

.D ➔ E.

P.T.O.
( 4 )

I,
• 1
(.i) Eliminate E productions.

.
(ii) Eliminate any unit productions .
In the
resulting
l

grammar.
/ '

(iii) Elirninate· •any useless .


I symb~ls in .~he resulting
I. '

grai:nmar..

(b)"_ Using Pumping Len1111.a, • prove •that Ja·nguage 11


a b"a",
. ;

n>. I is non-context,, -free. ·_


-"t-
5

-3. • (a) Prove that the regul~r ··languages· a.r~_ closed


under

I complement. 3
I-

I • (b). - ·Give a CFG • for th~ langauge •of all the


words ~aving

'bbb' as substring.

(c) Show ·that the foll.owi-~.. ·~ ambie_uous 4


ng grammar 1
..,.

-. . S_ ➔ XbaaXlaX

.X - ➔• Xal Xbl "•


( 5 ) J
6508
J
4. (a) Find _FA FAi( concatenation)
I ·for the f9llowing
,/
,,
automattt· -:
5
,/
'

,/
b a a, b
FA 1
. .-~·
a
.,

b .'•

FA.
2
a b b

(b) Find• the equivalent Deterministic Finite Automata for

the following Non-deterministic Finite Automata' : -5

P.T.O.
( • 6 )
65{)g

5. (a) Describe the language for the following


regular
. ,
expressions
. 4
..
j
' (,) (a+b)* ab(a+b)*

(it) ((a+b)b)*.

:_ (b). Build a DFA that a~cepts all words with fewer than

:'
four letters. .,"
t

. (c) Gtve a regular expression for the language of alt ·the


.,. f

r - ::: ·"'
~
it
A •
>/,

"'
, ·-·
I
'• , - ... , .-
words that do not have a double letter. • .,"
1.•
6. (a} Explain halting problem . 2

.(h) Show that. if language L 1s recursive. •then L is

recursi~ely enumerable also.

• (c) Design ·a ·rurin·g Machine ·ror· a 11 b11 for n>=I. 5

7. (a) • Design a PDA • fo_r the followi;1g ·language : 5

L={a11S, where S starts with b a_nd length(S)=n}.


I,
( 7 .) 6508
f,

(b)
STMT

ACCEPT PUSH a

:
REJECT
- " R£J£CT

REJECT

RUECT

a.b.
. I

" . ~
\ '
h, .l

.l
"
ACCEPT -REJECT

(1) Define· the language defo1ed by above PDA. 2

(ii) Trace lhe word 'abb' on ·the above PDA. 3

6508
7 1,200

_J

You might also like