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

Achieve better grades quicker with Premium

  • Unlimited AI interaction
  • Study offline
  • Say goodbye to ads
  • Export flashcards

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

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}\)

One App. One Place for Learning.

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

Get started for free

Most popular questions from this chapter

Use pseudocode to describe the recursive algorithm for solving the closest-pair problem as described in Example 12.

Let L(i,j)denote the length of a longest common subsequence ofa1,a2,....,aiandb1,b2,....,bj, where0imand0jn.

Use parts(a)&(b)of Exercise 15to show thatL(i,j)satisfies the recurrence relation,

L(i,j)=L(i-1,j-1)

If both iandjare nonzero andai=bi,

and

L(i,j)=L(i,j-1),L(i-1,j)

If both iandjare nonzero andaibi, and the initial conditionL(i,j)=0,

Ifi=0

or

j=0.

Use generating functions to find the number of ways to make change for \(100 using

a) \)10, \(20, and \)50 bills.

b) \(5, \)10, \(20, and \)50 bills.

c) \(5, \)10, \(20, and \)50 bills if at least one bill of each denomination is used.

d) \(5, \)10, and $20 bills if at least one and no more than four of each denomination is used.

Find a closed form for the generating function for each of these sequences. (Assume a general form for the terms of the sequence, using the most obvious choice of such a sequence.)

a) \( - 1, - 1, - 1, - 1, - 1, - 1, - 1,0,0,0,0,0,0, \ldots \)

b) \(1,3,9,27,81,243,729, \ldots \)

c) \(0,0,3, - 3,3, - 3,3, - 3, \ldots \)

d) \(1,2,1,1,1,1,1,1,1, \ldots \)

e) \(\left( {\begin{array}{*{20}{l}}7\\0\end{array}} \right),2\left( {\begin{array}{*{20}{l}}7\\1\end{array}} \right),{2^2}\left( {\begin{array}{*{20}{l}}7\\2\end{array}} \right), \ldots ,{2^7}\left( {\begin{array}{*{20}{l}}7\\7\end{array}} \right),0,0,0,0, \ldots \)

f) \( - 3,3, - 3,3, - 3,3, \ldots \)

g) \(0,1, - 2,4, - 8,16, - 32,64, \ldots \)

h) \(1,0,1,0,1,0,1,0, \ldots \)

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

See all solutions

Recommended explanations on Math Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free