1 / 18

Recurrences

Recurrences. recurrence. A recurrence is an equation or inequality that describes a function in terms of its value on smaller inputs. Example: MERGE-SORT procedure could be described by the recurrence:. R ecurrence M ethods. Substitution Method, Recursion-tree method, Master method.

Download Presentation

Recurrences

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Recurrences

  2. recurrence • A recurrence is an equation or inequality that describes a function in terms of its value on smaller inputs. • Example: • MERGE-SORT procedure could be described by the recurrence:

  3. Recurrence Methods • Substitution Method, • Recursion-tree method, • Master method

  4. The substitution method • The substitution method for solving recurrences entails two steps: • 1. Guess the form of the solution. • 2. Use mathematical induction to find the constants and show that the solution works. • The substitution method can be used to establish either upper or lower bounds on a recurrence.

  5. As an example, let us determine an upper bound on the recurrence

  6. The recursion-tree method • A recursion tree is best used to generate a good guess, which is then verified by the substitution method. • Using recursion trees to generate good guesses.

  7. For example We start by focusing on finding an upper bound for the solution. create a recursion tree for the recurrence we assume that n is an exact power of 4

  8. guess

  9. The master method

  10. Proof of the master theorem (no need)

More Related