© 1988 by British Computer Society
A Smooth Reshuffling Algorithm for Solving the Bulterman's Problem
Department of Computer Science, The University of Western Australia, Nedlands, WA 6009, Australia
This paper presents an efficient algorithm for solving the Bulterman's reshuffling problem in the spirit of smoothsort. The Bulterman's reshuffling problem is concerned with permuting an array of red and blue elements such that red elements are moved to specified positions without disturbing the relative order of blue elements. This smooth reshuffling algorithm solves the problem by utilising two processes, left sweep and right sweep; the latter is callable from the former. This algorithm is shown to be superior to a previously published algorithm which uses a brute force approach.
Received February 1987. revised March 1987.
* Now at Department of Maths and Computing Sciences, St Francis Xavier University, Antigonish, Nova Scotia, Canada B2G 1CO.
Department of Computer Science, The University of Western Australia, Nedlands, WA 6009, Australia