Discrete Mathematics and Its Applications, Seventh Edition

Published by McGraw-Hill Education
ISBN 10: 0073383090
ISBN 13: 978-0-07338-309-5

Chapter 8 - Section 8.3 - Divide-and-Conquer Algorithms and Recurrence Relations - Exercises - Page 535: 8

Answer

a) 4 b) 61 c) 509 d) 8189

Work Step by Step

We are given $$f(n)=2f(n/2)+3$$ and $$f(1)=5$$ a) Apply the recurrence relation when $n=2$ $f(2)=2f(1)+ 3$ $=1+3$ $=4$ b) Apply the recurrence relation when $n=8$ First we find $f(4)=2f(2)+3$ $=2\times13+3$ $=26+3$ $=29$ Then find $f(8)=2f(4)+3$ $=2\times29+3$ $=58 + 3$ $=61$ c) Apply the recurrence relation with $n=64$ First we find $f(16)=2f(8)+3$ $=2\times61+3$ $=125$ $f(32)=2f(16)+3$ $=2\times125+3$ $=253$ Then find $f(64)=2f(32)+3$ $=2\times253+3$ $=509$ d) Apply the recurrence relation with $n=1024$ First we find $f(128)=2f(64)+3$ $=2\times509+3$ $=1021$ $f(256)=2f(128)+3$ $=2\times1021+3$ $=2045$ $f(512)=2f(256)+3$ $=2\times2045+3$ $=4093$ Then find $f(1024)=2f(512)+3$ $=2\times4093+3$ $=8189$
Update this answer!

You can help us out by revising, improving and updating this answer.

Update this answer

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.