# Recursion

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Recursion
> Markdown URL: https://mediated.wiki/source/Recursion.md
> Source: https://en.wikipedia.org/wiki/Recursion
> Source revision: 1355055648
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

Process of repeating items in a self-similar way

For other uses, see [Recursion (disambiguation)](/source/Recursion_(disambiguation)).

A visual form of recursion known as the [Droste effect](/source/Droste_effect). The woman in this image holds an object that contains a smaller image of her holding an identical object, which in turn contains a smaller image of herself holding an identical object, and so forth. 1904 Droste [cocoa](/source/Hot_chocolate) tin, designed by Jan Misset.

**Recursion** occurs when the definition of a concept or process depends on a simpler or previous version of itself.[1] Recursion is used in a variety of disciplines ranging from [linguistics](/source/Linguistics) to [logic](/source/Logic). The most common application of recursion is in [mathematics](/source/Mathematics) and [computer science](/source/Computer_science), where a [function](/source/Function_(mathematics)) being defined is applied within its own definition. While this apparently defines an infinite number of instances (function values), it is often done in such a way that no infinite loop or infinite chain of references can occur.

A process that exhibits recursion is *recursive*. [Video feedback](/source/Video_feedback) displays recursive images, as does an [infinity mirror](/source/Infinity_mirror).

## Formal definitions

[Ouroboros](/source/Ouroboros), an ancient symbol depicting a serpent or dragon eating its own tail

In mathematics and computer science, a class of objects or methods exhibits recursive behavior when it can be defined by two properties:

- A simple *base case* (or cases) — a terminating scenario that does not use recursion to produce an answer

- A *recursive step* — a set of rules that reduces all successive cases toward the base case.

For example, the following is a recursive definition of a person's *ancestor*. One's ancestor is either:

- One's parent (*base case*), *or*

- One's parent's ancestor (*recursive step*).

The [Fibonacci sequence](/source/Fibonacci_sequence) is another classic example of recursion:

- Fib(0) = 0 as base case 1,

- Fib(1) = 1 as base case 2,

- For all [integers](/source/Integer) *n* > 1, Fib(*n*) = Fib(*n* − 1) + Fib(*n* − 2).

Many mathematical axioms are based upon recursive rules. For example, the formal definition of the [natural numbers](/source/Natural_number) by the [Peano axioms](/source/Peano_axioms) can be described as: "Zero is a natural number, and each natural number has a successor, which is also a natural number."[2] By this base case and recursive rule, one can generate the set of all natural numbers.

Other recursively defined mathematical objects include [factorials](/source/Factorial), [functions](/source/Function_(mathematics)) (e.g., [recurrence relations](/source/Recurrence_relation)), [sets](/source/Set_(mathematics)) (e.g., [Cantor ternary set](/source/Cantor_ternary_set)), and [fractals](/source/Fractal).

There are various more tongue-in-cheek definitions of recursion; see [recursive humor](#Recursive_humor).

## Informal definition

[Sourdough starter](/source/Sourdough_starter) being stirred into flour to produce sourdough: the recipe calls for some sourdough left over from the last time the same recipe was made.

Recursion is the process a procedure goes through when one of the steps of the procedure involves invoking the procedure itself. A procedure that goes through recursion is said to be 'recursive'.[3]

To understand recursion, one must recognize the distinction between a procedure and the running of a procedure. A procedure is a set of steps based on a set of rules, while the running of a procedure involves actually following the rules and performing the steps.

Recursion is related to, but not the same as, a reference within the specification of a procedure to the execution of some other procedure.

When a procedure is thus defined, this immediately creates the possibility of an endless loop; recursion can only be properly used in a definition if the step in question is skipped in certain cases so that the procedure can complete.

Even if it is properly defined, a recursive procedure is not easy for humans to perform, as it requires distinguishing the new from the old, partially executed invocation of the procedure; this requires some administration as to how far various simultaneous instances of the procedures have progressed. For this reason, recursive definitions are very rare in everyday situations.

## In language

Linguist [Noam Chomsky](/source/Noam_Chomsky), among many others, has argued that the lack of an upper bound on the number of grammatical sentences in a language, and the lack of an upper bound on grammatical sentence length (beyond practical constraints such as the time available to utter one), can be explained as the consequence of recursion in natural language.[4][5]

There are many structures apart from sentences that can be defined recursively, and therefore many ways in which a sentence can embed instances of one category inside another.[6] Over the years, languages in general have proved amenable to this kind of analysis.

The generally accepted idea that recursion is an essential property of human language has been challenged by [Daniel Everett](/source/Daniel_Everett) on the basis of his claims about the [Pirahã language](/source/Pirah%C3%A3_language). Andrew Nevins, David Pesetsky and Cilene Rodrigues are among many who have argued against this.[7] Literary [self-reference](/source/Self-reference) can in any case be argued to be different in kind from mathematical or logical recursion.[8]

Recursion plays a crucial role not only in syntax, but also in [natural language semantics](/source/Natural_language_semantics). The word *and*, for example, can be construed as a function that can apply to sentence meanings to create new sentences, and likewise for noun phrase meanings, verb phrase meanings, and others. It can also apply to intransitive verbs, transitive verbs, or ditransitive verbs. In order to provide a single denotation for it that is suitably flexible, *and* is typically defined so that it can take any of these different types of meanings as arguments. This can be done by defining it for a simple case in which it combines sentences, and then defining the other cases recursively in terms of the simple one.[9]

A [recursive grammar](/source/Recursive_grammar) is a [formal grammar](/source/Formal_grammar) that contains recursive [production rules](/source/Production_(computer_science)).[10]

### Recursive humor

Recursion is sometimes used humorously in computer science, programming, philosophy, or mathematics textbooks, generally by giving a [circular definition](/source/Circular_definition) or [self-reference](/source/Self-reference), in which the putative recursive step does not get closer to a base case, but instead leads to an [infinite regress](/source/Infinite_regress). It is not unusual for such books to include a joke entry in their glossary along the lines of:

- Recursion, *see Recursion*.[11]

A variation is found on page 269 in the [index](/source/Back-of-the-book_index) of some editions of [Brian Kernighan](/source/Brian_Kernighan) and [Dennis Ritchie](/source/Dennis_Ritchie)'s book *[The C Programming Language](/source/The_C_Programming_Language)*; the index entry recursively refers to itself ("recursion 86, 139, 141, 182, 202, 269"). Early versions of this joke can be found in *Let's talk Lisp* by Laurent Siklóssy (published by Prentice Hall PTR on December 1, 1975, with a copyright date of 1976) and in *Software Tools* by Kernighan and Plauger (published by Addison-Wesley Professional on January 11, 1976). The joke also appears in *The UNIX Programming Environment* by Kernighan and Pike. It did not appear in the first edition of *The C Programming Language*. The joke is part of the [functional programming](/source/Functional_programming) folklore and was already widespread in the functional programming community before the publication of the aforementioned books.[12][13]

A plaque commemorates the Toronto Recursive History Project of Toronto's Recursive History.

Another joke is that "To understand recursion, you must understand recursion."[11] In the English-language version of the Google web search engine, when a search for "recursion" is made, the site suggests "Did you mean: *recursion*."[14] An alternative form is the following, from [Andrew Plotkin](/source/Andrew_Plotkin): *"If you already know what recursion is, just remember the answer. Otherwise, find someone who is standing closer to [Douglas Hofstadter](/source/Douglas_Hofstadter) than you are; then ask him or her what recursion is."*

[Recursive acronyms](/source/Recursive_acronym) are other examples of recursive humor. [PHP](/source/PHP), for example, stands for "PHP Hypertext Preprocessor", [WINE](/source/Wine_(software)) stands for "WINE Is Not an Emulator", [RPM](/source/RPM_Package_Manager) stands for "RPM Package manager", [GNU](/source/GNU) stands for "GNU's not Unix", and [SPARQL](/source/SPARQL) denotes the "SPARQL Protocol and RDF Query Language".

## In mathematics

The [Sierpiński triangle](/source/Sierpi%C5%84ski_triangle)—a confined recursion of triangles that form a fractal

### Recursively defined sets

Main article: [Recursive definition](/source/Recursive_definition)

#### Example: the natural numbers

See also: [Closure (mathematics)](/source/Closure_(mathematics))

The canonical example of a recursively defined set is given by the [natural numbers](/source/Natural_numbers):

- 0 is in N {\displaystyle \mathbb {N} }

- if *n* is in N {\displaystyle \mathbb {N} } , then *n* + 1 is in N {\displaystyle \mathbb {N} }

- The set of natural numbers is the smallest set satisfying the previous two properties.

In mathematical logic, the [Peano axioms](/source/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](/source/Richard_Dedekind) and by the Italian mathematician [Giuseppe Peano](/source/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](/source/Axiomatic_system) that are defined in terms of a [proof procedure](/source/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

Main article: [Finite subdivision rule](/source/Finite_subdivision_rule)

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](/source/Cantor_set) is a subdivision rule, as is [barycentric subdivision](/source/Barycentric_subdivision).

### Functional recursion

A [function](/source/Function_(mathematics)) may be recursively defined in terms of itself. A familiar example is the [Fibonacci number](/source/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.

### Proofs involving recursive definitions

Applying the standard technique of [proof by cases](/source/Proof_by_cases) to recursively defined sets or functions, as in the preceding sections, yields [structural induction](/source/Structural_induction) — a powerful generalization of [mathematical induction](/source/Mathematical_induction) widely used to derive proofs in [mathematical logic](/source/Mathematical_logic) and computer science.

### Recursive optimization

[Dynamic programming](/source/Dynamic_programming) is an approach to [optimization](/source/Optimization_(mathematics)) that restates a multiperiod or multistep optimization problem in recursive form. The key result in dynamic programming is the [Bellman equation](/source/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](/source/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*: *X* → *X*, the theorem states that there is a unique function F : N → X {\displaystyle F:\mathbb {N} \to X} (where N {\displaystyle \mathbb {N} } denotes the set of natural numbers including zero) such that

- F ( 0 ) = a {\displaystyle F(0)=a}

- F ( n + 1 ) = f ( F ( n ) ) {\displaystyle F(n+1)=f(F(n))}

for any natural number n.

Dedekind was the first to pose the problem of unique definition of set-theoretical functions on N {\displaystyle \mathbb {N} } by recursion, and gave a sketch of an argument in the 1888 essay "Was sind und was sollen die Zahlen?"[15]

#### Proof of existence

Source:[16]

Let S = { A ⊆ N × X : ( 0 , a ) ∈ A and if ( x , y ) ∈ A then ( x + 1 , f ( y ) ) ∈ A } {\displaystyle S=\{A\subseteq {\mathbb {N} }\times X:(0,a)\in A{\text{ and if }}(x,y)\in A{\text{ then }}(x+1,f(y))\in A\}} .

S is not empty since N × X ∈ S {\displaystyle {\mathbb {N} }\times X\in S} . Let g = ⋂ A ∈ S A {\displaystyle g=\bigcap _{A\in S}A} . Now ( 0 , a ) ∈ g {\displaystyle (0,a)\in g} since it is in all A ∈ S {\displaystyle A\in S} . Moreover, if ( x , y ) ∈ g {\displaystyle (x,y)\in g} then ( x , y ) ∈ A {\displaystyle (x,y)\in A} for all A ∈ S {\displaystyle A\in S} . But then ( x + 1 , f ( y ) ) ∈ A {\displaystyle (x+1,f(y))\in A} for all A ∈ S {\displaystyle A\in S} so that ( x + 1 , f ( y ) ) ∈ g {\displaystyle (x+1,f(y))\in g} . Therefore g ∈ S {\displaystyle g\in S} and it is the smallest element of S.

Let T = { n ∈ N : ∃ z ∈ X such that ( n , z ) ∈ g } {\displaystyle T=\{n\in {\mathbb {N} }:\exists z\in X{\text{ such that }}(n,z)\in g\}} . Now 0 ∈ T {\displaystyle 0\in T} since ( 0 , a ) ∈ g {\displaystyle (0,a)\in g} . Suppose n ∈ T {\displaystyle n\in T} . Then ( n , z ) ∈ g {\displaystyle (n,z)\in g} for some z ∈ X {\displaystyle z\in X} . This gives ( n + 1 , f ( z ) ) ∈ g {\displaystyle (n+1,f(z))\in g} . Hence n + 1 ∈ T {\displaystyle n+1\in T} . It follows by [mathematical induction](/source/Mathematical_induction) that T = N {\displaystyle T={\mathbb {N} }} .

Let U = { x ∈ N : if ( x , y ) , ( x , z ) ∈ g then y = z } {\displaystyle U=\{x\in {\mathbb {N} }:{\text{if }}(x,y),(x,z)\in g{\text{ then }}y=z\}} . Suppose for contradiction that 0 ∉ U {\displaystyle 0\notin U} . That is, suppose we have ( 0 , z ) {\displaystyle (0,z)} , in addition, ( 0 , a ) ∈ g {\displaystyle (0,a)\in g} , where z ≠ a {\displaystyle z\neq a} . Then g ∖ { ( 0 , z ) } ∈ S {\displaystyle g\backslash \{(0,z)\}\in S} , contradicting the fact that g is the smallest element of S. Thus, 0 ∈ U {\displaystyle 0\in U} .

We show that if x ∈ U {\displaystyle x\in U} then x + 1 ∈ U {\displaystyle x+1\in U} . Suppose this is not the case. Then ∃ m ∈ U {\displaystyle \exists m\in U} so that m + 1 ∉ U {\displaystyle m+1\notin U} . Since m ∈ U {\displaystyle m\in U} and T = N {\displaystyle T={\mathbb {N} }} , there is a unique n ∈ N {\displaystyle n\in \mathbb {N} } with ( m , n ) ∈ g {\displaystyle (m,n)\in g} . Then ( m + 1 , f ( n ) ) ∈ g {\displaystyle (m+1,f(n))\in g} . Since m + 1 ∉ U {\displaystyle m+1\notin U} , there is an ( m + 1 , z ) ∈ g {\displaystyle (m+1,z)\in g} , in addition to ( m + 1 , f ( n ) ) ∈ g {\displaystyle (m+1,f(n))\in g} , where z ≠ f ( n ) {\displaystyle z\neq f(n)} . But then g ∖ { ( m + 1 , z ) } ∈ S {\displaystyle g\backslash \{(m+1,z)\}\in S} , contradicting the fact that g is the smallest element of S. The mathematical induction then says that U = N {\displaystyle U={\mathbb {N} }} . Therefore there exists a function whose graph is g. Denote it by F.

#### Proof of uniqueness

Take two functions F : N → X {\displaystyle F:\mathbb {N} \to X} and G : N → X {\displaystyle G:\mathbb {N} \to X} such that:

- F ( 0 ) = a {\displaystyle F(0)=a}

- G ( 0 ) = a {\displaystyle G(0)=a}

- F ( n + 1 ) = f ( F ( n ) ) {\displaystyle F(n+1)=f(F(n))}

- G ( n + 1 ) = f ( G ( n ) ) {\displaystyle G(n+1)=f(G(n))}

where a is an element of X.

It can be proved by [mathematical induction](/source/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 k ∈ N {\displaystyle k\in \mathbb {N} } . 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 n ∈ N {\displaystyle n\in \mathbb {N} } .

## In computer science

Main article: [Recursion (computer science)](/source/Recursion_(computer_science))

A common method of simplification is to divide a problem into subproblems of the same type. As a [computer programming](/source/Computer_programming) technique, this is called [divide and conquer](/source/Divide_and_conquer_algorithm) and is key to the design of many important algorithms. Divide and conquer serves as a top-down approach to problem solving, where problems are solved by solving smaller and smaller instances. A contrary approach is [dynamic programming](/source/Dynamic_programming). This approach serves as a bottom-up approach, where problems are solved by solving larger and larger instances, until the desired size is reached.

A classic example of recursion is the definition of the [factorial](/source/Factorial) function, given here in [Python](/source/Python_(programming_language)) code:

def factorial(n):
    if n > 0:
        return n * factorial(n - 1)
    else:
        return 1

The function calls itself recursively on a smaller version of the input (n - 1) and multiplies the result of the recursive call by n, until reaching the [base case](/source/Base_case_(recursion)), analogously to the mathematical definition of factorial.

Recursion in computer programming is exemplified when a function is defined in terms of simpler, often smaller versions of itself. The solution to the problem is then devised by combining the solutions obtained from the simpler versions of the problem. One example application of recursion is in [parsers](/source/Parser) for programming languages. The great advantage of recursion is that an infinite set of possible sentences, designs or other data can be defined, parsed or produced by a finite computer program.

[Recurrence relations](/source/Recurrence_relation) are equations which define one or more sequences recursively. Some specific kinds of recurrence relation can be "solved" to obtain a non-recursive definition (e.g., a [closed-form expression](/source/Closed-form_expression)).

Use of recursion in an algorithm has both advantages and disadvantages. The main advantage is usually the simplicity of instructions. The main disadvantage is that the memory usage of recursive algorithms may grow very quickly, rendering them impractical for larger instances.

## In biology

Shapes that seem to have been created by recursive processes sometimes appear in plants and animals, such as in branching structures in which one large part branches out into two or more similar smaller parts. One example is [Romanesco broccoli](/source/Romanesco_broccoli).[17]

## In business

Further information: [Management cybernetics](/source/Management_cybernetics)

Recursion is sometimes referred to in [management science](/source/Management_science) as the process of iterating through levels of abstraction in large business entities.[18] A common example is the recursive nature of management [hierarchies](/source/Hierarchy), ranging from [line management](/source/Line_management) to [senior management](/source/Senior_management) via [middle management](/source/Middle_management). It also encompasses the larger issue of [capital structure](/source/Capital_structure) in [corporate governance](/source/Corporate_governance).[19]

## In art

Recursive dolls: the original set of [Matryoshka dolls](/source/Matryoshka_doll) by [Zvyozdochkin](/source/Vasily_Zvyozdochkin) and [Malyutin](/source/Sergey_Malyutin), 1892

Front face of [Giotto](/source/Giotto)'s *[Stefaneschi Triptych](/source/Stefaneschi_Triptych)*, 1320, recursively contains an image of itself (held up by the kneeling figure in the central panel).

See also: [Mathematics and art](/source/Mathematics_and_art) and [Infinity mirror](/source/Infinity_mirror)

The [Matryoshka doll](/source/Matryoshka_doll) is a physical artistic example of the recursive concept.[20]

Recursion has been used in paintings since [Giotto](/source/Giotto)'s *[Stefaneschi Triptych](/source/Stefaneschi_Triptych)*, made in 1320. Its central panel contains the kneeling figure of Cardinal Stefaneschi, holding up the triptych itself as an offering.[21][22] This practice is more generally known as the [Droste effect](/source/Droste_effect), an example of the [Mise en abyme](/source/Mise_en_abyme) technique.

[M. C. Escher](/source/M._C._Escher)'s *[Print Gallery](/source/Print_Gallery_(M._C._Escher))* (1956) is a print which depicts a distorted city containing a gallery which [recursively](/source/Recursive) contains the picture, and so *[ad infinitum](/source/Ad_infinitum)*.[23]

## In culture

The film *[Inception](/source/Inception)* has colloquialized the appending of the suffix *[-ception](https://en.wiktionary.org/wiki/-ception)* to a noun to jokingly indicate the recursion of something.[24]

## See also

- [Corecursion](/source/Corecursion) – Type of algorithm in computer science

- [Course-of-values recursion](/source/Course-of-values_recursion) – Technique for defining number-theoretic functions by recursion

- [Digital infinity](/source/Digital_infinity) – Term in theoretical linguistics

- [A Dream Within a Dream (poem)](/source/A_Dream_Within_a_Dream_(poem)) – Poem by Edgar Allan PoePages displaying short descriptions of redirect targets

- [Droste effect](/source/Droste_effect) – Recursive visual effect

- [False awakening](/source/False_awakening) – Vivid and convincing dream about awakening from sleep

- [Fixed point combinator](/source/Fixed_point_combinator) – Higher-order function Y for which Y f = f (Y f)Pages displaying short descriptions of redirect targets

- [Infinite compositions of analytic functions](/source/Infinite_compositions_of_analytic_functions) – Mathematical theory about infinitely iterated function composition

- [Infinite loop](/source/Infinite_loop) – Programming idiom

- [Infinite regress](/source/Infinite_regress) – Philosophical problem

- [Infinitism](/source/Infinitism) – Philosophical view that knowledge may be justified by an infinite chain of reasons

- [Infinity mirror](/source/Infinity_mirror) – Parallel or angled mirrors reflecting each other

- [Iterated function](/source/Iterated_function) – Result of repeatedly applying a mathematical function

- [Mathematical induction](/source/Mathematical_induction) – Form of mathematical proof

- [Mise en abyme](/source/Mise_en_abyme) – Technique of placing a copy of an image within itself, or a story within a story

- [Reentrant (subroutine)](/source/Reentrant_(subroutine)) – Concept in computer programmingPages displaying short descriptions of redirect targets

- [Self-reference](/source/Self-reference) – Sentence, idea or formula that refers to itself

- [Spiegel im Spiegel](/source/Spiegel_im_Spiegel) – 1978 musical composition by Arvo Pärt

- [Strange loop](/source/Strange_loop) – Cycles going through a hierarchy

- [Tail recursion](/source/Tail_recursion) – Subroutine call performed as final action of a procedurePages displaying short descriptions of redirect targets

- [Tupper's self-referential formula](/source/Tupper's_self-referential_formula) – Formula that visually represents itself when graphed

- [Turtles all the way down](/source/Turtles_all_the_way_down) – Statement of infinite regress

## References

1. **[^](#cite_ref-1)** Causey, Robert L. (2006). *Logic, sets, and recursion* (2nd ed.). Sudbury, Mass.: Jones and Bartlett Publishers. [ISBN](/source/ISBN_(identifier)) [0-7637-3784-4](https://en.wikipedia.org/wiki/Special:BookSources/0-7637-3784-4). [OCLC](/source/OCLC_(identifier)) [62093042](https://search.worldcat.org/oclc/62093042).

1. **[^](#cite_ref-2)** ["Peano axioms | mathematics"](https://www.britannica.com/science/Peano-axioms). *Encyclopedia Britannica*. Retrieved 2019-10-24.

1. **[^](#cite_ref-3)** ["Definition of RECURSIVE"](https://www.merriam-webster.com/dictionary/recursive). *www.merriam-webster.com*. Retrieved 2019-10-24.

1. **[^](#cite_ref-4)** Pinker, Steven (1994). *The Language Instinct*. William Morrow.

1. **[^](#cite_ref-5)** Pinker, Steven; Jackendoff, Ray (2005). "The faculty of language: What's so special about it?". *Cognition*. **95** (2): 201–236. [CiteSeerX](/source/CiteSeerX_(identifier)) [10.1.1.116.7784](https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.116.7784). [doi](/source/Doi_(identifier)):[10.1016/j.cognition.2004.08.004](https://doi.org/10.1016%2Fj.cognition.2004.08.004). [PMID](/source/PMID_(identifier)) [15694646](https://pubmed.ncbi.nlm.nih.gov/15694646). [S2CID](/source/S2CID_(identifier)) [1599505](https://api.semanticscholar.org/CorpusID:1599505).

1. **[^](#cite_ref-6)** Nordquist, Richard. ["What Is Recursion in English Grammar?"](https://www.thoughtco.com/recursion-grammar-1691901). *ThoughtCo*. Retrieved 2019-10-24.

1. **[^](#cite_ref-7)** Nevins, Andrew; Pesetsky, David; Rodrigues, Cilene (2009). ["Evidence and argumentation: A reply to Everett (2009)"](https://web.archive.org/web/20120106154616/http://web.mit.edu/linguistics/people/faculty/pesetsky/Nevins_Pesetsky_Rodrigues_2_Evidence_and_Argumentation_Reply_to_Everett.pdf) (PDF). *Language*. **85** (3): 671–681. [doi](/source/Doi_(identifier)):[10.1353/lan.0.0140](https://doi.org/10.1353%2Flan.0.0140). [S2CID](/source/S2CID_(identifier)) [16915455](https://api.semanticscholar.org/CorpusID:16915455). Archived from [the original](http://web.mit.edu/linguistics/people/faculty/pesetsky/Nevins_Pesetsky_Rodrigues_2_Evidence_and_Argumentation_Reply_to_Everett.pdf) (PDF) on 2012-01-06.

1. **[^](#cite_ref-Drucker2008_8-0)** Drucker, Thomas (4 January 2008). [*Perspectives on the History of Mathematical Logic*](https://books.google.com/books?id=R70M4zsVgREC&pg=PA110). Springer Science & Business Media. p. 110. [ISBN](/source/ISBN_(identifier)) [978-0-8176-4768-1](https://en.wikipedia.org/wiki/Special:BookSources/978-0-8176-4768-1).

1. **[^](#cite_ref-9)** Barbara Partee and Mats Rooth. 1983. In Rainer Bäuerle et al., *Meaning, Use, and Interpretation of Language*. Reprinted in Paul Portner and Barbara Partee, eds. 2002. *Formal Semantics: The Essential Readings*. Blackwell.

1. **[^](#cite_ref-ns02_10-0)** Nederhof, Mark-Jan; Satta, Giorgio (2002), "Parsing Non-recursive Context-free Grammars", *Proceedings of the 40th Annual Meeting on Association for Computational Linguistics (ACL '02)*, Stroudsburg, PA, USA: Association for Computational Linguistics, pp. 112–119, [doi](/source/Doi_(identifier)):[10.3115/1073083.1073104](https://doi.org/10.3115%2F1073083.1073104).

1. ^ [***a***](#cite_ref-Hunter_11-0) [***b***](#cite_ref-Hunter_11-1) Hunter, David (2011). [*Essentials of Discrete Mathematics*](https://books.google.com/books?id=kuwhTxCVovQC&q=recursion+joke). Jones and Bartlett. p. 494. [ISBN](/source/ISBN_(identifier)) [9781449604424](https://en.wikipedia.org/wiki/Special:BookSources/9781449604424).

1. **[^](#cite_ref-Grainger_College_12-0)** Shaffer, Eric. ["CS 173:Discrete Structures"](https://courses.engr.illinois.edu/cs173/sp2009/Lectures/lect_19.pdf) (PDF). University of Illinois at Urbana-Champaign. Retrieved 7 July 2023.

1. **[^](#cite_ref-Columbia_University_13-0)** ["Introduction to Computer Science and Programming in C; Session 8: September 25, 2008"](https://www.cs.columbia.edu/~bert/courses/1003/lecture8.pdf) (PDF). Columbia University. Retrieved 7 July 2023.

1. **[^](#cite_ref-14)** ["recursion - Google Search"](https://www.google.com/search?q=recursion). *www.google.com*. Retrieved 2019-10-24.

1. **[^](#cite_ref-15)** A. Kanamori, "[In Praise of Replacement](https://math.bu.edu/people/aki/20.pdf)", pp.50--52. Bulletin of Symbolic Logic, vol. 18, no. 1 (2012). Accessed 21 August 2023.

1. **[^](#cite_ref-16)** Math 310 Class Notes 5: The Recursion Theorem for N [\[1\]](https://www.math.wustl.edu/~chi/310notesV.pdf)

1. **[^](#cite_ref-17)** ["Picture of the Day: Fractal Cauliflower"](https://twistedsifter.com/2012/12/fractal-cauliflower-romanesco-broccoli/). 28 December 2012. Retrieved 19 April 2020.

1. **[^](#cite_ref-18)** Riding, Allan; Haines, George H.; Thomas, Roland (1994). ["The Canadian Small Business–Bank Interface: A Recursive Model"](https://journals.sagepub.com/doi/pdf/10.1177/104225879401800401). *Entrepreneurship Theory and Practice*. **18** (4). SAGE Journals: 5–24. [doi](/source/Doi_(identifier)):[10.1177/104225879401800401](https://doi.org/10.1177%2F104225879401800401).

1. **[^](#cite_ref-19)** Beer, Stafford (1972). *Brain Of The Firm*. John Wiley & Sons. [ISBN](/source/ISBN_(identifier)) [978-0471948391](https://en.wikipedia.org/wiki/Special:BookSources/978-0471948391).

1. **[^](#cite_ref-20)** Tang, Daisy (March 2013). ["CS240 -- Lecture Notes: Recursion"](https://web.archive.org/web/20180317100946/https://www.cpp.edu/~ftang/courses/CS240/lectures/recursion.htm). California State Polytechnic University, Pomona. Archived from [the original](http://www.cpp.edu/~ftang/courses/CS240/lectures/recursion.htm) on 2018-03-17. Retrieved 24 September 2015. More examples of recursion: Russian Matryoshka dolls. Each doll is made of solid wood or is hollow and contains another Matryoshka doll inside it.

1. **[^](#cite_ref-21)** ["Giotto di Bondone and assistants: Stefaneschi triptych"](http://mv.vatican.va/3_EN/pages/PIN/PIN_Sala02_03.html). The Vatican. Retrieved 16 September 2015.

1. **[^](#cite_ref-22)** Svozil, Karl (2018). [*Physical (A)Causality: Determinism, Randomness and Uncaused Events*](https://books.google.com/books?id=gxBMDwAAQBAJ&pg=PA12). Springer. p. 12. [ISBN](/source/ISBN_(identifier)) [9783319708157](https://en.wikipedia.org/wiki/Special:BookSources/9783319708157).

1. **[^](#cite_ref-23)** Cooper, Jonathan (5 September 2007). ["Art and Mathematics"](https://unwrappingart.com/art/art-and-mathematics/). Retrieved 5 July 2020.

1. **[^](#cite_ref-24)** ["-ception – The Rice University Neologisms Database"](http://neologisms.rice.edu/index.php?a=term&d=1&t=17573). Rice University. [Archived](https://web.archive.org/web/20170705153941/http://neologisms.rice.edu/index.php?a=term&d=1&t=17573) from the original on July 5, 2017. Retrieved December 23, 2016.

## Bibliography

- [Dijkstra, Edsger W.](/source/Edsger_W._Dijkstra) (1960). "Recursive Programming". *Numerische Mathematik*. **2** (1): 312–318. [doi](/source/Doi_(identifier)):[10.1007/BF01386232](https://doi.org/10.1007%2FBF01386232). [S2CID](/source/S2CID_(identifier)) [127891023](https://api.semanticscholar.org/CorpusID:127891023).

- [Johnsonbaugh, Richard](/source/Richard_Johnsonbaugh) (2004). *Discrete Mathematics*. Prentice Hall. [ISBN](/source/ISBN_(identifier)) [978-0-13-117686-7](https://en.wikipedia.org/wiki/Special:BookSources/978-0-13-117686-7).

- [Hofstadter, Douglas](/source/Douglas_Hofstadter) (1999). [*Gödel, Escher, Bach: an Eternal Golden Braid*](https://archive.org/details/gdelescherbachet00hofs). Basic Books. [ISBN](/source/ISBN_(identifier)) [978-0-465-02656-2](https://en.wikipedia.org/wiki/Special:BookSources/978-0-465-02656-2).

- [Shoenfield, Joseph R.](/source/Joseph_R._Shoenfield) (2000). [*Recursion Theory*](https://archive.org/details/recursiontheory0000shoe). A K Peters Ltd. [ISBN](/source/ISBN_(identifier)) [978-1-56881-149-9](https://en.wikipedia.org/wiki/Special:BookSources/978-1-56881-149-9).

- [Causey, Robert L.](/source/Causey%2C_Robert_L.) (2001). [*Logic, Sets, and Recursion*](https://archive.org/details/logicsetsrecursi0000caus). Jones & Bartlett. [ISBN](/source/ISBN_(identifier)) [978-0-7637-1695-0](https://en.wikipedia.org/wiki/Special:BookSources/978-0-7637-1695-0).

- Cori, Rene; Lascar, Daniel; Pelletier, Donald H. (2001). *Recursion Theory, Gödel's Theorems, Set Theory, Model Theory*. Oxford University Press. [ISBN](/source/ISBN_(identifier)) [978-0-19-850050-6](https://en.wikipedia.org/wiki/Special:BookSources/978-0-19-850050-6).

- [Barwise, Jon](/source/Jon_Barwise); Moss, Lawrence S. (1996). *Vicious Circles*. Stanford Univ Center for the Study of Language and Information. [ISBN](/source/ISBN_(identifier)) [978-0-19-850050-6](https://en.wikipedia.org/wiki/Special:BookSources/978-0-19-850050-6). - offers a treatment of [corecursion](/source/Corecursion).

- Rosen, Kenneth H. (2002). *Discrete Mathematics and Its Applications*. McGraw-Hill College. [ISBN](/source/ISBN_(identifier)) [978-0-07-293033-7](https://en.wikipedia.org/wiki/Special:BookSources/978-0-07-293033-7).

- Cormen, Thomas H.; Leiserson, Charles E.; Rivest, Ronald L.; Stein, Clifford (2001). *Introduction to Algorithms*. Mit Pr. [ISBN](/source/ISBN_(identifier)) [978-0-262-03293-3](https://en.wikipedia.org/wiki/Special:BookSources/978-0-262-03293-3).

- Kernighan, B.; Ritchie, D. (1988). [*The C programming Language*](https://archive.org/details/cprogramminglang00bria). Prentice Hall. [ISBN](/source/ISBN_(identifier)) [978-0-13-110362-7](https://en.wikipedia.org/wiki/Special:BookSources/978-0-13-110362-7).

- Stokey, Nancy; Robert Lucas; Edward Prescott (1989). *Recursive Methods in Economic Dynamics*. Harvard University Press. [ISBN](/source/ISBN_(identifier)) [978-0-674-75096-8](https://en.wikipedia.org/wiki/Special:BookSources/978-0-674-75096-8).

- Hungerford (1980). *Algebra*. Springer. [ISBN](/source/ISBN_(identifier)) [978-0-387-90518-1](https://en.wikipedia.org/wiki/Special:BookSources/978-0-387-90518-1)., first chapter on set theory.

## External links

Wikimedia Commons has media related to [Recursion](https://commons.wikimedia.org/wiki/Category:Recursion).

Look up ***[recursion](https://en.wiktionary.org/wiki/recursion)*** or ***[recursivity](https://en.wiktionary.org/wiki/recursivity)*** in Wiktionary, the free dictionary.

- [Recursion](https://web.archive.org/web/20050206051223/http://www.freenetpages.co.uk/hp/alan.gauld/tutrecur.htm) - tutorial by Alan Gauld

- [Zip Files All The Way Down](https://research.swtch.com/2010/03/zip-files-all-way-down.html)

- [Nevins, Andrew and David Pesetsky and Cilene Rodrigues. Evidence and Argumentation: A Reply to Everett (2009). Language 85.3: 671--681 (2009)](https://www.ucl.ac.uk/psychlangsci/staff/linguistics-staff/nevins-publications/npr09b)

v t e Fractals Characteristics Fractal dimensions Assouad Box-counting Higuchi Correlation Hausdorff Packing Topological Recursion Self-similarity Iterated function system Barnsley fern Cantor set Koch snowflake Menger sponge Sierpiński carpet Sierpiński triangle Apollonian gasket Fibonacci word Space-filling curve Blancmange curve De Rham curve Minkowski Dragon curve Hilbert curve Koch curve Lévy C curve Moore curve Peano curve Sierpiński curve Z-order curve String T-square n-flake Vicsek fractal Gosper curve Pythagoras tree Weierstrass function Strange attractor Multifractal system L-system Fractal canopy Space-filling curve H tree Escape-time fractals Burning Ship fractal Julia set Filled Newton fractal Douady rabbit Lyapunov fractal Mandelbrot set Misiurewicz point Multibrot set Newton fractal Tricorn Mandelbox Mandelbulb Rendering techniques Buddhabrot Orbit trap Pickover stalk Random fractals Brownian motion Brownian tree Brownian motor Fractal landscape Lévy flight Percolation theory Self-avoiding walk People Michael Barnsley Georg Cantor Bill Gosper Felix Hausdorff Desmond Paul Henry Gaston Julia Niels Fabian Helge von Koch Paul Lévy Aleksandr Lyapunov Benoit Mandelbrot Hamid Naderi Yeganeh Lewis Fry Richardson Wacław Sierpiński Other Coastline paradox Fractal art List of fractals by Hausdorff dimension The Fractal Geometry of Nature (1982 book) The Beauty of Fractals (1986 book) Chaos: Making a New Science (1987 book) Kaleidoscope Chaos theory

v t e Mathematical logic General Axiom list Cardinality First-order logic Formal proof Formal semantics Foundations of mathematics Information theory Lemma Logical consequence Model Theorem Theory Type theory Theorems (list), paradoxes Gödel's completeness – incompleteness theorems Tarski's undefinability Banach–Tarski paradox Cantor's theorem – paradox – diagonal argument Compactness Halting problem Lindström's Löwenheim–Skolem Russell's paradox Logics Traditional Classical logic Logical truth Tautology Proposition Inference Logical equivalence Consistency Equiconsistency Argument Soundness Validity Syllogism Square of opposition Venn diagram Propositional Boolean algebra Boolean functions Logical connectives Propositional calculus Propositional formula Truth tables Many-valued logic 3 finite ∞ Predicate First-order list Second-order Monadic Higher-order Fixed-point Free Quantifiers Predicate Monadic predicate calculus Set theory Set hereditary Class (Ur-)Element Ordinal number Extensionality Forcing Relation equivalence partition Set operations: intersection union complement Cartesian product power set identities Types of sets Countable Uncountable Empty Inhabited Singleton Finite Infinite Transitive Ultrafilter Recursive Fuzzy Universal Universe constructible Grothendieck Von Neumann Maps, cardinality Function/Map domain codomain image In/Sur/Bi-jection Schröder–Bernstein theorem Isomorphism Gödel numbering Enumeration Large cardinal inaccessible Aleph number Operation binary Theories Zermelo–Fraenkel axiom of choice continuum hypothesis General Kripke–Platek Morse–Kelley Naive New Foundations Tarski–Grothendieck Von Neumann–Bernays–Gödel Ackermann Constructive Formal systems (list), language, syntax Alphabet Arity Automata Axiom schema Expression ground Extension by definition conservative Relation Formation rule Grammar Formula atomic closed ground open Free/bound variable Language Metalanguage Logical connective ¬ ∨ ∧ → ↔ = Predicate functional variable propositional variable Proof Quantifier ∃ ! ∀ rank Sentence atomic spectrum Signature String Substitution Symbol function logical/constant non-logical variable Term Theory list Example axiomatic systems (list) of true arithmetic Peano second-order elementary function primitive recursive Robinson Skolem of the real numbers Tarski's axiomatization of Boolean algebras canonical minimal axioms of geometry Euclidean Elements Hilbert's Tarski's non-Euclidean Principia Mathematica Proof theory Formal proof Natural deduction Logical consequence Rule of inference Sequent calculus Theorem Systems axiomatic deductive Hilbert list Complete theory Independence (from ZFC) Proof of impossibility Ordinal analysis Reverse mathematics Self-verifying theories Model theory Interpretation function of models Model atomic equivalence finite prime saturated spectrum submodel Non-standard model of non-standard arithmetic Diagram elementary Categorical theory Model complete theory Satisfiability Semantics of logic Strength Theories of truth semantic Tarski's Kripke's T-schema Transfer principle Truth predicate Truth value Type Ultraproduct Validity Computability theory Church encoding Church–Turing thesis Computably enumerable Computable function Computable set Decision problem decidable undecidable P NP P versus NP problem Kolmogorov complexity Lambda calculus Primitive recursive function Recursion Recursive set Turing machine Type theory Related Abstract logic Algebraic logic Automated theorem proving Category theory Concrete/Abstract category Category of sets History of logic History of mathematical logic timeline Logicism Mathematical object Philosophy of mathematics Supertask Mathematics portal

Authority control databases GND

---
Adapted from the Wikipedia article [Recursion](https://en.wikipedia.org/wiki/Recursion) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Recursion?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
