Abstract
A priority queue transforms an input sequence σ into an output sequence τ which is a re-ordering of the sequence σ. The setR of all such related pairs is studied in the case that σ is a binary sequence. It is proved thatR is a partial order and that ¦R¦=c n+1, the (n+1)th Catalan number. An efficient (O(n 2)) algorithm is given for computing the number of outputs achievable from a given input.
Similar content being viewed by others
References
D. E. Knuth, (1973)Fundamental Algorithms, Addison-Wesley, Reading, Mass.
T. H. Cormen, C. H. Leiserson, and R. L. Rivest (1992)Introduction to Algorithms, McGraw-Hill, Cambridge, Mass.
M. D. Atkinson and Robert Beals, Priority queues and permutations, in preparation.
M. D. Atkinson and Murali Thiyagarajah, The permutational power of a priority queue, BIT, to appear.
Author information
Authors and Affiliations
Additional information
Communicated by N. Zaguia
Rights and permissions
About this article
Cite this article
Atkinson, M.D. Transforming binary sequences using priority queues. Order 10, 31–36 (1993). https://doi.org/10.1007/BF01108706
Received:
Accepted:
Issue Date:
DOI: https://doi.org/10.1007/BF01108706