Substitution method for a recurrence 2026-10-31
Prove a proposed bound by mathematical induction, substituting the inductive hypothesis for smaller arguments into the recurrence relation. Choose its constants so the resulting inequality implies the proposed bound at the current argument, and verify all base cases. A leading-order guess may need an additional lower-order term to make the induction close. The entropy potential for a divide-and-conquer recurrence is an example using a linear correction to an bound.
Totient chain 2026-10-20
The sequence obtained by iterating Euler's totient function on a positive integer. Since for , the sequence reaches 1. Counting both endpoints gives the length recurrence relation and ; increasing order of therefore suffices for dynamic programming.
Tridiagonal elimination recurrences 2026-10-14
Let . Store the tridiagonal matrix by its diagonal , lower diagonal , and upper diagonal . The linear system iswith the nonexistent endpoint terms omitted. Initialize and . For , compute the elimination multiplier, modified pivot element, and modified right-hand side:These recurrence relations apply the elementary row operation after the preceding row has already been reduced. The transformed linear system is an upper bidiagonal matrix:Thus back substitution is especially short:For , only remains. Check each pivot element before its first division, including before back substitution.
Tridiagonal elimination preserves the narrow band: only one row and one diagonal coefficient change per step
. Details. Equivalently, this constructs an LU decomposition with unit lower bidiagonal matrix , whose lower diagonal is , and upper bidiagonal matrix , whose diagonal is and upper diagonal is . The sweep is forward substitution in . There is no fill-in outside these bands when no rows are interchanged. LAPACK's
DGTSV source uses these same coefficient and right-hand-side updates in its branch without row interchange.[ref]An invertible matrix need not admit the unpivoted Thomas algorithm. For example,Here and , but makes undefined. Interchanging the two equations instead gives the upper triangular matrix system , , solved immediately by back substitution. Even a nonzero first diagonal does not guarantee all later pivot elements: has determinant , yet .
For a general tridiagonal matrix, use a solver with partial pivoting when these structural guarantees are unavailable or a dangerously small pivot element occurs. Adjacent row interchanges can introduce a second upper diagonal, so a pivoted solver must track that additional fill-in; it cannot blindly continue the unpivoted recurrence relations. LAPACK's
DGTSV explicitly performs partial pivoting, stores this extra upper diagonal, and includes it in back substitution. Its fixed-width storage and bounded work per row retain time for one right-hand side and storage.[ref]DGTSV (LAPACK 3.12.1) by LAPACK project. DGTSV, Purpose lines 34–39; DL argument lines 63–69; adjacent interchange lines 188–199; back solve lines 295–305
