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

Design Analysis of Algorithms Rcs 502

Good

Uploaded by

Shobhit Mishra
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
14 views

Design Analysis of Algorithms Rcs 502

Good

Uploaded by

Shobhit Mishra
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 2
Printed Pages: 02 Subject Code: RCSS02 Paper Ia: [ 110502 Roll No: BTECH (SEM V) THEORY EXAMINATION 2018-19 DESIGN & ANALYSIS OF ALGORITHMS Time: 3 Hours Total Marks: 70 Note: 1. Attempt all Sections. If require any missing data; then choose suitably. 2. Any special paper specific instruction SECTION A 1 Attempt all questions in brief. 2x7=14 a. Rank the following by growth rate: rn, 27, jog n, tog (logn), log’n, (Ign), 4, (3/2)", nf b. Prove that if n>=1, then for any n-key B-Tree of height h and minimum degree t >~2, h<= log. ((n+1)/2) ¢. Define principal of optimality. When and how dynamic programming is applicable 4. Explain application of graph coloring problem €. Compare adjacency matrix and linked Adjaceng)J suitable example/diagram £ What are approximation algorithms? Whe meant by P (n) approximation algoritns? g. What do you mean by stability of sai algorithm? Explain is aplication sts representation of a Graph with, nN 2. Attempt any three of the followit 7 & a Use a recursion tree to give‘ah asymptotically tight solution to the r¢curfence Tn) = Tian) + TU - a+ cn, where a is a constant in the mage) *a< 1 and © Vis alsoa consgeane & b. Define BNP, ‘NP hard and NP Complete Problems: Prove that Travelling Salesman Probiem is NP-Complete. ¢. Consider the weights and values of items listed below. Note that there is only one unit of each item. The task is to pick a subset of these items such that their total weight is no more than 11 Kgs and their total value is maximized. Moreover, no item may be split, The total value of items picked by an optimal algorithm is denoted by Vos. A greedy algorithm sorts the items by their value-to-weight ratios in descending order and packs them greedily, starting from the first item in the ordered list. The total value of items picked by the greedy algorithm is denoted by Vgreedy. Find the value of Vopt ~ Vercedy i A PO ~ Ww i0 [7 [4 ]2 Vv 60 128 120 124 4. Insert the following keys in a 2-3-4 B Tree: 40, 35, 22, 90, 12, 45, 58, 78, 67, 60 and then delete key 35 and 22 one after other. . Prove that if the weights on the edge of the connected undirected graph are distinct then there is a unique Minimum Spanning Tree. Give an example in this regard. Also discuss Prim’s Minimum Spanning Tree Algorithm in detail, SECTION C Attempt any one part of the following: 7x17 (a) The recurrence T (n) = 7T (0/3) + n? describes the running time of an algorithm A Another competing algorithm B has a running time of $ (n) = aS (n/ 9) + n?, What is the smallest value of ‘a’ such that A is asymptotically faster than B.? (b) How will you sort following array A of elements using heap sort: A= (23,9, 18, 45, 5, 9. 1, 17, 6). Attempt any one part of the following: 7x1 (a) _ Explain the different conditions of getting union of two existing binomial Heaps. Also write algorithm for union of two Binomial Heaps. What is its complexity? (b) Insert the elements 8, 20, 11, 14, 9, 4, 12 in a Red-Black Tree and delete 12, 4,9, 14 respectively. Attempt any one part of the following: Tx1=7 (a) When do Dijkstra and the Bellman-Ford algorithm both fail to find a shortest path?Can Bellman ford detect all negative weight cycles in a graph? Apply Bellman Ford Algorithm on the following graph (6) Given an integer x and a positive number n, use divide & conquer approach to write @ function that computes x*with time complexity O (logn) Se Attempt any one part of the following: Tx1=7 (a) Solve the Subset sum problem using Backaracking: “where n=4, m=18, w [4] = (5, 10, 8, 13) (b) Give Floyd War shall algorithm to find‘fhe shortest path for all pairs of vertices in a graph. Give the complexity of the alg¢ n. Explain with example. Attempt any one part of the following: Txl=7 (a) | What is the application of Past Fourier Transform (FFT)? Also write the recursive algorithm for FFT. +.» (b) Give a linear time algorithin to determine if a text T is a cycle rotation of another string T° For example, ‘RAJA’ and ‘JARA’ arc cyclic rotations of cach other.

You might also like