2nd Assignment Questions 2024-2025-1
2nd Assignment Questions 2024-2025-1
Semester: IV Section: A, B, C & D Subject Code: BCS401 Subject: Analysis & Design of Algorithms
Blooms
Qn. No. Questions CO`s
Level
MODULES 3, 4 & 5
1 Define heap. Explain the properties of heap along with its representation. CO3 L2
2 Construct bottom up heap for the list 2,9,7,6,5,8. Obtain its time complexity. CO3 L3
Apply Heap Sort to sort the list of numbers 2, 9, 7, 6, 5, 8 in ascending order
3 CO3 L3
using array representation.
4 Define AVL Trees. Explain its four rotation types. CO3 L2
Construct a minimum cost spanning tree using Kruskals algorithm for the
following graph.
5 CO4 L3
Define Huffman Trees. Construct the Huffman tree for the following data.
Character A B C D E -
6 CO4 L3
Probability 0.5 0.35 0.5 0.1 0.4 0.2
Encode DAD-CBE using Huffman Encoding.
Apply Dijkstra’s algorithm to find single source shortest path for the given
graph by considering S as the source vertex.
7 CO4 L3
Define transitive closure of a graph. Apply Warshalls algorithm to compute
transitive closure of a directed graph.
8 CO3 L3
Apply Floyds algorithm to find the all-pairs shortest path for the given graph.
9 CO3 L3
Construct a minimum cost spanning tree using Prims algorithm for the
following graph.
10 CO4 L3
Construct a matrix to find the best profit for the following instance of 0/1
Knapsack problem.
11 W = (2,1,3,2) CO3 L3
P = (12,10,20,15)
M=5
Explain the following with examples
i) P problem
12 ii) NP Problem CO5 L2
iii) NP- Complete problem
iv) NP – Hard Problems
What is backtracking? Apply backtracking to solve the below instance of sum
13 CO6 L3
of subset problem S={5,10,12,13,15,18}, d=30.
14 Illustrate N queen’s problem using backtracking to solve 4-Queens problem. CO6 L3
Solve the following instance of knapsack problem by branch-and-bound
algorithm. Construct the state space tree.
Item Weight Value
1 4 40
15 CO6 L3
2 7 42
3 5 25
4 3 12
Capacity of Knapsack is 10.