Categories
algebra theory

Sorting algorithms as recursive functions

This paper is an experiment in presenting programming algorithms as recursive functions, without pseudo-code or genuine code. The algorithms presented are the standard basic sorting algorithms with some computational complexity analysis. The style is that of ordinary working mathematics although the case statements of the recursive functions look a lot like pattern matching.

Download

 

Categories
academics theory

Basic math for basic algorithms

It’s odd that all the descriptions of basic programming operations, such as sorting, rely on pseudo code or complex formal logic. All we are doing is modifying finite sequences so it seems like we should be able to use ordinary algebra. I’m going to start by defi ning basic operations on finite sequences and then look at the usual algorithms for sorting them – all without either using any pseudo code or any formal methods.

Download.