TOC_PYQ_
TOC_PYQ_
Semester
(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.
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
. a, b
(· j ) 6508.
also recursive.
4
n>-l.
4•
Part .B·
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.
/ '
grai:nmar..
I complement. 3
I-
'bbb' as substring.
-. . S_ ➔ XbaaXlaX
,/
b a a, b
FA 1
. .-~·
a
.,
b .'•
FA.
2
a b b
P.T.O.
( • 6 )
65{)g
(it) ((a+b)b)*.
:_ (b). Build a DFA that a~cepts all words with fewer than
:'
four letters. .,"
t
r - ::: ·"'
~
it
A •
>/,
"'
, ·-·
I
'• , - ... , .-
words that do not have a double letter. • .,"
1.•
6. (a} Explain halting problem . 2
(b)
STMT
ACCEPT PUSH a
:
REJECT
- " R£J£CT
REJECT
RUECT
a.b.
. I
" . ~
\ '
h, .l
.l
"
ACCEPT -REJECT
6508
7 1,200
_J