美文网首页
5. Methods for solving recurrenc

5. Methods for solving recurrenc

作者: 何大炮 | 来源:发表于2017-08-08 09:10 被阅读0次
  1. Substitution method:
    guess a bound.
    use mathematical induction to prove that the guess is correct.
    if the guess is wrong, refine the guess and try again.
  2. Recursion-tree method:
    convert the recurrence into a recursion tree.
    use this tree to rewrite the function as a sum.
    use techniques of bounding summations to solve the recurrence.

Substitution method

Step 1. Guess the form of the solution.
Step 2. Use mathematical induction to show that the guess is correct.

Attention:

  1. A good guess is vital when applying this method
  2. If the initial guess is wrong, the guess needs to be adjusted later.

解题步骤:先通过替换得出自己的猜想是否合理,然后找出特例范围,测试特例,得出c的范围。再计算特例范围外的的c的范围,对比得出答案。

实例 接上实例

The recursion tree method

The idea of the recursion tree method is to expand (iterate) the recurrence and express it as a summation of terms

题目

Important things to remember

  1. When using asymptotic notation, we take the fastest growing additive term and ignore its constant coefficient.
  2. Recall the difference between the defintions of O, W, Q and o, w: There exists some positive constant versus for any positive constant.
  3. Recall the hierarchy of growth rates.
    To compare the order of growth of functions, use basic operations, take logarithms, or exponentiate.
  4. In inductive proofs for statements like f (n) = O(g(n)), we have to use the same constant c throughout the proof.

相关文章

网友评论

      本文标题:5. Methods for solving recurrenc

      本文链接:https://www.haomeiwen.com/subject/fygzlxtx.html