Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
34 views5 pages

DSA-II Assignment-3

This document outlines an assignment for the Data Structures and Algorithms-II course for the academic session 2024-25, detailing various questions related to algorithms, data structures, and problem-solving techniques. The assignment includes topics such as knapsack problems, graph coloring, Hamiltonian cycles, and tree structures, with specific tasks and knowledge levels assigned to each question. Students are instructed to submit their work in PDF format by the due date, with penalties for plagiarism.

Uploaded by

maryan020806
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views5 pages

DSA-II Assignment-3

This document outlines an assignment for the Data Structures and Algorithms-II course for the academic session 2024-25, detailing various questions related to algorithms, data structures, and problem-solving techniques. The assignment includes topics such as knapsack problems, graph coloring, Hamiltonian cycles, and tree structures, with specific tasks and knowledge levels assigned to each question. Students are instructed to submit their work in PDF format by the due date, with penalties for plagiarism.

Uploaded by

maryan020806
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Data Structures And Algorithms-II SESSION: 2024-25

(BCSE-0401)
COURSE/SEM: B.TECH/IVth
UNIT-IV & V
Assignment Given Date: 17/05/2025
Assignment Submission Date: 02/06/2025 MAXIMUM MARKS: 10
Faculty Name: - MOHIT KUMAR Faculty Mail Id: [email protected]
INSTRUCTIONS:

1. Submit the assignment before the due date.


2. Avoid copying the assignment, if found student will be penalized accordingly.
3. Mention all the necessary details in your pdf file. All assignments should be in a pdf file format. No
other format will be entertained.

BLOOM’S
Q. No. Question Statement CO KNOWLEDGE
LEVEL
1. Discuss the difference between Backtracking and Branch 4 K1
and Bound Programming style with relevant examples for
both.
2. For the given set of items and knapsack capacity = 5 kg, find 4 K3
the optimal solution for the 0/1 knapsack problem making use
of dynamic programming approach.

ITEM WEIGHT PROFIT


1 2 3
2 3 4
3 4 5
4 5 6

3. A thief enters a house for robbing it. He can carry a 4 K3


maximal weight of 10 kg into his bag. There are 4 items in
the house with the following weights and values. What items
should thief take if he either takes the item completely or
leaves it completely?

ITEM WEIGHT VALUE


MIRROR 4 10
SILVER 5 20
PAINTING 3 15
VASE 3 12
4. Let us consider that the capacity of the knapsack W=80 and 4 K3
the list of provided items are shown in the table:

ITEMS 1 2 3 4
PROFIT 120 60 60 100
WEIGHT 30 60 20 50
5. Solve the Travelling salesman problem: 4 K2

6. Solve the Travelling Salesman Problem: 4 K2

7. Discuss n-Queen Problem with n=4. Provide a solution space 4 K2


tree and position to place the queen.
8. Give the backtracking algorithm to color the graph. 4 K1

9. Find out the graph coloring solution by constructing the state 4 K2


space tree.

Color={R,G,B}
10. Find out the graph coloring solution by constructing the state 4 K2
space tree.

11. Discuss Hamiltonian Cycle. Also, give algorithm to find 4 K1


Hamiltonian cycle in a closed and connected graph using
backtracking algorithm.
12. Find the Hamiltonian Cycle using backtracking algorithm. 4 K2
Draw the state space tree for all the cycles found if more than
one.

13. Find the Hamiltonian Cycle using backtracking algorithm. 4 K2


Draw the state space tree for all the cycles found if more than
one.

14. Given a set[] of non-negative integers and a value sum, the


task is to print the subset of the given set whose sum is equal
to the given sum. Construct the solution space tree using
backtracking algorithm.

 N=5, W=21
4 K2
W1=5, W2=6, W3=10, W4=11, W5=16
 N=4, W=13
W1=3, W2=4, W3=5, W4=6

15. Differentiate between a B-Tree, B.S.T. and B+ Tree. 5 K1

16. Create a B-Tree by inserting all the even numbers between 1- 5 K2


20 of order 4 and 3 respectively.
17. Provide the algorithm to search, insert and splitting a full 5 K3
node in B-Tree.
18. Construct a B-Tree of degree t=3 for following keys. 5 K3
F, S, Q, K, C, L, H, T, V, W, M, R, N, P, A, B, X, Y, D, Z, E,
G, I.
19. After creating the B-Tree in question no. 18 delete the 5 K2
following keys:
Z,C,M,K,B,Q.
20. Construct a B+ Tree of degree t=3 AND t=4 for following 5 K2
keys.
F, S, Q, K, C, L, H, T, V, W, M, R, N, P, A, B, X, Y, D, Z, E,
G, I.
21. After creating the B+ Tree in question no. 20 delete the 5 K2
following keys:
Z,C,M,K,B,Q.
22. Give the comparison between RB- Tree and AVL Tree. 5 K1

23. Create a Red-Black Tree by inserting the following nodes: 5 K2

25,10,11,7,15,30,2,21,25,19,14,16,28,33
24 Perform deletion in the Red-Black Tree created in question 5 K2
number 23 in the following order:
30,14,21,28,19
25 Differentiate between Binomial and Fibonacci Heaps Data 5 K1
Structures.
26. Discuss the properties of Binomial And Fibonacci Heaps. 5 K1

27. Demonstrate the operations on Binomial Heap by taking the 5 K2


following nodes.
I. Create a Binomial Heap by using the following nodes:
25,10,3,43,11,15,40,32,19,2,17,33,35,7,21
II. Decrease 32 by 31 times.
III. Extract minimum key.
IV. Delete 25.

28. Demonstrate the operations on Fibonacci Heap by taking the 5 K2


following nodes.
I. Create a Fibonacci Heap by using the following nodes:
25,10,3,43,11,15,40,32,19,2,17,33,35,7,21
II. Extract the minimum key

You might also like