Skip to content

Commit 7d314c4

Browse files
authored
Merge pull request #1524 from ceciliachan1979/patch-1
Clarify definition of opt(i, j): choose maximum k among optimal candidates
2 parents da9e74b + 3e7d29f commit 7d314c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dynamic_programming/knuth-optimization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The Speedup is applied for transitions of the form
1313

1414
$$dp(i, j) = \min_{i \leq k < j} [ dp(i, k) + dp(k+1, j) + C(i, j) ].$$
1515

16-
Similar to [divide and conquer DP](./divide-and-conquer-dp.md), let $opt(i, j)$ be the value of $k$ that minimizes the expression in the transition ($opt$ is referred to as the "optimal splitting point" further in this article). The optimization requires that the following holds:
16+
Similar to [divide and conquer DP](./divide-and-conquer-dp.md), let $opt(i, j)$ be the maximum value of $k$ that minimizes the expression in the transition ($opt$ is referred to as the "optimal splitting point" further in this article). The optimization requires that the following holds:
1717

1818
$$opt(i, j-1) \leq opt(i, j) \leq opt(i+1, j).$$
1919

0 commit comments

Comments
 (0)