Verification of backtracking and branch and bound design templates
- 76 Downloads
The design and analysis of computer algorithms is a requirement of computer curricula. It covers many topics, including data structures, complexity theory, and algorithmic design patterns. This course is about the greedy method, divide and conquer, dynamic programming, backtracking, and branch and bound. Naturally, all the listed design patterns are taught, learned, and comprehended using examples. However, they can be semiformalized as design templates, specified by correctness conditions, and manually verified by means of the Floyd method. Moreover, this approach can lead to new insights and better comprehension of the design patterns, specifications, and verification methods. In this paper, we demonstrate the utility of the approach using the study of the backtracking and branch-and-bound design patterns. In particular, we prove the correctness of the suggested templates when the boundary condition is monotone, but the decision condition is antimonotone on sets of “visited” vertices.
Keywordsbacktracking branch and bound abstract data type partial correctness total correctness Floyd proof method n-queen puzzle knapsack problem
Unable to display preview. Download preview PDF.
- 2.Gries, D., The Science of Programming, Berlin: Springer-Verlag, 1983; Moscow: Mir, 1984.Google Scholar
- 4.Corman, T., Leiserson, C., and Rivest, R., Introduction to Algorithms, Cambridge: The MIT Press, 1990; Moscow: MTsNMO, 2000.Google Scholar
- 6.Shilov, N.V., Osnovy sintaksisa, semantiki. translyatsii i verifikatsii programm (Fundamentals of Semantics, Translation and Verification of Program), Novosibirsk: Novosib. Gos. Univ., 2011.Google Scholar
- 7.Apt, K.R., de Boer, F.S., and Olderog, E.-R., Verification of Sequential and Computer Science, Berlin: Springer Verlag, 2009.Google Scholar
- 8.Floyd, R.W., Assinging Meanings to Programs, in Mathematical Aspects of Computer Science, Schwartz, J.T., Ed., Providence: Am. Math. Society, 1967, vol. 19, pp. 19–32; Proc. Symp. in Appl. Mathematics, 1967.Google Scholar
- 9.Golomb, S.W. and Baumert, L.D., Backtrack Programming, J. ACM, 1965, no. 4, pp. 516–524.Google Scholar
- 10.Land, A.H. and Doig, A.G., An Automatic Method of Solving Discrete Programming Problems, Econometrica, 1960, no. 3, pp. 497–520.Google Scholar
- 12.Smith, D.R., Automating the Design of Algorithms, in Formal Program Development, IFIP TC2/WG2.1 State-of-the-Art Report, Möller, B., Partsch, H., and Schumann, S., Eds., Lect. Notes Comput. Sci., 1993, vol. 755, pp. 324–354.Google Scholar