You are on page 1of 17

Sample Questions

Paper Code: ___________ PC-CS403___________


Paper Name: ____ Design and Analysis of Algorithm ___

Group – A
1. The time complexity of non-deterministic algorithm is always
a. less than deterministic algorithm
b. greater than deterministic algorithm
c. equal to deterministic algorithm
d. none of these
2. The time factor when determining the efficiency of an algorithm is measured by
a. counting microseconds
b. counting the number of key operations
c. counting the number of statements
d. counting the kilobyte algorithm
3. Which of the following is used to depict the working of the algorithm?
a. Flowchart
b. pseudo code
c. source code
d. all of these
4. Lower bound of any comparison sort is
a. O (log n)
b. O (n2)
c. O (n log n)
d. O (n2 log n)
5. Tight bound for building a max heap algorithm will be
a. O (log n)
b. O (n2)
c. O (n log n)
d. O (n)
6. The Big O notation of the expression f(n) = n log n+ n2 + elog n is
a. O (n)
b. O (n2)
c. O (n log n)
d. O (elog n)
7. Complexity of Tower of Hanoi Problem is?
a. O(n)
b. O(n2)
c. O(2n)
d. None of these
8. Which of the following function is asymptotically smallest?
a. 2n
b. nlog n
c. nn/2
d. 100(logn)1/3 + (log log n)2/3
9. Small o of g(n) is
a. Asymptotically loose
b. asymptotically tight

Page 1 of 17
c. same as Big O
d. none of these
10. Time complexity for recurrence relation T(n) = 2T (n/2) + n is
a. O (log n)
b. O(n log n)
c. O(n)
d. O(n2)
11. Which of the following design techniques is used in the quick sort algorithm?
a. Dynamic Programming
b. Backtracking
c. Divide and Conquer
d. Greedy Method
12. Time Complexity of Binary Search algorithm of n items is
a. O(n)
b. O(n log n)
c. O (n2)
d. O (log 2n)
13. Optimal Sub-structure property is exploited by
a. Dynamic Programming
b. Greedy Method
c. Both (a) and (b)
d. None of these
14. Which of the following problem is solved using Branch and Bound method?
a. Knapsack problem
b. Hamiltonian problem
c. Travelling Salesman problem
d. 15-puzzle problem
15. The minimum number of colors needed to color a graph having n>3 vertices and 2 edges is
a. 2
b. 3
c. 4
d. 1
16. Minimum Spanning Tree is obtained by
a. BFS
b. DFS
c. Prim’s Algorithm
d. None of these
17. Kruskal Algorithm is a
a. Divide and Conquer Algorithm
b. Branch and Bound Algorithm
c. Greedy Algorithm
d. Dynamic Algorithm
18. Fractional Knapsack problem can be solved by using
a. Greedy Method
b. Divide and Conquer Method
c. Dynamic Programming
d. None of these
19. Complexity of BFS Algorithm is
a. Θ (n + e)
b. Θ (n2)

Page 2 of 17
c. Θ (log n)
d. Θ (n + e log n)
20. Kruskal’s algorithm uses ________ and Prim’s algorithm uses ________ in determining the MST.
a. Edges, vertex
b. vertex, edges
c. edges, edges
d. vertex, vertex
21. Level order traversal of a rooted tree can be done by starting from the root and performing
a. Depth first search
b. breadth first search
c. pre-order traversal
d. in-order traversal
22. Consider the following three claims:
I) (n + k)m = O(nm), where k and m are constants
II) 2n+1 = O(2n)
III) 22n+1 = O(2n)
Which of the following claims are correct?
a. I and II
b. I and III
c. II and III
d. I, II, and III
23. Which one is true of the following?
a. All NP-hard problems are NP-complete
b. All NP-complete problems are NP-hard
c. Some NP-complete problems are NP-hard
d. None of these
24. Travelling salesman problem belongs to
a. P Class
b. (b) NP Class
c. (c) NP-Hard
d. (d) NP-Complete
25. Time complexity for the relation T(n) = 2T(√𝑛) + 1 is
a. Ɵ(n2)
b. (b) Ɵ(n log n)
c. (c) Ɵ(log n)
d. (d) Ɵ(n)
26. Which of the following can’t be performed recursively?
a. Binary Search
b. DFS
c. Quick Sort
d. None of these
27. Which of the following design techniques is used in quick-sort?
a. Dynamic Programming
b. Back Tracking
c. Greedy Method
d. Divide & Conquer
28. Which of the following functions is asymptotically smallest?
a. 2n
b. nlog n
c. 𝑛√𝑛

Page 3 of 17
d. 3√log 𝑛
29. Optimal sub-structure property is exploited by
a. Dynamic Programming
b. Greedy Method
c. Both (a) & (b)
d. None of these
30. Time complexity for recurrence relation T(n) = 2T(n/2) + n is
a. O(n log n)
b. O(log n)
c. O(n)
d. O(n2)
31. The average successful search time taken by binary search on a sorted array of 7 items is
a. 12/7
b. 13/7
c. 16/7
d. 17/7
32. The time complexity of the expression f(n) = 6*2n + n7 using Big-O notation is
a. O(2n)
b. O(n7)
c. O(n log n)
d. O(n)
33. Time complexity of Travelling Salesman problem is
a. O(n22n)
b. Ω(n22n)
c. Ɵ(n22n)
d. None of these
34. Which of the following sorting technique is not data sensitive?
a. Selection Sort
b. Insertion Sort
c. Quick Sort
d. None of these
35. Single source shortest path problem with negative weight edge can be solved by
a. Dijkstra algorithm
b. Bellman-Ford algorithm
c. both (a) and (b)
d. None of these
36. for i=1 to n do
begin
sum = sum + A(i)
end
The time complexity of the above algorithm is
a. O(1)
b. O(n)
c. O(100)
d. None of these
37. If the chain of matrices are (A1X2, B2X3, C3X4, D4X5, E5X6) then we can fully parenthesize the product in
______ distinct ways
a. Five
b. Nine
c. Fourteen

Page 4 of 17
d. None of these
38. Consider the following graph: The minimum cost spanning tree for the graph above has the cost
1 5
6

1
4
2
5 5

3
3 3
6 4

5 6
6
a. 21
b. 22
c. 15
d. 16
39. In 8-queen problem, if two queens are placed at positions (i, j) and (k, l), then two queens lie on the
same diagonal if and only if
a. |i – j| = |k – l|
b. |i – l| = |j – k|
c. |j – l| = |i – k|
d. None of these
40. BFS has running time of a graph G(V,E) using adjacency list is
a. O(|V|)
b. O(|E|)
c. O(|E log V|)
d. O(|V| + |E|)
41. o(g(n)) is
a. Asymptotically loose
b. Asymptotically tight
c. Same as Big O
d. None of these
42. Time Complexity of Insertion Sort Worst Case is
a. O(n)
b. O(n2)
c. O(n log n)
d. None of these
43. What is the cost of MST of the following graph?
B
1
1

A
C

3 2
D

E
a. 5
b. 4

Page 5 of 17
c. 1
d. MST not possible
44. Divide and Conquer strategy is used in which of the following algorithms?
a. Merge and Selection Sort
b. Quick and Computation of xn
c. Both (a) and (b)
d. None of these
45. Feasible solution in fractional knapsack problem with knapsack size M refers to a solution that is
a. Maximum profit with weight less than M
b. Maximum profit with weight less than or equal to M
c. Maximum profit only
d. Any of these
46. Single source shortest path in a graph having negative edge can be solved by
a. By Greedy method
b. By Greedy and Dynamic Programming
c. By Dynamic Programming
d. None of these
47. A matrix chain having 5 matrices can be parenthesized in
a. 14 different combinations
b. 15 different combinations
c. 13 different combinations
d. None of these
48. Best case time complexity of Binary Search in unsuccessful case is
a. O(1)
b. O(log n)
c. O(n)
d. None of these
49. Which of the following is useful in traversing a given graph using BFS?
a. Stack
b. Linked List
c. Array
d. Queue
50. O notation provides an asymptotic
a. Upper bound
b. Lower bound
c. Tight bound
d. None of these
51. Consider the graph:

1
6
7

2
2 4
6 6

3
3 3
7 5

5 6
7

The MST for the graph above has the cost

Page 6 of 17
a. 18
b. 24
c. 20
d. 22
52. Tight bound for finding a MST of an undirected acyclic graph with E edges and V vertices is
a. O(E2)
b. O(V2)
c. O(E log E)
d. O(V log V)
53. Time complexity for the Floyd Warshall algorithm to find all pairs of shortest path of a graph G with V
vertices and E edges using DP method is
a. O(V2)
b. O(E2)
c. O(V3)
d. O(E3)
54. The edge, removal of which makes a graph disconnected is called
a. Pendant Vertex
b. Bridge
c. Articulation Point
d. Colored Vertex
55. The average successful search time for Binary Search on a sorted array of 10 items is
a. 2.6
b. 2.8
c. 2.7
d. 2.9
56. Minimum The diagonal of Adjacency Matrix of a graph with self loop contains
a. 1
b. 0
c. -1
d. Both a and b
57. Time complexity of Insertion Sort is
a. Linear
b. Quadratic
c. Cubic
d. Exponential
58. Which of the following functions is asymptotically smallest?
a. 2n
b. nlog n
c. 𝑛√𝑛
1
d. (100)(log 𝑛)3 +(log log 𝑛)2/3 [1/3 and 2/3 are in power]
59. Which of the following approaches is adopted in D-A-C algorithms?
a. Top-down
b. Bottom-up
c. Both (a) and (b)
d. None of these
60. Time complexity of Binary Search algorithm on n items is?
a. O(n)
b. O(log n)
c. O(n2)
d. O(n log n)
Page 7 of 17
61. The complexity of Bubble Sort is
a. O(n)
b. O(log n)
c. O(n2)
d. O(n log n)
62. Which of the following is used to depict the working of algorithm?
a. Flow Chart
b. Pseudo Code
c. Source Code
d. All of these
63. Which of the following statements is correct?
a. If A<=PB and B𝜖𝑃 𝑡ℎ𝑒𝑛 𝐴𝜖𝑃
b. If A<=PB and A𝜖𝑃 𝑡ℎ𝑒𝑛 𝐵𝜖𝑃
c. If A<=PB and B<=PC then A<=PC
d. All of these
64. Which of the following algorithms solved the All-Pair Shortest Path Problem?
a. Dijkstra’s
b. Floyd Warshall
c. Prim’s
d. Kruskal’s
65. The average number of comparisons performed by Merge Sort algorithm in merging ‘2’ sorted lists of
length ‘2’ is
a. 8/5
b. 11/7
c. 11/6
d. 8/3
66. Which of the following can’t be performed recursively?
a. Binary Search
b. Quick Sort
c. DFS
d. None of these
67. In which sorting technique, is an element placed in its proper position at each step?
a. Bubble Sort
b. Quick Sort
c. Merge Sort
d. Heap Sort
68. Binary Search can’t be applied to
a. Sorted Linked List
b. Sorted Binary Trees
c. Sorted Linear Array
d. Sorted Integer Array
69. The technique of Pruning is used in
a. Branch and Bound
b. Backtracking
c. D-A-C
d. DP
70. The tight bound for building a max heap is
a. O(n)
b. O(log n)
c. O(n log n)

Page 8 of 17
d. None of these
71. Worst case time complexity of Quick Sort algorithm is
a. O(n2)
b. O(n log n)
c. O(n)
d. O(log n)
72. Complexity of the recurrence relation T(n) = 8T(n/2) + n2 is
a. O(n)
b. O(n2)
c. O(log n)
d. O(n3)
73. Consider the following statements:
(I) NP hard problem is a subset of NP complete problem
(II) An algorithm to multiply two matrices has complexity O(n3)
Which of the following alternatives is true?
a. I-True, II-False
b. Both True
c. Both False
d. I-False, II-True
76. The following equation 𝑇(1) = 1; 𝑇(𝑛) = 2𝑇(𝑛 − 1) + 𝑛; 𝑛 ≥ 2 evaluates to:
a. 2n+1 – n – 2
b. 2n – n
c. 2n+1 – 2n – 2
d. 2n + n
77. Let 𝑇(𝑛) = 2𝑇(√𝑛 ) + 1; 𝑇(1) = 1, then which one is true?
a. 𝑇(𝑛) = 𝜃(log log 𝑛)
b. 𝑇(𝑛) = 𝜃(log 𝑛)
c. 𝑇(𝑛) = 𝜃(√𝑛 )
d. 𝑇(𝑛) = 𝜃(𝑛)
78. Single source shortest path in a graph having negative edge can be solved by
a. Greedy method
b. Greedy method and Dynamic programming
c. Dynamic programming only
d. None of these
𝑛
79. Complexity of the recurrence relation 𝑇(𝑛) = 8𝑇 ( ) + 𝑛2 is
2
a. 𝑂(𝑛)
b. 𝑂(𝑛2 )
c. 𝑂(2𝑛 )
d. None of these
80. Travelling Salesman Problem is
a. NP Hard
b. NP
c. NP Complete
d. None of these
81. Consider the following three claims:
I. (𝑛 + 𝑘)𝑚 = 𝑂(𝑛𝑚 ) where k and m are constants
II. 2𝑛+1 = 𝑂(2𝑛 )
III. 22𝑛+1 = 𝑂(2𝑛 )
Which of the following claims are correct?

Page 9 of 17
a. I and II
b. I and III
c. II and III
d. I, II and III
82. Kruskal’s algorithm uses __________ and Prim’s algorithm uses ___________ in determining the MST.
a. edges, vertex
b. vertex, edges
c. edges, edges
d. vertex, vertex
83. Which of the following functions is asymptotically smallest?
a. 2𝑛
b. 𝑛𝑙𝑜𝑔 𝑛
c. 𝑛√𝑛
d. 3√log 𝑛
84. In 8-queen problem, if two queens are placed at positions (𝑖, 𝑗) and(𝑘, 𝑙), then two queens lie on the
same diagonal if and only if
a. |𝑖 – 𝑗| = |𝑘 – 𝑙|
b. |𝑖 – 𝑙| = |𝑗 – 𝑘|
c. |𝑗 – 𝑙| = |𝑖 – 𝑘|
d. None of these
85. Consider the following graph: The minimum cost spanning tree for the graph above has the cost
1 5
6

1
2 4
5 5

3
3 3
6 4

5 6
6

a. 21
b. 22
c. 15
d. 16
86. Time complexity for the Floyd Warshall algorithm to find all pairs of shortest path of a graph G with V
vertices and E edges using Dynamic Programming method is
a. 𝑂(𝑉 2 )
b. 𝑂(𝐸 2 )
c. 𝑂(𝑉 3 )
d. 𝑂(𝐸 3 )

Page 10 of 17
Group – B
Module: 01
Syllabus: Introduction: Characteristics of algorithm. Analysis of algorithm: Asymptotic analysis of complexity
bounds – best, average and worst case behavior; Performance measurements of Algorithm, Time and space
trade-offs, Analysis of recursive algorithms through recurrence relations: Substitution method, Method of
Iteration, Recursion Tree method and Masters’ theorem (Examples: Analysis of Binary Search, Merge Sort and
Quick Sort using Recurrence)
Questions
1. Define different asymptotic notations: O, Ω and Ɵ with suitable examples.
2. Explain an algorithm to compute xn with O (log n) complexity.
3. Prove that if f(n) = amnm + am-1nm-1 + …… a1n + a0, then f(n) = O(nm)
4. Prove that n! = O(nn)
5. Prove that log 𝑛! = O (nlog 𝑛)
6. Prove that ∑𝑛𝑖=1 𝑖 𝑘 = O(𝑛𝑘+1 )
7. Explain Master’s Theorem.
8. Analyze the complexity of Tower of Hanoi problem.
9. What is tail recursion? Explain with an example.
10. Write short notes on Recursion Tree.
√𝑛
11. Apply recursion tree to solve the recurrence 𝑇(𝑛) = 2𝑇 ( 2 ) + √𝑛 with initial condition, 𝑇(1) = 1
12. Solve the recurrence relation: an = 6an-1 – 11an-2 + 6an-3 for n>=3 with initial condition a0 = 1, a1 = -1 and
a2 = 1.
13. Calculate the complexity of the following recurrence using Recursion Tree method:
𝑐 𝑖𝑓 𝑛 = 1
𝑇(𝑛) = { 𝑛
2𝑇 ( 2) + 𝑐𝑛 𝑖𝑓 𝑛 > 1
14. Intelligent Guesswork is the main concept behind the Method of Substitution. Apply it to find out the
solution of tn = 2tn-1 + 1, n>=1 with initial condition t0 = 0.
15. Suppose we have a recurrence relation T (n) = a*T (n/b) + f (n). Show that the followings:
If a*f(n/b) = k*f(n) for some constant k<1, then T (n) = O (f(n))
If a*f(n/b) = k*f(n) for some constant k>1, then T (n) = O (n log 𝑏 𝑎). [log term is in power]
If a*f(n/b) = k*f(n) for some constant k=1, then T (n) = O (f(n) log 𝑏 𝑛)
16. Solve the following with the methods mentioned:
Apply Master’s Theorem to calculate the complexity of T (n) = 2T (n/2) + log n.
Apply Master’s Theorem to calculate the complexity of T (n) = 3T(n1/3) + Ɵ(log n).
Apply Master’s Theorem to calculate the complexity of T (n) = T (2n/3) + 1.
Apply Master’s Theorem to calculate the complexity of T (n) = 2T (n1/2) + log n.
Apply Iteration Method to solve T(n) = T(n-1) + log n.
Apply Iteration Method to solve T(n) = 3T(n/4) + n.
Apply Recursion Tree Method to solve T(n) = 2T(n/2) + n2.
Apply Recursion Tree Method to solve T(n) = T(n/3) + T(2n/3) + n.
Apply Recursion Tree Method to solve T(n) = T(n-a) + T(a) + cn, where a>=1 and c>0 are constants.
Apply Recursion Tree Method to solve T(n) = 2T(n/2) + n
𝑛
Apply Master Theorem to solve the recurrence given below: 𝑇(𝑛) = 2𝑇 ( 2) + log 𝑛
17. Analyze the complexity of Recursive Binary Search algorithm.
18. Explain the difference between Linear and Binary Search.
19. Explain merge sort algorithm using divide and conquer strategy.
20. Analyze the complexity [best and worst case] of Merge Sort algorithm.
21. Quick Sort provides Worst Performance when the array is already sorted – Justify.

Page 11 of 17
22. Explain the algorithm of Quick Sort.
23. Analyze the Best, Worst and Average Time Complexities of quick sort algorithm.
24. Calculate the kth smallest element of n elements with time complexity less than Quick Sort algorithm.
25. Let A [1…n] be a sorted array of n distinct integers. Explain a divide-and-conquer algorithm that can find
an index i such that A[i] = i (if one exists) with running time O (log n).

Module: 02
Syllabus: Fundamental Algorithmic Strategies: Divide and Conquer Method: Basic method, use, Example
– Max- Min Problems and its complexity analysis. Greedy Method: Basic method, use, Examples – Fractional
Knapsack Problem, Job sequencing with deadlines, Activity Scheduling Problem, Travelling Salesperson
Problem and their complexity analysis. Dynamic Programming: Basic method, use, Examples – Matrix Chain
Manipulation, 0/1 Knapsack Problem and their complexity analysis Branch and Bound and Backtracking:
Basic method, use, Examples – 15 Puzzles Problem, N queens problem, Graph Coloring problem, Hamiltonian
Cycle Problem.
Questions
1. Consider a 1-D array consists of n-number of elements. Using naïve approach to find-out the maximum
element from that array, requires (n-1) comparisons and for minimum element another (n-1)
comparisons. So total comparisons requires to find out the maximum and minimum elements is {(n-1) +
(n-1)}, i.e. (2n-2). Explain an alternative solution using Divide and Conquer approach to get the same
result with less than (2n-2) number of comparisons.
2. The solution of recursive MAXMIN problem is based on some assumptions. Briefly state the assumptions
and its effect on the algorithm in comparison the reality.
3. Analyze the complexity of Max-Min algorithm using divide and conquer strategy.
4. What are the characteristics of Greedy Algorithm? What is the difference between Greedy and Dynamic
Programming?
5. Prove that if p1/w1 ≥ p2/w2 ≥ …………pnwn, then Greedy Knapsack generates an optimal solution to the
given instance of the Knapsack Problem.
6. Explain TSP with an algorithm.
7. Explain Fractional Knapsack Problem.
8. Analyze the complexity of Fractional Knapsack Problem.
9. What is the difference between Fractional and 0/1 Knapsack problem?
10. Given the weight vector (2, 3, 5, 7, 1, 4, and 1) and the profit vector (10, 5, 15, 7, 6, 18, and 3) and a
Knapsack of capacity 15kg, find at-least 3 feasible solutions including optimal one for the Knapsack
problem with 7 objects.
11. Calculate the optimal solution for the fractional knapsack problem given below:
I = {I1, I2, I3, I4, I5} // I is the item set, w = {5, 10, 20, 30, 40} // w is weight, p = {30, 20, 100, 90, 160} // p is
profit. The knapsack capacity, W=60.
12. Solve the following Knapsack problem with the given conditions: n=3, where n is the number of items,
weight of Knapsack M=20, Profits (p1, p2, and p3) = (25, 24, and 15) and weight (w1, w2, and w3) = (18,
15, and 10).
13. Calculate the optimal solution using greedy criteria for knapsack having the capacity 100kg for the
following list of items having values and weights as shown in the table:
Item Value Weight
I1 10 15
I2 20 25
I3 30 35
I4 40 45
I5 50 55
14. Discuss Activity Selection Problem using greedy strategy.

Page 12 of 17
15. Prove that its time complexity is O (n log n).
16. Given 10 activities and their start and finish time as given below:

Start 1 2 3 4 7 8 9 9 11 12
Finish 3 5 4 7 10 9 11 13 12 14

Compute a Schedule where the largest number of activities takes place.


17. Explain Job Sequencing with deadline algorithm using greedy method.
18. Analyze the complexity of job sequencing with deadline algorithm.
19. Apply greedy strategy schedule the following jobs within deadline so as to maximize the profit. Deadlines
and profits are mentioned as follows:
Job No. 1 2 3 4
Profit 50 10 15 30
Deadline 2 1 2 1
20. Define Dynamic Programming.
21. What are the characteristics of Dynamic Programming?
22. What is Principle of Optimality?
23. What is the difference between Dynamic Programming and Greedy Method?
24. Memorization is one of the key concepts to establish Dynamic Programming: Explain with example.
25. Explain 0/1 Knapsack Problem using Dynamic Programming.
26. Explain Matrix Chain Multiplication algorithm using dynamic programming.
27. Analyze the complexity of matrix chain multiplication algorithm.
28. Calculate the minimum number of scalar multiplications required for the following Matrix Chain
Multiplication using Dynamic Programming: A (2X3) * B (3X4) * C (4X5) * D (5X6). Show the
parenthesized contents.
29. Find the minimum number of scalar multiplications required for the following Matrix Chain
Multiplication using Dynamic Programming: A (10X20) * B (20X50) * C (50X1) * D (1X100). Show the
parenthesized contents.
30. Calculate the optimal parenthesization of a matrix chain product whose sequence of dimension is <5, 10,
3, 12, 5, 50, and 6>.
31. Explain an algorithm of n-queen’s problem.
32. Analyze the time complexity of the n-queens algorithm.
33. Explain the graph coloring algorithm using backtracking.
34. Write short notes on Hamiltonian Cycles problem.
35. Explain a backtracking algorithm to find all the Hamiltonian cycles in a Hamiltonian graph.
36. Analyze the worst-case time complexity of the Hamiltonian cycle algorithm.
37. Apply backtracking technique to solve the 3-coloring problem for the following graph. Also generate the
state space tree.
1

2
5

4
3

Page 13 of 17
38. Consider the following graph and Find out Hamiltonian cycle:

1 2 3 4

8 7 6 5

39. Apply backtracking to generate state space search tree of a 3-coloring problem using the following graph:
a

b c

d e

40. Write short notes on 15-Puzzle Problem.

Module: 03
Syllabus: Fundamental Algorithmic Strategies: Graph and Tree Algorithms: Traversal algorithms:
Recapitulation of Depth First Search (DFS) and Breadth First Search (BFS); Shortest path Algorithms (Single
Source and All Pairs with their Complexity Analysis), Transitive Closure, Minimum Spanning Tree (Prim’s and
Kruskal’s Algorithms with their Complexity Analysis), Topological Sorting, Ford Fulkerson algorithm, Max
Flow Min-Cut theorem (Statement and Illustration).
Questions
1. Explain the following algorithms:
a. BFS
b. DFS
2. Analyze the complexities of
1. BFS
2. DFS
3. Compare and contrast BFS and DFS.
4. What are the applications of BFS and DFS?
5. How do you assure that the given graph consists of isolated vertices using BFS?
6. Consider the following graphs and apply BFS and DFS to generate the Tree Structures:
1

2 3

4 5 6 7

Page 14 of 17
[Graph: 1] [Graph: 2] [Graph: 3]

7. Define MST with an example.


8. Explain Prim’s Algorithm.
9. Analyze the complexity of Prim’s Algorithm.
10. Explain Kruskal’s Algorithm.
11. Analyze the complexity of Kruskal’s Algorithm.
12. Apply any suitable algorithm to generate MST of the given graph:

13. Explain Dijkstra’s algorithm for single source shortest path problem.
14. Analyze the complexity of Dijkstra’s algorithm.
15. Apply Dijkstra’s Algorithm for finding Single Source Shortest Path of the given graph with source vertex
1:
4
5 4
9
1
2 1 3 3 5
2
1 6
1

16. Apply Dijkstra’s Algorithm for finding Single Source Shortest Path of the given graph with source vertex
1:
5
2 4
13 10
9
5 4
3
2
3
1 5
6

17. Explain Floyd’s Algorithm for all pair shortest path problem.
18. Prove that in a weighted directed graph sub-paths of shortest paths are shortest paths.
19. Prove that time complexity of Floyd’s Algorithm is cubic.
20. Consider the following Cost Matrix OF A Directed Graph and apply suitable all pairs shortest path
algorithm using Dynamic Programming Approach to calculate all pairs shortest path:
Page 15 of 17
A B C D E

A 0 2 3 ∞ ∞

B 5 0 ∞ 7 4

C 7 3 0 6 ∞

D ∞ ∞ 1 0 5

E ∞ ∞ ∞ 3 0

21. Apply suitable algorithm using Dynamic Programming approach to generate shortest path between all
pairs of vertices of the given graph
6
1 2
4
11
2
3
3

22. Describe Bellman Ford algorithm for single source shortest path problem.
23. Prove that the time complexity of Bellman Ford algorithm is Ɵ (VE).
24. Apply suitable algorithm for finding Single Source Shortest Path of the given graph with source vertex s:

t 5 x

-2
6
-3
8
s 7
-4
7 2

y 9 z
25. Write short notes on Transitive Closure.
26. Explain Topological Sorting algorithm using adjacency matrix.
27. Apply topological sorting to generate the total order of the following DAG:

C3

C1 C2 C4 C5 C6

28. Discuss about Ford Fulkerson algorithm with suitable example.


29. Explain Max-Flow-Min-Cut theorem.
30. Analyze the complexity of Ford-Fulkerson algorithm to find the maximum flow of the graph.
31. Apply Ford-Fulkerson algorithm to find the maximum flow of the following graph:
Page 16 of 17
12
V1 V3
16 20

S 10
4
9 7 T
13
4
V2 14 V4

Module: 04
Syllabus: Tractable and Intractable Problems: Computability of Algorithms, Computability classes – P, NP,
NP- complete and NP-hard. Satisfiability Problem, Cook’s theorem, Clique decision problem
Questions
1. Define the classes P and NP.
2. Discuss diagrammatically the relations among P class, NP class, NP hard and NP complete.
3. What do you mean by Polynomial Reductions?
4. What are the different steps taken by non-deterministic algorithms?
5. Explain a non-deterministic graph coloring algorithm.
6. What is Non-deterministic algorithm?
7. Explain algorithm to sort an array using Deterministic and Non-Deterministic technique.
8. Compare the two techniques and show that the time complexity of non-deterministic technique is better
than Deterministic.
9. Prove that 3-colouring problem is NP-complete.
10. Prove that 2SAT is in P but 3SAT is NP-complete.
11. Prove that Hamiltonian Cycle is NP-Complete.
12. Prove that CDP (Clique Decision Problem) is NP-Complete.
13. What do you mean by non-deterministic algorithms?
14. Explain Circuit Satisfiability problem and conclude the category of this problem.
15. Write short notes on
a. NP-hard class
b. Set Covering Problem
c. Clique decision problem
13. Compare the Deterministic and Non-deterministic technique.
14. Prove that the time complexity of non-deterministic technique is better than Deterministic.
15. Write bubble sort algorithm using non-deterministic approach.

Module: 05
Syllabus: Advanced Topics: Approximation Algorithms: Introduction and Example - Vertex Cover Problem,
Randomized Algorithms: Introduction and Example - Quick Sort
Questions
1. Write short note on Approximation schemes and its uses.
2. Write short notes on Vertex Cover Problem.
3. Explain Randomized Quick Sort algorithm.
4. Analyze the complexity of Randomized Quick Sort algorithm.

Page 17 of 17

You might also like