RUS  ENG
Full version
JOURNALS // Vestnik Sankt-Peterburgskogo Universiteta. Seriya 10. Prikladnaya Matematika. Informatika. Protsessy Upravleniya // Archive

Vestnik S.-Petersburg Univ. Ser. 10. Prikl. Mat. Inform. Prots. Upr., 2020 Volume 16, Issue 1, Pages 50–61 (Mi vspui438)

Computer science

A parallel algorithm for iterating partitions of a finite set into subsets of a given cardinality

A. M. Kovshov

St. Petersburg State University, 7-9, Universitetskaya nab., St. Petersburg, 199034, Russian Federation

Abstract: The article describes an iterative algorithm for searching partitions of a finite set consisting of distinguishable elements into subsets of a given cardinality. The cardinalities of some subsets may be the same. The entire algorithm consists of two independent algorithms. The first algorithm for each element of the original set determines the cardinality of the subset that it will fall into when partitioning. To do this, subsets of the same cardinality are united into composite subsets. The elements of the original set are distributed among composite subsets. An index array is created to describe partitions. This array of indexes indicates which composite subset each element falls into. The length of the index array is equal to the cardinality of the original set. Each composite subset has its own index in the index array. Iterating over partitions of the original set into composite subsets is reduced to iterating over all index permutations in the index array. The second algorithm distributes elements within each composite subset over subsets of equal cardinalities. For each composite subset, an index array is created that describes which subset each element of the composite subset falls into. Iterating over all partitions of a composite subset over equally powerful subsets is reduced to iterating over-index permutations. Permutations must meet the following condition: the index value must not exceed the ordinal number of its place in the permutation. This avoids generating the same permutations. Permutations of all index arrays are iterated in lexicographic order. This construction of the algorithm allows to split the entire search into independent parts and use parallel calculations. An example is considered that shows the consistency of the algorithm and the acceleration of obtaining the result when using parallel calculations.

Keywords: exhaustive search algorithms, parallel computing.

UDC: 519.163

MSC: 05A18

Received: February 2, 2020
Accepted: February 13, 2020

DOI: 10.21638/11701/spbu10.2020.105



© Steklov Math. Inst. of RAS, 2024