Results 1 
6 of
6
Constructing RedBlack Trees
, 1999
"... This paper explores the structure of redblack trees by solving an apparently simple problem: given an ascending sequence of elements, construct a redblack tree which contains the elements in symmetric order. Several extreme redblack tree shapes are characterized: trees of minimum and maximum heig ..."
Abstract

Cited by 10 (3 self)
 Add to MetaCart
(Show Context)
This paper explores the structure of redblack trees by solving an apparently simple problem: given an ascending sequence of elements, construct a redblack tree which contains the elements in symmetric order. Several extreme redblack tree shapes are characterized: trees of minimum and maximum height, trees with a minimal and with a maximal proportion of red nodes. These characterizations are obtained by relating tree shapes to various number systems. In addition, connections to leftcomplete trees, AVL trees, and halfbalanced trees are highlighted. 1 Introduction Redblack trees are an elegant searchtree scheme that guarantees O(log n) worstcase running time of basic dynamicset operations. Recently, C. Okasaki (1998; 1999) presented an impressively simple functional implementation of redblack trees. In this paper we plunge deeper into the structure of redblack trees by solving an apparently simple problem: given an ascending sequence of elements, construct a redblack tree whic...
Numerical Representations as HigherOrder Nested Datatypes
, 1998
"... Number systems serve admirably as templates for container types: a container object of size n is modelled after the representation of the number n and operations on container objects are modelled after their numbertheoretic counterparts. Binomial queues are probably the first data structure that wa ..."
Abstract

Cited by 7 (2 self)
 Add to MetaCart
Number systems serve admirably as templates for container types: a container object of size n is modelled after the representation of the number n and operations on container objects are modelled after their numbertheoretic counterparts. Binomial queues are probably the first data structure that was designed with this analogy in mind. In this paper we show how to express these socalled numerical representations as higherorder nested datatypes. A nested datatype allows to capture the structural invariants of a numerical representation, so that the violation of an invariant can be detected at compiletime. We develop a programming method which allows to adapt algorithms to the new representation in a mostly straightforward manner. The framework is employed to implement three different container types: binary randomaccess lists, binomial queues, and 23 finger search trees. The latter data structure, which is treated in some depth, can be seen as the main innovation from a datastruct...
Perfect Trees and Bitreversal Permutations
, 1999
"... A famous algorithm is the Fast Fourier Transform, or FFT. An efficient iterative version of the FFT algorithm performs as a first step a bitreversal permutation of the input list. The bitreversal permutation swaps elements whose indices have binary representations that are the reverse of each othe ..."
Abstract

Cited by 4 (2 self)
 Add to MetaCart
A famous algorithm is the Fast Fourier Transform, or FFT. An efficient iterative version of the FFT algorithm performs as a first step a bitreversal permutation of the input list. The bitreversal 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 randomaccess machine. An intriguing question is whether a lineartime 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, rank2 types, and polymorphic recursion. 1 Introduction A bitreversal permutation operates on lists whose length is n = 2 k for some natural number k and swaps elements whose indices have binary representations that are the reverse of eac...
A appraisal paper on Breadthfirst search, Depthfirst search and Red
"... Abstract Breadthfirst and depthfirst search are indispensable adventure strategies leading which many other rummage around algorithms are built. In this dissertation, we projected an loomed of integrating these two strategies in a solitary algorithm that combines the corresponding strengths of mu ..."
Abstract
 Add to MetaCart
(Show Context)
Abstract Breadthfirst and depthfirst search are indispensable adventure strategies leading which many other rummage around algorithms are built. In this dissertation, we projected an loomed of integrating these two strategies in a solitary algorithm that combines the corresponding strengths of mutual. We account preliminary computational outcome using the tree width predicament as an example. This dissertation explores the configuration of redblack trees by solving an apparently straightforward crisis: grant an uphill progression of rudiments, erect, in linear time, a redblack tree that contains the rudiments in symmetric sort. Numerous tremendous redblack ranking shapes are characterized: trees of least quantity and maximum loftiness, trees with a nominal and with a maximal fraction of red nodes. 5. All paths on or after a knob to its sheet descendants restrain the equivalent amount of black nodes. The erection ought to merely take linear instance. This algorithm has a uncomplicated recursive portrayal [3]: 1. procedure DFS(v) 2. begin 3. smudge v as visited; 4. while there is an intact vertex w contiguous to v do 5. add (v, w) to T
Perfect Trees and BitReversal Permutations
, 1999
"... A famous algorithm is the Fast Fourier Transform, or FFT. An ecient iterative version of the FFT algorithm performs as a rst step a bitreversal permutation of the input list. The bitreversal permutation swaps elements whose indices have binary representations that are the reverse of each other. U ..."
Abstract
 Add to MetaCart
A famous algorithm is the Fast Fourier Transform, or FFT. An ecient iterative version of the FFT algorithm performs as a rst step a bitreversal permutation of the input list. The bitreversal 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 randomaccess machine. An intriguing question is whether a lineartime 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 armative. In deriving a solution we employ several advanced programming language concepts such as nested datatypes, associated fold and unfold operators, rank2 types, and polymorphic recursion.
Proceedings of the Workshop on Algorithmic Aspects of Advanced Programming Languages WAAAPL'99
, 1999
"... This paper describes a general framework for designing purely functional datatypes that automatically satisfy given size or structural constraints. Using the framework we develop implementations of different matrix types (eg square matrices) and implementations of several tree types (eg Braun trees, ..."
Abstract
 Add to MetaCart
This paper describes a general framework for designing purely functional datatypes that automatically satisfy given size or structural constraints. Using the framework we develop implementations of different matrix types (eg square matrices) and implementations of several tree types (eg Braun trees, 23 trees). Consider, for instance, representing square /102/ matrices. The usual representation using lists of lists fails to meet the structural constraints: there is no way to ensure that the outer list and the inner lists have the same length. The main idea of our approach is to solve in a first step a related, but simpler problem, namely to generate the multiset of all square numbers. In order to describe this multiset we employ recursion equations involving finite multisets, multiset union, addition and multiplication lifted to multisets. In a second step we mechanically derive datatype definitions from these recursion equations, which enforce the `squareness' constraint. The transf...