How to count the number of non-overlapping/distinct sub-problems?

Revision en1, by CandidFlakes, 2023-08-13 19:32:06

I am trying to solve this problem using DP.

I am able to observe that if I approach it using recursive backtracking, then there are 20^20(20*20*20..... 20 times for each garment) sub-problems, including overlapping sub-problems. Also, the total spending can be anything from 0 to 200(both inclusive).

How can I calculate the number of non-overlapping sub-problems for this problem?

I will be thankful for any help!

Tags dynamic programming, recursion, backtracking, sub-problems

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English CandidFlakes 2023-08-13 19:32:06 538 Initial revision (published)