Sie sind auf Seite 1von 2

Name:_________________________________________

Enrolment No:__________________________________

Model Question Paper


Course: Design & Analysis of Algorithm CS 201
Programme: B.Tech
Time: 1 Hour.

Semester: SUMMER /2013-14


Max. Marks:20

All the questions are compulsory.

Do not write anything on question-paper except Name and Enrolment Number


1. Function g is an upper bound on function f if f for all x,
a. g(x) f (x);
b. g(x) f (x)
c. g = O( f )
d. f =(g)
e. none of these
2. T(n) = (f (n)) means that
a. algorithm computes function f
b. algorithm produces a result in time at least f (n) for inputs of size
n;
c. algorithm produces a result in time not greater than f (n) for
inputs of size n;
d. algorithm T runs in time
e. algorithm f computes function T on data
3. Recurrences may help in time analysis if we find
a. count of iterations of while loop;
b. clock readings;
c. exit condition;
d. depth of recursion;
e. none of these
4. . Recurrences may help in time analysis if we find
a. count of iterations of while loop;
b. clock readings;
c. exit condition;
d. depth of recursion;
e. none of these
5. A recursive-case running time of (n + T(n1)) indicates ____ time
a. constant;
b. logarithmic;
c. linear;
d. quadratic;
e. exponential

6. What does Huffmans algorithm find and how?


7. Discuss a sorting Algorithm whose complexity is
a. O(n2)
b. O(nlogn)
c. O(n)
8. Express a recurrence that defines the Fibonacci function in the standard
way and analyze running time. Write a faster, dynamic-programming
algorithm and analyze.

Das könnte Ihnen auch gefallen