Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Example 2 . 1 1 . Solve the following recurrence relation for n = 2 k for any positive integer k . If n is

Example 2.11. Solve the following recurrence relation for n=2k for any
positive integer k. If n is not a power of 2,T(n) is bounded by the T values
of two consecutive powers of 2 and hence will belong to the same efficiency
class as with the powers of 2.
T(n)=T(n2)+n for n>1 and T(1)=1.
Solution: T(n)=T(2k)=T(2k-1)+2k=[T(2k-2)+2k-1]+2k=cdots=
1+2+22+cdots+2k=2k+1-1=2*2k-1=2n-1. using this example solve T(n)= T(n/3)+1 for n >1 and T(1)=1. Assume n is a power of 3.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions