Professional Documents
Culture Documents
Cse5 1
Cse5 1
com
3. a) What are the different Asymptotic notations? Explain them briefly. Find upper bound, 8
lower bound & tight bound for following.
i) 3n 2 ii) 20n 2 8n 10
b) What is Bitonic sorter? Explain half cleaner circuit design 8 – bit bitonic sorting network 7
for 1, 3, 5, 9, 8, 7, 4, 2.
5. a) Schedule the following Jobs using Job scheduling algorithm. Also write algorithm for the 7
same.
Job Profit Deadline
1 10 2
2 50 1
3 9 2
4 26 3
5 18 2
NRJ/KW/17/4492 1 P.T.O
www.rtmnuonline.com
rtmnuonline.com
b) Write an algorithm for Binary search. Find its complexity. Also find out average number 7
of successful and unsuccessful comparisons on following array:
-12, 23, 31, 45, 56, 78, 90, 103, 113, 126, 157
OR
6. a) For the following Knapsack sequence of objects find profit by three methods capacity = 30, 7
Number of elements = 07.
Object 1 2 3 4 5 6 7
Weight 4 6 10 14 2 8 2
Profit 20 15 20 28 8 18 6
b) Write KRUSKAL'S algorithm to generate spanning tree. Also implement the algorithm on 7
following graph.
1
b c
2 4 3
om
5 2
e.c
a
lin
1 e
on
d
3
nu
rtm
7. a) For the following graph, find the shortest path from source 'S' to destination 't' using 7
multistage graph algorithm. Also discuss its complexity.
w.
ww
1 5
2 6 9
7 6
2 5
2 3
3 3
2
s 1 7 2 57 4
10 12 t
om
9 4 11
4 6
e.c
8 4
lin
11
5 8 11
on
5
nu
rtm
b) Determine LCS of 7
x = (e, x, p, o, n, e, n, t, i, a, l)
w.
y = (p, , l, y, n, o, m, i, a, l)
ww
OR
8. a) Discuss Floyd-Warshall all pairs shortest path algorithm and generate the distance matrix 7
for:
5
1
18
1 12 2
1
3 13
NRJ/KW/17/4492 2
www.rtmnuonline.com
rtmnuonline.com
b) Determine cost and structure of an OBST for a set of n = 5 keys with the following 7
probabilities. Draw the tree.
i 0 1 2 3 4 5
Pi - 0.15 0.10 0.05 0.10 0.20
Qi 0.05 0.10 0.05 0.05 0.05 0.10
9. a) What is graph coloring? Color the following graph using graph coloring algorithm. 6
1 2
4 3
b) Explain 8 Queen problem. Explain the explicit & implicit constraints associated with this 7
problem. Give at least two solutions for this problem. Write the algorithm.
OR
10. a) Generate the space tree for following data using sum of subset problem. 6
S 10, 9, 15, 5, 1
M 25
b) What is Hamiltonian cycles? Implement it on following graph. Also find maximum cycles 7
from graph.
1 2 3 4
8 7 6 5
b) Prove P NP 4
OR
**********
NRJ/KW/17/4492 3 P.T.O
www.rtmnuonline.com