0% found this document useful (0 votes)
12 views9 pages

Daa Lab 2024

Uploaded by

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

Daa Lab 2024

Uploaded by

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

1. Perform In order Tree Traversal without Recursion.

Aim & Program(30) Results(30) Viva-Voce Record(10) Total(100)


Procedure(20) (10)

INTERNAL EXAMINER EXTERNAL EXAMINER

2. Given two square matrices A and B of size n x n each, find their


multiplication matrix by using the concept of Strassen’s Matrix
Multiplication.

Aim & Program(30) Results(30) Viva-Voce Record(10) Total(100)


Procedure(20) (10)

INTERNAL EXAMINER EXTERNAL EXAMINER


3. Sort a given set of elements using the quick sort method and determine
the time required to sort the elements. Repeat the experiment for different
values of n, the number of elements in the 1st to be sorted and plot a
graph of the time taken versus n. The elements can be read from a file or
can be generated using the random number generator.

Aim & Program(30) Results(30) Viva-Voce Record(10) Total(100)


Procedure(20) (10)

INTERNAL EXAMINER EXTERNAL EXAMINER

4. Implement merge sort algorithm to sort a given set of elements and


determine the time required to sort the elements. Repeat the experiment
for different values of n, the number of elements in the list to be sorted
and plot a graph of the time taken versus n. The elements can be read
from a file or can be generated using the random number generator.

Aim & Program(30) Results(30) Viva-Voce Record(10) Total(100)


Procedure(20) (10)

INTERNAL EXAMINER EXTERNAL EXAMINER


5. i) Obtain the topological ordering of vertices in a digraph.

ii) Compute the transitive closure of a directed graph using Warshall`s


algorithm

Aim & Program(30) Results(30) Viva-Voce Record(10) Total(100)


Procedure(20) (10)

INTERNAL EXAMINER EXTERNAL EXAMINER

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.

Aim & Program(30) Results(30) Viva-Voce Record(10) Total(100)


Procedure(20) (10)

INTERNAL EXAMINER EXTERNAL EXAMINER


7. Implement All-Pairs Shortest Paths Problem using Floyd's algorithm.

Aim & Program(30) Results(30) Viva-Voce Record(10) Total(100)


Procedure(20) (10)

INTERNAL EXAMINER EXTERNAL EXAMINER

8. Implement N Queen's problem using Back Tracking

Aim & Program(30) Results(30) Viva-Voce Record(10) Total(100)


Procedure(20) (10)

INTERNAL EXAMINER EXTERNAL EXAMINER

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

Aim & Program(30) Results(30) Viva-Voce Record(10) Total(100)


Procedure(20) (10)

INTERNAL EXAMINER EXTERNAL EXAMINER

10. Implement 0/1 Knapsack problem using Dynamic Programming

Aim & Program(30) Results(30) Viva-Voce Record(10) Total(100)


Procedure(20) (10)

INTERNAL EXAMINER EXTERNAL EXAMINER

Page 5 of 3
11. From a given vertex in a weighted connected graph, find shortest paths to other
vertices using Dijkstra’s algorithm.

Aim & Program(30) Results(30) Viva-Voce Record(10) Total(100)


Procedure(20) (10)

INTERNAL EXAMINER EXTERNAL EXAMINER

12. a. Obtain the Topological ordering of vertices in a given digraph

b. Compute the transitive closure of a given directed graph using

Warshall's algorithm.

Aim & Program(30) Results(30) Viva-Voce Record(10) Total(100)


Procedure(20) (10)

Page 6 of 3
INTERNAL EXAMINER EXTERNAL EXAMINER

13. Implement All-pairs shortest paths problem using Floyd`s algorithm.


Parallelize this algorithm, implement and determine the speed-up achieved.
Aim & Program(30) Results(30) Viva-Voce Record(10) Total(100)
Procedure(20) (10)

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.

Aim & Program(30) Results(30) Viva-Voce Record(10) Total(100)


Procedure(20) (10)

INTERNAL EXAMINER EXTERNAL EXAMINER

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)

INTERNAL EXAMINER EXTERNAL EXAMINER

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.

Aim & Program(30) Results(30) Viva-Voce Record(10) Total(100)


Procedure(20) (10)

INTERNAL EXAMINER EXTERNAL EXAMINER

17. Implement N Queen's problem using Back Tracking

Aim & Program(30) Results(30) Viva-Voce Record(10) Total(100)


Procedure(20) (10)

INTERNAL EXAMINER EXTERNAL EXAMINER

18. Build an optimal solution by iterative refinement of a feasible solution for the
complete problem by using any iterative method.

Aim & Program(30) Results(30) Viva-Voce Record(10) Total(100)


Procedure(20) (10)

INTERNAL EXAMINER EXTERNAL EXAMINER

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.

Aim & Program(30) Results(30) Viva-Voce Record(10) Total(100)


Procedure(20) (10)

INTERNAL EXAMINER EXTERNAL EXAMINER

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.

Aim & Program(30) Results(30) Viva-Voce Record(10) Total(100)


Procedure(20) (10)

INTERNAL EXAMINER EXTERNAL EXAMINER

Page 9 of 3

You might also like