You are on page 1of 2

RN SHETTY TRUST®

RNS INSTITUTE OF TECHNOLOGY


Affiliated to VTU, Recognized by GOK, Approved by AICTE, New Delhi
(NAAC ‘A+ Grade’ Accredited, NBA Accredited (UG - CSE, ECE, ISE, EIE and EEE)
Channasandra, Dr. Vishnuvardhan Road, Bengaluru - 560 098
Ph:(080)28611880,28611881 URL: www.rnsit.ac.in
DEPARTMENT OF INFORMATION SCIENCE & ENGINEERING

DAA ASSIGNMENT - 1 FOR IV SEM STUDENTS

1 a. Give the general divide and conquer recurrence relation and explain the same. Mention the use of
master’s theorem in solving recurrence relation with an example.

b. Write the quick sort algorithm. Analyse its efficiency. Apply the algorithm to sort the list
9, 1, 6, 3, 9, 2, 7, 5

2 a. Compare BFS with DFS


b. Write an algorithm for topological sort of a diagraph using DFS and Source removal algorithm. Apply
both algorithm for the following graph

3 a. Write Prims and Kruskal algorithm and their complexities


b. Find MST using Prims and Kruskal algorithm for the following graph

4 a. Write SSSP algorithm and its complexity


b. Solve the following instances of the single source shortest path problem with vertex ‘a’ as

the source.

5 a. Write algorithms for Heap sort to sort the elements using bottom up and top-down approach.
b. Apply bottom up and top-down approach for the following data to construct Heap.
30,40,50,60,60,50,40,30,20
6 a Compare Divide and Conquer technique with Greedy Techniques
b. Solve the following instance of Greedy knapsack problem. n=7,
[w1, w2, w3, w4, w5, w6. w7 ]=[1 3 5 4 1 3 2]
[p1,p2,p3,p4,p5,p6,p7]=[10,15,7,8,9,4] and M=15.

7 a. State the Job Sequencing with Deadlines problem.


b. Obtain an optimal schedule for the following jobs with n=6, profits = [12, 8, 5, 15,
30,15] and deadlines [3, 2, 1, 1, 3,4] respectively.

8 a. What is the importance of Huffman encoding Techniques.

b. Construct Huffman tree and decode DAD_CD for the below given input.

Alphabet A B C D E _
Frequencies 0.35 0.15 0.2 0.2 0.25 0.40

9 a. Compare Kruskal’s and Prims algorithm algorithms.


b. Write an Algorithm to find maximum and minimum using divide and conquer method.
Also show recursive tree for n =8.

10 a. Justify with an example how Insertion sort belongs to Decrease and Conquer
b. Sort the following data using Insertion Sort and show the order of elements after each iteration.
30,40,50,60,60,50,40,30,20

You might also like