Abstract
Sorting algorithms can be classified in many different ways. The way presented here is by expressing the algorithms as functional programs and to classify them by means of their recursion patterns. These patterns on their turn can be classified as the natural recursion patterns that destruct or construct a given data-type, the so called cata- and anamorphisms respectively. We show that the selection of the recursion pattern can be seen as the major design decision, in most cases leaving no more room for more decisions in the design of the sorting algorithm. It is also shown that the use of alternative data structures may lead to new sorting algorithms.
This presentation also serves as a gentle, light-weight, introduction into the various morphisms.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Augusteijn, L.: Functional Programming, Program Transformations and Compiler Construction. PhD thesis, Eindhoven Technical University (October 1993)
Bird, R.S., de Moor, O.: Algebra of Programming. Prentice-Hall, Englewood Cliffs (1994)
Clark, K.L., Darlington, J.: Algorithm classification through synthesis. The Computer Journal 23(1), 61–65 (1980)
Fokkinga, M.M.: Law and order in algorithmics. PhD thesis, Twente University (1992)
Fredman, M.L., Sedgewick, R., Sleator, D.D., Tarjan, R.E.: The pairing heap: A new form of self-adjusting heap. Algorithmica 1(1), 111–129 (1986)
Hudak, P., Wadler, P., Brian, A., Fairbairn, B.J., Fasel, J., Hammond, K., Hughes, J., Johnsson, T., Kieburtz, D., Nikhil, R., Jones, S.P., Reeve, M., Wise, D., Young, J.: Report on the Programming Language Haskell, A Non-Strict, Purely Functional Language, Version 1.2. In: ACM SIGPLAN, vol. 27(5)-Section R (1992)
Jones, M.P., Peterson, J.C.: Hugs 1.4 User Manual, Included as part of the Hugs distribution (November 1998), http://www.cs.nott.ac.uk/mpj/hugs14/
Knuth, D.E.: The Art of Computer Programming, vol. 3. Addison-Wesley, Reading (1973) (Sorting and Searching)
Meijer, E.: Calculating Compilers. PhD thesis, Utrecht State University, Utrecht, The Netherlands (1992)
Watson, B.W.: Taxonomies and Toolkits of Regular Language Algorithms. PhD thesis, Eindhoven University of Technology (1995)
Wirth, N.: Algorithms + Data Structures = Programs. Prentice Hall, Englewood Cliffs (1976)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1999 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Augusteijn, L. (1999). Sorting Morphisms. In: Swierstra, S.D., Oliveira, J.N., Henriques, P.R. (eds) Advanced Functional Programming. AFP 1998. Lecture Notes in Computer Science, vol 1608. Springer, Berlin, Heidelberg. https://doi.org/10.1007/10704973_1
Download citation
DOI: https://doi.org/10.1007/10704973_1
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-66241-9
Online ISBN: 978-3-540-48506-3
eBook Packages: Springer Book Archive