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

Design and Analysis of Algorithms

This document contains an assignment on algorithms for a Design and Analysis of Algorithms course. It includes 16 questions covering different algorithm techniques like BFS, DFS, topological sorting, greedy algorithms, dynamic programming, branch and bound, and counting sort. Students are asked to analyze example problems using these techniques, determine time complexities, construct tables, and optimize solutions. They must submit their responses by April 6, 2020.

Uploaded by

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

Design and Analysis of Algorithms

This document contains an assignment on algorithms for a Design and Analysis of Algorithms course. It includes 16 questions covering different algorithm techniques like BFS, DFS, topological sorting, greedy algorithms, dynamic programming, branch and bound, and counting sort. Students are asked to analyze example problems using these techniques, determine time complexities, construct tables, and optimize solutions. They must submit their responses by April 6, 2020.

Uploaded by

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

GANAPAT UNIVERSITY

U. V. PATEL COLLEGE OF ENGINEERING


B. Tech Semester IV (CE/IT)
2CEIT402: Design and Analysis of Algorithms
Assignment – 2
1. Differentiate BFS and DFS in detail with example. Write time complexity of BFS and DFS.
2. Write and apply topological sorting algorithm on given graph and write topological ordering.

3. Solve recurrence relations of following algorithms for best and worst case.
1) Binary search 2) Quick Sort 3) Merge Sort.
4. Discuss working and worst case of quicksort. How to improve worst case of quicksort?
5. Define counting inversion. Find counting inversions in given array: 5, 33,25,4,11,22,78,1,98 using
divide and conquer technique.
6. Find the minimum spanning tree (MST) using Kruskal and Prim’s algorithm from following graph.
Also draw the MST obtained using Kruskal and Prim’s algorithm.

7. Explain working of greedy algorithm with making change problem.


8. Consider the directed graph shown in the figure below. Apply Dijkstra’s shortest path algorithm on
graph. S is Source Vertex.

9. Solve fractional knapsack problem given as below using Greedy with v is value and w is weight of
each item whereas M is knapsack capacity. M=60.
N N1 N2 N3 N4
vi 280 100 120 120
wi 40 10 20 24
10. Apply minimum finish time first, minimum start time first and minimum interval first strategy on
following intervals. Which method will return optimal answer?
[1,10) ,[5,7) ,[2,3),[0,5),[3,5),[8,9),[4,6),[7,9)
11. Write an algorithm for making change problem using dynamic programming. Apply dynamic
programming algorithm to construct table for change of amount 14 with coins of denomination 1,
5, 7 and 10.
12. For the following matrices find the order of parenthesization for the optimal chained multiplication
using dynamic programming.
Matrices: A1: 10 x 3, A2: 3 x 20, A3: 20 x 50, A4: 50 x 30
13. Which kind of problems can be solved with Dynamic programming? What is Memoization? Write
algorithm of calculating Binomial coefficients using memoization and dynamic approach.
14. Consider 0/1 knapsack problem as below with w indicates the weight and v indicates the value of
each item respectively, whereas M denotes knapsack capacity. There are total 4 items. Construct
the table and find optimal answer using dynamic programming technique.
M=5 w=[2 3 4 5 ] v=[3 4 5 6 ]

15. Discuss branch and bound technique. Solve following assignment problem with branch and bound
problem.

16. Discuss and apply Count sort algorithm on 3,5,1,5,0,0,1,3,6,7,4,2

NOTE: Last Date to submit: 6.4.2020

You might also like