Section: STEM · Computer ScienceDifficulty: Medium

Recursion

USUK
US/recursion/UK/recusion/

A programming technique where a function calls itself to solve smaller instances of a problem.

Definition

Recursion is a programming and mathematical technique where a function or algorithm calls itself with a smaller or simpler input to solve a problem, breaking it into subproblems of the same type until reaching a base case. Every recursive algorithm requires at least one base case to prevent infinite loops. Recursion is naturally suited to problems with a recursive structure, such as tree traversal, fractal generation, and divide-and-conquer algorithms.

Example

“Computing the factorial of 5 recursively calls factorial(4), which calls factorial(3), continuing until factorial(1) returns 1, then the results multiply back up through the call stack to give 120.”

Usage Examples

  1. 1

    “The team applied recursion best practices to improve their computer science outcomes significantly.”

  2. 2

    “Understanding recursion is essential for anyone building a career in STEM.”

When & How to Use

Use 'Recursion' when working in Computer Science contexts where recursion is a programming and mathematical technique where a function or algorithm calls itself with a smaller or simpler input to solve a problem, breaking it into subproblems of the same type until reaching a base case.

  • ▸Applying recursion principles during a computer science project or initiative
  • ▸Explaining recursion to a junior team member or stakeholder unfamiliar with STEM
  • ▸Evaluating options or proposals using recursion as a decision-making criterion

Etymology & Origin

The term 'Recursion' derives from professional usage and entered STEM professional usage as the field formalised in the 20th century.

History & Evolution

The concept of recursion has evolved alongside STEM. Early practitioners relied on informal methods; structured approaches emerged with the professionalisation of computer science in the mid-20th century. Today, recursion is a standard part of STEM practice globally.

Synonyms

  • self-referential function
  • recursive function
  • divide-and-conquer

Antonyms / Opposites

  • iteration
  • iterative loop

Images

CC-licensed · free to use
More on Wikimedia
Loading images…

Video

Dictionary Entry

Back to STEM