A divide-and-conquer algorithm handles a small input directly; otherwise it divides the input into smaller instances, recursively solves them, and combines their answers. With equally sized subproblems of size approximately and nonrecursive work , its recurrence relation has the form , with constant-size base cases, and .
Write . The basic master theorem gives the following cases, with a fixed :
  • If , then .
  • If , then .
  • If and the regularity condition holds eventually for some , then .
For the common extended middle case, with fixed gives . A recursion tree explains the three cases: work is dominated by its leaves, spread across comparable levels, or dominated by its top levels. The regularity condition in the last case is part of the theorem, not an optional simplification.
Evaluate the recurrence relation successively, retaining only the preceding two values. Each of the updates uses three multiplications and one subtraction. Hence arithmetic operations and auxiliary storage suffice, excluding the stored input. Naively branching into two recursive calls would repeat work; the sequential computation is essential. This is an arithmetic-operation bound, not a bit-complexity bound for arbitrarily large exact integers.
Let be the determinant of the leading principal submatrix. Expansion along the last row gives an term and a term with negative cofactor sign. In the latter minor, the final column has only nonzero, and deleting that row and column leaves the leading principal submatrix. Thus the tridiagonal determinant recurrence is
Here is the empty determinant convention, needed to include . The derivation uses cofactor expansion, so the recurrence relation remains valid when coefficients or intermediate determinants vanish; it never divides by a pivot element.
The update must place the sum of the two current entries in the first coordinate and retain the old first coordinate in the second. Thus choose the matrix
By matrix multiplication, for every , using the given recurrence relation. This is the companion-matrix representation of the Lucas numbers.
The initial vector decomposes especially simply in the eigenbasis:
because . Applying multiplies the two eigenvectors by and . Part (b) then yields
Reading the second coordinate gives the Lucas closed form
At this is 2 and at it is 1. Each summand obeys the same recurrence relation, which independently verifies the formula and explains why the irrational parts cancel to give an integer.
Sort the two halves ascending, reverse the second, and concatenate to form a bitonic sequence:
sort :: Ord a => [a] -> [a]
sort []  = []
sort [x] = [x]
sort xs  = merge (sort as ++ reverse (sort bs))
  where (as,bs) = halve xs
For a power-of-two length greater than one, both halves are smaller powers of two. By induction, the recursive calls return ascending permutations of their respective inputs. Reversal makes the second half descending, so part (e)'s precondition holds and merge sorts their concatenation without losing entries. This proves both sortedness and sorting permutation preservation. Its recurrence relation is , so summing the levels gives time. Equal keys cause no difficulty; ascending and descending here permit equality. This is a bitonic sorting algorithm.
For the first recurrence relation, the master theorem compares with . Since , the recursive leaves dominate and the answer is . More explicitly, the work at depth is , a growing geometric series that stops at depth , where its sum has that order.
For the second recurrence relation, each step subtracts two and adds one until reaching a base case. For integral there are steps, so and the answer is .
The third set of printed requirements is inconsistent. The specified base values and its recurrence relation give identically, as strong induction immediately verifies: . In particular , while the extra condition demands . Thus no function satisfies all the printed conditions. Dropping that extra inequality gives .
The likely intended growth calculation can nevertheless be made precise, without treating it as a solution of the contradictory data. On dyadic arguments put . Its equation has the general form
because has characteristic equation . The printed values force . With suitably different initial values, the condition for arbitrarily large instead requires , hence and , or . That last order describes corrected initial data, not the paper as printed. All three bullets belong to this single marked part.
Use positive integral item weights and a nonnegative integral capacity. For the unbounded knapsack problem, define to be the best value with total weight at most . Then
The zero candidate is the empty selection, so unused capacity is allowed and an empty set of fitting items causes no problem. Every nonempty feasible selection has some last item ; removing one copy leaves a feasible solution at capacity . Its value is bounded by the corresponding candidate. Conversely, taking an optimal smaller selection and adding that item attains the candidate, proving the recurrence relation by optimal substructure. Positive weights make every dependency strictly smaller.
Fill capacities in increasing order. There are entries, each scanning items, so the dynamic programming takes time and storage. A winning item pointer at each capacity reconstructs the chosen multiplicities. These are capacity-dependent, pseudopolynomial bounds. For zero-weight items, any positive value makes the repetition problem unbounded; nonpositive-value zero-weight items may simply be discarded before using the recurrence.
Capacity alone cannot say which items have already been used. For the 0-1 knapsack problem, let use only the first items, each at most once. Then
The two alternatives omit item or take it. In the latter case its remaining companions must solve the smaller problem using the first items; otherwise replacing them would improve the whole selection. Both branches reduce the item index, so taking item cannot take it again. This establishes the recurrence relation and optimal substructure.
Fill rows in increasing and return . There are entries with constant work each. Store the decisions for reconstruction; value-only computation uses space by keeping two rows, or by scanning capacities downwards in a single row. A forward scan in a single row would instead allow repetitions. Nonnegative integral weights suffice for this version, including zero-weight items, because the item index always decreases.
Fix and use two-base mathematical induction on . At , the proposed right side is ; at , it is . Suppose the identity holds at and . The defining recurrence relation for the Fibonacci numbers gives
This is the assertion at , completing the proof of the Fibonacci addition formula. The argument includes , since is defined.
An RL circuit alternating for equal intervals between zero drive and constant drive has a unique attracting periodic electric current when . Write and . Sampling just before each zero-drive interval gives the recurrence relation . Subtracting its fixed point yields . Thus the limiting upper and lower electric currents are and ; convergence is geometric. This gives a simple exact ripple estimate for a periodically driven inductor.
For the Chebyshev differential equation , a power series about the ordinary point zero splits into even and odd solutions with the displayed recurrence relation. Every nonterminating parity series has radius of convergence one. If for a nonnegative integer , the parity series containing terminates, giving a polynomial with infinite radius of convergence; the other independent series still has radius one. Normalized solutions are and , with the latter replaced by when .
For , substitute a power series to obtain the displayed recurrence relation. It separates into an even solution with and an odd solution with :
The ratio of successive terms within each parity tends to zero at every fixed complex , giving infinite radius of convergence. The two initial-value vectors are independent, so these solutions span the solution space. A nonzero polynomial solution exists precisely when is a nonnegative integer: its highest power forces this value, and the recurrence terminates the matching parity. These terminating solutions are nonzero scalar multiples of the Hermite polynomials. Multiplication by connects them to Hermite oscillator quantization.
Reciprocal of a power series Created 2026-10-20 Updated 2026-10-25
If has , its reciprocal has a unique formal power series . Equating coefficients in the Cauchy product gives the displayed recurrence relation. In particular,
For a convergent power series, continuity and give a neighborhood without zeros, where the reciprocal is analytic and this series converges. Its radius need not equal the original radius: zeros of can introduce closer reciprocal singularities.
Repunit 2026-10-20
A repdigit whose digits are all 1 in a specified positional notation of base . Its value is the geometric series . In base ten, appending one digit gives , so its remainder modulo can be computed by a recurrence relation without constructing the full integer.
Root power-sum recurrence 2026-10-14
For the monic polynomial , its root power sums satisfy
Each root obeys . Multiplying that equation by and summing over root positions proves the recurrence relation. The first power sums are initialized by Newton's identities; their later values require only this fixed-order recurrence. For , it gives . Directly, . No new root-solving step is needed.[ref]
Sequence Created 2026-09-24 Updated 2026-10-14
A sequence assigns a value to each position in an ordered index list. For an infinite sequence in a set , one standard convention is a function , written with . Some applications start the index at zero, and a finite sequence has only finitely many positions. Values may repeat; both order and repetition matter. [ref].
For example, begins , whereas begins . Their sets of values are both , but these are different sequences. A subsequence keeps selected positions in increasing order; the subsequence of at its even integers is the constant sequence . A tail of a sequence retains all positions from one index onward.
Sequences express successive approximations, repeated observations, and the iterates of a recurrence relation. A limit of a sequence describes where its terms eventually concentrate. Finite observations alone cannot establish that behaviour: for any positive integer , the all-zero sequence and the sequence with for and for agree through index , yet have different limits of sequences. A formula or bound controlling the entire future, such as the tail diameter of a sequence in the Cauchy sequence condition, supplies information that a finite list cannot.
For nonnegative integers , the Stirling number of the second kind
counts the set partitions of an -element finite set into exactly unlabelled blocks of a set partition. Set , for , and for . Also for . Grassl and Levin develop these counts through explicit set partitions and a recurrence relation. [ref]
Insert one distinguished element. For and , the Stirling numbers of the second kind obey
Proof outline. Inspect the block of a set partition containing . If it contains another element, removing leaves a set partition into blocks of a set partition; conversely, insert into any of those blocks of a set partition. If is alone, remove its singleton set and obtain a set partition into blocks of a set partition. The cases cannot overlap, and deletion reverses each construction. This explains the factor even though the blocks of a set partition have no names. [ref]
For , start with the three two-block set partitions of . Inserting into either block of a set partition gives six possibilities. The remaining possibility is , obtained by making a singleton set. Hence . The seven set partitions in the diagram comprise four with sizes and three with sizes ; this grouping by sizes independently gives .
Figure 1.
Exact construction of all seven two-block set partitions of : six insert into an existing block of a set partition, and one creates a singleton set
. Details.
Three different counting questions. The binomial coefficient selects one -element subset. The Stirling number of the second kind groups all distinct elements into nonempty unnamed blocks of a set partition. The power counts all functions to a specified -element finite set, allowing some destination labels to go unused. At , these counts are respectively , , and . Choosing two people, making two unnamed nonempty teams, and assigning each person a red or blue label are different tasks.
When the destinations have labels. For fixed finite sets of sizes , respectively, the number of surjective functions is
Here every element of must be used. Each surjective function gives a set partition of into its nonempty preimages . Conversely, assign the distinct destination labels to the blocks of a set partition in ways, where is a factorial. For two labelled teams of four people this gives : of the assignments, exactly two use only one label. Dividing arbitrary function counts by fails in general because unused labels can be permuted without changing a function. For example, cannot count set partitions. The empty-to-empty function is a surjection, consistent with . Stanley gives the bijection underlying this qualification.[ref]
For example, the inclusion-exclusion principle counts the surjections from four elements to three labelled destinations as . Thus . An independent check chooses the only two-element block of a set partition in ways; the other two elements form singleton sets.
Why these numbers also occur in algebra. Classifying all functions to an -element finite set by the size of their image gives
For a fixed set partition, the falling factorial counts assignments of distinct labels to its blocks of a set partition, and is zero when . At , this reads . Replacing by yields a polynomial identity: both sides agree at every nonnegative integer. Thus the Stirling numbers of the second kind translate powers into falling factorials. Grouping by equal values turns a counting rule into an algebraic change of coordinates. Summing without destination labels instead gives the Bell number.
A strictly increasing subsequence selects indices of a sequence with . Equal values cannot both occur in it. Its maximum possible length is , with ; in general for the weak longest increasing subsequence. Use strict comparisons in the dynamic programming recurrence relation and replace the first tail at least as large as the next value in the binary search algorithm.