1-3hit |
Shin-ichiro KAWANO Shin-ichi NAKANO
In this paper we give a simple algorithm to generate all partitions of {1,2,,n} into k non-empty subsets. The number of such partitions is known as the Stirling number of the second kind. The algorithm generates each partition in constant time without repetition. By choosing k = 1,2,,n we can also generate all partitions of {1,2,,n} into subsets. The number of such partitions is known as the Bell number.
Katsuhisa YAMANAKA Shin-ichiro KAWANO Yosuke KIKUCHI Shin-ichi NAKANO
In this paper we give a simple algorithm to generate all partitions of a positive integer n. The problem is one of the basic problems in combinatorics, and has been extensively studied for a long time. Our algorithm generates each partition of a given integer in constant time for each without repetition, while best known algorithm generates each partition in constant time on "average." Also, we propose some algorithms to generate all partitions of an integer with some additional property in constant time.
Shin-ichiro KAWANO Shin-ichi NAKANO
In this paper we give an algorithm to generates all series-parallel graphs with at most m edges. This algorithm generate each series-parallel graph in constant time on average.