Articles

Programming Theorems and Their Applications

Published:
2020-03-24
Authors
View
Keywords
License

Copyright (c) 2022 István Fekete, Tibor Gregorics, Kinga Kovácsné Pusztai, Anna Veszprémi

Creative Commons License

This work is licensed under a Creative Commons Attribution 4.0 International License.

How To Cite
Selected Style: APA
Fekete, I., Gregorics, T., Kovácsné Pusztai, K., & Veszprémi, A. (2020). Programming Theorems and Their Applications. Teaching Mathematics and Computer Science, 17(2), 213-241. https://doi.org/10.5485/TMCS.2019.0466
Abstract

One of the effective methodological approaches in programming that supports the design and development of reliable software is analogy-based programming. Within this framework, the method of problem reduction plays a key role. Reducing a given problem to another one whose solving algorithm is already known can be made more efficient by the application of programming theorems. These represent proven, abstract solutions – in a general form – to some of the most common problems in programming. In this article, we present six fundamental programming theorems as well as pose five sample problems. In solving these problems, all six programming theorems will be applied. In the process of reduction, we will employ a concise specification language. Programming theorems and solutions to the problems will be given using the structogram form. However, we will use pseudocodes as descriptions of algorithms resembling their actual implementation in Python. A functional style solution to one of the problems will also be presented, which is to illustrate that for the implementation in Python, it is sufficient to give the specification of the problem for the design of the solution. The content of the article essentially corresponds to that of the introductory lectures of a course we offered to students enrolled in the Applied Mathematics specialization.

Subject Classification: D40