Content deleted Content added
fix the previous edit Tags: Reverted 2017 wikitext editor |
→Formal definitions: remove circularity Tags: Reverted 2017 wikitext editor |
||
Line 12:
==Formal definitions==
[[File:Serpiente alquimica.jpg|thumb|[[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 (i.e. self-referential) behavior when it can be defined by two properties:
* {{anchor|base case}}A simple ''base case'' (or cases) — a terminating scenario that does not use
* {{anchor|recursive step}}A ''recursive step'' — a set of rules that reduces all successive cases toward the base case by possibly invoking (referring to) the definition itself.
For example, the following is a recursive definition of a person's ''ancestor''. One's ancestor is either:
|