The iteration step is conducted by increasing n from 1 to n for a given m, and then update m bym + 1, and processing n again. Here, in each iteration step with (n, m), we will derive the value P∗n,m(q) for every q satisfying 0 < q ≤ q. The iteration will be stopped until n = n and m = m, and the optimal path P∗ n,m(q) is finally obtained. The computation complexity of this algorithm is O(nmq) which can be executed in a few seconds.