Result: Efficient generation of subsets with a given sum
Title:
Efficient generation of subsets with a given sum
Authors:
Publisher Information:
Combinatorial Press, Winnipeg, MB
Subject Terms:
Document Type:
Academic journal
Article
File Description:
application/xml
Access URL:
Accession Number:
edsair.c2b0b933574d..6867557f44fa764ba5c108ae6dfbfa9c
Database:
OpenAIRE
Further Information
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.