Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Reg. No.

:
Name :

Mid-Term Examinations – October 2021


Programme : B.Tech(CSE) Semester : Fall 2021-22
Course : Design and Analysis of Algorithms Code : CSE3004
Faculty : Dr. Praveen Lalwani Slot/ Class No. : D11+D12+D13/0354
Time : 1 ½ hours Max. Marks : 50

Answer all the Questions

Sub.
Q.No. Question Description Marks
Sec.

1 Explain the Travelling Salesman Problem and provide the conditions when it
is solution of the problem is captured and when the problem becomes 10
unsolvable.
2 (a) A file contains the following characters with the frequencies as shown. If
Huffman Coding is used for data compression, determine-
1. Huffman Code for each character
2. Average code length
3. Length of Huffman encoded message (in bits)
Characters Frequencies 10
A 36
E 15
I 30
O 3
U 4
S 13
T 6
3 Find the maximum profit of below mentioned task using the job scheduling
procedure.

Tasks Deadlines Profit

1 8 15

2 2 2 10

3 5 18

4 7 1

5 4 25

Page 1 of 2
6 2 20

7 5 8

8 4 10

9 4 12

10 3 5

4 Write a Program to search a pattern “Bhopal” in Text “VIT Bhopal, VIT


Chennai, VIT Amravati, VIT Vellore” using the Naive Algorithm and print 10
the index.
5 Exemplify the concept of hashing in Rabin Karp Algorithm and how it reduces
10
the complexity of the algorithm.


Page 2 of 2

You might also like