A duality of sorts

1Citations
Citations of this article
9Readers
Mendeley users who have this article in their library.
Get full text

Abstract

Sorting algorithms are one of the key pedagogical foundations of computer science, and their properties have been studied heavily. Perhaps less well known, however, is the fact that many of the basic sorting algorithms exist as a pair, and that these pairs arise naturally out of the duality between folds and unfolds. In this paper, we make this duality explicit, by showing how to define common sorting algorithms as folds of unfolds, or, dually, as unfolds of folds. This duality is preserved even when considering optimised sorting algorithms that require more exotic variations of folds and unfolds, and intermediary data structures. While all this material arises naturally from a categorical modelling of these recursion schemes, we endeavour to keep this presentation accessible to those not versed in abstract nonsense. © 2013 Springer-Verlag Berlin Heidelberg.

Cite

CITATION STYLE

APA

Hinze, R., Magalhães, J. P., & Wu, N. (2013). A duality of sorts. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 8106, pp. 151–167). Springer Verlag. https://doi.org/10.1007/978-3-642-40355-2_11

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free