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

Set-2 - ESE - Dec22 - B TECH (CSE+AI&ML) - B TECH (CSE+AI&ML) - (Hons.) - III - CSEG2021 - Design and Analysis of Algorithm

Uploaded by

Agam Vishwas
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)
15 views2 pages

Set-2 - ESE - Dec22 - B TECH (CSE+AI&ML) - B TECH (CSE+AI&ML) - (Hons.) - III - CSEG2021 - Design and Analysis of Algorithm

Uploaded by

Agam Vishwas
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

Name:

Enrolment No:

UNIVERSITY OF PETROLEUM AND ENERGY STUDIES


End Semester Examination, December 2022
Course: Design and Analysis of Algorithms Semester: III
Program: B.Tech Time: 03 hrs.
Course Code: CSEG 2022 Max. Marks: 100

Instructions: All questions of the section A is mandatory. In section B, attempt any one of the Q 9 and Q 10.
In section C, attempt either Q 12 or Q 13. Remaining questions from sections B and C are mandatory.
SECTION A
(5Qx4M=20Marks)
S. No. Marks CO
Q1 What is an algorithm and how it is different from a program? 3+1 CO1
Q2 Solve the recurrence relation using Master Theorem T(n) = 4T(n/3) + n2 4 CO2
Q3 Find the solution to the following recurrence equation
4 CO1
T(n)=T(n/2)+1 with the base condition as T(1)=1
Q4 Derive the time complexity of Quick sort algorithm for worst case. 4 CO2
Q5 Distinguish between Dynamic Programming and Greedy method. 4 CO3
SECTION B
(4Qx10M= 40 Marks)
Q6 What is a Spanning tree? Explain Prim’s Minimum cost spanning tree
2+6+2 CO3
algorithm with suitable example
Q7 Describe asymptotic notations? Illustrate any three notations with
2+8 CO1
diagrams. How the performance can be analyzed with these notations?
Q8 Explain Activity Selection problem in detail with suitable example? 10 CO2
Q9 Explain Task Scheduling Problem with deadline and Penalty.

OR 10 CO4

Q 10 Describe the Dynamic 0/1 Knapsack Problem. Find an optimal solution


for the dynamic programming 0/1 knapsack instance for n=3, m=6, 2+8 CO4
profits are (p1, p2, p3 ) = (1,2,5), weights are (w1,w2,w3)=(2,3,4).
SECTION-C
(2Qx20M=40 Marks)
Q 11 Explain Huffman coding with its characteristics.
Consider the following characters with their frequencies in a file 3+8+3+3+3 CO3
a-10, e-15, i-12, o-3, u-4, s-13, t-1. If Huffman coding is used for data
compression, determine
i) Create a Huffman tree for the following message
ii) Huffman code for each character
iii) Average code length
iv) Length of Huffman encoded message (in bits)
Q 12 i) Explain Merge sort with its characteristics
ii) Apply merge sort algorithm to arrange the following array of
numbers in increasing order
100, 55, 70, 1, 30, 75, 27, 5, 25, 34
iii) Is merge sort a stable sort? 4+8+2+6 CO3
iv) Find the time complexities if the algorithm in worst and best
cases.
OR

Q 13 What is Radix sort and how it is different from the comparison-based


sorting? Consider the following keys and apply Radix sorting algorithm
to arrange the keys in non-decreasing order 5+10+5 CO4
171,290, 111, 144, 97, 836, 414, 189, 212. Find the time complexities in
all the three cases.

You might also like