DAA - Question Bank CSE B

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

SRINIVASA RAMANUJAN INSTITUTE OF TECHNOLOGY

(AUTONOMOUS)
II B. Tech II Sem – Question Bank
DESIGN AND ANALYSIS OF ALGORITHMS
[R204GA05404]
(Computer Science & Engineering)

UNIT – 1 (2 Marks)
# Questions M CO BL
1 Define an Algorithm. 2 CO1 L1
2 Define Time complexity and Space Complexity. 2 CO1 L1
3 What are the characteristics of a good algorithm? 2 CO1 L1
4 Define Asymptotic Notations. 2 CO1 L1
5 What do meant by “Worst case efficiency” of an algorithm? 2 CO1 L1
6 List some of the pseudo code conventions. 2 CO1 L1
Define recursive and randomized algorithms. 2 CO1 L1
7 Give short notes on Biconnected component. 2 CO1 L1
What are the two methods used to analyze the time complexity of an algorithm. 2 CO1 L1
Define disjoint sets. 2 CO1 L1
9 List the applications of stack and queue. 2 CO1 L1
10 List the applications of trees and graphs. 2 CO1 L1
11 What is a degenerate tree? 2 CO1 L1
Write the difference between search and traversal. 2 CO1 L1
12 What are connected and biconnected components? Explain with suitable 2 CO1 L1
example.
UNIT – 1 (5/10 Marks)
# Questions M CO BL
1 Explain about growth of functions. 5 CO2 L1
2 Distinguish between Algorithm and Pseudo code. 5 CO2 L4
3 Use tabular method to analyze the time complexity for the multiplication of two 5 CO2 L3
n×n matrices.
4 Illustrate the Asymptotic notations with suitable examples. 10 CO2 L2
5 Illustrate the implementation of DFS and BFS search techniques with suitable 10 CO2 L2
example.
6 Explain about the following: 10 CO2 L2
i) Heap trees
ii) Hashing
7 Discuss the importance of weighted union and collapsing find algorithms. 10 CO2 L4
8 Explain about the following: 10 CO2 L2
i) Sets and disjoint sets
ii) Union and find
9 How to measure the algorithm’s efficiency and algorithm’s running time? 5 CO2 L3
11 What is a biconnected component and write an algorithm to find the biconnected 10 CO2 L3
components in the given graph.
12 Discuss the methods used to represent a graph in a datastuctures. 5 CO2 L2
13 Use tabular method to analyze the time complexity for the addition of two n×n 5 CO2 L3
matrices.
14 Discuss about the binary tree traversal techniques. 5 CO2 L2
***

UNIT – 2 (2 Marks)
# Questions CO BL
1 Write the general recurrence relation for the divide and conquer method. CO1 L1
2 Mention the advantages and disadvantages of divide and conquer method. CO1 L1
3 Mention the worst case time complexities of the following: CO1 L1
i) Binary search
ii) Merge sort
iii) Quick sort
iv) Selection Sort
4 Write the applications of Divide and Conquer method. CO1 L1
5 Define feasible and optimal solutions. CO1 L1
6 What is the Knapsack Problem? CO1 L1
7 Give the control abstraction for greedy method. CO1 L1
8 List the advantages and applications of Greedy method. CO1 L1
9 Write the applications of minimum cost spanning trees. CO1 L1
10 What is the aim of job sequencing with dead line problem? CO1 L1
11 What is binary search? CO1 L1
12 What is a Spanning tree? CO1 L1
13 Write the difference between prims and kruskal’s algorithms. CO1 L1
14 What is the runtime of shortest path algorithm? CO1 L1
UNIT – 2 (5/10 Marks)
# Questions M CO BL
1 Explain about the control abstraction / general method of Divide and conquer 5 CO3 L2
method and give its applications.
2 Illustrate the implementation of binary search using divide and conquer method. 10 CO3 L3
3 Solve the following recurrence relations using substitution method: 10 CO3 L3
i) T(n)=2T(n/2)+n
ii) T(n)=T(n/2)+1
4 Discuss about merge sort algorithm and analyse the worst case time complexity. 10 CO3 L4
5 Analyze the performance of quick sort algorithm. 10 CO3 L4
6 Implement the algorithm for finding maximum and minimum number form the 10 CO3 L3
given list using divide and conquer method.
7 Discuss the control abstraction of greedy method and give its applications. 5 CO3 L2
8 Find the optimal solution for the given knapsack instance n=7; 10 CO3 L3
(p1, p2, p3, p4, p5, p6, p7) = (10, 15, 7, 8, 9, 4); (w1, w2, w3, w4, w5, w6, w7)
= (1, 3, 5, 4, 1, 3, 2) and the capacity of the knapsack is 15.
9 Find the optimal solution for the given job sequencing with deadlines instance 10 CO3 L3
n=4; (p1, p2, p3, p4) =(100,10,15,27); (d1, d2, d3, d4) =(2,1,2,1).
10 Illustrate the Prim’s algorithm with suitable example. 10 CO3 L2
11 Illustrate the Kruskal’s algorithm with suitable example. 10 CO3 L2
12 Find the optimal solution for the given optimal storage on tapes problem n=3; 5 CO3 L3
(l1,l2,l3) =(5,10,3).
13 Explain the single source shortest path problem with suitable example. 10 CO3 L2
14 Explain about strassen’s matrix multiplication with an example and give the 5 CO3 L2
advantages of it.

***

UNIT – 3 (2 Marks)
# Questions CO BL
1 What is Dynamic Programming? CO1 L1
2 What are the applications of dynamic programming? CO1 L1
3 What are the drawbacks of dynamic programming? CO1 L1
4 Define principle of optimality. CO1 L1
5 Write the difference between the Greedy method and Dynamic programming. CO1 L1
6 Write the formulas for the following: CO1 L1
i) Estimated cost of the Binary Search Tree
ii) Multistage graph forward approach
iii) All pairs shortest path
iv) Optimal binary search tree
7 Define dominance or purging rule. CO1 L1
8 Define Travelling Salesman Problem. CO1 L1
9 Define explicit and implicit constraints. CO1 L1
10 What is the Aim of Backtracking? CO1 L1
11 Define E-node and dead node. CO1 L1
12 What is the purpose of bounding function? CO1 L1
13 Define Subset-Sum Problem? CO1 L1
14 Define planar graph. CO1 L1
15 What is a state space tree? CO1 L1
16 Define chromatic number. CO1 L1
17 Define Hamiltonian cycle. CO1 L1
UNIT – 3 (5/10 Marks)
# Questions M CO BL
1 Distinguish between Greedy method and Dynamic programming. 5 CO4 L2
2 Find the optimal solution for the given multistage graph using forward approach. 10 CO4 L3

3 Construct two possible binary search trees for the given identifier set with n=3, 10 CO4 L3
(a1,a2,a3,a4), p(1:4)=(0.5,0.1,0.05,0.1) q(0:4)=(0.05, 0.1, 0.05, 0.05, 0.1) and
find the optimal binary search tree.
4 Find the shortest paths between all pairs of nodes in the following graph. 10 CO4 L3

5 Construct the optimal binary search tree for the given identifiers with n=4; 10 CO4 L3
(a1,a2,a3,a4)=(do, if, int, While); p(1:4)=(3,3,1,1); q(0:4)=(2,3,1,1,1) using
dynamic programming.
6 Consider the knapsack instance n=3, (w1,w2,w3)=(2,3,4); (p1,p2,p3)=(1,2,5) 10 CO4 L3
and m=6. Find the optimal solution using dynamic programming.
7 Write an algorithm of n-queen problem. 10 CO4 L2
8 Discuss about the travelling sales person problem with suitable example. 10 CO4 L2
9 Write an algorithm of 8-queen problem and explain one possible solution for 8- 10 CO4 L2
queen problem.
10 Give solution to sum of subset problem using Backtracking technique. 10 CO4 L2
11 Illustrate the Hamiltonian cycle using Backtracking technique with an algorithm. 10 CO4 L2
12 Explain Backtracking technique and write psuedocode of backtracking 10 CO4 L2
algorithm.
13 Explain about graph colouring problem with example. 10 CO4 L2

***

UNIT – 4 (2 Marks)
# Questions CO BL
1 Define Branch and Bound. CO1 L1
2 List the different search techniques of branch-and-bound. CO1 L1
3 Define least cost branch and bound (LCBB). CO1 L1
4 What is the importance of lower bound theory? CO1 L1
5 Define comparison trees. CO1 L1
6 Draw the comparison tree for linear search. CO1 L1
7 Give the upper bound and lower bound of matrix multiplication algorithm? CO1 L1
8 State the concept of branch and bound method? CO1 L1
9 Differentiate backtracking and branch bound techniques. CO1 L1

UNIT – 4 (5/10 Marks)


# Questions M CO BL
1 Write and explain the techniques used in branch and bound method with 10 CO5 L2
examples.
2 Explain the general method of Branch and Bound. 10 CO5 L2
3 Write FIFOBB algorithm for the 0/1 knapsack problem. 10 CO5 L2
4 Write LCBB algorithm for the 0/1 knapsack problem. 10 CO5 L2
5 What are the strengths of backtracking and branch-and-bound? 5 CO5 L2
6 State travelling salesperson problem. Apply LCBB to solve the TSP instantiated 10 CO5 L3
by the following cost matrix.

7 Explain the concept of multiplying triangular matrices. 5 CO5 L2


8 Explain the concept of inverting lower triangular matrix. 5 CO5 L2
***

UNIT – 5 (2 Marks)
# Questions M CO BL
1 Define NP-Complete. 2 CO1 L1
2 What is the difference between tractable and intractable? 2 CO1 L1
3 Define nondeterministic Polynomial. 2 CO1 L1
4 Define clique theorem. 2 CO1 L1
5 Define SAT problem. 2 CO1 L1
6 State Lemma theorem. 2 CO1 L1
7 Define P, NP problems.
***

UNIT – 5 (5/10 Marks)


# Questions M CO BL
1 Explain about Cook’s theorem. 10 CO6 L2
2 Explain about optimization problem with an example. 5 CO6 L2
3 Explain briefly, NP-hard and NP-complete problems. List some of the example 10 CO6 L2
of NP-complete problems.
4 Explain the approximation Algorithm for NP-hard Problem. 5 CO6 L2
5 Explain P, NP and NP complete problems. 5 CO6 L2
6 State and prove cook’s theorem that SAT is NP-complete. 10 CO6 L2
7 Explain Reducibility and prove Lemma. 5 CO6 L2
8 Explain non-deterministic polynomial time algorithm for clique problem. 5 CO6 L2
9 Discuss about Satisfialbility(SAT) Problem. 5 CO6 L2
10 State and prove Lemma theorem. 10 CO6 L2
11 Distinguish between deterministic and non-deterministic algorithms. 5 CO6 L2

You might also like