Coin change with fixed denominations with duplicate values

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












Suppose I have $1, 1 2, 2, 2 5 10$ coins.



How many ways I can get 15 by adding coins?



If I use DP then it counts 7, because $1+2+2+10 1+2+2+10 1+2+2+10 1+2+2+10 1+2+2+10 1+2+2+10$ and $10 + 5$. But actual result is $1+2+2+10$ and $10 + 5$. How do I solve efficiently?



Now I able to figure out the solution. I have to find integral solutions of equation $x+2y+5z+10m=15$ with constraints $x <= 2$, $y <= 3$, $z <= 1$ and $m <= 1$. Now how to do that?







share|cite|improve this question

















  • 1




    dynamic programming geeksforgeeks.org/dynamic-programming-subset-sum-problem
    – Debasis Jana
    2 days ago










  • Your DP answer repeats combinations, suggesting that you are thinking of the coins with the same value as different from each other. The "actual result" suggests they are the same. And you're missing combinations with $(1,1)$ replacing a $(2)$. Please edit the question to clarify. That said, I suspect there is no good algorithm to count what you want.
    – Ethan Bolker
    2 days ago














up vote
1
down vote

favorite












Suppose I have $1, 1 2, 2, 2 5 10$ coins.



How many ways I can get 15 by adding coins?



If I use DP then it counts 7, because $1+2+2+10 1+2+2+10 1+2+2+10 1+2+2+10 1+2+2+10 1+2+2+10$ and $10 + 5$. But actual result is $1+2+2+10$ and $10 + 5$. How do I solve efficiently?



Now I able to figure out the solution. I have to find integral solutions of equation $x+2y+5z+10m=15$ with constraints $x <= 2$, $y <= 3$, $z <= 1$ and $m <= 1$. Now how to do that?







share|cite|improve this question

















  • 1




    dynamic programming geeksforgeeks.org/dynamic-programming-subset-sum-problem
    – Debasis Jana
    2 days ago










  • Your DP answer repeats combinations, suggesting that you are thinking of the coins with the same value as different from each other. The "actual result" suggests they are the same. And you're missing combinations with $(1,1)$ replacing a $(2)$. Please edit the question to clarify. That said, I suspect there is no good algorithm to count what you want.
    – Ethan Bolker
    2 days ago












up vote
1
down vote

favorite









up vote
1
down vote

favorite











Suppose I have $1, 1 2, 2, 2 5 10$ coins.



How many ways I can get 15 by adding coins?



If I use DP then it counts 7, because $1+2+2+10 1+2+2+10 1+2+2+10 1+2+2+10 1+2+2+10 1+2+2+10$ and $10 + 5$. But actual result is $1+2+2+10$ and $10 + 5$. How do I solve efficiently?



Now I able to figure out the solution. I have to find integral solutions of equation $x+2y+5z+10m=15$ with constraints $x <= 2$, $y <= 3$, $z <= 1$ and $m <= 1$. Now how to do that?







share|cite|improve this question













Suppose I have $1, 1 2, 2, 2 5 10$ coins.



How many ways I can get 15 by adding coins?



If I use DP then it counts 7, because $1+2+2+10 1+2+2+10 1+2+2+10 1+2+2+10 1+2+2+10 1+2+2+10$ and $10 + 5$. But actual result is $1+2+2+10$ and $10 + 5$. How do I solve efficiently?



Now I able to figure out the solution. I have to find integral solutions of equation $x+2y+5z+10m=15$ with constraints $x <= 2$, $y <= 3$, $z <= 1$ and $m <= 1$. Now how to do that?









share|cite|improve this question












share|cite|improve this question




share|cite|improve this question








edited 2 days ago
























asked 2 days ago









Debasis Jana

63




63







  • 1




    dynamic programming geeksforgeeks.org/dynamic-programming-subset-sum-problem
    – Debasis Jana
    2 days ago










  • Your DP answer repeats combinations, suggesting that you are thinking of the coins with the same value as different from each other. The "actual result" suggests they are the same. And you're missing combinations with $(1,1)$ replacing a $(2)$. Please edit the question to clarify. That said, I suspect there is no good algorithm to count what you want.
    – Ethan Bolker
    2 days ago












  • 1




    dynamic programming geeksforgeeks.org/dynamic-programming-subset-sum-problem
    – Debasis Jana
    2 days ago










  • Your DP answer repeats combinations, suggesting that you are thinking of the coins with the same value as different from each other. The "actual result" suggests they are the same. And you're missing combinations with $(1,1)$ replacing a $(2)$. Please edit the question to clarify. That said, I suspect there is no good algorithm to count what you want.
    – Ethan Bolker
    2 days ago







1




1




dynamic programming geeksforgeeks.org/dynamic-programming-subset-sum-problem
– Debasis Jana
2 days ago




dynamic programming geeksforgeeks.org/dynamic-programming-subset-sum-problem
– Debasis Jana
2 days ago












Your DP answer repeats combinations, suggesting that you are thinking of the coins with the same value as different from each other. The "actual result" suggests they are the same. And you're missing combinations with $(1,1)$ replacing a $(2)$. Please edit the question to clarify. That said, I suspect there is no good algorithm to count what you want.
– Ethan Bolker
2 days ago




Your DP answer repeats combinations, suggesting that you are thinking of the coins with the same value as different from each other. The "actual result" suggests they are the same. And you're missing combinations with $(1,1)$ replacing a $(2)$. Please edit the question to clarify. That said, I suspect there is no good algorithm to count what you want.
– Ethan Bolker
2 days ago










2 Answers
2






active

oldest

votes

















up vote
1
down vote













The generating function for the number of solutions in integers to
$$x_1 + 2x_2 + 5 x_3 + 10 x_4 = r$$
subject to $0 le x_1 le 2$, $0 le x_2 le 3$, $0 le x_3 le 1$ and $0 le x_4 le 1$ is
$$f(x) = (1+x+x^2)(1+x^2+x^4+x^6)(1+x^5)(1+x^10)$$
The answer to your problem is the coefficient of $x^15$ when this polynomial is expanded, which is $2$. I used a computer algebra system for the expansion. Expanding the polynomial by hand is possible, but tedious unless you can find a shortcut.



Another approach is to observe that using only coins of denomination 1, 2, or 5, the largest amount you can make is 13, so you must use one coin of denomination 10 if the total is to be 15. That leaves an amount of 5 to be made up from coins of denomination 1, 2, or 5. There aren't many cases to consider, and you can probably see that the only possibilities are 5 and 1+2+2.






share|cite|improve this answer





















  • Marcus Scheuer's solution shows that pencil and paper expansion of the generating function to find the coefficient of $x^15$ is not tedious, if approached correctly.
    – awkward
    yesterday

















up vote
1
down vote













This is a supplement to the already given answer showing that calculating the coefficient is not that cumbersome. We use the coefficient of operator $[x^n]$ to denote the coefficient of $x^n$ in a polynomial.




We obtain
beginalign*
colorblue[x^15]&colorblue(1+x+x^2)(1+x^2+x^4+x^6)(1+x^5)(1+x^10)\
&=[x^15](1+x^5+x^10+x^15)(1+x+x^2)(1+x^2+x^4+x^6)tag1\
&=left([x^15]+[x^10]+[x^5]+[x^0]right)(1+x+x^2)(1+x^2+x^4+x^6)tag2\
&=left([x^5]+[x^0]right)(colorblue1+x+x^2)(colorblue1+x^2+x^4+x^6)tag3\
&=1+[x^5](1+colorbluex+x^2)(1+x^2+colorbluex^4+x^6)tag4\
&=1+1tag5\
&,,colorblue=2
endalign*




Comment:



  • In (1) we multiply out the terms with the highest powers which is convenient as we will see in step (3).


  • In (2) we use the linearity of the coefficient of operator and apply the rule $[x^p-q]A(x)=[x^p]x^qA(x)$.


  • In (3) we can skip $[x^15]$ and $[x^10]$ since they do not contribute as the highest power of $x$ is $8$.


  • In (4) we select the coefficient of $x^0$.


  • In (5) we select the coefficient of $x^5$.






share|cite|improve this answer























  • but last 6 means 1, actually it should result 2
    – Debasis Jana
    2 days ago










  • @DebasisJana: Ok, I see. From your example I thought you wanted to distinguish them.
    – Markus Scheuer
    2 days ago










  • But in terms of computation how do I solve it? If I do polynomial multiplication then it will be a brute force approach. What is the efficient algorithm?
    – Debasis Jana
    yesterday










  • @DebasisJana: As long as there is a moderate number of terms involved as in this example the brute force approach is presumably the most appropriate. Somewhat more sophisticated techniques could implement a cut off of branches as it done in the calculation from step 2 to step 3.
    – Markus Scheuer
    yesterday






  • 1




    Good point (+1). Thank you.
    – awkward
    yesterday










Your Answer




StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "69"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2871795%2fcoin-change-with-fixed-denominations-with-duplicate-values%23new-answer', 'question_page');

);

Post as a guest






























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote













The generating function for the number of solutions in integers to
$$x_1 + 2x_2 + 5 x_3 + 10 x_4 = r$$
subject to $0 le x_1 le 2$, $0 le x_2 le 3$, $0 le x_3 le 1$ and $0 le x_4 le 1$ is
$$f(x) = (1+x+x^2)(1+x^2+x^4+x^6)(1+x^5)(1+x^10)$$
The answer to your problem is the coefficient of $x^15$ when this polynomial is expanded, which is $2$. I used a computer algebra system for the expansion. Expanding the polynomial by hand is possible, but tedious unless you can find a shortcut.



Another approach is to observe that using only coins of denomination 1, 2, or 5, the largest amount you can make is 13, so you must use one coin of denomination 10 if the total is to be 15. That leaves an amount of 5 to be made up from coins of denomination 1, 2, or 5. There aren't many cases to consider, and you can probably see that the only possibilities are 5 and 1+2+2.






share|cite|improve this answer





















  • Marcus Scheuer's solution shows that pencil and paper expansion of the generating function to find the coefficient of $x^15$ is not tedious, if approached correctly.
    – awkward
    yesterday














up vote
1
down vote













The generating function for the number of solutions in integers to
$$x_1 + 2x_2 + 5 x_3 + 10 x_4 = r$$
subject to $0 le x_1 le 2$, $0 le x_2 le 3$, $0 le x_3 le 1$ and $0 le x_4 le 1$ is
$$f(x) = (1+x+x^2)(1+x^2+x^4+x^6)(1+x^5)(1+x^10)$$
The answer to your problem is the coefficient of $x^15$ when this polynomial is expanded, which is $2$. I used a computer algebra system for the expansion. Expanding the polynomial by hand is possible, but tedious unless you can find a shortcut.



Another approach is to observe that using only coins of denomination 1, 2, or 5, the largest amount you can make is 13, so you must use one coin of denomination 10 if the total is to be 15. That leaves an amount of 5 to be made up from coins of denomination 1, 2, or 5. There aren't many cases to consider, and you can probably see that the only possibilities are 5 and 1+2+2.






share|cite|improve this answer





















  • Marcus Scheuer's solution shows that pencil and paper expansion of the generating function to find the coefficient of $x^15$ is not tedious, if approached correctly.
    – awkward
    yesterday












up vote
1
down vote










up vote
1
down vote









The generating function for the number of solutions in integers to
$$x_1 + 2x_2 + 5 x_3 + 10 x_4 = r$$
subject to $0 le x_1 le 2$, $0 le x_2 le 3$, $0 le x_3 le 1$ and $0 le x_4 le 1$ is
$$f(x) = (1+x+x^2)(1+x^2+x^4+x^6)(1+x^5)(1+x^10)$$
The answer to your problem is the coefficient of $x^15$ when this polynomial is expanded, which is $2$. I used a computer algebra system for the expansion. Expanding the polynomial by hand is possible, but tedious unless you can find a shortcut.



Another approach is to observe that using only coins of denomination 1, 2, or 5, the largest amount you can make is 13, so you must use one coin of denomination 10 if the total is to be 15. That leaves an amount of 5 to be made up from coins of denomination 1, 2, or 5. There aren't many cases to consider, and you can probably see that the only possibilities are 5 and 1+2+2.






share|cite|improve this answer













The generating function for the number of solutions in integers to
$$x_1 + 2x_2 + 5 x_3 + 10 x_4 = r$$
subject to $0 le x_1 le 2$, $0 le x_2 le 3$, $0 le x_3 le 1$ and $0 le x_4 le 1$ is
$$f(x) = (1+x+x^2)(1+x^2+x^4+x^6)(1+x^5)(1+x^10)$$
The answer to your problem is the coefficient of $x^15$ when this polynomial is expanded, which is $2$. I used a computer algebra system for the expansion. Expanding the polynomial by hand is possible, but tedious unless you can find a shortcut.



Another approach is to observe that using only coins of denomination 1, 2, or 5, the largest amount you can make is 13, so you must use one coin of denomination 10 if the total is to be 15. That leaves an amount of 5 to be made up from coins of denomination 1, 2, or 5. There aren't many cases to consider, and you can probably see that the only possibilities are 5 and 1+2+2.







share|cite|improve this answer













share|cite|improve this answer



share|cite|improve this answer











answered 2 days ago









awkward

5,04611021




5,04611021











  • Marcus Scheuer's solution shows that pencil and paper expansion of the generating function to find the coefficient of $x^15$ is not tedious, if approached correctly.
    – awkward
    yesterday
















  • Marcus Scheuer's solution shows that pencil and paper expansion of the generating function to find the coefficient of $x^15$ is not tedious, if approached correctly.
    – awkward
    yesterday















Marcus Scheuer's solution shows that pencil and paper expansion of the generating function to find the coefficient of $x^15$ is not tedious, if approached correctly.
– awkward
yesterday




Marcus Scheuer's solution shows that pencil and paper expansion of the generating function to find the coefficient of $x^15$ is not tedious, if approached correctly.
– awkward
yesterday










up vote
1
down vote













This is a supplement to the already given answer showing that calculating the coefficient is not that cumbersome. We use the coefficient of operator $[x^n]$ to denote the coefficient of $x^n$ in a polynomial.




We obtain
beginalign*
colorblue[x^15]&colorblue(1+x+x^2)(1+x^2+x^4+x^6)(1+x^5)(1+x^10)\
&=[x^15](1+x^5+x^10+x^15)(1+x+x^2)(1+x^2+x^4+x^6)tag1\
&=left([x^15]+[x^10]+[x^5]+[x^0]right)(1+x+x^2)(1+x^2+x^4+x^6)tag2\
&=left([x^5]+[x^0]right)(colorblue1+x+x^2)(colorblue1+x^2+x^4+x^6)tag3\
&=1+[x^5](1+colorbluex+x^2)(1+x^2+colorbluex^4+x^6)tag4\
&=1+1tag5\
&,,colorblue=2
endalign*




Comment:



  • In (1) we multiply out the terms with the highest powers which is convenient as we will see in step (3).


  • In (2) we use the linearity of the coefficient of operator and apply the rule $[x^p-q]A(x)=[x^p]x^qA(x)$.


  • In (3) we can skip $[x^15]$ and $[x^10]$ since they do not contribute as the highest power of $x$ is $8$.


  • In (4) we select the coefficient of $x^0$.


  • In (5) we select the coefficient of $x^5$.






share|cite|improve this answer























  • but last 6 means 1, actually it should result 2
    – Debasis Jana
    2 days ago










  • @DebasisJana: Ok, I see. From your example I thought you wanted to distinguish them.
    – Markus Scheuer
    2 days ago










  • But in terms of computation how do I solve it? If I do polynomial multiplication then it will be a brute force approach. What is the efficient algorithm?
    – Debasis Jana
    yesterday










  • @DebasisJana: As long as there is a moderate number of terms involved as in this example the brute force approach is presumably the most appropriate. Somewhat more sophisticated techniques could implement a cut off of branches as it done in the calculation from step 2 to step 3.
    – Markus Scheuer
    yesterday






  • 1




    Good point (+1). Thank you.
    – awkward
    yesterday














up vote
1
down vote













This is a supplement to the already given answer showing that calculating the coefficient is not that cumbersome. We use the coefficient of operator $[x^n]$ to denote the coefficient of $x^n$ in a polynomial.




We obtain
beginalign*
colorblue[x^15]&colorblue(1+x+x^2)(1+x^2+x^4+x^6)(1+x^5)(1+x^10)\
&=[x^15](1+x^5+x^10+x^15)(1+x+x^2)(1+x^2+x^4+x^6)tag1\
&=left([x^15]+[x^10]+[x^5]+[x^0]right)(1+x+x^2)(1+x^2+x^4+x^6)tag2\
&=left([x^5]+[x^0]right)(colorblue1+x+x^2)(colorblue1+x^2+x^4+x^6)tag3\
&=1+[x^5](1+colorbluex+x^2)(1+x^2+colorbluex^4+x^6)tag4\
&=1+1tag5\
&,,colorblue=2
endalign*




Comment:



  • In (1) we multiply out the terms with the highest powers which is convenient as we will see in step (3).


  • In (2) we use the linearity of the coefficient of operator and apply the rule $[x^p-q]A(x)=[x^p]x^qA(x)$.


  • In (3) we can skip $[x^15]$ and $[x^10]$ since they do not contribute as the highest power of $x$ is $8$.


  • In (4) we select the coefficient of $x^0$.


  • In (5) we select the coefficient of $x^5$.






share|cite|improve this answer























  • but last 6 means 1, actually it should result 2
    – Debasis Jana
    2 days ago










  • @DebasisJana: Ok, I see. From your example I thought you wanted to distinguish them.
    – Markus Scheuer
    2 days ago










  • But in terms of computation how do I solve it? If I do polynomial multiplication then it will be a brute force approach. What is the efficient algorithm?
    – Debasis Jana
    yesterday










  • @DebasisJana: As long as there is a moderate number of terms involved as in this example the brute force approach is presumably the most appropriate. Somewhat more sophisticated techniques could implement a cut off of branches as it done in the calculation from step 2 to step 3.
    – Markus Scheuer
    yesterday






  • 1




    Good point (+1). Thank you.
    – awkward
    yesterday












up vote
1
down vote










up vote
1
down vote









This is a supplement to the already given answer showing that calculating the coefficient is not that cumbersome. We use the coefficient of operator $[x^n]$ to denote the coefficient of $x^n$ in a polynomial.




We obtain
beginalign*
colorblue[x^15]&colorblue(1+x+x^2)(1+x^2+x^4+x^6)(1+x^5)(1+x^10)\
&=[x^15](1+x^5+x^10+x^15)(1+x+x^2)(1+x^2+x^4+x^6)tag1\
&=left([x^15]+[x^10]+[x^5]+[x^0]right)(1+x+x^2)(1+x^2+x^4+x^6)tag2\
&=left([x^5]+[x^0]right)(colorblue1+x+x^2)(colorblue1+x^2+x^4+x^6)tag3\
&=1+[x^5](1+colorbluex+x^2)(1+x^2+colorbluex^4+x^6)tag4\
&=1+1tag5\
&,,colorblue=2
endalign*




Comment:



  • In (1) we multiply out the terms with the highest powers which is convenient as we will see in step (3).


  • In (2) we use the linearity of the coefficient of operator and apply the rule $[x^p-q]A(x)=[x^p]x^qA(x)$.


  • In (3) we can skip $[x^15]$ and $[x^10]$ since they do not contribute as the highest power of $x$ is $8$.


  • In (4) we select the coefficient of $x^0$.


  • In (5) we select the coefficient of $x^5$.






share|cite|improve this answer















This is a supplement to the already given answer showing that calculating the coefficient is not that cumbersome. We use the coefficient of operator $[x^n]$ to denote the coefficient of $x^n$ in a polynomial.




We obtain
beginalign*
colorblue[x^15]&colorblue(1+x+x^2)(1+x^2+x^4+x^6)(1+x^5)(1+x^10)\
&=[x^15](1+x^5+x^10+x^15)(1+x+x^2)(1+x^2+x^4+x^6)tag1\
&=left([x^15]+[x^10]+[x^5]+[x^0]right)(1+x+x^2)(1+x^2+x^4+x^6)tag2\
&=left([x^5]+[x^0]right)(colorblue1+x+x^2)(colorblue1+x^2+x^4+x^6)tag3\
&=1+[x^5](1+colorbluex+x^2)(1+x^2+colorbluex^4+x^6)tag4\
&=1+1tag5\
&,,colorblue=2
endalign*




Comment:



  • In (1) we multiply out the terms with the highest powers which is convenient as we will see in step (3).


  • In (2) we use the linearity of the coefficient of operator and apply the rule $[x^p-q]A(x)=[x^p]x^qA(x)$.


  • In (3) we can skip $[x^15]$ and $[x^10]$ since they do not contribute as the highest power of $x$ is $8$.


  • In (4) we select the coefficient of $x^0$.


  • In (5) we select the coefficient of $x^5$.







share|cite|improve this answer















share|cite|improve this answer



share|cite|improve this answer








edited 2 days ago


























answered 2 days ago









Markus Scheuer

55.7k450135




55.7k450135











  • but last 6 means 1, actually it should result 2
    – Debasis Jana
    2 days ago










  • @DebasisJana: Ok, I see. From your example I thought you wanted to distinguish them.
    – Markus Scheuer
    2 days ago










  • But in terms of computation how do I solve it? If I do polynomial multiplication then it will be a brute force approach. What is the efficient algorithm?
    – Debasis Jana
    yesterday










  • @DebasisJana: As long as there is a moderate number of terms involved as in this example the brute force approach is presumably the most appropriate. Somewhat more sophisticated techniques could implement a cut off of branches as it done in the calculation from step 2 to step 3.
    – Markus Scheuer
    yesterday






  • 1




    Good point (+1). Thank you.
    – awkward
    yesterday
















  • but last 6 means 1, actually it should result 2
    – Debasis Jana
    2 days ago










  • @DebasisJana: Ok, I see. From your example I thought you wanted to distinguish them.
    – Markus Scheuer
    2 days ago










  • But in terms of computation how do I solve it? If I do polynomial multiplication then it will be a brute force approach. What is the efficient algorithm?
    – Debasis Jana
    yesterday










  • @DebasisJana: As long as there is a moderate number of terms involved as in this example the brute force approach is presumably the most appropriate. Somewhat more sophisticated techniques could implement a cut off of branches as it done in the calculation from step 2 to step 3.
    – Markus Scheuer
    yesterday






  • 1




    Good point (+1). Thank you.
    – awkward
    yesterday















but last 6 means 1, actually it should result 2
– Debasis Jana
2 days ago




but last 6 means 1, actually it should result 2
– Debasis Jana
2 days ago












@DebasisJana: Ok, I see. From your example I thought you wanted to distinguish them.
– Markus Scheuer
2 days ago




@DebasisJana: Ok, I see. From your example I thought you wanted to distinguish them.
– Markus Scheuer
2 days ago












But in terms of computation how do I solve it? If I do polynomial multiplication then it will be a brute force approach. What is the efficient algorithm?
– Debasis Jana
yesterday




But in terms of computation how do I solve it? If I do polynomial multiplication then it will be a brute force approach. What is the efficient algorithm?
– Debasis Jana
yesterday












@DebasisJana: As long as there is a moderate number of terms involved as in this example the brute force approach is presumably the most appropriate. Somewhat more sophisticated techniques could implement a cut off of branches as it done in the calculation from step 2 to step 3.
– Markus Scheuer
yesterday




@DebasisJana: As long as there is a moderate number of terms involved as in this example the brute force approach is presumably the most appropriate. Somewhat more sophisticated techniques could implement a cut off of branches as it done in the calculation from step 2 to step 3.
– Markus Scheuer
yesterday




1




1




Good point (+1). Thank you.
– awkward
yesterday




Good point (+1). Thank you.
– awkward
yesterday












 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2871795%2fcoin-change-with-fixed-denominations-with-duplicate-values%23new-answer', 'question_page');

);

Post as a guest













































































Comments

Popular posts from this blog

What is the equation of a 3D cone with generalised tilt?

Color the edges and diagonals of a regular polygon

Relationship between determinant of matrix and determinant of adjoint?