Suppose an additively closed subset of the nonnegative integers contains a positive integer and every integer from to . Then it contains every integer at least . The first values are the base cases. For , the smaller number belongs to by strong induction, and closure under addition gives . Equivalently, write by division with remainder, with ; start at and add exactly times.
If and for positive integers , each halving removes one binary digit until zero is reached. There are such steps. The formula follows by strong induction, using for and checking separately. With fixed positive , this is as ; the zero case retains its separately defined value.
Median of medians 2026-10-24
For deterministic linear-time selection, group keys into fives, compute the median of each group, and recursively select the median of those medians as a pivot. Apart from bounded end effects, at least keys lie on either side. Thus the selection cost satisfies , since the fractions sum to . A strong induction with sufficiently large linear coefficient absorbs the lower-order terms.
Every integer is a product of primes, uniquely up to order. Existence follows by strong induction: if is not prime, factor it into smaller positive integers and apply induction. For uniqueness, if
Euclid's lemma makes divide some , hence equal it. Cancel that prime and induct on the number of factors.
An Oberon recursive procedure can implement the defining recurrence relation directly. Its precondition is ; arithmetic is assumed to remain in the representable integer range.
PROCEDURE Fib(n: INTEGER): INTEGER;
  VAR result: INTEGER;
BEGIN
  IF n <= 2 THEN
    result := 1
  ELSE
    result := Fib(n-1) + Fib(n-2)
  END;
  RETURN result
END Fib;
Correctness follows by strong induction: the two base inputs give , and for the returned sum is . On each recursive branch the positive integer argument strictly decreases, while recursion stops at or . The well-ordering principle therefore proves algorithm termination.
The method repeats many subproblems and has exponential time complexity; termination alone does not make it efficient.
Represent the two recursively split arrays by adjacent half-open ranges of the original array. This avoids allocating a fresh pair at every call. The caller supplies a distinct work array with at least as many elements as a; only that work array is used for merging. The Oberon code is
PROCEDURE SortRange(VAR a, work: ARRAY OF INTEGER;
                    l, r: INTEGER);
  VAR m, i, j, k: INTEGER;
BEGIN
  IF r-l > 1 THEN
    m := l + (r-l) DIV 2;
    SortRange(a, work, l, m);
    SortRange(a, work, m, r);
    i := l; j := m; k := l;
    WHILE (i < m) & (j < r) DO
      IF a[i] <= a[j] THEN
        work[k] := a[i]; i := i+1
      ELSE
        work[k] := a[j]; j := j+1
      END;
      k := k+1
    END;
    WHILE i < m DO
      work[k] := a[i]; i := i+1; k := k+1
    END;
    WHILE j < r DO
      work[k] := a[j]; j := j+1; k := k+1
    END;
    k := l;
    WHILE k < r DO
      a[k] := work[k]; k := k+1
    END
  END
END SortRange;

PROCEDURE MergeSort(VAR a, work: ARRAY OF INTEGER);
BEGIN
  SortRange(a, work, 0, LEN(a))
END MergeSort;
For a range of length , the left length is and the right length is , so as required. Both are positive and smaller than , giving the recursive loop variant analogue for algorithm termination. Empty ranges are also harmless, although the question supplies a nonempty array.
For the first merge loop, regard the two sorted ranges as fixed input sequences and . They are not overwritten during the merge. A loop invariant is that , , , and work[l:k) is the stable sorted merge of the consumed prefixes a[l:i) and a[m:j). Every emitted element is at most every remaining element. Taking the smaller head preserves this property, and choosing the left head on equality preserves stable sorting. The loop variant is
It is nonnegative and decreases by one per iteration. On exit at least one range is exhausted.
For the second loop, the remaining left range is already sorted and any right remainder is absent whenever that loop runs. Appending the next left element preserves the same merge loop invariant; its loop variant is . For the third loop, the left range is exhausted and the right remainder is appended in order; its loop variant is . On completing both loops, work[l:r) is the complete sorted merge and .
In the final copying loop, the loop invariant is that a[l:k) equals work[l:k), work[l:r) remains the correct sorted answer, and positions outside a[l:r) are unchanged. Its loop variant is . At exit the whole answer has been copied back. By strong induction on range length, the recursive calls sort their halves, and the merge preserves the original multiset. Thus
The work array must not alias a: overwriting the source while merging would invalidate the merge loop invariant.
First consider powers of four, with a fixed finite base value. For a mathematical induction hypothesis , the recurrence relation gives
provided and also covers the base value.
The allowed integer rounding needs a little more care. Suppose the recurrence relation is applied above fixed base cases, as usual; applying with a ceiling would not define a positive sequence. For either rounding write or . For ,
Choose large enough to bound all finitely many positive-index base values below . By strong induction,
This argument starts at , so the floor convention's index zero, if used in an earlier base calculation, is absorbed into those fixed initial values. Thus, for either convention with a well-defined finite base,
Use the same integer rounding in a divide-and-conquer recurrence, now with root cost . Since ,
Choose and use strong induction with inductive hypothesis . Both child sizes are positive and less than , so
The same factor occurs for the exact fractional split. Therefore in Big O notation.
The printed fractional arguments require a size convention. To make the recurrence relation precise on positive integers, take a bounded base case and use , for . This integer rounding in a divide-and-conquer recurrence gives . The unrounded calculation is the special split fraction .
Prove by strong induction. Put , choose , and choose . The base case follows. The entropy potential for a divide-and-conquer recurrence gives
The last step uses . This closes the inductive hypothesis and proves in Big O notation.
The initial values of the two sequences agree: and . For , use the first-order recurrence relation at and :
Therefore satisfies exactly the same derangement recurrence as . By strong induction, equality of the preceding two terms implies equality of the next term. Consequently
The first-order recurrence relation therefore also counts derangements.
We prove the stronger bound for every by strong induction. The initial case is . For , put . Then , so the induction hypothesis and the defining recurrence relation give
Thus
The recurrence relation must be read as applying for ; applying it at would invoke outside the printed domain. No value of is needed.
Put ; the other summands in the printed sum vanish. The initial values are and . For , Pascal's identity gives
For the first sum, when is even its final term is zero; otherwise its range already agrees with . In the second sum put , obtaining for . Thus both range identifications hold without negative upper arguments in a binomial coefficient.
Now strong induction gives from the two preceding cases and the Fibonacci recurrence. Hence
A stronger exact formula makes the induction explicit:
For , the recurrence gives . For , set , so . In the relevant binary interval, . The strong induction hypothesis gives
For , . Hence . This is an integer-halving recurrence with constant toll; the separately defined case does not require evaluating .
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 strong induction with three consecutive base cases:
For , assume all values from through have the required representation. Since , write with nonnegative integers. Then is another such representation. Strong induction proves the claim for every . This is a consecutive-base induction for additive semigroups: the three base cases handle all residues before repeated addition of .
Use strong induction on the positive integer . The case is represented by the empty product. For , if is prime it is already a product of one prime. Otherwise with ; the induction hypothesis gives prime factorizations for both and , and concatenating them gives one for . This proves existence in the fundamental theorem of arithmetic without presupposing uniqueness.
Strong induction Created 2026-09-24 Updated 2026-10-18
Strong induction establishes a proposition for all integers . Prove ; then, for each , assume every with and prove . The induction hypothesis includes all earlier cases, so the inductive step can use whichever smaller indices it needs. It cannot use itself.[ref]
This is useful when a construction breaks into smaller pieces of varying sizes. A prime factorization splits a composite number into smaller integer divisors, which need not be one less than the original integer. A recursive procedure can likewise call itself on several smaller inputs. The available cases should match those dependencies. Strong induction lets the mathematical proof follow the construction rather than forcing every step through the immediately preceding size.
Strong induction does not prove more than ordinary mathematical induction. Put . Ordinary mathematical induction on retains the earlier cases and obtains the next one, establishing the same conclusion. Conversely, an ordinary inductive step can ignore the extra cases allowed in a strong induction hypothesis.[ref]
The well-ordering principle gives another view. A least counterexample would have all smaller cases true, so the strong induction step would establish that allegedly false case. The starting case excludes the beginning.
Every integer has a prime factorization. The induction base case is prime. For a larger integer, either it is prime or it is , with . The induction hypothesis supplies prime factorizations of both smaller integer divisors; multiplying them gives one for . This proves existence, while uniqueness requires the additional argument under the fundamental theorem of arithmetic.[ref]
For the chosen number , one possible recursive decomposition is
The step at needs results for and , rather than a result for . Each composite number in this factorization tree splits into strictly smaller positive integers, so recursive descent terminates at prime numbers. The tree describes one construction; another choice of integer divisors can give a differently shaped factorization tree.
Figure 1.
The step for 84 can use 6 and 14: the induction hypothesis covers both
. Original factorization tree , followed by and . Arrows show recursive dependencies toward smaller integers, rather than the order of increasing induction. The strip at the bottom marks the earlier cases available at the step for , with the required and highlighted. No use of the unproved case is permitted in the hypothesis. Details.
The same pattern explains the usefulness of strong induction for algorithm correctness. When a recursive procedure returns answers for smaller inputs, the induction hypothesis can justify those answers; the remaining task is to justify how the current call combines them. Strictly decreasing a nonnegative integer size measure establishes termination. Correctness also requires each call's conditions and its combination rule; termination alone does not make an algorithm correct.
Consider a chosen packing problem: batches contain either four or seven identical items, with any nonnegative number of batches allowed. Which integer totals can be formed? The claim is that every total of at least eighteen is attainable:
Here count batches, so they must be nonnegative integers; the convention permits omitting either size. Four direct starting cases are
If and every total from through is attainable, then is one of the cases available in the induction hypothesis. Add a batch of four to its representation to obtain . Thus the inductive step applies to every new total from onward. Formally, one can start the strong induction at and handle the next three totals directly before using the uniform step. The finite checks and the propagation together establish all totals, not merely those drawn below.
Figure 1.
Four starting cases seed every residue class when the step adds four
. Original chosen batch sizes and . Colored rows follow ; ; ; and . Each arrow adds a batch of four. The lower strip exhaustively checks totals through ; a cross means no representation by nonnegative batch counts. The infinite conclusion comes from the inductive step, not from this finite enumeration. Details.
Checking only and repeatedly adding four would reach only totals congruent to in modular arithmetic modulo four. The four induction base cases supply all four residue classes. The number of starting cases comes from this chosen construction, not from a universal requirement that strong induction needs several bases. A different construction can need different starting information.
The threshold is sharp for these batch sizes. If , reducing modulo four gives , so . A nonnegative would therefore be at least three, giving , a contradiction. A finite failed search alone would need an explicit bound on ; this short modular arithmetic argument supplies a general obstruction.