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

Gujarat Technological University

This document contains instructions and questions for an examination on the subject of Analysis and Design of Algorithms. It includes 5 questions testing knowledge of algorithm analysis concepts like big-O notation, and algorithms including selection sort, Prim's algorithm, heap sort, Huffman coding, dynamic programming, greedy algorithms, graph traversal, the knapsack problem, N-queens, finite automata, and string matching algorithms. Students are instructed to attempt all questions which involve defining terms, explaining algorithms, deriving time complexities, solving recurrences, working through examples, and more.

Uploaded by

Sejal Yadav
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)
45 views2 pages

Gujarat Technological University

This document contains instructions and questions for an examination on the subject of Analysis and Design of Algorithms. It includes 5 questions testing knowledge of algorithm analysis concepts like big-O notation, and algorithms including selection sort, Prim's algorithm, heap sort, Huffman coding, dynamic programming, greedy algorithms, graph traversal, the knapsack problem, N-queens, finite automata, and string matching algorithms. Students are instructed to attempt all questions which involve defining terms, explaining algorithms, deriving time complexities, solving recurrences, working through examples, and more.

Uploaded by

Sejal Yadav
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

Seat No.

: ________ Enrolment
No.___________

GUJARAT TECHNOLOGICAL UNIVERSITY


BE – SEMESTER – V (NEW) EXAMINATION – WINTER 2015

Subject Code: 2150703 Date:17/12/ 2015


Subject Name: Analysis and Design of Algorithms
Time: 10:30am to 1:00pm 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 following terms 07


(i) Quantifier (ii) Algorithm (iii) Big ‘Oh’ Notation
(iv) Big ‘Omega’ Notation (v) ‘Theta’ Notation

(b) Explain an algorithm for Selection Sort Algorithm. Derive its best case, worst case 07
and average case time complexity.
Q.2 (a) Write the Prim’s Algorithm to find out Minimum Spanning Tree. Apply the same 07
and find MST for the graph given below.

(b) What is recurrence? Solve recurrence equation T (n) =T (n-1) + n using forward 07
substitution and backward substitution method.
OR
(b) Sort the given elements with Heap Sort Method: 20, 50, 30, 75, 90, 60, 25, 10, 40. 07

Q.3 (a) Write Huffman code algorithm and Generate Huffman code for following 07
Letters A B C D E
Frequency 24 12 10 8 8
07
(b) Write an algorithm for quick sort and derive best case, worst case using divide and
conquer technique also trace given data (3,1,4,5,9,2,6,5)
OR
Q.3 (a) 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.
(b) Using greedy algorithm find an optimal schedule for following jobs with n=6. 07
Profits: (P1,P2,P3,P4,P5,P6) = (20, 15, 10, 7, 5, 3)
Deadline: (d1,d2,d3,d4,d5,d6) =(3, 1, 1, 3, 1, 3)
1
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) Explain Breath First Traversal Method for Graph with algorithm with example. 07
(b) Solve Making Change problem using Dynamic Programming. (Denominations: 07
d1=1, d2=4, d3=6). Give your answer for making change of Rs. 9.
Q.5 (a) Explain Backtracking Method. What is N-Queens Problem? Give solution of 4- 07
Queens Problem using Backtracking Method.
(b) What is Finite Automata? Explain use of finite automata for string matching with 07
suitable example.
OR
Q.5 (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

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

You might also like