Problem Set 2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Problem Set #2 | Coursera

1 of 4

https://www.coursera.org/learn/algorithm-design-analysis/exam/BvM...

1.
( ) = 9 ( /3) +

)
log )

( log )

9/7/2016 1:36 AM

Problem Set #2 | Coursera

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

Problem Set #2 | Coursera

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

Problem Set #2 | Coursera

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

You might also like