0% found this document useful (0 votes)
14 views42 pages

T O C Combined

Uploaded by

Pritish Dighore
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)
14 views42 pages

T O C Combined

Uploaded by

Pritish Dighore
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/ 42

www.nagpurstudents.

org
B.E. (Computer Science Engineering) Fourth Semester (C.B.S.)
Theoretical Foundation of Computer Science
P. Pages : 3 NRJ/KW/17/4436
Time : Three Hours *0204*
Max. Marks : 80
_____________________________________________________________________
Notes : 1. All questions carry marks as indicated.
2. Solve Question 1 OR Questions No. 2.
3. Solve Question 3 OR Questions No. 4.

rg
4. Solve Question 5 OR Questions No. 6.
5. Solve Question 7 OR Questions No. 8.
6. Solve Question 9 OR Questions No. 10.
7. Solve Question 11 OR Questions No. 12.

s.O
8. Due credit will be given to neatness and adequate dimensions.
9. Assume suitable data whenever necessary.
10. Illustrate your answers whenever necessary with the help of neat sketches.

1. a) Explain Pigeon hole principal. 3

t
b) Define the following terms with suitable example. 8
i) Prefix
ii) Suffix
iii) Substring
iv) Subsequences
en
ud
c) Explain closure of a Relation, 2
find R * for

R  (1,1), (1, 2), (2,1), (2, 3), (3, 2)


St

OR
2. a) Explain Chomsky Hierarchy in detail. 6

b) Using Mathematical induction, prove that 7


ur

P(n) :1.1! 2.2! 3.3! ...... n . n !


 (n 1)!1, n  1

3. a) Design a Finite Automata for accepting 7


gp

 w (a / b)*
L  w
 n (a ) W M 0 D 3  n ( b ) W M 0 D 3
also write application of Finite Automata.
Na

b) Obtain a Deterministic Finite Automata for 6


 

d  d
q0 q1 q2 q3
START
OR

NRJ/KW/17/4436 1 P.T.O
4. a) Convert the given Mealy Machine into equivalent Moore Machine. 7
0|z2
0|z1
q1 q2
START
1|z1 0|z1
1|z1
q3

rg
b) Design a Moore and Mealy machine over    a, b  such that it will generate output 6
EVEN if the number of a's are Even & generate output ODD if number of a's are odd.

5. a) Convert the given Finite Automata to equivalent Regular Expression. 8

s.O
0
START
S

0 1

t
1

b)
B
en
0
A 1

Construct NFA with   transition s equivalent to the given Regular Expression. 6


ud
R  10  (0 11) 0*1
OR
6. a) Explain the procedure to convert Right linear grammar to equivalent left linear grammar, 8
convert the given RLG into LLG.
St

S  01A | 10
A 10 A | 10

b) Convert the given grammar into GNF without renaming the grammar. 6
ur

S  AB
A  BS | b
B  SA | a
gp

7. a) Design a Non deterministic PDA for 7


L  WW R
W  (a / b)*
W R is Reverse of W
Na

Also explain STACK Execution with valid string.

b) Design a PDA for given CFG. 7


S  XY
X  AX | BX | a
Y  YA | YB | a
Aa
Bb
OR

NRJ/KW/17/4436 2
8. a) Design a PDA for 7
 W  (a / b)*
L  W
 n a (W)  n b (W)
Where n a ( W)  Number of a's in W
& n b ( W)  Number of b's in W

b) Convert the given PDA to CFG. 7


 (q 0 , a, z0 )  (q 0 , xz0 )

rg
 (q 0 , a, x)  (q 0 , xx)
 (q0 , b, x)  (q1,)
 (q1, b, x)  (q1,)

s.O
 (q1,, z0 )  (q1,)

9. a) (n  1) 7
Design a Turing Machine to perform where n is an uniary number.
2

t
b) Explain different types of Turing Machine. 6

10 a) Design a Turing Machine that has


en OR

7
INPUT :  # W # and generates
ud
OUTPUT :  # W # W
where W   a , b  .

b) Explain various properties of Recursively Enumerable Language. 6


St

11. a) What do you mean by Primitive Recursive Functions? Show that 7


ADD  x, y and SUB  x, y are Primitive Recursive?
ur

b) Write short notes on LBA. 6

OR
gp

12. a) What is Ackermann's Function, Calculate 7


A (1,1) A (1, 2) A (2,1)

b) What is the significance of PCP, Solve the following using PCP 6


Na

i wi xi
1 0 000
2 01000 01
3 01 1

*************

NRJ/KW/17/4436 3 P.T.O
NRJ/KW/17/4436
Na
gp
ur
St

4
ud
en
ts.O
rg
www.nagpurstudents.org

It’s hard to beat a person who never gives up.


~ Babe Ruth
www.nagpurstudents.org
B.E. (Computer Science Engineering) Fourth Semester (C.B.S.)
Theoretical Foundation of Computer Science
P. Pages : 3 NRJ/KW/17/4436
Time : Three Hours *0204*
Max. Marks : 80
_____________________________________________________________________
Notes : 1. All questions carry marks as indicated.
2. Solve Question 1 OR Questions No. 2.
3. Solve Question 3 OR Questions No. 4.

rg
4. Solve Question 5 OR Questions No. 6.
5. Solve Question 7 OR Questions No. 8.
6. Solve Question 9 OR Questions No. 10.
7. Solve Question 11 OR Questions No. 12.

s.O
8. Due credit will be given to neatness and adequate dimensions.
9. Assume suitable data whenever necessary.
10. Illustrate your answers whenever necessary with the help of neat sketches.

1. a) Explain Pigeon hole principal. 3

t
b) Define the following terms with suitable example. 8
i) Prefix
ii) Suffix
iii) Substring
iv) Subsequences
en
ud
c) Explain closure of a Relation, 2
find R * for

R  (1,1), (1, 2), (2,1), (2, 3), (3, 2)


St

OR
2. a) Explain Chomsky Hierarchy in detail. 6

b) Using Mathematical induction, prove that 7


ur

P(n) :1.1! 2.2! 3.3! ...... n . n !


 (n 1)!1, n  1

3. a) Design a Finite Automata for accepting 7


gp

 w (a / b)*
L  w
 n (a ) W M 0 D 3  n ( b ) W M 0 D 3
also write application of Finite Automata.
Na

b) Obtain a Deterministic Finite Automata for 6


 

d  d
q0 q1 q2 q3
START
OR

NRJ/KW/17/4436 1 P.T.O
4. a) Convert the given Mealy Machine into equivalent Moore Machine. 7
0|z2
0|z1
q1 q2
START
1|z1 0|z1
1|z1
q3

rg
b) Design a Moore and Mealy machine over    a, b  such that it will generate output 6
EVEN if the number of a's are Even & generate output ODD if number of a's are odd.

5. a) Convert the given Finite Automata to equivalent Regular Expression. 8

s.O
0
START
S

0 1

t
1

b)
B
en
0
A 1

Construct NFA with   transition s equivalent to the given Regular Expression. 6


ud
R  10  (0 11) 0*1
OR
6. a) Explain the procedure to convert Right linear grammar to equivalent left linear grammar, 8
convert the given RLG into LLG.
St

S  01A | 10
A 10 A | 10

b) Convert the given grammar into GNF without renaming the grammar. 6
ur

S  AB
A  BS | b
B  SA | a
gp

7. a) Design a Non deterministic PDA for 7


L  WW R
W  (a / b)*
W R is Reverse of W
Na

Also explain STACK Execution with valid string.

b) Design a PDA for given CFG. 7


S  XY
X  AX | BX | a
Y  YA | YB | a
Aa
Bb
OR

NRJ/KW/17/4436 2
8. a) Design a PDA for 7
 W  (a / b)*
L  W
 n a (W)  n b (W)
Where n a ( W)  Number of a's in W
& n b ( W)  Number of b's in W

b) Convert the given PDA to CFG. 7


 (q 0 , a, z0 )  (q 0 , xz0 )

rg
 (q 0 , a, x)  (q 0 , xx)
 (q0 , b, x)  (q1,)
 (q1, b, x)  (q1,)

s.O
 (q1,, z0 )  (q1,)

9. a) (n  1) 7
Design a Turing Machine to perform where n is an uniary number.
2

t
b) Explain different types of Turing Machine. 6

10 a) Design a Turing Machine that has


en OR

7
INPUT :  # W # and generates
ud
OUTPUT :  # W # W
where W   a , b  .

b) Explain various properties of Recursively Enumerable Language. 6


St

11. a) What do you mean by Primitive Recursive Functions? Show that 7


ADD  x, y and SUB  x, y are Primitive Recursive?
ur

b) Write short notes on LBA. 6

OR
gp

12. a) What is Ackermann's Function, Calculate 7


A (1,1) A (1, 2) A (2,1)

b) What is the significance of PCP, Solve the following using PCP 6


Na

i wi xi
1 0 000
2 01000 01
3 01 1

*************

NRJ/KW/17/4436 3 P.T.O
NRJ/KW/17/4436
Na
gp
ur
St

4
ud
en
ts.O
rg
www.nagpurstudents.org

It’s hard to beat a person who never gives up.


~ Babe Ruth
www.nagpurstudents.org
B.E. (Computer Science Engineering) Fourth Semester (C.B.S.)
Theoretical Foundations of Computer Science

P. Pages : 3 NJR/KS/18/4436
Time : Three Hours *0601* Max. Marks : 80
_____________________________________________________________________
Notes : 1. All questions carry marks as indicated.
2. Solve Question 1 OR Questions No. 2.

rg
3. Solve Question 3 OR Questions No. 4.
4. Solve Question 5 OR Questions No. 6.
5. Solve Question 7 OR Questions No. 8.
6. Solve Question 9 OR Questions No. 10.

s.O
7. Solve Question 11 OR Questions No. 12.
8. Assume suitable data whenever necessary.

1. a) Explain the following in detail with example. 6


i) Type – 0 Grammar ii) Type – 1 Grammar
iii) Type – 2 Grammar iv) Type – 3 Grammar

b)

c) nt
What is string, prefix, proper prefix & proper suffix with examples.

Write short note on pigeonhole principle. State its application.


4

3
de
OR

2. a) Consider a Relation R = {(a, b), (a, a), (b, b), (c, c), (d, d), (b, a)} on set A = {a, b, c, d}. Is 6
tu

relation R an equivalence relation. If so find equivalence classes.

b) Prove the following using method of induction. 7


n
n(n  1)(2 n  1)
 i2 
S

i 1
6
ur

3. a) Construct DFA which can accept the string those can have odd number of 0's and any 7
number of 1's.

b) Design a Moore machine for binary input sequence, if it ends in 101, output is 'A'. if it 6
gp

ends in 110 output is 'B'. Otherwise C.

OR

4. a) Convert the following NFA to equivalent DFA. 6


Na

a E a
q0 q1 q2

NJR/KS/18/4436 1 P.T.O
b) Minimize the following Automata. 7

b a b
q0 b q3 a q4 q5
b

a a b a
a a
b
q1 q2 q7 a q6
b

rg
b

5. a) Construct the regular expression for the automata given. 6

s.O
0 1 0
0 1
q0 q1 q2

b) Construct context free Grammar for following. Where  n  0, m  0, k  0 . 8

 
nt
i) L  a n bmck | n  m or m  k .

ii) L  a n bm | 2n  m  3n .
de
iii) L  a n bmcmd n \ m, n  1 .

iv) L  a n b2n | n  1 .
tu

OR

6. a) Remove all unit productions, all useless production and all E-productions from the 7
S

grammar given below.


S  aA | aBB
ur

A  aaA | 
B  bB | bbC
CB
gp

b) Convert the following grammar into Greibach normal form. 7


S  aSa | bBb
B  abB | aaAa
A  Aa | a
Na

7. a) 
Construct PDA for L  a 2n bn | n  0 .  6

b)  
Show that L  a n b j | n  j2 is not a context free language. 3

c) Explain the Non-deterministic push down automata in detail. 4

NJR/KS/18/4436 2
OR

8. a) Convert the following CFG into PDA 7


E  aAB | d
A  BA | a
B  Ead | C

b) Explain the modal of PDA and its acceptance by stack and acceptance by final state. 6

rg
9. a) Explain the types of Turing machine. 5

b) Construct a Turing machine for. 9


f (a, b) = a – b if a  b

s.O
=0 if a < b

OR

10. a) Explain the modal of linear bounded automata. 5

nt
b) Construct the Turing machine for 9
 
L  a n bn a n bn | n  0 .
de
11. a) Write a short note on: 6
i) Post correspondence problem.
ii) Primitive Recursive function.
tu

b) Define Ackermann's function. 7


Compute A (1, 1), A (2, 1), A (2, 2).

OR
S

12. a) Define Decidability & undecidability. 4


ur

b) Explain the properties of Recursively enumerable language. Give relation between 6


recursive & recursive enumerable language.

c) Explain Halting problem of Turing machine in detail. 3


gp

*********
Na

NJR/KS/18/4436 3 P.T.O
NJR/KS/18/4436
Na
gp
ur
S

4
tu
de
nt
s.O
rg
www.nagpurstudents.org

High expectations are the key to everything.


~ Sam Walton
www.nagpurstudents.org
B.E. (Computer Science Engineering) Fourth Semester (C.B.S.)
Theoretical Foundations of Computer Science
P. Pages : 3 NIR/KW/18/3381
Time : Three Hours *1312* Max. Marks : 80
_____________________________________________________________________
Notes : 1. All questions carry marks as indicated.
2. Solve Question 1 OR Questions No. 2.
3. Solve Question 3 OR Questions No. 4.

rg
4. Solve Question 5 OR Questions No. 6.
5. Solve Question 7 OR Questions No. 8.
6. Solve Question 9 OR Questions No. 10.
7. Solve Question 11 OR Questions No. 12.

s.O
8. Assume suitable data whenever necessary.

1. a) Explain closure of a Relation. Find R* for R = (1,1) (1, 2) (2,1) (2,3) (3, 2) . 3

b) Prove the following relation using principle of Induction : 8

i)

nt
1.2.3 + 2.3.4 + .... + n(n + 1) (n + 2) =
n(n + 1) (n + 2) (n + 3)
4
de
n(n + 1) (2n + 1)
ii) 12 + 22 + 32 + .... + n 2 =
6

c) What is countability? Explain. 2


tu

OR
2. a) Describe the concept of Pigeon – hole principle with example. 5
S

b) Define the following any four. 8


ur

i) Transitive Closure.

ii) Reflexive Transitive Closure.


gp

iii) Prefix of String.

iv) Suffix of String.

v) Substring.
Na

vi) Subsequence

3. a) Design a DFA to accept all the natural numbers divisible by 3. 6

b) Construct a Mealy machine to find 2’s complement of a given binary number. Assume 8
that given binary number is presented from LSB to MSB. Also, convert the resultant
Mealy machine into its equivalent Moore machine.
OR

NIR/KW/18/3381 1 P.T.O
4. a) Convert the following NFA into its equivalent DFA. 6

Q/ 0 1
→p p p, q
*q r r
r - s
*s s s

rg
b) Construct a minimum state automaton equivalent to a given automaton M whose 8
transition table is given by,

State /  a b

s.O
→ q0 q0 q3
q1 q2 q5
q2 q3 q4
q3 q0 q5
q4 q0 q6

nt
q5 q1 q4
q6 q1 q3
de
5. a) Reduce the following grammar. 5
S → aA / aBB
A → aaA/ 
B → bB / bbC
C→B
tu

b) Obtain deterministic finite automata for the following Regular expression, 4


(0 + 1)*10(0 + 1)* + (0 + 1)*11(0 + 1)*
S

c) Check whether the given grammar is ambiguous or not. 4


ur

S → a / Sa / bSS / SbS

OR
gp

6. a) Convert the following Right linear grammar into left linear grammar. 7
S → 01A /10
A → 10A / 10
Na

b) Construct a Regular expression from the following finite automata. 6

b a
q0 b q1 q2

a
b

NIR/KW/18/3381 2
7. a) Convert the CFG into PDA. 7
E → aAB / d
A → BA / a
B → Ead / c

b) Design a PDA for 7


L = ww R / w a, b*
OR

rg
8. a) Convert the given PDA to CFG. 7
(q 0 , a, z 0 ) → (q 0 , x z 0 )
(q 0 , a, x) → (q 0 , x x)
(q 0 , b, x) → (q1 ,)

s.O
(q1 , b, x) → (q1 ,)
(q1 ,, z 0 ) → (q1 ,)

b) Using pumping lema, prove that language 7

nt
 3 
L = a i i  1
 
is not regular.
de
9. a) Design a Turing machine for the language 6
 n m n
L = a b c n, m  1 
tu

b) Design a TM to perform multiplication of two unary numbers. 7


OR
10. a) Explain various types of Turing machines. 6
S

b) Design a Turing machine to copy a string over  = a, b* . 7


ur

11. a) Explain post correspondence problem. Consider the post correspondence system described 7
by the following lists.
A = 10, 01, 0,100,1
B = 101,100,10, 0, 010
gp

Does this PCP have a resolution?

b) Compute A(1, 1), A(1, 2), A(2, 1) using Ackermann function. 6


Na

OR
12. Write a short note on : 13
i) Halting problem of Turing Machine
ii) Linear bounded Automata
iii) Primitive Recursive Function.
**************

NIR/KW/18/3381 3 P.T.O
NIR/KW/18/3381
Na
gp
ur
S

4
tu
de
nt
s.O
rg
www.nagpurstudents.org

The secret of getting ahead is getting started.


~ Mark Twain
www.nagpurstudents.org
B.E. Fourth Semester (Computer Science Engineering) (C.B.S.)
Theoretical Foundations of Computer Science
P. Pages : 3 NKT/KS/17/7296
Time : Three Hours *0686* Max. Marks : 80
_____________________________________________________________________
Notes : 1. All questions carry marks as indicated.
2. Solve Question 1 OR Questions No. 2.
3. Solve Question 3 OR Questions No. 4.
4. Solve Question 5 OR Questions No. 6.

g
5. Solve Question 7 OR Questions No. 8.
6. Solve Question 9 OR Questions No. 10.

.Or
7. Solve Question 11 OR Questions No. 12.
8. Due credit will be given to neatness and adequate dimensions.
9. Assume suitable data whenever necessary.
10. Illustrate your answers whenever necessary with the help of neat sketches.

ts
1. a) With the help of Mathematical Induction, prove that 8
n (n  1) (2n  1)
1) 12  2 2  32  ........ n 2 
6
2) 1.1! 2.2! 3.3! ........ n.n ! (n  1)!1
en
b) Explain Pigeonhole principle with example. Also explain Generalised pigeonhole principle. 5

OR
ud
2. a) Explain in detail Chomsky Hierarchy of languages. 6

b) What is Countability & Diagonalization. 4


St

c) Let R   (1, 2), (2, 3), (3,1)  & 3


A  1, 2, 3  . Find Reflexive, Symmetric & transitive closure of R.

3. a) Design DFA over    0, 1 to accept strings containing even number of 0's and 1's. 6
r

Consider   NFA .
pu

b) 8

Q
Z
 a b c

p
Na

-- p q r

q p q r 

r q r  p

i) Compute   closure of each state


ii) Compute all the strings of length 3 or less accepted by the automata
iii) Convert to DFA.
OR
NKT/KS/17/7296 1 P.T.O
4. a) Construct Mealy Machine to compute 2's complement of binary number. Also convert this 6
machine to Moore Machine.

b) Construct Minimum state automata equivalent to given automata. 8

State 0 1
q0 q1 q5
q1 q6 q2
q2 q0 q2

g
q3 q2 q6

.Or
q4 q7 q5
q5 q2 q6
q6 q6 q4
q7 q6 q2

ts
5. Construct F.A. to accept strings over    a , b containing atleast one aba and not 13
containing bbb. en OR

6. a) Check whether given grammar is ambiguous or not. 4


S  a / Sa / bSS / SbS
ud

b) Reduce the grammar & find equivalent grammar. 5


S  aA / aBB
A  aaA / 
B  bB / bbC
St

CB

c) Convert the following CFG into CNF. 4


S  bA / aB
r

A  bAA / aS / a
B  aBB / bS / b
pu

7. a) Construct CFG from following PDA. 10


 (q 0 ,1, Z0 )  (q 0 , XZ0 )
 (q 0 ,1, X)  (q 0 , XX)
Na

 (q 0 , 0, X)  (q1, X)
 (q 0 ,, Z0 )  (q 0 ,)
 (q1,1, X)  (q1,)
 (q1, 0, Z0 )  (q 0 , Z0 )

b) Explain the model of PDA. 4

OR

NKT/KS/17/7296 2
8. a) Convert the CFG into PDA. 6
E  aAB / d
A  BA / a
B  Ead / C

b) Design PDA for 8


h  WW R W   a, b 
9. a) Explain in detail, types of Turing Machines. 6

g
b) Design Turing Machine for 7

 

.Or
h  a n bn cn n  1
OR

10. a) Design a Turing Machine for multiplication of unary numbers. 9

ts
b) Give the model of LBA and define it formally. 4

11. a) What is Post Correspondence Problem? Explain with example. 6


Also explain modified PCP.
en
b) Define Ackermann's function. 7
Compute A (1, 1), A (2, 1), A (2, 2)
ud
OR

12. a) Explain properties of Recursively Enumerable Languages. 5

b) Write a note on Recursive function. 3


St

c) Explain Halting Problem. 3

d) Define Decidability & Undecidability. 2


r

*************
pu
Na

NKT/KS/17/7296 3 P.T.O
NKT/KS/17/7296
Na
pu
rSt

4
ud
en
ts
.Or
g
www.nagpurstudents.org

High expectations are the key to everything.


~ Sam Walton
www.nagpurstudents.org
B.E. (Computer Science Engineering) Fourth Semester (C.B.S.)
Theoretical Foundations of Computer Science
P. Pages : 3 NRT/KS/19/3381
Time : Three Hours *0642* Max. Marks : 80
_____________________________________________________________________
Notes : 1. All questions carry marks as indicated.
2. Solve Question 1 OR Questions No. 2.
3. Solve Question 3 OR Questions No. 4.
4. Solve Question 5 OR Questions No. 6.
5. Solve Question 7 OR Questions No. 8.
6. Solve Question 9 OR Questions No. 10.
7. Solve Question 11 OR Questions No. 12.
8. Assume suitable data whenever necessary.

1. a) Explain Chomsky Hierarchy in detail. 6

b) Prove the following using method of induction. 7


n
n ( n + 1)( 2n + 1)
 i2 = 6
.
i =1
OR
2. a) Let R = {(1,2), (2,3), (3,1)} & A = {1,2,3}. Find Reflexive, symmetric & transitive closure 4
of R.

b) Define : 3
i) Kleene closure ii) Positive closure
with an example.

c) Explain pigeon-hole principle in detail. 6

3. a) Construct a DFA over  = {0,1} for the "Language accepting 1100 or 1010 as a 7
substring''.

b) Convert following mealy machine into equivalent Moore machine. 6


1/a2
q1 q2
0/a1
1/a2
0/a
2

0/a
1
1/a1
q3

OR
4. a) Construct DFA equivalent to : 6
M = ({q0 ,q1,q 2}, a, b , ,q 0 q 2 )
Where  is defined by its state table.
State Input
a b
→ q0 q0 , q1 q 2 
q1 q 0  q1
q2 -- q0 , q1

NRT/KS/19/3381 1 P.T.O
b) Convert the NFA with  -transition to NFA without  -transition. 7
,c
P R
a,c c
 ,b
b
Q

5. a) What is Regular Grammar? Find left linear and right linear grammar for the following 8
regular expression.
i) (0+1)* 00 (0+1)* ii) 0* (1(0+1))*

b) Convert the following grammar into CNF 6


S → ABa
A → aab
B → Ab

OR

6. a) Find Regular expression for following transition diagram. 7

0 0
q0 q1

0 1
0
q3 q2
1 1

b) Explain closures properties of Regular set. 7

7. a) Design PDA for the language 7


 
L =    |  ( 0 + 1) * .
R

R : Reverse string.

b) Explain the modal of PDA and its acceptance by stack and acceptance by final state. 6

OR

8. a) Explain pumping lemma theorem for context free language. 6

b) Convert following CFG into PDA. 7


E → aAB | d
A → BA | a
B → Ead | c

NRT/KS/19/3381 2
9. a) Design a Turing machine for the language 8

L = WW | W  ( 0 + 1) *
R

R : Reverse string.

b) Explain the modal of linear bounded automata. 6

OR

10. a) Explain : Turing machine as transducers with example. 7

b) Design a Turing machine that computes the function f (m,n) = m +n. 7

11. a) What is Ackermann's function, calculate A (1, 1) A (1, 2) A (2, 1). 6

b) Explain the properties of Recursively enumerable language. Give relation between 7


recursive & recursive enumerable language.

OR

12. a) What is significance of PCP, solve the following using PCP. 7


   
A = b, bab3 , ba B = b3 , ba, a .

b) Write a short note on LBA. 6

***************

NRT/KS/19/3381 3 P.T.O
NRT/KS/19/3381 4
www.nagpurstudents.org

It’s hard to beat a person who never gives up.


~ Babe Ruth
www.nagpurstudents.org
B.E. (Computer Science Engineering) Fourth Semester (C.B.S.)
Theoretical Foundations of Computer Science
P. Pages : 3 NRT/KS/19/3381
Time : Three Hours *0642* Max. Marks : 80
_____________________________________________________________________
Notes : 1. All questions carry marks as indicated.
2. Solve Question 1 OR Questions No. 2.
3. Solve Question 3 OR Questions No. 4.
4. Solve Question 5 OR Questions No. 6.
5. Solve Question 7 OR Questions No. 8.
6. Solve Question 9 OR Questions No. 10.
7. Solve Question 11 OR Questions No. 12.
8. Assume suitable data whenever necessary.

1. a) Explain Chomsky Hierarchy in detail. 6

b) Prove the following using method of induction. 7


n
n ( n + 1)( 2n + 1)
 i2 = 6
.
i =1
OR
2. a) Let R = {(1,2), (2,3), (3,1)} & A = {1,2,3}. Find Reflexive, symmetric & transitive closure 4
of R.

b) Define : 3
i) Kleene closure ii) Positive closure
with an example.

c) Explain pigeon-hole principle in detail. 6

3. a) Construct a DFA over  = {0,1} for the "Language accepting 1100 or 1010 as a 7
substring''.

b) Convert following mealy machine into equivalent Moore machine. 6


1/a2
q1 q2
0/a1
1/a2
0/a
2

0/a
1
1/a1
q3

OR
4. a) Construct DFA equivalent to : 6
M = ({q0 ,q1,q 2}, a, b , ,q 0 q 2 )
Where  is defined by its state table.
State Input
a b
→ q0 q0 , q1 q 2 
q1 q 0  q1
q2 -- q0 , q1

NRT/KS/19/3381 1 P.T.O
b) Convert the NFA with  -transition to NFA without  -transition. 7
,c
P R
a,c c
 ,b
b
Q

5. a) What is Regular Grammar? Find left linear and right linear grammar for the following 8
regular expression.
i) (0+1)* 00 (0+1)* ii) 0* (1(0+1))*

b) Convert the following grammar into CNF 6


S → ABa
A → aab
B → Ab

OR

6. a) Find Regular expression for following transition diagram. 7

0 0
q0 q1

0 1
0
q3 q2
1 1

b) Explain closures properties of Regular set. 7

7. a) Design PDA for the language 7


 
L =    |  ( 0 + 1) * .
R

R : Reverse string.

b) Explain the modal of PDA and its acceptance by stack and acceptance by final state. 6

OR

8. a) Explain pumping lemma theorem for context free language. 6

b) Convert following CFG into PDA. 7


E → aAB | d
A → BA | a
B → Ead | c

NRT/KS/19/3381 2
9. a) Design a Turing machine for the language 8

L = WW | W  ( 0 + 1) *
R

R : Reverse string.

b) Explain the modal of linear bounded automata. 6

OR

10. a) Explain : Turing machine as transducers with example. 7

b) Design a Turing machine that computes the function f (m,n) = m +n. 7

11. a) What is Ackermann's function, calculate A (1, 1) A (1, 2) A (2, 1). 6

b) Explain the properties of Recursively enumerable language. Give relation between 7


recursive & recursive enumerable language.

OR

12. a) What is significance of PCP, solve the following using PCP. 7


   
A = b, bab3 , ba B = b3 , ba, a .

b) Write a short note on LBA. 6

***************

NRT/KS/19/3381 3 P.T.O
NRT/KS/19/3381 4
www.nagpurstudents.org

All our dreams can come true if we have the courage to


pursue them.
~ Walt Disney

You might also like