Hostname: page-component-cd9895bd7-p9bg8 Total loading time: 0 Render date: 2024-12-22T00:09:45.692Z Has data issue: false hasContentIssue false

Perfect trees and bit-reversal permutations

Published online by Cambridge University Press:  01 May 2000

RALF HINZE
Affiliation:
Institut für Informatik III, Universität Bonn, Römerstraße 164, 53117 Bonn, Germany (e-mail: ralf@informatik.uni-bonn.de)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

One well known algorithm is the Fast Fourier Transform (FFT). An efficient iterative version of the FFT algorithm performs as a first step a bit-reversal permutation of the input list. The bit-reversal permutation swaps elements whose indices have binary representations that are the reverse of each other. Using an amortized approach, this operation can be made to run in linear time on a random-access machine. An intriguing question is whether a linear-time implementation is also feasible on a pointer machine, that is, in a purely functional setting. We show that the answer to this question is in the affirmative. In deriving a solution, we employ several advanced programming language concepts such as nested datatypes, associated fold and unfold operators, rank-2 types and polymorphic recursion.

Type
FUNCTIONAL PEARL
Copyright
© 2000 Cambridge University Press
Submit a response

Discussions

No Discussions have been published for this article.