Mathematical Analysis of Nonrecursive Algorithms