Generating Permutations of a Bag by Interchanges


Chun Wa Ko, Department of Computer Science, University of Victoria, Canada.
Frank Ruskey, Department of Computer Science, University of Victoria, Canada.

Abstract:

We present algorithms for generating all permutations of a given bag so that successive permutations differ by the interchange of two elements. One version of the algorithm runs in time linear in the number of permutations.

Keywords: Analysis of algorithms, bag, multiset, permutation, interchange.



Back to list of publications.