Log In Start studying!

Select your language

Suggested languages for you:
Answers without the blur. Sign up and see all textbooks for free! Illustration

Q10E

Expert-verified
Discrete Mathematics and its Applications
Found in: Page 535
Discrete Mathematics and its Applications

Discrete Mathematics and its Applications

Book edition 7th
Author(s) Kenneth H. Rosen
Pages 808 pages
ISBN 9780073383095

Answers without the blur.

Just sign up for free and you're in.

Illustration

Short Answer

Find f(n) when n=2k, where f satisfies the recurrence relation f(n)=f(n/2)+1with f(1)=1.

Thus, n=2k is equivalent with k=log2n.

See the step by step solution

Step by Step Solution

Step 1: Recurrence Relation definition

A recurrence relation is an equation that recursively defines a sequence where the next term is a function of the previous terms: f(n) = a f(n / b) + c

Step 2: Apply Recurrence Relation

Given information are n=2k,f(n)=f(n/2)+1andf(1)=1

Repeatedly apply the recurrence relation:

f(n)=f2kf(n)=f2k-1+1f(n)=f2k-2+2f(n)=f(n)=f22+(k-2)f(n)=f21+(k-1)f(n)=f20+kf(n)=f(1)+kf(n)=1+kf(n)=k+1f(n)=log2n+1

Therefore, n=2k is equivalent with k=log2n.

Recommended explanations on Math Textbooks

94% of StudySmarter users get better grades.

Sign up for free
94% of StudySmarter users get better grades.