3 ms·
You are misunderstanding the problem. Given a particular set, the question is enumerating the subsets that add to a particular thing. The fact that numbers th
by btilly 4y ago
You are misunderstanding the problem.
Given a particular set, the question is enumerating the subsets that add to a particular thing. The fact that numbers themselves could be represented as a linked list has nothing to do with it. And there is no particularly useful generating function to use either.
For example there are 303 primes less than 2000, and 47,839,398,752,301 subsets of them add up to 2000. If you arrange them in lexicographic order, what is the 5 trillionth one?