hi guys; I just would like to verify about something and hope I get an illustration about;
In programming there's what's called dynamic programming which is depended on recursion like what's in math .. what's confusing me is whenever we are trying to solve sub-problem of the problem itself we solve it as the same the problem itself .. here's an example of what I mean:
lets assume I have a problem which is finding the maximum profit of a "set" (doesn't matter what's a set) so if I want to solve it in dynamic programming we are solving it recursively; what's confusing me why at the sub-problem we are finding also "the maximum profit of a "set" " why maximum over the sub-problem? the maximum has been demanded over the problem itself .. but why we
need to assume that at the sub-problem we want also to find the maximum?! I know it's given to find the maximum at the problem .. but not at sub-problem!! ........... any explanation please?! thanks.
In programming there's what's called dynamic programming which is depended on recursion like what's in math .. what's confusing me is whenever we are trying to solve sub-problem of the problem itself we solve it as the same the problem itself .. here's an example of what I mean:
lets assume I have a problem which is finding the maximum profit of a "set" (doesn't matter what's a set) so if I want to solve it in dynamic programming we are solving it recursively; what's confusing me why at the sub-problem we are finding also "the maximum profit of a "set" " why maximum over the sub-problem? the maximum has been demanded over the problem itself .. but why we
need to assume that at the sub-problem we want also to find the maximum?! I know it's given to find the maximum at the problem .. but not at sub-problem!! ........... any explanation please?! thanks.