An Efficient generic algorithm for the generation of unlabelled cycles
Document typeExternal research report
Rights accessOpen Access
In this report we combine two recent generation algorithms to obtain a new algorithm for the generation of unlabelled cycles. Sawada's algorithm lists all k-ary unlabelled cycles with fixed content, that is, the number of occurences of each symbol is fixed and given a priori. The other algorithm, by the authors, generates all multisets of objects with given total size n from any admissible unlabelled class A. By admissible we mean that the class can be specificied using atomic classes, disjoints unions, products, sequences, (multi)sets, etc. The resulting algorithm, which is the main contribution of this paper, generates all cycles of objects with given total size n from any admissible class A. Given the generic nature of the algorithm, it is suitable for inclusion in combinatorial libraries and for rapid prototyping. The new algorithm incurs constant amortized time per generated cycle, the constant only depending in the class A to which the objects in the cycle belong.
CitationMartinez, C., Molinero, X. "An Efficient generic algorithm for the generation of unlabelled cycles". 2003.
Is part ofLSI-03-35-R
All rights reserved. This work is protected by the corresponding intellectual and industrial property rights. Without prejudice to any existing legal exemptions, reproduction, distribution, public communication or transformation of this work are prohibited without permission of the copyright holder