We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>


Looking For Something at vustudents.ning.com? Click Here to Search

+ Click Here To Join also Our facebook study Group.

..How to Join Subject Study Groups & Get Helping Material?..


See Your Saved Posts Timeline

Views: 2738

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

Replies to This Discussion

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.

if u make it plz share

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 

RSS

Today Top Members 

© 2019   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service