You are on page 1of 8

GURU NANAK INSTITUTE OF TECHNOLOGY

(A UGC Autonomous Institution – Affiliated to JNTUH)


Ibrahimpatnam, Ranga Reddy (District) - 501 506.

Branch: B.Tech. CSE, CSE(CSC) & (CSM) Year / Sem : III/I


Sub: Design and Analysis of Algorithms Sub code: 20PC0CS17/CY14/AI18
QUESTION BANK
Part –A:

2 Marks Questions:
Bloom’s
Q.
Unit No Question Taxonomy
No
Level
1 Define an algorithm L1
2 List the two major phases of performance evaluation. L1
3 What do you mean by space and time complexity? L1
4 What is the difference between profiling and debugging? L2
5 Define order of growth L1
Unit 1
6 What is the difference between little o and big O? L2
7 What is the use of divide and conquer method? L1
8 What is the time and space complexity of quick sort? L1
9 What is the recurrence relation of merge sort? L1
10 Give the formula for Strassen’s matrix multiplication L1
1 What is set? What is disjoint set? L1
2 What are the operations cane be performed on set? L1
3 How to represent the disjoint sets? L1
4 Write simple union and find algorithms L1
5 Define weighting rule L1
Unit 2
6 Define E-node and Live node L1
7 Differentiate the Dead node and Live node L2
8 What is a chromatic number? L1
9 List the applications of disjoint set L1
10 What is the need of collapsing find? L1
1 What is the use of dynamic programming? L1
2 State the principle of optimality L1
3 Define dominance rule L1
4 Define purging rule L1
5 List the applications of dynamic programming L1
Unit 3
6 State reliability system L1
7 What do you mean by optimal solution? L1
8 What is optimal binary search tree? L1
What is the difference between all pairs shortest path and single L2
9
source shortest path?
10 How dynamic programming is different from greedy method? L2
1 What is feasible solution? L1
2 What is greedy method? L1
3 What is cost adjacency matrix? L1
4 What is spanning tree? L1
5 Define 0/1 knapsack problem in view of greedy method L1
Unit 4
6 What do you mean by minimum cost spanning tree? L1
7 List the differences between tree and graph L2
8 How to find the number of spanning tree possible from graph? L1
9 What is the improved time complexity of Prims algorithm? L1
10 What is the improved time complexity of Kruskal algorithm? L1
1 What is the use of branch and bound technique? L1
2 Define bounding function L1
3 List the two types of search methods in branch and bound L1
4 What is the constraint used to expand the node in FIFOBB? L1
5 What is row and column reduction? L1
Unit 5
6 Define intelligent function or ranking function? L1
7 What is the relation between NP-hard and NP-complete? L2
8 Define NP problem L1
9 What is halting problem? L1
10 What is Clique problem? L1

Part –B:

10 Marks Questions:
Bloom’s
Q.
Unit No Question Taxonomy
No
Level
a. List the characteristics of an algorithm
L1
b. What is pseudo code?
1 L1
c. List the procedure to be followed to convert a problem into
L2
pseudocode with an example.
a. What are the characteristics of an algorithm?
L1
2 b. Write an algorithm to generate Fibonacci series and find the
L2
time complexity.
a. Define space and time complexity.
L1
Unit 1 3 b. Write an algorithm or pseudo code to sorting n numbers and
L2
find the time complexity.
a. What do you mean by asymptotic notations? L1
4 b. Define all the asymptotic notations. L1
c. Prove that 10n2+3n+3 = Ω(n2) L3
a. Discuss the Master theorem
L1
5 b. Solve the recurrence relations T(n) = T(n/2) + ½ n2 + n and
L3
T(n) = 2T(n/2) + nlogn
6 a. What is divide and conquer method? L1
b. Write the control abstraction of divide and conquer method. L1
c. What is the time complexity of DANDC while two sub L2
problems are approximately equal.
a. What is recurrence relation?
b. What are the methods available to solve the recurrence L1
7 relations? L1
c. Write the pseudo code or algorithm for binary search and time L3
complexity in worst, average and best case.
a. How to derive the recurrence relation of merge sort?
L2
b. Write the pseudo code or algorithm of merge sort and time
8 L1
complexity.
L3
c. 8,3,2,9,7,1,5,4 → Apply merge sort and sort the elements
a. Write the pseudo code or algorithm of quick sort and time
complexity in best & worst case L1
9
b. Apply quick sort algorithm and sort the data: 20, 35, 10, 16, L3
54, 21, 25
a. Write the pseudo code or algorithm for binary search
L1
10 b. 2,6,8,12,16,22,30 → apply binary search to search an element
L3
“16” and write the time complexity
a. What is disjoint set? L1
1
b. Explain the weighted union and collapsing find. L2
a. What are the applications of disjoint set? L1
2 b. Explain the algorithm for simple union, weighted union, L2
collapsing find.
a. What does the need of collapsing find?
b. Detect the cycle in the following graph using
array representation L2
3
L3

a. Discuss the backtracking technique with an


example L2
4
b. Detect the cycle in the following graph using L3
Unit 2 array representation
a. Detect the cycle in the following graph using array
representation

L3
5
b. In a class, there will be only one “three-seater” bench is L3
available. 2 boys and 1 girl must sit in that bench. Explain the
following using backtracking with state space tree
1. What are the possibilities of seating arrangements?
2. If “girl must not sit in between 2 boys” means, what are
the possibilities?
6 a. Write the N queens algorithm or pseudo code L1
b. In the board, 4 queens already placed. The remaining 4 queens L3
to be placed in the board in which position? Explain how to
be placed? (8 Queens Problem)
c. 7 5 3 1 ? ? ? ?
a. In the board, 4 queens already placed. The remaining 4 queens
to be placed in the board in which position? Explain how to
be placed? (8 Queens Problem)
L3
7 6 4 7 1 ? ? ? ?
L3
b. Solve the sum of subset problem.
Given weights [1 to 6] = {5,10,12,13,15,18}. Sum of weights
for subset (m) should be 30.
a. Explain the Backtracking technique using state space tree
with an example.
b. A tropical fish hobbyist has six different types of fish: A, B,
C, D, E, and F. Because of predator type relationships, water
condition, and size, some of the fish cannot be kept in the
same tank. The following table show which fish cannot be L2
8
together: L3
Type A B C D E F
Cannot
B,C A,C,E A,B,D,E C,F B,C,F D,E
be with
What is the smallest number of tanks needed to keep all the
fish? Using m-coloring find the solution.
a. GNIT is offering eight courses during summer session. The
table shows with an “X” which pairs of courses have one or
more students in common. Only two air-conditioned lecture
halls are available for use at any one time.
Maths Eng Che Phy PPS EG EDC BEE
Maths X X X X X
Eng X X X
Che X X X L3
9 Phy X X L1
PPS X X
EG X X X X X
EDC X X
BEE X X X
Using m-coloring algorithm, design an efficient way to
schedule the final examinations.
b. What are the applications of disjoint set?
a. Detect the cycle in the following graph using
array representation
L3
10 b. Solve the sum of subset problem.
L3
Given weights [1 to 6] = {3,4,34,5,2,12}.
Sum of weights for subset (m) should be 9.
a. What is the need of dynamic programming? What are the
1 different approaches used in dynamic programming? Explain L2
Unit 3 with an example.
a. Solve the following knapsack problem using tabulation L3
2
method. Profit = {11,21,31,33} W = {2,11,22,15} m = 40 L3
b. Compute all pairs shortest path for the
following graph

a. Find the Optimal Binary Search Tree for the following keys
Obj 1 2 3 4
Keys 10 20 30 40 L3
3 Frequency 4 2 6 3 L3
b. Solve the following knapsack problem using set method.
Profit = {1,2,5,6} W = {2,3,4,5} m = 8
a. What is the need of dynamic programming? What are the
different methods used in dynamic programming? Explain
L2
4 with an example
L3
b. Solve the following knapsack problem using set method.
Profit = {11,21,31,33} W = {2,11,22,15} m = 40
a. What is the need of dynamic programming? What are the
different methods used in dynamic programming? Explain
with an example
b. Compute all pairs shortest path for the L2
5
following graph L3

a. Discuss the memorization method used in dynamic


programming.
b. Find the maximum reliability with minimum cost for the
given data. Total cost is 105 $ L1
6
Di Ci Ri L3
D1 30 0.9
D2 15 0.8
D3 20 0.5
a. Describe the traveling salesman problem.
b. Find the minimum cost tour for the following graph using
dynamic programming. Cost of the edges are given by the
matrix shown L1
7
0 10 15 20 L3
5 0 9 10
6 13 0 12
8 8 9 0
a. Discuss the iteration method used in dynamic programming.
b. Solve the following knapsack problem using tabulation L1
8
method. L3
Profit = {1,2,5,6} W = {2,3,4,5} m = 8
a. Discuss the memorization method used in dynamic
L1
9 programming
L3
b. Solve the following knapsack problem using set method.
Profit = {1,2,5,6} W = {2,3,4,5} m = 8
a. Discuss the memorization method used in dynamic
programming
b. Find the Optimal Binary Search Tree for the following keys L1
10 Obj 1 2 3 4 L3
Keys 10 20 30 40
Frequency 4 2 6 3
a. What is greedy method? Discuss
b. Write the control abstraction of greedy method
c. Find the optimal solution for the knapsack problem using L1
1 greedy method where m=15 L1
Obj 1 2 3 4 5 6 7 L3
Profit 5 10 15 7 8 9 4
Weight 1 3 5 4 1 3 2
a. Discuss the greedy method.
b. Find the optimal solution for the knapsack problem using
greedy method where m=20 L1
2
Obj 1 2 3 L3
Profit 25 24 15
Weight 18 15 10
a. What is the need of greedy method?
b. Solve the Job sequencing with deadline problem using greedy
method L2
3
Jobs 1 2 3 4 5 L3
Profit 20 15 10 5 1
Dead line 2 2 1 3 3
a. Discuss the Prim’s algorithm to find the minimum cost
spanning tree
Unit 4 b. Apply the Prim’s algorithm and find the optimal solution
L1
4
L3

a. Discuss the Kruskal’s algorithm to find the minimum cost


spanning tree. What is the time complexity of Kruskal’s
algorithm? L1
b. Apply the Kruskal’s algorithm and find the optimal solution
5
L3

a. Explain the Prim’s algorithm. What is the time complexity of


Prim’s algorithm?
L1
b. Apply the Prim’s algorithm and find the optimal solution
6
L3
a. Write the pseudo code or algorithm for Dijkstra’s single
shortest path algorithm
b. Apply Dijkstra’s algorithm to find L1
7
the shortest path of the given graph L3

a. What is single source shortest path


problem?
b. Apply Dijkstra’s algorithm to find the L1
8
shortest path of the given graph L3

a. Discuss the greedy method.


b. Apply the Prim’s algorithm find the optimal solution
L1
9
L3

a. Discuss the greedy method


b. Solve the Job sequencing with deadline problem using greedy
method L1
10
Jobs 1 2 3 4 5 6 7 L3
Profit 35 30 25 20 15 12 5
Dead line 3 4 4 2 3 1 2
a. Discuss the branch and bound technique
b. Apply LCBB and find the shortest path L1
1
L3

a. What is LCBB method?


b. Apply LCBB to solve the knapsack problem where m=15 L1
2 Obj 1 2 3 4
Profit 10 10 12 18
L3
Weight 2 4 6 9
a. Apply FIFOBB to solve the knapsack problem where m=15
Obj 1 2 3 4
3 Profit 10 10 12 18
L3
Weight 2 4 6 9

Unit 5 a. What is P and NP? Discuss. L1


4
b. Explain the non-deterministic sorting algorithm L2
a. Discuss the cook’s theorem L1
5
b. Discuss the 3 CNF Satisfiability problem L1
a. Discuss NP-Hard and NP-Complete L1
6
b. Discuss the Cook’s theorem L1
a. Discuss the non-deterministic algorithms L1
7
b. Discuss the branch and bound technique L1
Apply LCBB to solve the knapsack problem where m=60
Obj 1 2 3 4 5
8 Profit 30 40 45 77 90
L3
Weight 5 10 15 22 25

9 a. Apply FIFOBB to solve the knapsack problem where m=7 L3


Obj 1 2 3
Profit 6 5 4 L2
Weight 5 4 3
b. What is NP-Hard and NP-complete?
10 Explain the branch and bound technique with an example L2

You might also like