You are on page 1of 1

Assignment No.

1
Course: Advanced Algorithms Analysis Class: MS Computer Science
Max. No. of students in each group: 2 Last Date of Submission: 20 Sep 2016

Note: Assignment should be hand written.

Q. No. 1
Write an algorithm that finds the largest and smallest number in a list (an array) of n numbers.
Calculate the total number of basic operations in this algorithm. Which complexity function can
be used to represent complexity of this algorithm?
Q. No. 2
Determine the worst-case, average-case, and best-case time complexities for the basic Insertion
Sort and for the Binary Search.
Q. No. 3
Algorithm A performs 10n2 basic operations, and algorithm B performs 300 ln n basic
operations. For what value of n does algorithm B start to show its better performance?
Q. No. 4
Group the following function by complexity category.

Q. No. 5
Differentiate between Big O, Big Omega and Big Theta with some suitable examples.
Q. No. 6
Suppose you have a computer that requires 1 minute to solve problem instances of size n= 1,000.
Suppose you buy a new computer that runs 1,000 times faster than the old one. What instance
sizes can be run in 1 minute, assuming the following time complexities T(n) for our algorithm?
a) T(n)= n
b) T(n)=n3
c) T(n)=10n2

You might also like