0% found this document useful (0 votes)
17 views

Analysis and Design of Algorithms

This document is a progress assessment test for the subject Analysis and Design of Algorithms. It contains two questions with multiple parts. Question 1 asks students to list characteristics of algorithms and illustrate a heapify operation on a given array. It also contains parts asking students to solve algorithm problems related to string sorting and analyzing time complexities. Question 2 compares greedy and dynamic programming methods, and contains parts that ask students to solve problems using greedy algorithms, explain Dijkstra's algorithm, and find a minimum spanning tree using Prim's algorithm on a given graph.

Uploaded by

capota3822
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Analysis and Design of Algorithms

This document is a progress assessment test for the subject Analysis and Design of Algorithms. It contains two questions with multiple parts. Question 1 asks students to list characteristics of algorithms and illustrate a heapify operation on a given array. It also contains parts asking students to solve algorithm problems related to string sorting and analyzing time complexities. Question 2 compares greedy and dynamic programming methods, and contains parts that ask students to solve problems using greedy algorithms, explain Dijkstra's algorithm, and find a minimum spanning tree using Prim's algorithm on a given graph.

Uploaded by

capota3822
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Sarvajanik College of Engineering and Technology, Surat

Computer Engineering Department


B.E. III, Sem. V
PROGRESSIVE ASSESSMENT 1

Subject Code: 3150703 Date: 18/08/2020


Subject Name: Analysis and Design of Algorithms
Time: 1.00 PM to 2.00 PM Total Marks: 20
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.

Q.1 [A] Do as directed. Marks

1. Enlist characteristics of the algorithm. [1]

2. Illustrate the operation of MAX-HEAPIFY (A, 3) on the array A [27, 17, 3, [3]
16, 13, 10, 1, 5, 7, 12, 4, 8, 9, 0].

Q.1 [B] Attempt ANY TWO questions. [6]

1. Write Insertion sort algorithm to arrange the characters of string “analysis


and design of algorithms” in ascending order. What is its time complexity
in best case?
2. (a) Prove or disprove that running time T(n) = 3n + 2 is Ω(n).
(b) Prove that running time f(n) = 4n2 + 3n + 5 is in O(n2).
3. When do best case, average case and worst case occur for sequential and
binary search algorithms? Also state the time complexity of sequential and
binary search algorithms in these three cases if n elements are given in the
list to be searched.

Q.2 [A] Compare Greedy method with Dynamic Programming method. [2]

Q.2 [B] Attempt ANY TWO questions. [8]

1. Find an optimal solution to the knapsack instance using greedy method.


Knapsack size = 15
Profit values are (p1, p2, p3, p4, p5, p6, p7) = (5, 10, 15, 7, 8, 9, 4)
Weight values are (w1, w2, w3, w4, w5, w6, w7) = (1, 3, 5, 4, 1, 3, 2)
2. Write and explain Dijkstra’s algorithm to find the minimum distance of all
nodes from a given source node.
3. Define Minimum Spanning Tree of a graph. Find the same (stepwise) for
the following given graph using Prim’s algorithm considering the vertex

1
“A” as the source vertex.

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

You might also like