0% found this document useful (0 votes)
21 views1 page

Gujarat Technological University: Instructions

This document appears to be an exam for a computer algorithms course, containing 5 questions worth 7 marks each. The questions cover topics like analyzing the time complexity of quicksort and insertion sort, solving algorithmic recurrences, comparing heuristic and dynamic programming approaches, explaining data structures like interval trees and B-trees, analyzing problems like the traveling salesman problem and minimum spanning trees, and sorting algorithms in parallel environments.

Uploaded by

Rakesh Parmar
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)
21 views1 page

Gujarat Technological University: Instructions

This document appears to be an exam for a computer algorithms course, containing 5 questions worth 7 marks each. The questions cover topics like analyzing the time complexity of quicksort and insertion sort, solving algorithmic recurrences, comparing heuristic and dynamic programming approaches, explaining data structures like interval trees and B-trees, analyzing problems like the traveling salesman problem and minimum spanning trees, and sorting algorithms in parallel environments.

Uploaded by

Rakesh Parmar
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


M.E Sem-I Regular Examination January / February 2011

Subject code: 710201N

Subject Name: Computer Algorithm

Date: 31 /01 /2011

Time: 02.30 pm 05.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

Q.2

Q.3

Q.3

Q.4

Q.4

Q.5

Q.5

(a) Prove that worst case complexity of quick sort and insertion sort is O (n2).
(b) Solve the following recurrences.
1) T (n) = 4T (n/2) + nlog n, where n is power of two.
2) T(n) = T(n-1) + T(n-2) , when n is greater than 1 , else T(n) = n, when n is 0,1
(a) How is heuristic Algorithm more efficient than dynamic programming? Explain
with example.
(b) Greedy Approach is faster than dynamic programming? Justify with example.
OR
Explain
interval
tree
and
its
searching
complexity?
(b)
(a) Show the B-tree that results when inserting R,Y,F,X,A,M,C,D,E,T,H,V,L,W,G(in
that order) branching factor of t = 3. You need only draw the trees just before and
after each split. Show the B-tree the results when deleting A, then deleting V and
then deleting P from the following B-tree with a minimum branching factor of t = 2.
(b) Difference between AVL tree and Red-black tree (In terms of height and
complexity). Insert the following sequence in AVL tree and Red-black tree:
12, 4, 19, 16, 21, 1, 4, 7,9
OR
(a) What is the complexity of deleting and inserting an element from binomial heap?
Specify any example where binomial heap is preferred than normal heap?
(b) Explain Traveling sales man problem? It is a NP class problem? Justify your answer
with proof.
(a) Let G = (V, E) be a simple graph which is weighted, undirected, and connected.
Suppose G contains a unique edge having the largest weight. Let emax be this edge.
Suppose removing emax in G does not disconnect G. Prove that any minimum
spanning tree of G must not contain the edge emax.
(b) Explain kruskals algorithm in detail with analysis of space complexity?
OR
(a) Create a Fibonacci-heap for following list
<23,15,10,35,40,60,30,47,3,33,51,90,70,44> After creation, Decrease the key 47 to
19 and 33 to 2 and show above all operation with use of auxiliary Array.
(b) Find the longest common subsequence from the given two sequence of characters,
1) P = (A,BC,D,B,C,D,C,D,D); Q= ( C,B,A,F)
2) P = (1,0,0,1,0,1,1,0,1,1,0,1); Q= ( 0,1,1,0)
(a) Explain Insertion sort in Parallel Environment and Calculate Complexity.
(b) Explain radix sort in Parallel Environment and Calculate Complexity.
OR
(a) Find an optimal solution for the knapsack Instances
n=7, M=15(P1,P2,,P7)=(10,5,15,7,6,18,3) and
(W1,W2,,W7)=(2,3,5,7,1,4,1)
(b) Derive recurrence for chained matrix multiplication and solve for following
sequence:
10 15, 15 25, 25 30, 30 35
*************

07
07

07
07
07
07

07

07
07
07

07
07

07

07
07
07

07

You might also like