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

Gujarat Technological University

This document outlines the examination details for the Analysis and Design of Algorithms course at Gujarat Technological University, scheduled for December 17, 2024. It includes instructions for the exam, a breakdown of questions covering various algorithmic concepts such as sorting, dynamic programming, and graph algorithms, along with their respective marks. The exam consists of five questions, each with multiple parts requiring definitions, algorithm writing, and problem-solving.

Uploaded by

rohitrahul2909
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)
16 views2 pages

Gujarat Technological University

This document outlines the examination details for the Analysis and Design of Algorithms course at Gujarat Technological University, scheduled for December 17, 2024. It includes instructions for the exam, a breakdown of questions covering various algorithmic concepts such as sorting, dynamic programming, and graph algorithms, along with their respective marks. The exam consists of five questions, each with multiple parts requiring definitions, algorithm writing, and problem-solving.

Uploaded by

rohitrahul2909
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

Enrolment No.

/Seat No_______________

GUJARAT TECHNOLOGICAL UNIVERSITY


BE- SEMESTER–V (NEW) EXAMINATION – WINTER 2024
Subject Code:3150703 Date:17-12-2024
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) Define the following terms: 03
i) Function in mathematics ii) Linear inequalities
(b) Explain the need of amortized notation. Explain with suitable example. 04
(c) Write an algorithm for insertion sort. Calculate the best, average and worst 07
case complexity of it.

Q.2 (a) Sort the following elements using counting sort. 03


2, 5, 3, 0, 2, 3, 0, 3
(b) Sort the following elements using bucket sort. 04
10, 21, 29, 41, 52
(c) Write the Master theorem. Solve following recurrence using it. 07
(i)T(n)= 3T(n/2) + n2
(ii) T(n)=2T(n/2) + n log n
OR
(c) Write binary search algorithm using recursion. Derive its recurrence 07
relation. Calculate its complexity using master theorem.

Q.3 (a) Explain the steps of greedy strategy for solving a problem. 03
(b) Write an algorithm for Max-Min problem using divide and conquer 04
approach. Calculate its complexity.
(c) The matrices A(5X10), B(10X15), C(15X20), and D(20X25) are given. 07
Solve the matrix chain multiplication problem using dynamic programming.
OR
Q.3 (a) Enlist the general characteristics of greedy algorithms. 03
(b) Write an algorithm for matrix multiplication using divide and conquer 04
approach. Calculate its complexity.
(c) For the given set of items and knapsack capacity = 5 kg, find the optimal 07
solution for the 0/1 knapsack problem using dynamic programming.
Item Weight Value
I1 2 3
I2 3 4
I3 4 5
I4 5 6

Q.4 (a) Explain DFS with suitable example. 03


(b) Enlist the advantages and disadvantages of dynamic programming. 04

1
(c) Define minimum spanning tree. Explain Prim’s algorithm with suitable 07
example.
OR
Q.4 (a) Explain BFS with suitable example. 03
(b) Define principal of optimality. Explain its use in Dynamic Programming 04
Method.
(c) "A greedy strategy will work for fractional Knapsack problem but not for 07
0/1", is this true or false? Explain with suitable example.

Q.5 (a) Define string matching problem. Define valid shift and invalid shift. 03
(b) Define the followings: 04
i) Articulation point ii) Acyclic Directed Graph iii) Back Edge iv) Tree
(c) Explain P, NP, NP complete and NP-Hard problems. Give examples of each. 07
OR
Q.5 (a) Explain Backtracking Method. Give solutions for 4-queens problem using 03
backtracking method.
(b) Explain in-order, pre-order and post-order traversals of the graph. 04
(c) Write short note on the followings: 07
i) Approximation algorithms
ii) Randomized algorithms

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

You might also like