Preview

Master Theorem

Better Essays
Open Document
Open Document
5125 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Master Theorem
170

CHAPTER 5. RECURSION AND RECURRENCES

5.2

The Master Theorem

Master Theorem
In the last section, we saw three different kinds of behavior for recurrences of the form aT (n/2) + n if n > 1 d if n = 1.

T (n) =

These behaviors depended upon whether a < 2, a = 2, and a > 2. Remember that a was the number of subproblems into which our problem was divided. Dividing by 2 cut our problem size in half each time, and the n term said that after we completed our recursive work, we had n additional units of work to do for a problem of size n. There is no reason that the amount of additional work required by each subproblem needs to be the size of the subproblem. In many applications it will be something else, and so in Theorem 5.1 we consider a more general case. Similarly, the sizes of the subproblems don’t have to be 1/2 the size of the parent problem. We then get the following theorem, our first version of a theorem called the Master Theorem. (Later on we will develop some stronger forms of this theorem.) Theorem 5.1 Let a be an integer greater than or equal 1. Let c be a positive real number and d a nonnegative form aT (n/b) + nc T (n) = d then for n a power of b, 1. if logb a < c, T (n) = Θ(nc ), 2. if logb a = c, T (n) = Θ(nc log n), 3. if logb a > c, T (n) = Θ(nlogb a ). Proof: In this proof, we will set d = 1, so that the bottom level of the tree is equally well computed by the recursive step as by the base case. It is straightforward to extend the proof for the case when d = 1. Let’s think about the recursion tree for this recurrence. There will be logb n levels. At each level, the number of subproblems will be multiplied by a, and so the number of subproblems at level i will be ai . Each subproblem at level i is a problem of size (n/bi ). A subproblem of size n/bi requires (n/bi )c additional work and since there are ai problems on level i, the total number of units of work on level i is ai (n/bi )c = nc ai bci = nc a bc i to 1 and b be a real

You May Also Find These Documents Helpful

  • Good Essays

    Test Physic 1401

    • 1086 Words
    • 5 Pages

    More than four problems from Section II can be attempted. However, points will be awarded for only the best four answers.…

    • 1086 Words
    • 5 Pages
    Good Essays
  • Powerful Essays

    Mat 540 Week 4

    • 4465 Words
    • 18 Pages

    SECTION – B Note: (i) Answer 10 questions (ii) Answer any 9 questions from the first 14 questions. Question No. 30 is Compulsory. (iii) Each question carries Two marks 10 × 2 = 20 16. If A = {4, 6, 7, 8, 9}, B = {2, 4, 6} and C = {1, 2, 3, 4, 5, 6} A , ^ B + Ch.…

    • 4465 Words
    • 18 Pages
    Powerful Essays
  • Satisfactory Essays

    Problem: This POW’s problem was to have seven spaces, three of which were shaded, 1 empty space, then three spaces that were plain. The object was to switch the colors to the opposite side, but while doing this you could only move your marker to an adjacent space, or jump over ONE marker to another open space.…

    • 250 Words
    • 1 Page
    Satisfactory Essays
  • Good Essays

    Economics 304

    • 1465 Words
    • 6 Pages

    grows at rate n such that Nt = nNt−1 for every period and n > 1 and money is also growing in…

    • 1465 Words
    • 6 Pages
    Good Essays
  • Satisfactory Essays

    CJA 374 Week 5 DQs

    • 423 Words
    • 3 Pages

    This work of CJA 374 Week 5 Discussion Questions shows the solutions to the following problems:…

    • 423 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    Kelly And Witko Summary

    • 694 Words
    • 3 Pages

    Kelly and Witko make three hypothesis that they attempt to prove in their article. First of…

    • 694 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Exploring Decimals

    • 1002 Words
    • 5 Pages

    Does the relationship in part a hold for the number of digits between the decimal point and the repetend in those cases where the decimal equivalent of the fraction repeats?…

    • 1002 Words
    • 5 Pages
    Good Essays
  • Powerful Essays

    In this case, we are going to analyze the following problems which are relevant to the case:…

    • 3289 Words
    • 14 Pages
    Powerful Essays
  • Good Essays

    Fibonacci Numbers

    • 717 Words
    • 3 Pages

    The following example is just one of the numerous examples of the fascination applications found within the Fibonacci sequence in nature. Now, we turn to one of the most fundamental concepts of the Fibonacci sequence: the golden ratio.…

    • 717 Words
    • 3 Pages
    Good Essays
  • Better Essays

    In number theory, the prime number theorem (PNT) describes the asymptotic distribution of the prime numbers. The prime number theorem gives a general description of how the primes are distributed amongst the positive integers.…

    • 1138 Words
    • 5 Pages
    Better Essays
  • Satisfactory Essays

    The Koch Snowflake

    • 328 Words
    • 2 Pages

    When A6 occurs, these are the following results; In 6 1729 Nn 3072 Pn 1024243 ) An 3/4(1+13+427+16243+642187+1024177147…

    • 328 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Again, if we rearrange and show it in a continuous form [2]: ; (Please note that in the above three equations, Professor John H. Cochrane considers Y(N)…

    • 5067 Words
    • 21 Pages
    Good Essays
  • Good Essays

    The following will be an investigation of Lacsap’s Fractions, that is, a set of numbers that are presented in a symmetrical pattern. It is an interesting point that ‘Lacsap’ is ‘Pascal’ backwards, which hints that the triangle below will be similar to “Pascal’s Triangle”.…

    • 1884 Words
    • 8 Pages
    Good Essays
  • Satisfactory Essays

    Ib Diploma

    • 1337 Words
    • 6 Pages

    mathematics higher level PaPer 1 Thursday 7 May 2009 (afternoon) 2 hours iNsTrucTioNs To cANdidATEs Write your session number in the boxes above. do not open this examination paper until instructed to do so. You are not permitted access to any calculator for this paper. section A: answer all of section A in the spaces provided. section B: answer all of section B on the answer sheets provided. Write your session number on each answer sheet, and attach them to this examination paper and your cover sheet using the tag provided.  At the end of the examination, indicate the number of sheets used in the appropriate box on your cover sheet.  unless otherwise stated in the question, all numerical answers must be given exactly or correct to three significant figures.      0 0 candidate session number…

    • 1337 Words
    • 6 Pages
    Satisfactory Essays
  • Better Essays
    • 1708 Words
    • 7 Pages
    Better Essays

Related Topics