Treffer: Efficient generation of subsets with a given sum

Title:
Efficient generation of subsets with a given sum
Publisher Information:
Combinatorial Press, Winnipeg, MB
Document Type:
Fachzeitschrift Article
File Description:
application/xml
Accession Number:
edsair.c2b0b933574d..6867557f44fa764ba5c108ae6dfbfa9c
Database:
OpenAIRE

Weitere Informationen

Summary: Let \(\mathbb{C}(n,p)\) denote the set of all subsets of \(\{1,2, \dots, n\}\) whose sum is \(p\), and let \(\mathbb{C} (n,k,p)\) denote the \(k\) element sets of \(\mathbb{C} (n,p)\). We show that the elements of \(\mathbb{C} (n,p)\) and \(\mathbb{C} (n,k,p)\) can be generated efficiently by simple recursive algorithms. The subsets are represented by characteristic bitstrings and by lists of elements. These representations can be generated in time that is proportional to the number of subsets generated.