Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

Suppose that f(n)=2f(n/2)+3when n is an even positive integer, and f(1)=5. Find

a)f(2)

b)f(8).

c)f(64).

d)f(1024).

Short Answer

Expert verified

The answers are given below:

(a)f2=13

(b)f8=61

(c)f64=509

(d)f1024=8189

Step by step solution

01

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

02

Apply Recurrence Relation

Given:\(f(n) = 2f(n/2) + 3\,{\rm{and}}\,f(1) = 5\)

(a) Repeatedly apply the recurrence relation until we obtain\(n = 3\):

\(\begin{aligned}f(2) &= 2f(1) + 3\\ &= 2(5) + 3\\ &= 13\end{aligned}\)

(b) Repeatedly apply the recurrence relation until we obtain\(n = 8\):

\(\begin{aligned} f(4) &= 2f(2) + 3\\ &= 2(13) + 3\\ &= 29\\f(8) &= 2f(4) + 3\\ &= 2(29) + 3\\& = 61\end{aligned}\)

(c) Repeatedly apply the recurrence relation until we obtain\(n = 64\):

\(\begin{aligned}f(16) &= 2f(8) + 3\\f(16) &= 2(61) + 3\\ &= 125\\f(32) &= 2f(16) + 3\\ &= 2(125) + 3\\ &= 253\\f(64) &= 2f(32) + 3\\ &= 2(253) + 3\\ &= 509\end{aligned}\)

(d) Repeatedly apply the recurrence relation until we obtain\(n = 1024\):

\(\begin{aligned}f(128) &= 2f(64) + 3\\ &= 2(509) + 3\\ &= 1021\\f(256) &= 2f(128) + 3\\& = 2(1021) + 3\\ &= 2045\\f(512) &= 2f(256) + 3\\ &= 2(2045) + 3\\ &= 4093\\f(1024) &= 2f(512) + 3\\ &= 2(4093) + 3\\ &= 8189\end{aligned}\)

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Study anywhere. Anytime. Across all devices.

Sign-up for free