Using a Progress Measure

This is another trick that you might not have studied formally but have used (implicitly) before. This trick is generally used to bound the number of times a loop is executed in an algorithm.