dynamic programming

Ryan$

Full Member
Joined
Jan 25, 2019
Messages
353
Hi guys; may anyone please illustrate what dynamic programming means in his own word?! to be more frankly, I've read about dynamic programming at google but still confused about its definition, for example I don't know why I need to solve every sub-problem in an optimal way if I need to solve the problem itself in optimal way .. what matter?! why exactly I need to solve its sub-problems in optimal way?!
 
for example if I at have coins 1,5,10 and I have sum 80 which I want to find the optimal solution so if I choose 10 then 80-10=70 ..so now I have a sub problem with sum 70 implicitly regardless from what I've done before, now I have a new problem with size 70 and coins 1,5,10 ; my question is , why I've now a new problem? where does 80 gone?! gone means solved .. but what does it mean solved ..we totally disregards the problem over sum 80 and now we have a problem with sum 70 .. so where does the problem 80 gone?! ineed we subtract from 80 number 10 but it doesn't mean that I have a new problem with 70 ...

what's confusing me is, when we say solved at concrete part .. what does that mean? exactly when we solve a part of problem we say it's solved and neglect this part which is solved and move to the part which not solved yet ! .. my problem is where does the solved part gone? why we are neglect it from the problem?!! isn't it a part of the problem?! ; everytime we solve a part we neglect it in the second iteration .. why?!
to sum up I'm not understanding the idea behind of dynamic programming
 
Last edited:
for example if I at have coins 1,5,10 and I have sum 80 which I want to find the optimal solution so if I choose 10 then 80-10=70 ..so now I have a sub problem with sum 70 implicitly regardless from what I've done before, now I have a new problem with size 70 and coins 1,5,10 ; my question is , why I've now a new problem? where does 80 gone?! gone means solved .. but what does it mean solved ..we totally disregards the problem over sum 80 and now we have a problem with sum 70 .. so where does the problem 80 gone?! ineed we subtract from 80 number 10 but it doesn't mean that I have a new problem with 70 ...

what's confusing me is, when we say solved at concrete part .. what does that mean? exactly when we solve a part of problem we say it's solved and neglect this part which is solved and move to the part which not solved yet ! .. my problem is where does the solved part gone? why we are neglect it from the problem?!! isn't it a part of the problem?! ; everytime we solve a part we neglect it in the second iteration .. why?!
to sum up I'm not understanding the idea behind of dynamic programming

You should take a course or seven.
 
Top