Skip to content

Commit e24c674

Browse files
Update knuth-optimization.md
In time complexity proof cancellation explanation, j=N -> j=N-1
1 parent 82a06ff commit e24c674

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
@@ -77,7 +77,7 @@ $$
7777
\sum\limits_{i=1}^N \sum\limits_{j=i}^{N-1} [opt(i+1,j+1)-opt(i,j)].
7878
$$
7979

80-
As you see, most of the terms in this expression cancel each other out, except for positive terms with $j=N$ and negative terms with $i=1$. Thus, the whole sum can be estimated as
80+
As you see, most of the terms in this expression cancel each other out, except for positive terms with $j=N-1$ and negative terms with $i=1$. Thus, the whole sum can be estimated as
8181

8282
$$
8383
\sum\limits_{k=1}^N[opt(k,N)-opt(1,k)] = O(n^2),

0 commit comments

Comments
 (0)