Recursion

From Department of Mathematics at UTSA
Jump to navigation Jump to search

Recursion in mathematics

The Sierpinski triangle—a confined recursion of triangles that form a fractal

Recursively defined sets

Template:Main

Example: the natural numbers

The canonical example of a recursively defined set is given by the natural numbers:

0 is in
if n is in , then n + 1 is in
The set of natural numbers is the smallest set satisfying the previous two properties.

In mathematical logic, the Peano axioms (or Peano postulates or Dedekind–Peano axioms), are axioms for the natural numbers presented in the 19th century by the German mathematician Richard Dedekind and by the Italian mathematician Giuseppe Peano. The Peano Axioms define the natural numbers referring to a recursive successor function and addition and multiplication as recursive functions.

Example: Proof procedure

Another interesting example is the set of all "provable" propositions in an axiomatic system that are defined in terms of a proof procedure which is inductively (or recursively) defined as follows:

  • If a proposition is an axiom, it is a provable proposition.
  • If a proposition can be derived from true reachable propositions by means of inference rules, it is a provable proposition.
  • The set of provable propositions is the smallest set of propositions satisfying these conditions.

Finite subdivision rules

Finite subdivision rules are a geometric form of recursion, which can be used to create fractal-like images. A subdivision rule starts with a collection of polygons labelled by finitely many labels, and then each polygon is subdivided into smaller labelled polygons in a way that depends only on the labels of the original polygon. This process can be iterated. The standard `middle thirds' technique for creating the Cantor set is a subdivision rule, as is barycentric subdivision.

Functional recursion

A function may be recursively defined in terms of itself. A familiar example is the Fibonacci number sequence: F(n) = F(n − 1) + F(n − 2). For such a definition to be useful, it must be reducible to non-recursively defined values: in this case F(0) = 0 and F(1) = 1.

A famous recursive function is the Ackermann function, which, unlike the Fibonacci sequence, cannot be expressed without recursion.

Proofs involving recursive definitions

Applying the standard technique of proof by cases to recursively defined sets or functions, as in the preceding sections, yields structural induction — a powerful generalization of mathematical induction widely used to derive proofs in mathematical logic and computer science.

Recursive optimization

Dynamic programming is an approach to optimization that restates a multiperiod or multistep optimization problem in recursive form. The key result in dynamic programming is the Bellman equation, which writes the value of the optimization problem at an earlier time (or earlier step) in terms of its value at a later time (or later step).

The recursion theorem

In set theory, this is a theorem guaranteeing that recursively defined functions exist. Given a set X, an element a of X and a function f: XX, the theorem states that there is a unique function (where denotes the set of natural numbers including zero) such that

for any natural number n.

Proof of uniqueness

Take two functions and such that:

where a is an element of X.

It can be proved by mathematical induction that F(n) = G(n) for all natural numbers n:

Base Case: F(0) = a = G(0) so the equality holds for n = 0.
Inductive Step: Suppose F(k) = G(k) for some Template:Nowrap Then F(k + 1) = f(F(k)) = f(G(k)) = G(k + 1).
Hence F(k) = G(k) implies F(k + 1) = G(k + 1).

By induction, F(n) = G(n) for all .