That is to say, by denoting the solution of (11) as P∗n,m(q),it can be determined by P∗n−1,m(q − f(n, m)) and P∗n,m−1(q −f(n, m)). Similarity, P∗n−1,m(q − f(n, m)) can be determined by P∗n−2,m(q − f(n, m) − f(n − 1, m)) and P∗ n−1,m−1(q − f(n, m) − f(n −1, m)), and P∗n,m−1(q − f(n, m)) can be determined by P∗n−1,m−1(q −f(n, m) − f(n, m − 1)) and P∗n,m−2(q − f(n, m) − f(n, m − 1)), and so on. In this light, we first initialize P∗0,m(q) and P∗n,0(q) for each 0 < n ≤ n, 0 < m ≤ m, and 0 < q ≤ q. Then, iteratively determine P∗n,m(q) for each (n, m).