Recurrences Lecture Slide Summary

Algorithms and Data Structures

1. Recurrences

  • Definition: T(n) = aT(n/b) + f(n)
  • Example Context: Based on slides by Alexander Wolff, Myroslav Kryven, Spring 2026.

2. Putting Things Together

  • Runtime of MaxSubarr:
    • Base Case: TMT(1) = Θ(1)
    • Recursive Case for n > 1:
    • TMT(n) ≈ 2 · TMT(n/2) + TMMT(n)
    • TMT(n) ≈ 2 · TMT(n/2) + n
    • Result: TMT(n) = VMS(n) = O(n log₂ n)
  • Further Inquiry:
    • If T(n) = 2 · T(n/2) + 4n (and T(1) = Θ(1)), still holds that T(n) = O(n log n)?
  • Challenge: Solve MaxSum in O(n) (i.e. linear time) for n = power of two.
  • MergeSort Applicability: For a, b ≥ 2:
    • Θ(logₐ n) = Θ(log_b n)
    • ‘Round up’ to the next power of two n′ < 2n.

3. Solving Recurrences

  • General Assertion: There exists a constant c > 0 such that T(n) ≤ c · n log₂ n for all n ≥ 1.
    • Applies to T(n) = 2 · T(n/2) + 4n with T(1) = 0, thus T ∈ O(n log n).
3.1 Inductive Proof Setup
  • Base Case: For n = 1,
    • T(1) ≤ 0, thus T ∈ O(n log n) is satisfied.
3.2 Inductive Hypothesis
  • Assume that T(k) ≤ c · k log₂ k holds for all k < n.
  • Inductive Step: Show T(n) ≤ 2c · (n/2 log₂(n/2)) + 4n is valid.
3.3 Final Application of Inductive Proof
  • By replacing recursive calculation:
    • T(n) = 2 · T(n/2) + 4n;
    • Hence, 2c(n/2)(log₂(n) - 1) + 4n reduces to confirming if simplified ensures:
    • 2c(n/2)(log₂(n) - 1) + 4n ≤ c · n log₂ n.
3.4 Adjustments Necessary
  • In each step, if correctly structured leads to a proving assertion for all n >= 1 through continued application of the same logic. (See subsequent presentations for reinforcement.)

4. Substitution Method Examples

  • T(n) = T(⌊n/2⌋) + T(⌈n/2⌉) + 1 with T(1) = 0
  • Assertion: Need to demonstrate:
    • T(n) ≤ c · n for some constant c > 0.
  • Inductive Application: Confirm with base cases and continuing assumptions recursively.
4.1 Recursive Breakdown
  • On applying the recursive relationship:
    • Each step shows aggregation leading to:
    • Required limits hold if the structure efficiently encodes the halved element structure effectively within the expected condition and under the complexity.
4.2 Continued Inductive Proof Validation
  • Methodically assess that each outcome remains carefully bounded below maximum relationships proved in the assessment to validate decisions.

5. Recursion Tree Method

  • Illustrate valid approach through example: T(n) = 3T(n/4) + n².
5.1 Recursive Tree Analysis
  • Showing layout:
    • Each spreading node differentiating values solidifying structure leading aggregation.
  • Outcome Confirmation: Proved by summing the effects across each depth.

6. Master Theorem Overview

  • Effective approach to recurrences of T(n) = aT(n/b) + f(n).
  • Central Assertion: a ≥ 1, b > 1 must confirm casting condition on the regularity aspects as reviewed within bounds.
  • Practical Examples: Apply relationships to assert behavior of function calls under the model shared.
6.1 Conditions Defined:**
  • Outcome effectiveness assessed through bounding as:
    • Θ(n^{log_b a}), if conditions f ascertain relevant behavior based on limits invoked.
    • Special cases (log relationships involved) allowed analysis behaviorbased on form structuring.

Conclusion

  • Proof integrity reaffirmed: This shows combinations are still feasible encodings bounded by forms assessed tested relationships effectively, along earlier framing discussed, embracing effective treatment of divide and conquer techniques algorithmically to explore ensuring variant reactions driven by variable behavior mathematically embedded throughout structures similarly executed.