We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>
Tags:
+ Click Here To Join also Our facebook study Group.
..How to Join Subject Study Groups & Get Helping Material?...
+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)
Please Discuss here about this GDB.Thanks
Our main purpose here discussion not just Solution
We are here with you hands in hands to facilitate your learning and do not appreciate the idea of copying or replicating solutions.
Complete solution of this GDB is in lecture no 23.
3600
1) 3 - 1000Rs
2) 1 - 500Rs
3) 1 - 100Rs
it requires 5 coinz...
solution... bta do....
jldi kar do share bachon jisko b ata hai :( mjy to zra nai i smj iski
greedy approach will be the most appropriate
i think dynamic is best. is it?
Greedy Approach is Best check lecture no 23 and after reading that lecture you will be able to solve this GDB. its too easy.
you cannot say it in particular it depends on the problem sometimes even the complexity may vary even in DP problems , based on whether you use top-down or bottom -top approach . But one key way to find out is that when you just have more overlapping sub problems and you again and again recompute the values for the same this can be spotted once you construct the decision tree for your problem and then proceed if you can just avoid the overlapping by just using the best (min or max) then your about to use a greedy approach on the other hand you will spot sometimes ... this doesn't work for many problems then you tend to eliminate by just hashing for the previous computed values for some sub problems that can be used in future and voila you are using a DP and it can further go on from one's perspective of viewing the DP problem , one may go top-bottom and recursively solve it while some professionals do this in bottom-top approach where they know what is really going on in that situation.
and it is just an idea or helping lines
upward para is copied from this link which is wrong
Programming Interview_Algorithm_Dynamic Programming_ Coin Changing ...
because the optimum solution of our GDB is greedy algorithm coin change problem which lesson no 23 chapter 7 greedy algorithm
what's your opinion ?
Algorithm work by using time and space , use od algorithm is varied acceding to the situation when we want speed and don’t care space we will go for the faster solution , if we have concern of space we will go for the algorithm which uses less data.
Greedy strategy is best for coin change problem because when we have 5000, 1000,500,100 currency notes we want the minimum number of notes to be used to withdraw 3600 .
In this problem 5000 cannot be used after this 1000 can be used 3 times (keeping in mind we want minimum number of notes )and 500 plus 100 each one time . in this problem greedy strategy is best to reduce the no of notes to minimum that is 5
3 x 100
1x 500
1x 100
Total 5 notes
Hence best solution is greedy algorithm
Algorithm work by using time and space , use od algorithm is varied acceding to the situation when we want speed and don’t care space we will go for the faster solution , if we have concern of space we will go for the algorithm which uses less data.
Greedy strategy is best for coin change problem because when we have 5000, 1000,500,100 currency notes we want the minimum number of notes to be used to withdraw 3600 .
In this problem 5000 cannot be used after this 1000 can be used 3 times (keeping in mind we want minimum number of notes )and 500 plus 100 each one time . in this problem greedy strategy is best to reduce the no of notes to minimum that is 5
3 x 100
1x 500
1x 100
Total 5 notes
Hence best solution is greedy algorithm
© 2019 Created by + M.Tariq Malik. Powered by
Promote Us | Report an Issue | Privacy Policy | Terms of Service
We are user-generated contents site. All product, videos, pictures & others contents on vustudents.ning.com don't seem to be beneath our Copyrights & belong to their respected owners & freely available on public domains. We believe in Our Policy & do according to them. If Any content is offensive in your Copyrights then please email at m.tariqmalik@gmail.com or Contact us at contact Page with copyright detail & We will happy to remove it immediately.
Management: Admins ::: Moderators
Become a Team Member | Safety Guidelines for New | Site FAQ & Rules | Safety Matters | Online Safety | Rules For Blog Post