Iteration describes repeating an action or process, typically producing a sequence of outcomes. The term applies in ordinary language to any repetition, and in technical fields it refers to the repeated application of the same step or procedure until a stopping condition is met.
Everyday examples
In casual speech, someone might ask, "Do I have to reiterate myself?" meaning they are repeating the same statement. Each repetition of that statement is an iteration — one occurrence in a series of similar acts.
In computer programming and algorithms
In computer science, an iteration usually means performing the body of a loop once. Typical loop constructs — such as for-loops, while-loops, and do-while loops — advance the program by executing the same instructions repeatedly, possibly with different data or state each time. The number of iterations is controlled by loop conditions, counters, or break statements, and careful use of termination criteria is essential to avoid infinite loops.
Programmers also use the word in a broader sense when describing iterative approaches to problem solving: rather than solving a problem in one pass, they apply a procedure repeatedly, refining results step by step (for example, in iterative numerical methods or successive approximation algorithms).
In mathematics and fractal geometry
Mathematicians use iteration to mean repeated application of a function to an initial value, producing a sequence x, f(x), f(f(x)), and so on. Many dynamical systems and numerical methods are studied by examining the behavior of these sequences.
In fractal construction, rules or transformations are applied repeatedly to generate successive approximations of the fractal shape. Famous examples of such processes appear in the study of the fractal geometry, where iterating a mapping can produce highly complex and self-similar structures.
Related concepts
- Iteration vs. recursion: Both involve repetition. Recursion expresses repetition through function calls that refer to themselves, while iteration explicitly repeats statements in a loop; many recursive algorithms can be transformed into iterative ones.
- Iteration count: Practical programs and analyses often track how many iterations occur to measure performance or to decide when to stop.
- Iterative design: In engineering and product development, "iteration" often denotes repeating cycles of design, testing, and refinement.