0% found this document useful (0 votes)
19 views3 pages

Gujarat Technological University

https://839ryhea6uecfehekgwmwwcuklqce32s.oastify.com

Uploaded by

cokoka3983
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)
19 views3 pages

Gujarat Technological University

https://839ryhea6uecfehekgwmwwcuklqce32s.oastify.com

Uploaded by

cokoka3983
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/ 3

Seat No.: ________ Enrolment No.

___________

GUJARAT TECHNOLOGICAL UNIVERSITY


BE - SEMESTER–V (NEW) EXAMINATION – WINTER 2022
Subject Code:2150703 Date:04-01-2023
Subject Name:Analysis and Design of Algorithms
Time:10:30 AM TO 01:00 PM Total Marks:70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
4. Simple and non-programmable scientific calculators are allowed.

MARKS

Q.1 (a) What is an algorithm? What are the properties of an algorithm? 03


(b) Explain the Big-Oh computation for each of the following control 04
structures.
(a) If-then-else (c) sequencing
(b) for loop (d) recursion
(c) Analyze the Insertion Sort algorithm in best and worst case. 07

Q.2 (a) Explain Asymptotic notations with examples. 03


(b) Solve the recurrence following relation. 04
T(n) = T(n/3) + T(2n/3) + Ө(n)
(c) Sort the list: 415, 213, 700, 515, 712, 615 using merge sort algorithm and 07
also explain the time complexity of merge sort algorithm.
OR
(c) Arrange the following data into ascending order using heap sort. Make 07
necessary assumptions if required. 34, 12, 42, 96, 56, 11, 78

Q.3 (a) Explain the Strassen’s matrix multiplication algorithm. Obtain its time 03
complexity.
(b) Find multiplication (A x B) of A = 2341 and B = 6780 using divide and 04
conquer methodology.
(c) Explain the concept of greedy technique for Prim’s algorithm. Also obtain 07
the Minimum Spanning Tree from the following graph.

OR
Q.3 (a) Arrange following growth rates in increasing order. 03
O(n1/4), O(n1.5), O(n3 log n), O(n1.02), Ω(n6 ), Ω(n!), O(√n), O(n6/2), Ω(2n )

1
(b) Demonstrate Binary Search method to search Key = 14, form the array A= 04
{1,3,5,7,8,14,15,20}
(c) What are the Huffman trees? Construct the Huffman code for the 07
following data:
Character A B C D E F
Frequency 0.5 0.35 0.2 0.1 0.4 0.6

Q.4 (a) Write an algorithm for Naïve-String-Matching algorithm. 03


(b) Using the Dijkstra’s algorithm find the shortest path from A to F from the 04
following graph.

(c) Using Dynamic programming solve the below instance of the knapsack 07
problem with the knapsack capacity W=5

Item I1 I2 I3 I4
Weight 2 1 3 2
Value 12 10 20 15
OR
Q.4 (a) Explain string matching using finite automata with suitable example. 03
(b) Using Floyd Warshall’s algorithm find the shortest path distance between 04
every pair of vertices from the following graph.

(c) Find the total number of multiplications and optimal multiplication 07


sequence for the following three matrices using dynamic programming.
A = 5 x 5, B = 5 x 4, C = 4 x 8, C = 8 x 2

Q.5 (a) Differentiate between depth first search and breadth first search. 03
(b) Explain use of branch and bound technique for solving assignment 04
problem.
(c) Apply backtracking to the problem of finding Hamilton circuit in the 07
graph shown below.

OR

2
Q.5 (a) Draw the state space tree Diagram to generate the solutions to 03
4-Queen problem.
(b) Explain polynomial-time reduction algorithm. 04
(c) Demonstrate Topological sort for the following graph. 07

*************

You might also like