Showing posts with label DAA. Show all posts
Showing posts with label DAA. Show all posts

January 03, 2019

03 Jan

Design and Analysis of Algorithms - MCQS 2

                                           Question What is an optimal Huffman code for alphabet b of the following set of frequencies  a: 45, b:13, c:12, d:16, e:9, f:5 Select one: a. 111 b. 101 c. 100 d....

November 05, 2018

05 Nov

Design and Analysis of Algorithms - Mid Sem Solution

Question 1A) The time factor when determining the efficiency of algorithm is measured by a) Counting microseconds b) Counting the number of key operations c) Counting the number of statements d) Counting the kilobytes of algorithm Answer: b Justification: It is hardware and language independent , rest are dependent...

November 01, 2018

01 Nov

DESIGN AND ANALYSIS OF ALGORITHMS - Comprehensive Paper Solution

Question: Assume that there are two algorithms A and B for a given problem P. The time complexity functions of algorithms A and B are 5n and log2n    respectively. Which algorithm should be selected assuming that all other conditions remain the same for both the algorithms? Solution: Assuming that...

October 23, 2018

23 Oct

Design and Analysis of Algorithms - MCQS

Question If one was to apply Master theorem to recurrence equation T(n)=3.T(n/2)+n^2, what would be the values of a and b? Select one: a. a=3,b=3 b. a=3,b=2 c. A=2,b=2 d. a=2,b=3 The correct answer is: a=3,b=2 Question  Time complexity of knapsack 0/1 where n is the number of items and W is the capacity...