Hello, my thesis is about this topic, but I need to solve it using integer linear programing. The case is a supermarket. I would like to ask you, how would you use ILP to solve the coin change problem? If you could give me a suggestion, you will help me a lot.
Hello and thank you for your comment! I'm sorry but I don't have any knowledge of ILP at all. That style of programming is very far beyond my skillset I'm afraid!
Hello and thank you for your comment! Here we hit into a limitation of the algorithm shown. It only tells you how many but there's no real way to find out what coins you've chosen, since when each box is filled, we make a decision about which coin to pick but don't store that anywhere! Additional data structures are needed to store this information.
Hello and thank you for your comment! This can be quite difficult especially if you're using the DP approach. You may have to augment each "cell" of your memo table with the coins that actually make up the value.
Best video yet through the searches. Keep up the great work, man.
Thank you very much! Glad you liked the video =)
Best explanation with great visualizations!
Hello and thank you very much for your comment! Very happy to be of help =)
Awesome explanation of possible approaches and reasons for each!
Hello and thank you very much for your comment! Glad you liked the video =)
Great video! Simple explanation that actually makes sense..or cents in this case =) !
Oh, that's a good one =) Thank you very much for your comment! Glad you liked the video =)
Best video, man you really explained it to me! Thankyou very much,
You're welcome! Very happy to be of help =)
Thanks man, your video really helped me. You're doing a great job.
Hello and thank you very much for your comment! Very happy to be of help :)
thanks for the explanation
You're welcome! Glad to be of help =)
Hello, my thesis is about this topic, but I need to solve it using integer linear programing. The case is a supermarket. I would like to ask you, how would you use ILP to solve the coin change problem? If you could give me a suggestion, you will help me a lot.
Hello and thank you for your comment! I'm sorry but I don't have any knowledge of ILP at all. That style of programming is very far beyond my skillset I'm afraid!
Can u please tell me the solution by using brute force?
Hello and thank you for your comment! The recursive solution, which I start explaining at around 7:11, is a brute force solution.
So we need 3 coins. but which 3 coins we actually need ? (problem from the memo table)
Hello and thank you for your comment! Here we hit into a limitation of the algorithm shown. It only tells you how many but there's no real way to find out what coins you've chosen, since when each box is filled, we make a decision about which coin to pick but don't store that anywhere! Additional data structures are needed to store this information.
How to actually print out all combinations of amount? Let us say for amount=4, coins=[1,2,3] need to print out: (1,1,1,1); (2,2); (1,1,2);(1,3)
Hello and thank you for your comment! This can be quite difficult especially if you're using the DP approach. You may have to augment each "cell" of your memo table with the coins that actually make up the value.
Qustion: How many ways are to make the sum of 51 with that set - [1, 2, 3, 5]? How about 2020?