 A simple, general method for constructing termination proofs involves associating a measure with each step of an algorithm.The measure is taken from the domain of a well-founded relation, such as from the ordinal numbers.If the measure "decreases" according to the relation along every possible step of the algorithm, it must terminate, because there are no infinite descending chains with respect to a well-founded relation.