Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed arithmetic error in CLRS 7.4-3 #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion other/clrs/07/04/03.markdown
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
> Show that the expression $q^2 + (n - q - 1)^2$ achieves a maximum over $q =
> 0, 1, \ldots, n-1$ when $q = 0$ and $q = n - 1$.


$$ \begin{align}
f(q) &= q^2 + (n - q - 1)^2 \\\\
f'(q) &= 2q - 2(n - q - 1) = 4q - 2n + 2 \\\\
f''(q) &= 4 \\\\
\end{align} $$

$f'(q) = 0$ when $q = \frac{1}{2}n - \frac{1}{4}$. $f'(q)$ is also continious.
$f'(q) = 0$ when $q = \frac{1}{2}n - \frac{1}{2}$. $f'(q)$ is also continuous.
$\forall q : f''(q) > 0$, which means that $f'(q)$ is negative left of $f'(q) =
0$ and positive right of it, which means that this is a local minima. In this
case, $f(q)$ is decreasing in the beginning of the interval and increasing in
Expand Down