Skip to main content

Sorting and Searching by Distribution: From Generic Discrimination to Generic Tries

Fritz Henglein and Ralf Hinze

Abstract

A discriminator partitions values associated with keys into groups listed in ascending order. Discriminators can be defined generically by structural recursion on representations of ordering relations. Employing type-indexed families we demonstrate how tries with an optimal-time lookup function can be constructed generically in worst-case linear time. We provide generic implementations of comparison, sorting, discrimination and trie building functions and give equational proofs of correctness that highlight core relations between these algorithms.

Book Title
Proceedings of the 11th Asian Symposium on Programming Languages and Systems (APLAS 2013)
Editor
Shan‚ Chung−chieh
ISBN
978−3−319−03541−3
Location
Melbourne‚ Australia
Pages
315−332
Publisher
Springer International Publishing
Series
Lecture Notes in Computer Science
Volume
8301
Year
2013