DAA - QuestionBank - CSIT
DAA - QuestionBank - CSIT
Question Bank
Sl. Part-I
Module BL CO
No Short Answer Type Questions
1 Define growth of a function. 1 1 1
2 Is 2n+1 = O(2n)? 1 1 1
3 Differentiate posteriori and priori analysis. 1 1 1
4 Define little omega notation with example 1 1 1
5 Is 9n5+21n3+4n = ω (n5)? 1 2 1
6 1 1 1
Define time complexity and space complexity.
7 Find time complexity of addition of 2D array. 1 1 1
8 Is f(n) = 5n7 +2n3+8n = w(n6)? 1 1 1
9 If f(n) = 700 n7 + 8 , Represent it using all notation. 1 1 1
10 Briefly explain divide and conquer approach for problem solving. 1 2 1
11 Define recurrence with example. 1 2 1
12 What is time space trade-off? 1 1 1
13 State master’s method for solving recurrences. 1 2 1
14 Define big omega notation with example. 1 1 1
15 Define big oh notation with example. 1 1 1
16 List the advantages and disadvantages of divide and conquer 2 1 2
algorithm.
17 Write is the difference between quick sort and merge sort? 2 2 2
18 State the elements of dynamic programming. 2 1 2
19 Why dynamic programming is better than greedy? 2 2 2
20 Define matrix-chain multiplication problem. 2 1 2
21 Best case and Worst-case time complexity of LCS are _______ & 2 1 2
________.
22 Let A, B and C are three matrices of dimensions [5X7], [7 X 2] and 2 3 2
[2 X5]. Find the minimum cost of multiplying them.
23 In activity selection problem from a given set of activities always we 2 2 2
have to consider the first activity. [T/F]. Justify your answer.
24 What are the features/characteristics of an efficient algorithm? 5 2 2
25 State the elements of greedy algorithm. 3 1 2
26 State the formula for parenthesizing n matrices. 3 1 2
27 What do you mean by graph traversal and its types? 4 1 4
28 Define Minimum spanning tree problem. 4 1 4
29 Define the capacity constraint in the context of maximum workflow 3 1 3
problem.
30 List any two applications of shortest-path algorithms. 4 1 4
31 Explain the general method of branch and bound? What is FIFO and 4 2 4
LC branch and bound.
32 What are different graph representation techniques, explain? 4 1 4
33 What is the use of Relaxation () in shortest-path algorithms? 4 1 4
34 What do you mean by negative-weight cycle in a directed graph? 4 1 4
35 Define backtracking. 3 1 3
36 Define the transitive closure of a directed graph. 4 1 4
37 Define N-Queen problem. 3 1 3
38 State the time complexity of prim’s and krushkal’s algorithm. 3 2 3
39 State the algorithm for initialize_single_source(). 3 2 3
40 What do you mean by all-pair-shortest path? 4 1 5
41 Mention four differences between Dynamic and Greedy approach. 3 1,2 5
42 Define tree edge, forward edge, backward edge and cross edge. 4 1 4
43 Define spanning graph with an example. 4 1 4
44 State different types of shortest path problems 4 1 4
45 What is topological ordering of a graph? 4 1 4
46 What are tractable and intractable Problems? 5 1 5
47 Define Cook’s theorem. 5 1 5
48 State deterministic algorithm and non-deterministic algorithm. 5 1 5
49 Define decision problem and optimization problem. 5 1 5
50 What is node cover decision problem? 5 1 5
Sl. Part-II
Module BL CO
No Focused-Short answer type Questions
1 Let the frequency count of function f(n) = 7n5+2n+3n2+8, Represent 1 1 1
it using Big oh notation.
2 Let the frequency count of function f(n)= 5n2+7n+3, Represent it
using theta notation.
3 Solve the recurrence using master’s method. 1 3 1
T (n) =9T (n/3) + n2.5
15. Prove that the worst-case time complexity of Quick sort is O(n2). 2 3 2
16 State the algorithm of merge sort. Analyze the best , worst and 2 1,1 2
average case time complexity of merge sort.
17 2 3,1 2
Given the s table:
Find the optimal parenthesis for above matrix and write the
algorithm.
20 Explain Depth First Search algorithm and find the traversal list. 4 2,3 4
21 Write Breadth First Search (BFS) algorithm for graph traversals. 4 2,3 4
Perform BFS traversal for the following graph by considering start
node as 0.
22 Find the minimum spanning tree and its cost for the given graph by 4 3 4
using krushkal’s algorithm.
23 Find the shortest path from vertex A to all other vertices by using 4 3 4
Dijkstra’s algorithm.
24 2 3 2
Find the shortest way for Travelling Salesman by assuming that the
salesman starts his journey from city 1 by using dynamic
programming.
25 Use branch and bound technique to solve the following 0/1 3 3 3
knapsack problem . Find the maximum profit.
Consider :-n = 4, w = 10, (w1, w2, w3, w4) = (4, 7, 5, 3)
(v1, v2, v3, v4) = (40, 42, 25, 12)
17. Consider the following flow network with source S and sink T, 4 3 4
where the edges are labeled with their capacities:
Find a maximum S-T flow for this network. What is the value of this
flow?