# dynamic programming

##### Junior Member
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:

#### tkhunny

##### Moderator
Staff member
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.