The mathematics of discrete algorithms

Analyze correctness and resource growth through recurrences, greedy structure, dynamic programming, and reductions.

10 published lessons1 module320 min of guided study
  1. 01
    The mathematics of discrete algorithmscore · 10 lessons

Follow the path or begin with a question. Every lesson is open.

Your notebook0 of 10 lessons completed

Your place, at your pace. Progress is optional and saved only in this browser when available.

Inside this module

Each lesson includes an interactive lab

The mathematics of discrete algorithms

Analyze correctness and resource growth through recurrences, greedy structure, dynamic programming, and reductions.

  1. 01

    Loop invariants and termination

    Turn an iterative procedure into a proof with preserved assertions, exit conditions, and a well-founded progress measure.

    29 min
  2. 02

    Asymptotic bounds and recurrence solving

    State resource bounds with quantifiers, solve recurrences by expansion and induction, and account for input encoding.

    30 min
  3. 03

    Divide and conquer and the master theorem

    Read a recursion tree level by level, apply a precise master theorem, and recognize recurrences outside its scope.

    31 min
  4. 04

    Greedy exchange arguments

    Prove when an irrevocable local choice can replace part of an optimum, and build counterexamples when the objective changes.

    30 min
  5. 05

    Dynamic programming and Bellman recurrences

    Define sufficient states, derive optimal substructure, and evaluate overlapping subproblems in a justified order.

    32 min
  6. 06

    Shortest-path optimality and potentials

    Certify shortest distances with feasible labels, understand Dijkstra's nonnegative-weight assumption, and reweight edges without changing path order.

    33 min
  7. 07

    Matroids and greedy optimality

    Recognize hereditary independence and augmentation, prove weighted greedy optimality, and distinguish maximal sets from maximum ones.

    34 min
  8. 08

    Randomized algorithms and expected cost

    Keep inputs fixed while averaging internal choices, analyze randomized quicksort with indicators, and distinguish expected cost from error guarantees.

    33 min
  9. 09

    Reductions and NP-completeness

    Translate decision instances with a polynomial-time equivalence, prove certificate membership, and preserve the direction of hardness.

    34 min
  10. 10

    Approximation ratios and inapproximability

    Compare a feasible solution against a certified optimum bound, prove the vertex-cover factor two, and separate exact hardness from approximation barriers.

    34 min
All mathematics modules