You are on page 1of 6

Design and Analysis of Algorithms (BCSL 404)

G.H. RAISONI COLLEGE OF ENGINEERING, NAGPUR


DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

Design and Analysis of Algorithms BCSL 404


VI semester B
QUESTION BANK (2014-15)
Q1. What do you mean by analysis of algorithm? Write and analyze the Insertion sort
algorithm.
Q2. Explain best, average and worst case complexity of an algorithm.
Q3. Write a short note on Asymptotic Notation.
Q4. Explain divide and conquer approach and discuss it with the Merge sort.
Q5. Solve the recurrence relation shown below:
i)
6 * 2 n + n 2 = o (3 n)
ii)
2n + 3 log (n) = (n)
Q6. Write and explain Quicksort algorithm.
Q7. Explain Binary Search algorithm and its complexity.
Q8. Explain Linear Search algorithm and its complexity.
Q9. Explain Binary Search Tree and write Insertion algorithm for BST.
Q10. Write and explain Insertion of RB Trees.
Q11. Write and explain Deletion of RB Trees.
Q12. Explain merge sort algorithm with example.
Q13. Define and explain Fibonacci Heap with example.
Q14. Which is a more efficient way to determine the optimal number of multiplications
in a matrix chain multiplication problem enumerating all the ways of
parenthesizing the product and computing the number of multiplication for each or
running MATRIX- CHAIN-ORDER? Justify your answer. Find an optimal
paranthesization of a matrix-chain product whose sequence of dimensions is
(5,10,3,12,5,50,6).
Q15. Explain Greedy method and discuss some problems which are solved using this
algorithm.
Q16. Write and explain Travelling Salesman Problem.
Prepared By-Archana R Raut

Design and Analysis of Algorithms (BCSL 404)


Q17. What is Set cover problem? Discuss its possible solution.
Q18. Write and explain multistage graphs with example.
Q19. Explain the concept of backtracking.
Q20. Write and explain Longest common subsequence method.
Q21. Find the minimum distance of each station from NY. Give the algorithm used and
show all the steps.
Boston
LA
2

4
4

NY
5

3
CK

WN

Q22. Use Floydd-Warshall Algorithm to find the shortest paths for all pairs of
vertices in the given graph.
2
a

b
7

3
c

d
1

Q23. What are minimum spanning trees? Write and explain any algorithm to find
a minimum spanning tree for a given graph.
Q24. What do you understand by Maximum flow, augmenting path?
Q25. What is planar graph explain with the help of an example.
Q26. Discuss the classes P, NP, NP complete, and NP hard with examples. How can
we show that a problem is NP complete.
Q27. Write and explain different Approximation algorithms.
Q28. Explain Binomial Heap.
Q29. Write and explain the concept of sorting networks. Design a sorting network to
sort four elements 2,8,3,6.
Prepared By-Archana R Raut

Design and Analysis of Algorithms (BCSL 404)


Q30. Define Red Black Tree. Prove that a Red Black tree with n internal nodes has
height at most 2 log (n+1).
Q31. Write and explain Bellman-Ford Algorithm with the help of suitable example.
Q32. Write and explain Dijkstras Algorithm with the help of suitable example.
Q33. Define Traversal of Trees. What are the different ways of traversal of Trees?
Q34. Indicate the order in which Kruskals algorithm would include edges in
constructing a minimum spanning tree for the following graph:

7
4

6
3

Q35. Explain Approximation algorithm and Randomized algorithms with example.


Q36. Write down the algorithm of Quick Sort and perform the algorithm on the
following array: A={10,12,1,7,4,6,9,5,3,11,0}.
Q37. Illustrate the operation of RADIX-SORT on the following list of English words:
COW, DOG, SEA, ROW, MOB, BOX, TAB, BAR, EAR, BIG, TEA, NOW.
Q38. Apply BUCKET-SORT algorithm on the following array:
0.78, 0.17, 0.39, 0.26, 0.72, 0.94, 0.21, 0.21, 0.12, 0.23, 0.68
Q39. Apply Merge sort on the following array:
A= < 9, 16, 52, 5, 8, 25, 35, 50 >
Q40. Solve the following recurrences by substitution method:
a) T (n) = 2 T (n / 2) + n
b) T (n) = T ( n / 2 ) + T ( n / 2 ) + 1
c) T (n) = 2 T (n) + 1
Q41. Solve the following recurrences by Iteration method:
d) T (n) = 3 T (n / 2) + n
e) T (n) = 3 T ( n / 4 ) + n
f) T (n) = 2 T (n / 2) + n

Prepared By-Archana R Raut

Design and Analysis of Algorithms (BCSL 404)


Q42. Solve the following recurrences by recurrence tree method:
g) T (n) = 3 T (n / 2) + n
h) T (n) = 2 T (n / 2) + n2
i) T (n) = T (n / 3) + T (2 n / 3) + n
Q43. Solve the following recurrences by Master method:
j)
k)
l)
m)

T (n) = 4 T (n / 2) + n
T (n) = 4 T (n / 2) + n2
T (n) = T (n / 2) + 1
T (n) = 4 T (n / 2) + n2 log n

Q44. Apply Kruskals Algorithm to find minimum spanning tree on the following graph:
b

11

4
a

14

6
1

10

Q45. Apply Prims Algorithm to find minimum spanning tree on the following graph:

11

4
a

7
h

14

6
1

10

Q46. Write and explain Ford-Fulkerson method.

Prepared By-Archana R Raut

Design and Analysis of Algorithms (BCSL 404)


Q47. What do you understand by amortized analysis? Explain any one
algorithm.
Q48. What do you understand by Polynomial time reducibility?
Q49. What is the relationship between P, NP and NPC classes?
Q50. Explain the terms: CLIQUE, INDEPENDENT SET, SAT and 3SAT.
Q51. Explain 8-Queens Problem.
Q52. What is 0-1 Knapsack Problem.
Q53. Explain matrix multiplication using divide and conquer.
Q54. What is adjacency matrix? Explain with example.
Q55. Write a short note on:
1. Breath First Search (BFS)
2. Depth First Search (DFS)
3. NP Hard and NP Complete problem
4. Topological Sorting
Q56. Calculate DFS and BFS for the following graph.

Prepared By-Archana R Raut

Design and Analysis of Algorithms (BCSL 404)


Q. 57. Explain the method of binding the minimum spanning tree for a connected
graph using Prims algorithm.
Q. 58. Discuss the design steps in Kruskal algorithm to construct minimum spanning
tree with example.
Q. 59. Explain Greedy method and discuss some problems which are solved using this
algorithm.
Q. 60. Four Jobs with following deadlines and profits
JobID Deadline Profit
a
4
20
b
1
10
c
1
40
d
1
30
Find the maximum profit sequence of jobs?
Q. 61. Five Jobs with following deadlines and profits
JobID Deadline Profit
a
2
100
b
1
19
c
2
27
d
1
25
e
3
15
Find the maximum profit sequence of jobs?
Q. 62. Consider two strings X = "ABBACB" and Y = "ABCAB". What is the length
of the longest common subsequence between X and Y.
Q. 63. Given two sequences X = "1,0,0,1,0,1,0,1" and Y = "0,1,0,1,1,0,1,1,0". What is
the Longest common subsequence of X and Y.
Q. 64. A networking company uses a compression technique to encode the message
before transmitting over the network. Suppose the message contains the
following characters with their frequency:
character
a
b
c
d
e
f

Frequency
5
9
12
13
16
45

If the compression technique used is Huffman Coding, find the Huffman tree.
Q. 65. Write short notes on
(a) Graph coloring

(b) 4-Queens problem with possible solutions.


Prepared By-Archana R Raut

You might also like