Daa Lab 2024
Daa Lab 2024
6. Implement any scheme to find the optimal solution for the Traveling
Sales Person problem and then solve the same problem instance using
any approximation algorithm and determine the error in the
approximation.
Page 4 of 3
9. In Knapsack problem we are given:1) n objects 2) Knapsack with capacity m, 3) An
object i is associated with profit Wi , 4) An object i is associated with profit Pi , 5)
when an object i is placed in knapsack we get profit Pi Xi .Here objects can be broken
into pieces (Xi Values). Find Optimal solution for a Knap Sack Problem using Greedy
Method
Page 5 of 3
11. From a given vertex in a weighted connected graph, find shortest paths to other
vertices using Dijkstra’s algorithm.
Warshall's algorithm.
Page 6 of 3
INTERNAL EXAMINER EXTERNAL EXAMINER
14. You are given an array of coins with varying denominations and an integer sum
representing the total amount of money; you must return the fewest coins required to
make up that sum; if that sum cannot be constructed, return -1.
15. Let there be four characters a, b, c and d, and their corresponding variable length
codes be 00, 01, 0 and 1. This coding leads to ambiguity because code assigned to c is
the prefix of codes assigned to a and b. If the compressed bit stream is 0001, the de-
compressed output may be “cccd” or “ccb” or “acd” or “ab”. Build a Huffman Tree
from input characters. Traverse the Huffman Tree and assign codes to characters.
Aim & Program(30) Results(30) Viva-Voce Record(10) Total(100)
Procedure(20) (10)
Page 7 of 3
16. Find a subset of a given set S = {sl, s2... sn} of n positive integers whose sum is equal
to a given positive integer d. For example, if S={1, 2, 5, 6, 8} and d = 9 there are two
solutions {1, 2, 6} and {1,8}.A suitable message is to be displayed if the given problem
instance doesn't have a solution.
18. Build an optimal solution by iterative refinement of a feasible solution for the
complete problem by using any iterative method.
Page 8 of 3
19. Implement any scheme to find the optimal solution for the Traveling Sales Person
problem and then solve the same problem instance using any approximation
algorithm and determine the error in the approximation.
20. Assume that you have N workers and N jobs that should be done. For each pair
(worker, job) you know salary that should be paid to worker for him to perform the
job. Our goal is to complete all jobs minimizing total inputs, while assigning each
worker to exactly one job and vice versa.
Page 9 of 3