0% found this document useful (0 votes)
6 views

Computer Algorithms

Uploaded by

patildhan061
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)
6 views

Computer Algorithms

Uploaded by

patildhan061
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/ 3

SB- 86

Seat Total No. of Pages : 3


No.
T.Y.B.Tech.(Computer Science and Engineering) (Part-III)
(Semester - V) (CBCS) Examination, January - 2023
COMPUTER ALGORITHMS
Sub. Code: 80797
Day and Date: Saturday, 21 - 01 - 2023 Total Marks : 70
Time : 10.30 a.m. to 1.00 p.m.
Instructions : 1) All questions are compulsory.
2) Figures to right indicate full marks.
3) Assume suitable data wherever necessary.

Q1) Solve MCQs. (2 Marks Each) [14]


a) Consider the problem of computing min-max in an unsorted array where
min and max are minimum and maximum elements of array. Algorithm
A1 can compute min-max in a1 comparisons without divide and conquer.
Algorithm A2 can compute min-max in a2 comparisons by scanning the
array linearly.What could be the relation between a1 and a2 considering
the worst case scenarios?
i) a1< a2 ii) a1 > a2
iii) a1 = a2 iv) Depends on the input
b) What is the time complexity of Huffman Coding?
i) O(N) ii) O(Nlog N)
iii) O(N(log N)^2) iv) O(N^2)
c) We use dynamic programming approach when
i) We need an optimal solution
ii) The solution has optimal substructure
iii) The given problem can be reduced to the 3-SAT problem
iv) It’s faster than Greedy

P.T.O.
SB - 86
d) The inorder and preorder traversal of a binary tree are d b e a f c g and a
b d e c f g, respectively. The postorder traversal of the binary tree is:
i) debfgca ii) edbgfca
iii) edbfg ca iv) d e f g b c a
e) Let S be an NP-complete problem and Q and R be two other problems
not known to be in NP. Q is polynomial time reducible to S and S is
polynomial-time reducible to R. Which one of the following statements
is true?
i) R is NP-complete ii) R is NP-hard
iii) Q is NP-complete iv) Q is NP-hard
f) Which is not a constraints enforced on PRAM model
i) EREW ii) ERCW
iii) CRCW iv) None
g) Which of the following algorithms can be used to most efficiently
determine the presence of a cycle in a given graph?
i) Depth Frist Search
ii) Breadth First Search
iii) Prim’s Minimum Spanning Tree Algorithm
iv) Kruskal’ Minimum Spanning Tree Algorithm

Q2) Solve any 2 of the following. (7 Marks Each) [14]


a) Explain with example Big-oh, Big-omega and Theta, also plot a graph
for few functions.
b) Compare Prim’s and Kruskal’s algorithm to find minimum cost spanning
tree (MST)
c) Generate the sets Si, 0 ≤ i ≤ 4, when (w1, w2, w3, w4) = (10,15,6,9,) and
(p1,p2,p3,p4) = (2, 5, 8, 1).

-2-
SB - 86
Q3) Solve any 2 of the following (7 Marks Each) [14]
a) Solve job sequencing problem with deadlines using greedy approach for
following instance n=7. (p1,p2,....,p7) = (50, 15, 18, 16, 8, 25, 60)
(d1,d2,...,d7) = (1, 3, 4, 3, 2, 1, 2)
b) What is Difference between priori and posteriori analysis
c) Explain dynamic programming solution to 0/1 knapsack problem

Q4) Solve any 2 of the following (7 Marks Each) [14]


a) Explain techniques for binary tree traversal.
b) What is backtracking? Explain sum of subset problem and algorithm
with suitabel example.
c) List and explain Variants of PRAM

Q5) Solve any 2 of the following (7 Marks Each). [14]


a) Discuss Algorithm and conditions of 8 Queens problem
b) List and explain NP-Hard graph problems
c) Write an algorithm for prefix computation on mesh.

ooo

-3-

You might also like