Nepedia
Back to Discover
Fluent Reader
🔢

Recursion

math Maturity 7-9 Next article →

Have you ever seen a picture of a person holding a box?

Droste Cacao Alcalinise blikje, foto4
Droste Cacao Alcalinise blikje, foto4

Inside that box is a smaller version of the same person holding the same box. This creates a loop that seems to go on forever. This idea is called recursion. Recursion happens when a rule or a process depends on a previous version of itself. It is like a set of steps that calls upon its own steps to finish a job. You might see this in a mirror that faces another mirror. It can also look like a snake eating its own tail.

Serpiente alquimica
Serpiente alquimica

To work correctly, recursion needs two special parts. The first part is called a base case. A base case is a simple stopping point that does not use recursion. Without a base case, a process might loop forever without ever finishing. The second part is the recursive step. This is a rule that breaks a big problem into smaller versions. These smaller versions must always get closer to the base case. Think of finding your ancestors. Your parent is a base case. Your parent's ancestor is the recursive step.

Mixing Sourdough starter into the flour
Mixing Sourdough starter into the flour

Math experts have used recursion to explain how numbers work for a long time. In the 19th century, mathematicians Richard Dedekind and Giuseppe Peano created the Peano axioms. These rules define natural numbers using recursion. They say that zero is a natural number. Then, they say every number has a successor, which is also a natural number. This simple rule lets us build all the numbers we use for counting.

Sierpinski triangle
Sierpinski triangle

We also see recursion in the Fibonacci sequence. This sequence uses the two previous numbers to find the next one. It is a famous way to show recursive math in action.

Recursion is also a very important part of how we use language. A famous linguist named Noam Chomsky argued that recursion helps us make endless sentences. A sentence can have another sentence tucked inside it. For example, you might say, "Dorothy thinks that witches are dangerous." The part about the witches is a whole sentence inside the first one. This allows humans to create sentences of almost any length. Some people, like Daniel Everett, have challenged this idea. However, many others believe recursion is what makes human language so creative.

Even computer scientists enjoy playing with recursion. They often use it to make jokes in their textbooks. One joke says that to understand recursion, you must first understand recursion. This is a circular definition that never reaches a base case. Some computer programs even use recursive names. For example, the name PHP stands for "PHP Hypertext Preprocessor." This means the name uses itself to define itself.

Toronto recursive history plaque
Toronto recursive history plaque

Whether in math, art, or talk, recursion shows how small rules can build huge things.

458 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (7)
File:Droste Cacao Alcalinise blikje, foto4.JPG
Droste Cacao Alcalinise blikje, foto4.JPG
File:Serpiente alquimica.jpg
Serpiente alquimica.jpg
File:Mixing Sourdough starter into the flour.jpg
Mixing Sourdough starter into the flour.jpg
File:Toronto recursive history plaque.jpg
Toronto recursive history plaque.jpg
File:Sierpinski triangle.svg
Sierpinski triangle.svg
File:First matryoshka museum doll open.jpg
First matryoshka museum doll open.jpg
File:Giotto. The Stefaneschi Triptych (verso) c.1330 220x245cm. Pinacoteca, Vatican..jpg
Giotto. The Stefaneschi Triptych (verso)...
More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.