0% found this document useful (0 votes)
0 views2 pages

Sample Paper Daa

The document is a sample paper for a Data Structures and Algorithms (DAA) course, containing various questions related to algorithmic problems such as the coin problem, optimal binary search trees, Huffman coding, the 0/1 knapsack problem, activity selection, all-pair shortest path, and matrix chain multiplication. Each question requires the application of specific algorithms and concepts to solve problems or illustrate theoretical concepts. It also notes that the questions may vary and emphasizes the need to cover complete units for theoretical questions.

Uploaded by

vikasprajapat051
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)
0 views2 pages

Sample Paper Daa

The document is a sample paper for a Data Structures and Algorithms (DAA) course, containing various questions related to algorithmic problems such as the coin problem, optimal binary search trees, Huffman coding, the 0/1 knapsack problem, activity selection, all-pair shortest path, and matrix chain multiplication. Each question requires the application of specific algorithms and concepts to solve problems or illustrate theoretical concepts. It also notes that the questions may vary and emphasizes the need to cover complete units for theoretical questions.

Uploaded by

vikasprajapat051
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/ 2

SAMPLE PAPER FOR DAA

Q1: Apply the coin problem with regards to the following data: Input: sum = 15,
coins [] = {1, 2, 3, 4}
Q2: Construct an optimal binary search tree for the following Five–key set
Key A B C D E
0.2 0.3 0.4 0.5 0.6
Probability

Q3: A file contains the following characters with the frequencies as shown. If
Huffman Coding is used for data compression, determine-
1. Average code length
2. Length of Huffman encoded message (in bytes)
Characters Frequencies
h 1
e 1
l 3
o 2
w 1
r 1
d 1

Q4: Find an optimal solution to the 0/1, knapsack problem given the knapsack
capacity in W=10 using dynamic programming
Item Weight Value
1 3 $13
2 3 $22
3 3 $15
4 3 $20
Q5: Solve the activity selection problem using the greedy approach for the
followings set of activities: Set of activities, A = Start time S = <0, 1, 3, 4, 5, 7>
Finish time F = <4, 5, 4, 7, 9, >
Q6: Illustrate the all-pair shortest path problem algorithm. And calculate the all-
pair shortest path problem for the digraph
with the weighted matrix given below:
a b c d
a 2 α 6 2
b 3 3 α α
c α 9 4 1
d 6 7 α 5

Q7: Explain the concept of Matrix Chain Multiplication with the example: The
matrices have sizes 5 x 7, 7 x 3, 3 x 9, 9 x 10, and 10 x 7. We know M [i, i] = 0
for all i.

NOTE: I am sharing a sample question for numerical-type questions. It is not


compulsory that questions can be the same type. It is only an assumption-
based sample paper.
For theoretical questions, you need to cover the complete unit. Definition,
Algorithms, Complexity.

You might also like