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

Gujarat Technological University

This document is an exam for the subject Design & Analysis of Algorithms. It contains 5 questions assessing various algorithm concepts. Question 1 defines key terms related to algorithm analysis like space complexity, feasible solutions, and data structures. Question 2 applies sorting algorithms like bubble sort and analyzes selection and quicksort. Question 3 covers recurrence relations, heap sort, and Huffman coding. Question 4 discusses graph traversal, longest common subsequence problems, and complexity classes. Question 5 examines matrix multiplication, assembly line scheduling, and amortized analysis.

Uploaded by

Rutvik
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)
61 views

Gujarat Technological University

This document is an exam for the subject Design & Analysis of Algorithms. It contains 5 questions assessing various algorithm concepts. Question 1 defines key terms related to algorithm analysis like space complexity, feasible solutions, and data structures. Question 2 applies sorting algorithms like bubble sort and analyzes selection and quicksort. Question 3 covers recurrence relations, heap sort, and Huffman coding. Question 4 discusses graph traversal, longest common subsequence problems, and complexity classes. Question 5 examines matrix multiplication, assembly line scheduling, and amortized analysis.

Uploaded by

Rutvik
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/ 1

Seat No.: ________ Enrolment No.

______________
GUJARAT TECHNOLOGICAL UNIVERSITY
MCA – SEMESTER – V • EXAMINATION – SUMMER 2018
Subject Code: 3650001 Date: 30-Apr-2018
Subject Name: Design & Analysis of Algorithms (DAA)
Time: 10.30 am to 1.00 pm Total Marks: 70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
Q.1 (a) Define the following questions: 07
i. Define space complexity.
ii. Define Feasible Solution.
iii. Define P-type Problem.
iv. Define Directed Acyclic Graph.
v. Define Minimum Spanning Tree.
vi. Write down the Best case, Worst Case and Average case Complexity for
Heap sort.
vii. What is vector? Which operations are performed on vector?
(b) Explain the difference between Greedy and Dynamic Algorithm. 07
Q.2 (a) Apply the bubble sort algorithm for sorting {U,N,I,V,E,R,S} 07
(b) Analyze Selection sort algorithm in best case and worst case. 07
OR
(b) Analyze Quick sort algorithm in best case and worst case. 07
Q.3 (a) What is recurrence? Solve recurrence equation T (n) =T (n-1) + n using forward 07
substitution and backward substitution method.
(b) Sort the given elements with Heap Sort Method: 20, 50, 30, 75, 90, 60, 25, 10, 40. 07
OR
Q.3 (a) Write Huffman code algorithm and Generate Huffman code for following 07
Letters A B C D E
Frequencies 24 12 10 8 8
(b) Write equation for Chained matrix multiplication using Dynamic programming. 07
Find out optimal sequence for multiplication:
A1 [5 × 4], A2 [4 × 6], A3 [6 × 2], and A4 [2 × 7]. Also give the optimal
parenthesization of matrices.
Q.4 (a) Explain Depth First Traversal Method for Graph with algorithm with example. 07
(b) Explain how to find out Longest Common Subsequence of two strings using 07
Dynamic Programming method. Find any one Longest Common Subsequence of
given two strings using Dynamic Programming.
X=abbacdcba
Y=bcdbbcaac
OR
Q.4 (a) Define P, NP, NP complete and NP-Hard problems. Give examples of each. 07
(b) Give and explain Rabin-Carp string matching algorithm with example. 07
Q.5 (a) Discuss matrix multiplication problem using divide and conquer technique. 07
(b) Discuss Assembly Line Scheduling problem using dynamic programming with 07
example.
OR
Q.5 (a) Sort the letters of word “EDUCATION” in alphabetical order using insertion sort. 07
(b) What is an amortized analysis? Explain aggregate method of amortized analysis 07
using suitable example.

*************
1

You might also like