0% found this document useful (0 votes)
12 views2 pages

Algo (OS052020) Quiz 1: - Socrat1ve

The document appears to be a quiz on algorithm analysis and complexity. It contains 10 multiple choice questions related to solving recurrences, asymptotic notation, recursion trees, and analyzing algorithm running times.
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)
12 views2 pages

Algo (OS052020) Quiz 1: - Socrat1ve

The document appears to be a quiz on algorithm analysis and complexity. It contains 10 multiple choice questions related to solving recurrences, asymptotic notation, recursion trees, and analyzing algorithm running times.
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/ 2

•• socrat1ve

•• • Name
Date

Algo {OS0 5202 0) Quiz 1 Score

------- ·--·--- - -- - - - -
-I
1. Solve the recurrence T(n) = T(n/2) +1
@ O(n)
1-- [
@ O(nlog n)
'1?J'o(lo gn) =
@ O(n 2 )
L.
I
2. Solve the recurrence T(n) = 9T(n/3) +n
@ T(n) = Theta(n)

® T (n) = Theta (n 2)
© T(n) = Theta(log n)
T(n) = Theta(n log n)

3. In array arr(i) the integer value i represents


@ Condition
@ Marker

$1ndex
@ None of the above

4. An operation in an algorithm takes a fixed amount of time, so its time is bounded by


@ function
@const ant L
I

© variable
@ O(n)

I
S. Which of the following is correct?
@ 0(1)<0(1og n)<O(n togn)<O(n)<O(n 2)<0(n 3)<0(2")

@ 0(1)<0(n)< O(log n)<O(n logn)<O{n 2)<0(n 3).<0(2")

$ 0(1)<0(1og n)<O{n)<O(n logn)<O(n2 )<0(n 3 )<0(2")

@ 0(1)<0(Iog n)<O(n)<O{n logn)<O(n2)<0(2")<0 {n 3)


6. Solve the recurrence T(n) = T(n/2) + theta(1)
J:?f T(n) = Theta( log n)
@ T(n) = Theta( n log n)
© T(n) = Theta ( n)

@ T(n) = Theta(n 2)

7. If f(n) is 2n 2+theta(n) , then we can say that f(n) =


@ 0(1)

@ Theta(n 2)

~O(n)

@ Theta(1)

8. A recursion tree is drawn with cost of single call in each node, the running time is the sum of
costs in
$ A l l nodes
@ some nodes

© ·root nodes
@ leaf nodes

9. For a recusion tree, each node represent the cost of


~single subproblem

@ multiple sub problerr:1

© whole problem
@ none of the above

10. Typically the pseudocode is not concerned with the issues of


@ effectiveness
..
@ finiteness

© definiteness
~oftware engineering

You might also like