Worlds of David Darling
Encyclopedia of Science
   
Home > Encyclopedia of Science

loop



  1. A knot or hitch that holds its form.

  2. A degenerate edge of a graph that joins a vertex to itself.

  3. A sequence of instructions that is repeated either a specified number of times or until a particular condition prevails. Loops lie at the heart of most computer programs. The most common type is the iterative loop, signified by keywords such as for, while, do, and repeat, or their equivalent, in which a given set of instructions is repeated a specified number of times. The recursive loop is a more powerful construct that carries out a given set of instructions, typically including recursive calls with modified parameters back to the instruction set itself, until a terminating condition is met. Recursive algorithms solve problems by reducing them to smaller and smaller subproblems until a solution is found, reusing the same set of instructions as often as needed.

Related category

   • MATHEMATICAL TERMINOLOGY