Professional Documents
Culture Documents
Problem Set 2
Problem Set 2
Problem Set 2
1 of 4
https://www.coursera.org/learn/algorithm-design-analysis/exam/BvM...
1.
( ) = 9 ( /3) +
)
log )
( log )
9/7/2016 1:36 AM
2 of 4
https://www.coursera.org/learn/algorithm-design-analysis/exam/BvM...
2.
1
2
3
4
5
6
7
8
9
10
FastPower(a,b) :
if b = 1
return a
else
c := a*a
ans := FastPower(c,[b/2])
if b is odd
return a*ans
else return ans
end
( )
( log( ))
(log( ))
( )
9/7/2016 1:36 AM
3 of 4
https://www.coursera.org/learn/algorithm-design-analysis/exam/BvM...
3.
0<
< .5
22
12
1
4.
(1 )
.5
( )
( )
( )
( )
( )
( )
( )
( )
( )
( )
( )
( )
( )
( )
9/7/2016 1:36 AM
4 of 4
https://www.coursera.org/learn/algorithm-design-analysis/exam/BvM...
5.
(log( ))
( )
(log( ))
( log( ))
(1)
( )
( )
( )
Submit Quiz
9/7/2016 1:36 AM