Two new strategies for developing loop invariants and their applications
The loop invariants take a very important role in the design, proof and derivation of the algorithmic program. We point out the limitations of the traditional standard strategy for developing loop invariants, and propose two new strategies for proving the existing algorithmic program and developing new ones. The strategies use recurrence as vehicle and integrate some effective methods of designing algorithms, e. g. Dynamic Programming, Greedy and Divide- Conquer, into the recurrence relation of problem solving sequence. This lets us get straightforward an approach for solving a variety of complicated problems, and makes the standard proof and formal derivation of their algorithmic programs possible. We show the method and advantages of applying the strategies with several typical nontrivial examples.
Key wordsLoop invariant standard proof and formal derivation of program recurrence relation algorithm design
Unable to display preview. Download preview PDF.
- Gries, D. and Wadkins, J., An Introduction to Proofs of Program Correctness for Teacher of College-level Introduction, Programming Courses. TR90-1102, Dept. of CS, Cornell Univ., 1990.Google Scholar
- Harel, D., Algorithmics: The Spirit of Computing. Addison-Wesley, 108–109, 1987.Google Scholar
- Denning, P., A debate on teaching computing science.CACM., 1989, 32, 1397–1414.Google Scholar
- Li Zhaoren, A formal method of programming and the experimental system.Chinese Journal of Computers, 1985, 8(1), 8–18.Google Scholar
- Xue, Jinyun, On Loop Invariant and Its Developing Techniques. Proceedings of China 4th Conference On Software Engneering, 1991. (in Chinese).Google Scholar
- Aho, A., Hopcroft, J. and Ullman, J., Data Structures and Algorithms. Addison-Wesley Publishing Company, 1983.Google Scholar