 
Summary: ELSEVIER Theoretical Computer Science 182(1997) 145l 57
Theoretical
Computer Science
Bounded capacity priority queues
M.D. Atkinson*, D. Tulley
School of Mathematical and Computational Sciences, North Haugh, St. Andrew& Fife KY16 9SS, UK
Received October 1994; revised May 1996
Communicated by MS. Paterson
Abstract
A kbounded priority queue transforms an input sequence CTinto an output sequence z which
is a reordering of the sequence c while never storing more than k elements during the trans
formation. We consider the set of all such related pairs (a, 7) in both the case that csis a binary
sequence and the case that o is a permutation of 1,2,. ,n. We derive properties of this relation
and use it to describe systems of priority queues in series. In the binary case we give an efficient
algorithm for computing the number of outputs achievable from a given input and the number
of inputs which can give rise to a given output. Finally, we give a onetoone correspondence
between related binary inputoutput pairs and ordered forests of restricted height.
1. Introduction
Abstract data types are an important design tool in modern software systems. Al
though there is an infinity of possible data types only a small number of them occur
