I am really not mathematically inclined so whatever I'm asking might have already an obvious solution.
For most combination problems, we are given the choice to add our own values (is it n?), decide on the combination size, m, and generate the results
My question is, is it possible, if we add our number values (e.g. A:10, B:20, C:30) but instead of combination size (m), we have a choice to pick a total number combination, lets say Q, (Q= 40) and the algorithm show possible number values that could make up that total number value combination (Q).
In this case, the possible number value combinations could be
Q (Total Number Combination)= 40, where A:10, B:20, C:30
(1) A+A+A+A (10+10+10+10)
(2) B+B (20+20)
(3) A+A+B (10+10+20)
(4) A+C (10+30)
Could also allow for non-duplicates of values, in fact I would prefer that in a single combination to have no duplicates.
This is just a simplified example of what I'm doing, if you need more clarification, just buzz!
Thank you in advance Maths community! :)