Recursion Meaning and Definition

Recursion

Recursion

Pronunciation

/rɪˈkɜːrʃən/

Part of Speech

Noun

Definition

The act of repeating a process or step within the same function or process, causing a function to call itself again and again, without stopping, until a stopping condition is met.

Examples

  • The recursive function kept calling itself until the input size was less than 10.
  • The program used recursion to calculate the factorial of a number.
  • The algorithm used recursion to traverse the tree data structure.

Synonyms

  • Iteration
  • Self-referential

Antonyms

  • Distributed processing
  • Parallel processing

Etymology

The word “recursion” comes from the Latin “recurri”, meaning “to come back”, and is first used in the 15th century to describe the process of a function calling itself.

Usage Notes

When using recursion, it is important to ensure that the stopping condition is well-defined to avoid infinite loops.

Cultural References

Recursion is often used as a literary device in stories and novels to create a sense of continuity and cycles.

Idiomatic Expressions or Phrases

Digging one’s own grave

Related Words or Phrases

  • Iteration
  • Bisection
  • Fibonacci sequence

Collocations

  • Recursive function
  • Recursive algorithm

Frequency of Use

Recursion is commonly used in computer science and mathematics, but is also used in literature and popular culture.

Common Misspellings

  • Recursion is often misspelled as “reccursion” or “recussion”.

Related Words