From e24c67450d38ffdde84b1191a85f9c4b1687d054 Mon Sep 17 00:00:00 2001 From: FloppaInspector <136809316+FloppaInspector@users.noreply.github.com> Date: Sun, 6 Apr 2025 00:39:54 +0900 Subject: [PATCH] Update knuth-optimization.md In time complexity proof cancellation explanation, j=N -> j=N-1 --- src/dynamic_programming/knuth-optimization.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dynamic_programming/knuth-optimization.md b/src/dynamic_programming/knuth-optimization.md index 535c7caf2..35978b839 100644 --- a/src/dynamic_programming/knuth-optimization.md +++ b/src/dynamic_programming/knuth-optimization.md @@ -77,7 +77,7 @@ $$ \sum\limits_{i=1}^N \sum\limits_{j=i}^{N-1} [opt(i+1,j+1)-opt(i,j)]. $$ -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 +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 $$ \sum\limits_{k=1}^N[opt(k,N)-opt(1,k)] = O(n^2),