ex: Solved some other exercises, added code snippets, and more
This commit is contained in:
parent
c5030a634d
commit
f8713f058f
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"My exercise environment": {
|
||||||
|
"scope": "latex,tex",
|
||||||
|
"prefix": "myexercise",
|
||||||
|
"body": [
|
||||||
|
"\\begin{myexercise}",
|
||||||
|
"\t$1",
|
||||||
|
"\\end{myexercise}"
|
||||||
|
],
|
||||||
|
},
|
||||||
|
"My answer environment": {
|
||||||
|
"scope": "latex,tex",
|
||||||
|
"prefix": "myanswer",
|
||||||
|
"body": [
|
||||||
|
"\\begin{myanswer}",
|
||||||
|
"\t$1",
|
||||||
|
"\\end{myanswer}"
|
||||||
|
],
|
||||||
|
},
|
||||||
|
}
|
|
@ -60,8 +60,6 @@
|
||||||
\end{myanswer}
|
\end{myanswer}
|
||||||
\end{myexercise}
|
\end{myexercise}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
\begin{myexercise}{5}{19}
|
\begin{myexercise}{5}{19}
|
||||||
A prime number is an integer $> 1$ that has no exact divisors other than $1$ and itself.
|
A prime number is an integer $> 1$ that has no exact divisors other than $1$ and itself.
|
||||||
|
|
||||||
|
@ -268,3 +266,144 @@ T_n = \frac{1}{2} n (n + 1)
|
||||||
% \end{myexercise}
|
% \end{myexercise}
|
||||||
% Dirty false proof... To be continued
|
% Dirty false proof... To be continued
|
||||||
|
|
||||||
|
\subsection{Numbers, Powers and Logarithms}
|
||||||
|
|
||||||
|
\begin{myexercise}{1}{25}
|
||||||
|
What is the smallest positive rational number?
|
||||||
|
|
||||||
|
\begin{myanswer}
|
||||||
|
The smallest positive rational number is 0.
|
||||||
|
\end{myanswer}
|
||||||
|
\end{myexercise}
|
||||||
|
|
||||||
|
|
||||||
|
\begin{myexercise}{2}{25}
|
||||||
|
Is $1 + 0.23999999999...$ a decimal expansion?
|
||||||
|
|
||||||
|
\begin{myanswer}
|
||||||
|
0.23999999999... is not a decimal number as it has an infinite decimal expansion.
|
||||||
|
|
||||||
|
The decimal expansion of $1 + 0.23999999999...$ is in the form
|
||||||
|
\[
|
||||||
|
1 \cdot 10^0 + 2 \cdot 10^{-1} + 3 \cdot 10^{-2} + 9 \cdot 10^{-3} + \sum_{i=1}^{\infty} 9 \cdot 10^{-3-i}
|
||||||
|
\]
|
||||||
|
|
||||||
|
\textit{Nota bene}: This surely does not answer the question...
|
||||||
|
\end{myanswer}
|
||||||
|
\end{myexercise}
|
||||||
|
|
||||||
|
|
||||||
|
\begin{myexercise}{3}{25}
|
||||||
|
What is $(-3)^{-3}$?
|
||||||
|
|
||||||
|
\begin{myanswer}
|
||||||
|
\[
|
||||||
|
(-3)^{-3} = \frac{1}{(-3)^3} = \frac{1}{(-3)(-3)(-3)} = -\frac{1}{27}
|
||||||
|
\]
|
||||||
|
\end{myanswer}
|
||||||
|
|
||||||
|
\end{myexercise}
|
||||||
|
|
||||||
|
\begin{myexercise}{4}{25}
|
||||||
|
What is $(0.125)^{-2/3}$?
|
||||||
|
|
||||||
|
\begin{equation}
|
||||||
|
b^{p/q} = \sqrt[q]{b^p}
|
||||||
|
\end{equation}
|
||||||
|
|
||||||
|
\begin{myanswer}
|
||||||
|
\begin{align*}
|
||||||
|
0.125^{-2/3} &= \left(\frac{1}{8}\right)^{-2/3} \\
|
||||||
|
&= 8^{2/3} \\
|
||||||
|
&= \sqrt[3]{8^2} \\
|
||||||
|
&= \sqrt[3]{64} \\
|
||||||
|
&= 4
|
||||||
|
\end{align*}
|
||||||
|
\end{myanswer}
|
||||||
|
\end{myexercise}
|
||||||
|
|
||||||
|
\begin{myexercise}{5}{25}
|
||||||
|
|
||||||
|
Defining real numbers in terms of binary expansion.
|
||||||
|
|
||||||
|
\begin{myanswer}
|
||||||
|
\[
|
||||||
|
x = \sum_{i=0}^{\infty} a_i \cdot 2^{-i}
|
||||||
|
\]
|
||||||
|
\end{myanswer}
|
||||||
|
\end{myexercise}
|
||||||
|
|
||||||
|
\begin{myexercise}{6}{25}
|
||||||
|
Let $x = m + 0.d_1d_2\dots$ and $y = n + 0.e_1e_2\dots$.
|
||||||
|
Give a rule for determining whether $x = y$, $x < y$, $x > y$ based on the decimal representation.
|
||||||
|
|
||||||
|
\begin{myanswer}
|
||||||
|
\begin{algorithm}[H]
|
||||||
|
\begin{algorithmic}[1]
|
||||||
|
\Procedure {LowerGreaterEqual} {$X$, $Y$}
|
||||||
|
\Comment{$X$ and $Y$ are arrays of decimal of numbers $x$ and $y$ respectively.}
|
||||||
|
\State $i \gets 0$
|
||||||
|
\While {$i < X.length$ and $i < Y.length$}
|
||||||
|
\If{$X[i] == Y[i]$}
|
||||||
|
\State $i \gets i+1$
|
||||||
|
\ElsIf {$X[i] > Y[i]$}
|
||||||
|
\State \Return \texttt{GREATER}
|
||||||
|
\Else
|
||||||
|
\State \Return \texttt{LOWER}
|
||||||
|
\EndIf
|
||||||
|
\EndWhile
|
||||||
|
\If{$X.length > Y.length$}
|
||||||
|
\State \Return \texttt{GREATER}
|
||||||
|
\ElsIf{$X.length < Y.length$}
|
||||||
|
\State \Return \texttt{LOWER}
|
||||||
|
\Else
|
||||||
|
\State \Return \texttt{EQUALS}
|
||||||
|
\EndIf
|
||||||
|
\EndProcedure
|
||||||
|
\end{algorithmic}
|
||||||
|
\caption{Greater, Lower or Equal Decimal representation}
|
||||||
|
\end{algorithm}
|
||||||
|
\end{myanswer}
|
||||||
|
\end{myexercise}
|
||||||
|
|
||||||
|
\begin{myexercise}{7}{25}
|
||||||
|
Given that $x$ and $y$ are integers. \textit{Prove} the laws of exponents, from definition given by Eq. \ref{eq:rule-of-exponents-2} from Eq. \ref{eq:rule-of-exponents}.
|
||||||
|
|
||||||
|
\begin{eqnarray}
|
||||||
|
b^0 = 1, & b^n = b^{n-1} b \quad \text{ if $n > 0$}, & b^n = b^{n+1} / b \quad \text{ if $n < 0$}.
|
||||||
|
\label{eq:rule-of-exponents}
|
||||||
|
\end{eqnarray}
|
||||||
|
|
||||||
|
\begin{eqnarray}
|
||||||
|
b^{x+y} = b^x b^y, & (b^x)^y = b^{xy},
|
||||||
|
\label{eq:rule-of-exponents-2}
|
||||||
|
\end{eqnarray}
|
||||||
|
|
||||||
|
\begin{myanswer}
|
||||||
|
We will prove this in $\Reals$
|
||||||
|
Let us recall the following formula:
|
||||||
|
\begin{equation}
|
||||||
|
b^x = e^{x \ln b}
|
||||||
|
\end{equation}
|
||||||
|
and
|
||||||
|
\begin{equation}
|
||||||
|
\exp(x + y) = \exp(x) \exp(y)
|
||||||
|
\end{equation}
|
||||||
|
|
||||||
|
Thus it comes:
|
||||||
|
\begin{align*}
|
||||||
|
b^{x + y} &= e^{(x + y) \ln b} \\
|
||||||
|
&= e^{x \ln b + y \ln b} \\
|
||||||
|
&= e^{x \ln b} e^{y \ln b} \\
|
||||||
|
&= b^x b^y
|
||||||
|
\end{align*}
|
||||||
|
|
||||||
|
Similarly for $(a^x)^y$:
|
||||||
|
\begin{align*}
|
||||||
|
(a^x)^y &= e^{y \ln (a^x)} \\
|
||||||
|
&= e^{xy \ln a} \\
|
||||||
|
&= a^{xy}
|
||||||
|
\end{align*}
|
||||||
|
\end{myanswer}
|
||||||
|
\end{myexercise}
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -0,0 +1,105 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="612" height="792" viewBox="0 0 612 792">
|
||||||
|
<defs>
|
||||||
|
<g>
|
||||||
|
<g id="glyph-0-0">
|
||||||
|
</g>
|
||||||
|
<g id="glyph-0-1">
|
||||||
|
<path d="M 6.828125 -4.5 L 6.640625 -6.75 L 0.546875 -6.75 L 0.359375 -4.5 L 0.609375 -4.5 C 0.75 -6.109375 0.890625 -6.4375 2.40625 -6.4375 C 2.578125 -6.4375 2.84375 -6.4375 2.9375 -6.421875 C 3.15625 -6.375 3.15625 -6.265625 3.15625 -6.046875 L 3.15625 -0.78125 C 3.15625 -0.453125 3.15625 -0.3125 2.109375 -0.3125 L 1.703125 -0.3125 L 1.703125 0 C 2.109375 -0.03125 3.125 -0.03125 3.59375 -0.03125 C 4.046875 -0.03125 5.078125 -0.03125 5.484375 0 L 5.484375 -0.3125 L 5.078125 -0.3125 C 4.03125 -0.3125 4.03125 -0.453125 4.03125 -0.78125 L 4.03125 -6.046875 C 4.03125 -6.234375 4.03125 -6.375 4.21875 -6.421875 C 4.328125 -6.4375 4.59375 -6.4375 4.78125 -6.4375 C 6.296875 -6.4375 6.4375 -6.109375 6.578125 -4.5 Z M 6.828125 -4.5 "/>
|
||||||
|
</g>
|
||||||
|
<g id="glyph-0-2">
|
||||||
|
<path d="M 5.328125 0 L 5.328125 -0.3125 C 4.8125 -0.3125 4.5625 -0.3125 4.5625 -0.609375 L 4.5625 -2.515625 C 4.5625 -3.375 4.5625 -3.671875 4.25 -4.03125 C 4.109375 -4.203125 3.78125 -4.40625 3.203125 -4.40625 C 2.359375 -4.40625 1.921875 -3.8125 1.765625 -3.453125 L 1.75 -3.453125 L 1.75 -6.921875 L 0.3125 -6.8125 L 0.3125 -6.5 C 1.015625 -6.5 1.09375 -6.4375 1.09375 -5.9375 L 1.09375 -0.75 C 1.09375 -0.3125 0.984375 -0.3125 0.3125 -0.3125 L 0.3125 0 L 1.453125 -0.03125 L 2.5625 0 L 2.5625 -0.3125 C 1.890625 -0.3125 1.78125 -0.3125 1.78125 -0.75 L 1.78125 -2.59375 C 1.78125 -3.625 2.5 -4.1875 3.125 -4.1875 C 3.765625 -4.1875 3.875 -3.65625 3.875 -3.078125 L 3.875 -0.75 C 3.875 -0.3125 3.765625 -0.3125 3.09375 -0.3125 L 3.09375 0 L 4.21875 -0.03125 Z M 5.328125 0 "/>
|
||||||
|
</g>
|
||||||
|
<g id="glyph-0-3">
|
||||||
|
<path d="M 4.140625 -1.1875 C 4.140625 -1.28125 4.0625 -1.3125 4 -1.3125 C 3.921875 -1.3125 3.890625 -1.25 3.875 -1.171875 C 3.53125 -0.140625 2.625 -0.140625 2.53125 -0.140625 C 2.03125 -0.140625 1.640625 -0.4375 1.40625 -0.8125 C 1.109375 -1.28125 1.109375 -1.9375 1.109375 -2.296875 L 3.890625 -2.296875 C 4.109375 -2.296875 4.140625 -2.296875 4.140625 -2.515625 C 4.140625 -3.5 3.59375 -4.46875 2.359375 -4.46875 C 1.203125 -4.46875 0.28125 -3.4375 0.28125 -2.1875 C 0.28125 -0.859375 1.328125 0.109375 2.46875 0.109375 C 3.6875 0.109375 4.140625 -1 4.140625 -1.1875 Z M 3.484375 -2.515625 L 1.109375 -2.515625 C 1.171875 -4 2.015625 -4.25 2.359375 -4.25 C 3.375 -4.25 3.484375 -2.90625 3.484375 -2.515625 Z M 3.484375 -2.515625 "/>
|
||||||
|
</g>
|
||||||
|
<g id="glyph-0-4">
|
||||||
|
<path d="M 3.59375 -1.28125 C 3.59375 -1.796875 3.296875 -2.109375 3.171875 -2.21875 C 2.84375 -2.546875 2.453125 -2.625 2.03125 -2.703125 C 1.46875 -2.8125 0.8125 -2.9375 0.8125 -3.515625 C 0.8125 -3.875 1.0625 -4.28125 1.921875 -4.28125 C 3.015625 -4.28125 3.078125 -3.375 3.09375 -3.078125 C 3.09375 -2.984375 3.203125 -2.984375 3.203125 -2.984375 C 3.34375 -2.984375 3.34375 -3.03125 3.34375 -3.21875 L 3.34375 -4.234375 C 3.34375 -4.390625 3.34375 -4.46875 3.234375 -4.46875 C 3.1875 -4.46875 3.15625 -4.46875 3.03125 -4.34375 C 3 -4.3125 2.90625 -4.21875 2.859375 -4.1875 C 2.484375 -4.46875 2.078125 -4.46875 1.921875 -4.46875 C 0.703125 -4.46875 0.328125 -3.796875 0.328125 -3.234375 C 0.328125 -2.890625 0.484375 -2.609375 0.75 -2.390625 C 1.078125 -2.140625 1.359375 -2.078125 2.078125 -1.9375 C 2.296875 -1.890625 3.109375 -1.734375 3.109375 -1.015625 C 3.109375 -0.515625 2.765625 -0.109375 1.984375 -0.109375 C 1.140625 -0.109375 0.78125 -0.671875 0.59375 -1.53125 C 0.5625 -1.65625 0.5625 -1.6875 0.453125 -1.6875 C 0.328125 -1.6875 0.328125 -1.625 0.328125 -1.453125 L 0.328125 -0.125 C 0.328125 0.046875 0.328125 0.109375 0.4375 0.109375 C 0.484375 0.109375 0.5 0.09375 0.6875 -0.09375 C 0.703125 -0.109375 0.703125 -0.125 0.890625 -0.3125 C 1.328125 0.09375 1.78125 0.109375 1.984375 0.109375 C 3.125 0.109375 3.59375 -0.5625 3.59375 -1.28125 Z M 3.59375 -1.28125 "/>
|
||||||
|
</g>
|
||||||
|
<g id="glyph-0-5">
|
||||||
|
<path d="M 5.328125 0 L 5.328125 -0.3125 C 4.640625 -0.3125 4.5625 -0.375 4.5625 -0.875 L 4.5625 -4.40625 L 3.09375 -4.296875 L 3.09375 -3.984375 C 3.78125 -3.984375 3.875 -3.921875 3.875 -3.421875 L 3.875 -1.65625 C 3.875 -0.78125 3.390625 -0.109375 2.65625 -0.109375 C 1.828125 -0.109375 1.78125 -0.578125 1.78125 -1.09375 L 1.78125 -4.40625 L 0.3125 -4.296875 L 0.3125 -3.984375 C 1.09375 -3.984375 1.09375 -3.953125 1.09375 -3.078125 L 1.09375 -1.578125 C 1.09375 -0.796875 1.09375 0.109375 2.609375 0.109375 C 3.171875 0.109375 3.609375 -0.171875 3.890625 -0.78125 L 3.890625 0.109375 Z M 5.328125 0 "/>
|
||||||
|
</g>
|
||||||
|
<g id="glyph-0-6">
|
||||||
|
<path d="M 8.109375 0 L 8.109375 -0.3125 C 7.59375 -0.3125 7.34375 -0.3125 7.328125 -0.609375 L 7.328125 -2.515625 C 7.328125 -3.375 7.328125 -3.671875 7.015625 -4.03125 C 6.875 -4.203125 6.546875 -4.40625 5.96875 -4.40625 C 5.140625 -4.40625 4.6875 -3.8125 4.53125 -3.421875 C 4.390625 -4.296875 3.65625 -4.40625 3.203125 -4.40625 C 2.46875 -4.40625 2 -3.984375 1.71875 -3.359375 L 1.71875 -4.40625 L 0.3125 -4.296875 L 0.3125 -3.984375 C 1.015625 -3.984375 1.09375 -3.921875 1.09375 -3.421875 L 1.09375 -0.75 C 1.09375 -0.3125 0.984375 -0.3125 0.3125 -0.3125 L 0.3125 0 L 1.453125 -0.03125 L 2.5625 0 L 2.5625 -0.3125 C 1.890625 -0.3125 1.78125 -0.3125 1.78125 -0.75 L 1.78125 -2.59375 C 1.78125 -3.625 2.5 -4.1875 3.125 -4.1875 C 3.765625 -4.1875 3.875 -3.65625 3.875 -3.078125 L 3.875 -0.75 C 3.875 -0.3125 3.765625 -0.3125 3.09375 -0.3125 L 3.09375 0 L 4.21875 -0.03125 L 5.328125 0 L 5.328125 -0.3125 C 4.671875 -0.3125 4.5625 -0.3125 4.5625 -0.75 L 4.5625 -2.59375 C 4.5625 -3.625 5.265625 -4.1875 5.90625 -4.1875 C 6.53125 -4.1875 6.640625 -3.65625 6.640625 -3.078125 L 6.640625 -0.75 C 6.640625 -0.3125 6.53125 -0.3125 5.859375 -0.3125 L 5.859375 0 L 6.984375 -0.03125 Z M 8.109375 0 "/>
|
||||||
|
</g>
|
||||||
|
<g id="glyph-0-7">
|
||||||
|
<path d="M 4.6875 -2.140625 C 4.6875 -3.40625 3.703125 -4.46875 2.5 -4.46875 C 1.25 -4.46875 0.28125 -3.375 0.28125 -2.140625 C 0.28125 -0.84375 1.3125 0.109375 2.484375 0.109375 C 3.6875 0.109375 4.6875 -0.875 4.6875 -2.140625 Z M 3.875 -2.21875 C 3.875 -1.859375 3.875 -1.3125 3.65625 -0.875 C 3.421875 -0.421875 2.984375 -0.140625 2.5 -0.140625 C 2.0625 -0.140625 1.625 -0.34375 1.359375 -0.8125 C 1.109375 -1.25 1.109375 -1.859375 1.109375 -2.21875 C 1.109375 -2.609375 1.109375 -3.140625 1.34375 -3.578125 C 1.609375 -4.03125 2.078125 -4.25 2.484375 -4.25 C 2.921875 -4.25 3.34375 -4.03125 3.609375 -3.59375 C 3.875 -3.171875 3.875 -2.59375 3.875 -2.21875 Z M 3.875 -2.21875 "/>
|
||||||
|
</g>
|
||||||
|
<g id="glyph-0-8">
|
||||||
|
<path d="M 3.5625 -6.328125 C 3.5625 -6.703125 3.1875 -7.03125 2.65625 -7.03125 C 1.96875 -7.03125 1.109375 -6.5 1.109375 -5.4375 L 1.109375 -4.296875 L 0.328125 -4.296875 L 0.328125 -3.984375 L 1.109375 -3.984375 L 1.109375 -0.75 C 1.109375 -0.3125 1 -0.3125 0.34375 -0.3125 L 0.34375 0 L 1.46875 -0.03125 C 1.875 -0.03125 2.34375 -0.03125 2.734375 0 L 2.734375 -0.3125 L 2.53125 -0.3125 C 1.796875 -0.3125 1.78125 -0.421875 1.78125 -0.78125 L 1.78125 -3.984375 L 2.90625 -3.984375 L 2.90625 -4.296875 L 1.75 -4.296875 L 1.75 -5.453125 C 1.75 -6.328125 2.21875 -6.8125 2.65625 -6.8125 C 2.6875 -6.8125 2.84375 -6.8125 2.984375 -6.734375 C 2.875 -6.703125 2.6875 -6.5625 2.6875 -6.3125 C 2.6875 -6.09375 2.84375 -5.890625 3.125 -5.890625 C 3.40625 -5.890625 3.5625 -6.09375 3.5625 -6.328125 Z M 3.5625 -6.328125 "/>
|
||||||
|
</g>
|
||||||
|
<g id="glyph-0-9">
|
||||||
|
<path d="M 5.25 0 L 5.25 -0.3125 C 4.5625 -0.3125 4.46875 -0.375 4.46875 -0.875 L 4.46875 -6.921875 L 3.046875 -6.8125 L 3.046875 -6.5 C 3.734375 -6.5 3.8125 -6.4375 3.8125 -5.9375 L 3.8125 -3.78125 C 3.53125 -4.140625 3.09375 -4.40625 2.5625 -4.40625 C 1.390625 -4.40625 0.34375 -3.421875 0.34375 -2.140625 C 0.34375 -0.875 1.3125 0.109375 2.453125 0.109375 C 3.09375 0.109375 3.53125 -0.234375 3.78125 -0.546875 L 3.78125 0.109375 Z M 3.78125 -1.171875 C 3.78125 -1 3.78125 -0.984375 3.671875 -0.8125 C 3.375 -0.328125 2.9375 -0.109375 2.5 -0.109375 C 2.046875 -0.109375 1.6875 -0.375 1.453125 -0.75 C 1.203125 -1.15625 1.171875 -1.71875 1.171875 -2.140625 C 1.171875 -2.5 1.1875 -3.09375 1.46875 -3.546875 C 1.6875 -3.859375 2.0625 -4.1875 2.609375 -4.1875 C 2.953125 -4.1875 3.375 -4.03125 3.671875 -3.59375 C 3.78125 -3.421875 3.78125 -3.40625 3.78125 -3.21875 Z M 3.78125 -1.171875 "/>
|
||||||
|
</g>
|
||||||
|
<g id="glyph-0-10">
|
||||||
|
<path d="M 5.328125 0 L 5.328125 -0.3125 C 4.8125 -0.3125 4.5625 -0.3125 4.5625 -0.609375 L 4.5625 -2.515625 C 4.5625 -3.375 4.5625 -3.671875 4.25 -4.03125 C 4.109375 -4.203125 3.78125 -4.40625 3.203125 -4.40625 C 2.46875 -4.40625 2 -3.984375 1.71875 -3.359375 L 1.71875 -4.40625 L 0.3125 -4.296875 L 0.3125 -3.984375 C 1.015625 -3.984375 1.09375 -3.921875 1.09375 -3.421875 L 1.09375 -0.75 C 1.09375 -0.3125 0.984375 -0.3125 0.3125 -0.3125 L 0.3125 0 L 1.453125 -0.03125 L 2.5625 0 L 2.5625 -0.3125 C 1.890625 -0.3125 1.78125 -0.3125 1.78125 -0.75 L 1.78125 -2.59375 C 1.78125 -3.625 2.5 -4.1875 3.125 -4.1875 C 3.765625 -4.1875 3.875 -3.65625 3.875 -3.078125 L 3.875 -0.75 C 3.875 -0.3125 3.765625 -0.3125 3.09375 -0.3125 L 3.09375 0 L 4.21875 -0.03125 Z M 5.328125 0 "/>
|
||||||
|
</g>
|
||||||
|
<g id="glyph-0-11">
|
||||||
|
<path d="M 5.1875 -2.15625 C 5.1875 -3.421875 4.21875 -4.40625 3.078125 -4.40625 C 2.296875 -4.40625 1.875 -3.9375 1.71875 -3.765625 L 1.71875 -6.921875 L 0.28125 -6.8125 L 0.28125 -6.5 C 0.984375 -6.5 1.0625 -6.4375 1.0625 -5.9375 L 1.0625 0 L 1.3125 0 L 1.671875 -0.625 C 1.8125 -0.390625 2.234375 0.109375 2.96875 0.109375 C 4.15625 0.109375 5.1875 -0.875 5.1875 -2.15625 Z M 4.359375 -2.15625 C 4.359375 -1.796875 4.34375 -1.203125 4.0625 -0.75 C 3.84375 -0.4375 3.46875 -0.109375 2.9375 -0.109375 C 2.484375 -0.109375 2.125 -0.34375 1.890625 -0.71875 C 1.75 -0.921875 1.75 -0.953125 1.75 -1.140625 L 1.75 -3.1875 C 1.75 -3.375 1.75 -3.390625 1.859375 -3.546875 C 2.25 -4.109375 2.796875 -4.1875 3.03125 -4.1875 C 3.484375 -4.1875 3.84375 -3.921875 4.078125 -3.546875 C 4.34375 -3.140625 4.359375 -2.578125 4.359375 -2.15625 Z M 4.359375 -2.15625 "/>
|
||||||
|
</g>
|
||||||
|
<g id="glyph-0-12">
|
||||||
|
<path d="M 3.625 -3.796875 C 3.625 -4.109375 3.3125 -4.40625 2.890625 -4.40625 C 2.15625 -4.40625 1.796875 -3.734375 1.671875 -3.3125 L 1.671875 -4.40625 L 0.28125 -4.296875 L 0.28125 -3.984375 C 0.984375 -3.984375 1.0625 -3.921875 1.0625 -3.421875 L 1.0625 -0.75 C 1.0625 -0.3125 0.953125 -0.3125 0.28125 -0.3125 L 0.28125 0 L 1.421875 -0.03125 C 1.8125 -0.03125 2.28125 -0.03125 2.6875 0 L 2.6875 -0.3125 L 2.46875 -0.3125 C 1.734375 -0.3125 1.71875 -0.421875 1.71875 -0.78125 L 1.71875 -2.3125 C 1.71875 -3.296875 2.140625 -4.1875 2.890625 -4.1875 C 2.953125 -4.1875 2.984375 -4.1875 3 -4.171875 C 2.96875 -4.171875 2.765625 -4.046875 2.765625 -3.78125 C 2.765625 -3.515625 2.984375 -3.359375 3.203125 -3.359375 C 3.375 -3.359375 3.625 -3.484375 3.625 -3.796875 Z M 3.625 -3.796875 "/>
|
||||||
|
</g>
|
||||||
|
<g id="glyph-0-13">
|
||||||
|
<path d="M 2.46875 0 L 2.46875 -0.3125 C 1.796875 -0.3125 1.765625 -0.359375 1.765625 -0.75 L 1.765625 -4.40625 L 0.375 -4.296875 L 0.375 -3.984375 C 1.015625 -3.984375 1.109375 -3.921875 1.109375 -3.4375 L 1.109375 -0.75 C 1.109375 -0.3125 1 -0.3125 0.328125 -0.3125 L 0.328125 0 L 1.421875 -0.03125 C 1.78125 -0.03125 2.125 -0.015625 2.46875 0 Z M 1.90625 -6.015625 C 1.90625 -6.296875 1.6875 -6.546875 1.390625 -6.546875 C 1.046875 -6.546875 0.84375 -6.265625 0.84375 -6.015625 C 0.84375 -5.75 1.078125 -5.5 1.375 -5.5 C 1.71875 -5.5 1.90625 -5.765625 1.90625 -6.015625 Z M 1.90625 -6.015625 "/>
|
||||||
|
</g>
|
||||||
|
<g id="glyph-0-14">
|
||||||
|
<path d="M 4.8125 -0.890625 L 4.8125 -1.453125 L 4.5625 -1.453125 L 4.5625 -0.890625 C 4.5625 -0.3125 4.3125 -0.25 4.203125 -0.25 C 3.875 -0.25 3.84375 -0.703125 3.84375 -0.75 L 3.84375 -2.734375 C 3.84375 -3.15625 3.84375 -3.546875 3.484375 -3.921875 C 3.09375 -4.3125 2.59375 -4.46875 2.109375 -4.46875 C 1.296875 -4.46875 0.609375 -4 0.609375 -3.34375 C 0.609375 -3.046875 0.8125 -2.875 1.0625 -2.875 C 1.34375 -2.875 1.53125 -3.078125 1.53125 -3.328125 C 1.53125 -3.453125 1.46875 -3.78125 1.015625 -3.78125 C 1.28125 -4.140625 1.78125 -4.25 2.09375 -4.25 C 2.578125 -4.25 3.15625 -3.859375 3.15625 -2.96875 L 3.15625 -2.609375 C 2.640625 -2.578125 1.9375 -2.546875 1.3125 -2.25 C 0.5625 -1.90625 0.3125 -1.390625 0.3125 -0.953125 C 0.3125 -0.140625 1.28125 0.109375 1.90625 0.109375 C 2.578125 0.109375 3.03125 -0.296875 3.21875 -0.75 C 3.265625 -0.359375 3.53125 0.0625 4 0.0625 C 4.203125 0.0625 4.8125 -0.078125 4.8125 -0.890625 Z M 3.15625 -1.390625 C 3.15625 -0.453125 2.4375 -0.109375 1.984375 -0.109375 C 1.5 -0.109375 1.09375 -0.453125 1.09375 -0.953125 C 1.09375 -1.5 1.5 -2.328125 3.15625 -2.390625 Z M 3.15625 -1.390625 "/>
|
||||||
|
</g>
|
||||||
|
<g id="glyph-0-15">
|
||||||
|
<path d="M 5.25 1.9375 L 5.25 1.625 C 4.578125 1.625 4.46875 1.625 4.46875 1.171875 L 4.46875 -4.40625 L 4.25 -4.40625 L 3.875 -3.5 C 3.75 -3.78125 3.34375 -4.40625 2.546875 -4.40625 C 1.390625 -4.40625 0.34375 -3.4375 0.34375 -2.140625 C 0.34375 -0.890625 1.3125 0.109375 2.46875 0.109375 C 3.15625 0.109375 3.5625 -0.3125 3.78125 -0.609375 L 3.78125 1.171875 C 3.78125 1.625 3.671875 1.625 3.015625 1.625 L 3.015625 1.9375 L 4.125 1.90625 Z M 3.8125 -1.359375 C 3.8125 -1.03125 3.640625 -0.75 3.421875 -0.515625 C 3.296875 -0.375 2.96875 -0.109375 2.5 -0.109375 C 1.78125 -0.109375 1.171875 -1 1.171875 -2.140625 C 1.171875 -3.328125 1.859375 -4.15625 2.609375 -4.15625 C 3.40625 -4.15625 3.8125 -3.296875 3.8125 -2.765625 Z M 3.8125 -1.359375 "/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</defs>
|
||||||
|
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
|
||||||
|
<use xlink:href="#glyph-0-1" x="107.243" y="8.369"/>
|
||||||
|
<use xlink:href="#glyph-0-2" x="114.436026" y="8.369"/>
|
||||||
|
<use xlink:href="#glyph-0-3" x="119.975254" y="8.369"/>
|
||||||
|
</g>
|
||||||
|
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
|
||||||
|
<use xlink:href="#glyph-0-4" x="127.716225" y="8.369"/>
|
||||||
|
<use xlink:href="#glyph-0-5" x="131.641505" y="8.369"/>
|
||||||
|
<use xlink:href="#glyph-0-6" x="137.180733" y="8.369"/>
|
||||||
|
</g>
|
||||||
|
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
|
||||||
|
<use xlink:href="#glyph-0-7" x="148.797171" y="8.369"/>
|
||||||
|
<use xlink:href="#glyph-0-8" x="153.778491" y="8.369"/>
|
||||||
|
</g>
|
||||||
|
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
|
||||||
|
<use xlink:href="#glyph-0-7" x="160.144618" y="8.369"/>
|
||||||
|
</g>
|
||||||
|
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
|
||||||
|
<use xlink:href="#glyph-0-9" x="165.404892" y="8.369"/>
|
||||||
|
<use xlink:href="#glyph-0-9" x="170.94412" y="8.369"/>
|
||||||
|
</g>
|
||||||
|
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
|
||||||
|
<use xlink:href="#glyph-0-10" x="179.800907" y="8.369"/>
|
||||||
|
</g>
|
||||||
|
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
|
||||||
|
<use xlink:href="#glyph-0-5" x="185.061181" y="8.369"/>
|
||||||
|
<use xlink:href="#glyph-0-6" x="190.600409" y="8.369"/>
|
||||||
|
</g>
|
||||||
|
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
|
||||||
|
<use xlink:href="#glyph-0-11" x="198.620334" y="8.369"/>
|
||||||
|
</g>
|
||||||
|
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
|
||||||
|
<use xlink:href="#glyph-0-3" x="204.438516" y="8.369"/>
|
||||||
|
<use xlink:href="#glyph-0-12" x="208.861928" y="8.369"/>
|
||||||
|
<use xlink:href="#glyph-0-4" x="212.767283" y="8.369"/>
|
||||||
|
</g>
|
||||||
|
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
|
||||||
|
<use xlink:href="#glyph-0-13" x="220.010122" y="8.369"/>
|
||||||
|
<use xlink:href="#glyph-0-4" x="222.779736" y="8.369"/>
|
||||||
|
</g>
|
||||||
|
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
|
||||||
|
<use xlink:href="#glyph-0-14" x="230.022575" y="8.369"/>
|
||||||
|
</g>
|
||||||
|
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
|
||||||
|
<use xlink:href="#glyph-0-4" x="238.321454" y="8.369"/>
|
||||||
|
<use xlink:href="#glyph-0-15" x="242.246735" y="8.369"/>
|
||||||
|
<use xlink:href="#glyph-0-5" x="247.507009" y="8.369"/>
|
||||||
|
<use xlink:href="#glyph-0-14" x="253.046236" y="8.369"/>
|
||||||
|
<use xlink:href="#glyph-0-12" x="258.027556" y="8.369"/>
|
||||||
|
<use xlink:href="#glyph-0-3" x="261.932911" y="8.369"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 15 KiB |
|
@ -0,0 +1,13 @@
|
||||||
|
\documentclass{article}
|
||||||
|
|
||||||
|
\usepackage{graphicx}
|
||||||
|
\usepackage{caption}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
\begin{figure}
|
||||||
|
\centering
|
||||||
|
\includegraphics[scale=1]{sum_odd_numbers_to_square}
|
||||||
|
\setcounter{figure}{2}
|
||||||
|
\caption{The sum of odd numbers is a square}
|
||||||
|
\end{figure}
|
||||||
|
\end{document}
|
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 3.8 KiB |
|
@ -0,0 +1,52 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="199.621" height="199.621" viewBox="0 0 199.621 199.621">
|
||||||
|
<defs>
|
||||||
|
<g>
|
||||||
|
<g id="glyph-0-0">
|
||||||
|
</g>
|
||||||
|
<g id="glyph-0-1">
|
||||||
|
<path d="M 2.9375 -6.375 C 2.9375 -6.625 2.9375 -6.640625 2.703125 -6.640625 C 2.078125 -6 1.203125 -6 0.890625 -6 L 0.890625 -5.6875 C 1.09375 -5.6875 1.671875 -5.6875 2.1875 -5.953125 L 2.1875 -0.78125 C 2.1875 -0.421875 2.15625 -0.3125 1.265625 -0.3125 L 0.953125 -0.3125 L 0.953125 0 C 1.296875 -0.03125 2.15625 -0.03125 2.5625 -0.03125 C 2.953125 -0.03125 3.828125 -0.03125 4.171875 0 L 4.171875 -0.3125 L 3.859375 -0.3125 C 2.953125 -0.3125 2.9375 -0.421875 2.9375 -0.78125 Z M 2.9375 -6.375 "/>
|
||||||
|
</g>
|
||||||
|
<g id="glyph-0-2">
|
||||||
|
<path d="M 2.890625 -3.515625 C 3.703125 -3.78125 4.28125 -4.46875 4.28125 -5.265625 C 4.28125 -6.078125 3.40625 -6.640625 2.453125 -6.640625 C 1.453125 -6.640625 0.6875 -6.046875 0.6875 -5.28125 C 0.6875 -4.953125 0.90625 -4.765625 1.203125 -4.765625 C 1.5 -4.765625 1.703125 -4.984375 1.703125 -5.28125 C 1.703125 -5.765625 1.234375 -5.765625 1.09375 -5.765625 C 1.390625 -6.265625 2.046875 -6.390625 2.40625 -6.390625 C 2.828125 -6.390625 3.375 -6.171875 3.375 -5.28125 C 3.375 -5.15625 3.34375 -4.578125 3.09375 -4.140625 C 2.796875 -3.65625 2.453125 -3.625 2.203125 -3.625 C 2.125 -3.609375 1.890625 -3.59375 1.8125 -3.59375 C 1.734375 -3.578125 1.671875 -3.5625 1.671875 -3.46875 C 1.671875 -3.359375 1.734375 -3.359375 1.90625 -3.359375 L 2.34375 -3.359375 C 3.15625 -3.359375 3.53125 -2.6875 3.53125 -1.703125 C 3.53125 -0.34375 2.84375 -0.0625 2.40625 -0.0625 C 1.96875 -0.0625 1.21875 -0.234375 0.875 -0.8125 C 1.21875 -0.765625 1.53125 -0.984375 1.53125 -1.359375 C 1.53125 -1.71875 1.265625 -1.921875 0.984375 -1.921875 C 0.734375 -1.921875 0.421875 -1.78125 0.421875 -1.34375 C 0.421875 -0.4375 1.34375 0.21875 2.4375 0.21875 C 3.65625 0.21875 4.5625 -0.6875 4.5625 -1.703125 C 4.5625 -2.515625 3.921875 -3.296875 2.890625 -3.515625 Z M 2.890625 -3.515625 "/>
|
||||||
|
</g>
|
||||||
|
<g id="glyph-0-3">
|
||||||
|
<path d="M 4.46875 -2 C 4.46875 -3.1875 3.65625 -4.1875 2.578125 -4.1875 C 2.109375 -4.1875 1.671875 -4.03125 1.3125 -3.671875 L 1.3125 -5.625 C 1.515625 -5.5625 1.84375 -5.5 2.15625 -5.5 C 3.390625 -5.5 4.09375 -6.40625 4.09375 -6.53125 C 4.09375 -6.59375 4.0625 -6.640625 3.984375 -6.640625 C 3.984375 -6.640625 3.953125 -6.640625 3.90625 -6.609375 C 3.703125 -6.515625 3.21875 -6.3125 2.546875 -6.3125 C 2.15625 -6.3125 1.6875 -6.390625 1.21875 -6.59375 C 1.140625 -6.625 1.125 -6.625 1.109375 -6.625 C 1 -6.625 1 -6.546875 1 -6.390625 L 1 -3.4375 C 1 -3.265625 1 -3.1875 1.140625 -3.1875 C 1.21875 -3.1875 1.234375 -3.203125 1.28125 -3.265625 C 1.390625 -3.421875 1.75 -3.96875 2.5625 -3.96875 C 3.078125 -3.96875 3.328125 -3.515625 3.40625 -3.328125 C 3.5625 -2.953125 3.59375 -2.578125 3.59375 -2.078125 C 3.59375 -1.71875 3.59375 -1.125 3.34375 -0.703125 C 3.109375 -0.3125 2.734375 -0.0625 2.28125 -0.0625 C 1.5625 -0.0625 0.984375 -0.59375 0.8125 -1.171875 C 0.84375 -1.171875 0.875 -1.15625 0.984375 -1.15625 C 1.3125 -1.15625 1.484375 -1.40625 1.484375 -1.640625 C 1.484375 -1.890625 1.3125 -2.140625 0.984375 -2.140625 C 0.84375 -2.140625 0.5 -2.0625 0.5 -1.609375 C 0.5 -0.75 1.1875 0.21875 2.296875 0.21875 C 3.453125 0.21875 4.46875 -0.734375 4.46875 -2 Z M 4.46875 -2 "/>
|
||||||
|
</g>
|
||||||
|
<g id="glyph-0-4">
|
||||||
|
<path d="M 4.75 -6.078125 C 4.828125 -6.1875 4.828125 -6.203125 4.828125 -6.421875 L 2.40625 -6.421875 C 1.203125 -6.421875 1.171875 -6.546875 1.140625 -6.734375 L 0.890625 -6.734375 L 0.5625 -4.6875 L 0.8125 -4.6875 C 0.84375 -4.84375 0.921875 -5.46875 1.0625 -5.59375 C 1.125 -5.65625 1.90625 -5.65625 2.03125 -5.65625 L 4.09375 -5.65625 C 3.984375 -5.5 3.203125 -4.40625 2.984375 -4.078125 C 2.078125 -2.734375 1.75 -1.34375 1.75 -0.328125 C 1.75 -0.234375 1.75 0.21875 2.21875 0.21875 C 2.671875 0.21875 2.671875 -0.234375 2.671875 -0.328125 L 2.671875 -0.84375 C 2.671875 -1.390625 2.703125 -1.9375 2.78125 -2.46875 C 2.828125 -2.703125 2.953125 -3.5625 3.40625 -4.171875 Z M 4.75 -6.078125 "/>
|
||||||
|
</g>
|
||||||
|
<g id="glyph-0-5">
|
||||||
|
<path d="M 3.65625 -3.171875 L 3.65625 -2.84375 C 3.65625 -0.515625 2.625 -0.0625 2.046875 -0.0625 C 1.875 -0.0625 1.328125 -0.078125 1.0625 -0.421875 C 1.5 -0.421875 1.578125 -0.703125 1.578125 -0.875 C 1.578125 -1.1875 1.34375 -1.328125 1.125 -1.328125 C 0.96875 -1.328125 0.671875 -1.25 0.671875 -0.859375 C 0.671875 -0.1875 1.203125 0.21875 2.046875 0.21875 C 3.34375 0.21875 4.5625 -1.140625 4.5625 -3.28125 C 4.5625 -5.96875 3.40625 -6.640625 2.515625 -6.640625 C 1.96875 -6.640625 1.484375 -6.453125 1.0625 -6.015625 C 0.640625 -5.5625 0.421875 -5.140625 0.421875 -4.390625 C 0.421875 -3.15625 1.296875 -2.171875 2.40625 -2.171875 C 3.015625 -2.171875 3.421875 -2.59375 3.65625 -3.171875 Z M 2.421875 -2.40625 C 2.265625 -2.40625 1.796875 -2.40625 1.5 -3.03125 C 1.3125 -3.40625 1.3125 -3.890625 1.3125 -4.390625 C 1.3125 -4.921875 1.3125 -5.390625 1.53125 -5.765625 C 1.796875 -6.265625 2.171875 -6.390625 2.515625 -6.390625 C 2.984375 -6.390625 3.3125 -6.046875 3.484375 -5.609375 C 3.59375 -5.28125 3.640625 -4.65625 3.640625 -4.203125 C 3.640625 -3.375 3.296875 -2.40625 2.421875 -2.40625 Z M 2.421875 -2.40625 "/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</defs>
|
||||||
|
<path fill="none" stroke-width="0.3985" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M -0.00146875 -0.0015625 L 170.080563 -0.0015625 M -0.00146875 28.346094 L 170.080563 28.346094 M -0.00146875 56.69375 L 170.080563 56.69375 M -0.00146875 85.041406 L 170.080563 85.041406 M -0.00146875 113.389063 L 170.080563 113.389063 M -0.00146875 141.732813 L 170.080563 141.732813 M -0.00146875 170.072656 L 170.080563 170.072656 M -0.00146875 -0.0015625 L -0.00146875 170.080469 M 28.346187 -0.0015625 L 28.346187 170.080469 M 56.693844 -0.0015625 L 56.693844 170.080469 M 85.0415 -0.0015625 L 85.0415 170.080469 M 113.389156 -0.0015625 L 113.389156 170.080469 M 141.732906 -0.0015625 L 141.732906 170.080469 M 170.07275 -0.0015625 L 170.07275 170.080469 " transform="matrix(1, 0, 0, -1, 14.771, 184.85)"/>
|
||||||
|
<path fill="none" stroke-width="0.79701" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M -0.00146875 -0.0015625 L 170.080563 -0.0015625 L 170.080563 170.080469 L -0.00146875 170.080469 L -0.00146875 -0.0015625 " transform="matrix(1, 0, 0, -1, 14.771, 184.85)"/>
|
||||||
|
<path fill="none" stroke-width="1.19553" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M -0.00146875 -0.0015625 L -0.00146875 -0.0015625 " transform="matrix(1, 0, 0, -1, 14.771, 184.85)"/>
|
||||||
|
<path fill="none" stroke-width="1.19553" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M -0.00146875 -0.0015625 L 28.346187 -0.0015625 L 28.346187 28.346094 L -0.00146875 28.346094 L -0.00146875 -0.0015625 " transform="matrix(1, 0, 0, -1, 14.771, 184.85)"/>
|
||||||
|
<path fill="none" stroke-width="1.19553" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M -0.00146875 -0.0015625 L 56.693844 -0.0015625 L 56.693844 56.69375 L -0.00146875 56.69375 L -0.00146875 -0.0015625 " transform="matrix(1, 0, 0, -1, 14.771, 184.85)"/>
|
||||||
|
<path fill="none" stroke-width="1.19553" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M -0.00146875 -0.0015625 L 85.0415 -0.0015625 L 85.0415 85.041406 L -0.00146875 85.041406 L -0.00146875 -0.0015625 " transform="matrix(1, 0, 0, -1, 14.771, 184.85)"/>
|
||||||
|
<path fill="none" stroke-width="1.19553" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M -0.00146875 -0.0015625 L 113.389156 -0.0015625 L 113.389156 113.389063 L -0.00146875 113.389063 L -0.00146875 -0.0015625 " transform="matrix(1, 0, 0, -1, 14.771, 184.85)"/>
|
||||||
|
<path fill="none" stroke-width="1.19553" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M -0.00146875 -0.0015625 L 141.732906 -0.0015625 L 141.732906 141.732813 L -0.00146875 141.732813 L -0.00146875 -0.0015625 " transform="matrix(1, 0, 0, -1, 14.771, 184.85)"/>
|
||||||
|
<path fill="none" stroke-width="1.19553" stroke-linecap="butt" stroke-linejoin="miter" stroke="rgb(0%, 0%, 0%)" stroke-opacity="1" stroke-miterlimit="10" d="M -0.00146875 -0.0015625 L 170.080563 -0.0015625 L 170.080563 170.080469 L -0.00146875 170.080469 L -0.00146875 -0.0015625 " transform="matrix(1, 0, 0, -1, 14.771, 184.85)"/>
|
||||||
|
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
|
||||||
|
<use xlink:href="#glyph-0-1" x="26.454" y="173.887"/>
|
||||||
|
</g>
|
||||||
|
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
|
||||||
|
<use xlink:href="#glyph-0-2" x="54.8" y="145.541"/>
|
||||||
|
</g>
|
||||||
|
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
|
||||||
|
<use xlink:href="#glyph-0-3" x="83.146" y="117.194"/>
|
||||||
|
</g>
|
||||||
|
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
|
||||||
|
<use xlink:href="#glyph-0-4" x="111.493" y="88.848"/>
|
||||||
|
</g>
|
||||||
|
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
|
||||||
|
<use xlink:href="#glyph-0-5" x="139.839" y="60.501"/>
|
||||||
|
</g>
|
||||||
|
<g fill="rgb(0%, 0%, 0%)" fill-opacity="1">
|
||||||
|
<use xlink:href="#glyph-0-1" x="165.695" y="32.155"/>
|
||||||
|
<use xlink:href="#glyph-0-1" x="170.6763" y="32.155"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 9.1 KiB |
|
@ -0,0 +1,25 @@
|
||||||
|
% Draw a 6 by 6 grid of squares, with thicker line on outer borders.
|
||||||
|
|
||||||
|
\documentclass[margin=0.5cm]{standalone}
|
||||||
|
|
||||||
|
\usepackage{tikz}
|
||||||
|
\usetikzlibrary{calc}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
\begin{tikzpicture}
|
||||||
|
% Draw grid
|
||||||
|
\draw (0, 0) grid (6, 6);
|
||||||
|
% Draw thicker lines on outer borders
|
||||||
|
\draw[thick] (0, 0) -- (6, 0) -- (6, 6) -- (0, 6) -- (0, 0);
|
||||||
|
|
||||||
|
% Draw for each square with bottom left corner at (0, 0) to (6, 6) the thicker border
|
||||||
|
\foreach \i in {0, 1, 2, 3, 4, 5, 6}
|
||||||
|
\draw[very thick] (0, 0) -- (\i, 0) -- (\i, \i) -- (0, \i) -- (0, 0);
|
||||||
|
|
||||||
|
% For each $i$-th odd number from 1 to 11, add a node at the top right corner of the $i$-th square
|
||||||
|
\foreach \i [evaluate={\x=int(\i*2+1);}] in {0, 1, 2, 3, 4, 5}
|
||||||
|
\node at (\i+0.5, \i+0.5) {$\x$};
|
||||||
|
\end{tikzpicture}
|
||||||
|
|
||||||
|
\end{document}
|
|
@ -1 +1,7 @@
|
||||||
\chapter*{Introduction}
|
\chapter*{Introduction}
|
||||||
|
|
||||||
|
|
||||||
|
This document gathers some random solution to the problem from the \textit{Art of Computer Programming} by Donald E. KNUTH.
|
||||||
|
It should not be considered as a reference, but as a personal attempt to solve some of the exercises, there for the answer should not consider the solution as correct unless he find it so.
|
||||||
|
|
||||||
|
The answer are presented with page numbers from the third edition of the AOCP.
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
\DeclareMathOperator{\Reals}{\mathbb{R}}
|
||||||
|
\DeclareMathOperator{\Integers}{\mathbb{Z}}
|
||||||
|
\DeclareMathOperator{\Naturals}{\mathbb{N}}
|
|
@ -1,5 +1,5 @@
|
||||||
% makeindex style file created by the glossaries package
|
% makeindex style file created by the glossaries package
|
||||||
% for document 'main' on 2023-1-3
|
% for document 'main' on 2023-2-27
|
||||||
actual '?'
|
actual '?'
|
||||||
encap '|'
|
encap '|'
|
||||||
level '!'
|
level '!'
|
||||||
|
|
BIN
tex/main.pdf
BIN
tex/main.pdf
Binary file not shown.
32
tex/main.tex
32
tex/main.tex
|
@ -1,26 +1,4 @@
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
||||||
% The LuaLaTeX Chameleon Book Template
|
|
||||||
% LaTeX Template
|
|
||||||
% Version 0.0.0 (2022-12-05)
|
|
||||||
%
|
|
||||||
% Authors:
|
|
||||||
% Samuel ORTION <samuel+dev@ortion.fr>
|
|
||||||
% Compiling this template:
|
|
||||||
% This template uses biber for its bibliography and makeindex for its index.
|
|
||||||
% When you first open the template, compile it from the command line with the
|
|
||||||
% commands below to make sure your LaTeX distribution is configured correctly:
|
|
||||||
%
|
|
||||||
% 1) lualatex main
|
|
||||||
% 2) makeindex main.idx -s indexstyle.ist
|
|
||||||
% 3) biber main
|
|
||||||
% 3) makeglossaries main
|
|
||||||
% 4) lualatex main
|
|
||||||
% 5) lualatex main
|
|
||||||
%
|
|
||||||
% License:
|
|
||||||
% MIT
|
|
||||||
%
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
% PREAMBLE
|
% PREAMBLE
|
||||||
|
@ -29,7 +7,8 @@
|
||||||
\documentclass[
|
\documentclass[
|
||||||
11pt,
|
11pt,
|
||||||
fleqn,
|
fleqn,
|
||||||
a4paper
|
a4paper,
|
||||||
|
oneside
|
||||||
]{TheLuaChameleonBook}
|
]{TheLuaChameleonBook}
|
||||||
|
|
||||||
% Book PDF metadata
|
% Book PDF metadata
|
||||||
|
@ -37,7 +16,7 @@
|
||||||
pdftitle={The Art of Computer Programming Vol. 1 - Some Exercises},
|
pdftitle={The Art of Computer Programming Vol. 1 - Some Exercises},
|
||||||
pdfauthor={Samuel ORTION},
|
pdfauthor={Samuel ORTION},
|
||||||
pdfsubject={An Attempt to solve some of the exercises from the Book of Donald E. KNUTH},
|
pdfsubject={An Attempt to solve some of the exercises from the Book of Donald E. KNUTH},
|
||||||
pdfkeywords={computer science, mathematics, algorithmics},
|
pdfkeywords={computer science, mathematics, algorithmic},
|
||||||
pdfcreator={LaTeX},
|
pdfcreator={LaTeX},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,6 +27,7 @@
|
||||||
\makeindex
|
\makeindex
|
||||||
|
|
||||||
\input{preamble.tex}
|
\input{preamble.tex}
|
||||||
|
\input{definitions.tex}
|
||||||
\setcounter{tocdepth}{2}
|
\setcounter{tocdepth}{2}
|
||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
@ -87,7 +67,7 @@
|
||||||
|
|
||||||
\noindent \texttt{\href{https://samuel.ortion.fr/}{samuel.ortion.fr}}\\ % URL
|
\noindent \texttt{\href{https://samuel.ortion.fr/}{samuel.ortion.fr}}\\ % URL
|
||||||
|
|
||||||
\noindent Licensed under the Creative Commons Attribution-NonCommercial 4.0 License.
|
\noindent Answers Licensed under the Creative Commons Attribution-NonCommercial 4.0 License.
|
||||||
% You may not use this file except in compliance with the License. You may obtain a copy of the License at \url{https://creativecommons.org/licenses/by-nc-sa/4.0}. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \textsc{``as is'' basis, without warranties or conditions of any kind}, either express or implied. See the License for the specific language governing permissions and limitations under the License.\\ % License information, replace this with your own license (if any)
|
% You may not use this file except in compliance with the License. You may obtain a copy of the License at \url{https://creativecommons.org/licenses/by-nc-sa/4.0}. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \textsc{``as is'' basis, without warranties or conditions of any kind}, either express or implied. See the License for the specific language governing permissions and limitations under the License.\\ % License information, replace this with your own license (if any)
|
||||||
|
|
||||||
% \noindent \textit{First printing, October 2022} % Printing/edition date
|
% \noindent \textit{First printing, October 2022} % Printing/edition date
|
||||||
|
|
|
@ -10,26 +10,22 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
% Create a new environment {exercise} to refer to exercises from the KNUTH book.
|
% Create a new environment {exercise} to refer to exercises from the KNUTH book.
|
||||||
% Add a TODO switch option to show unresolved exercises
|
|
||||||
\newenvironment{myexercise}[2]
|
\newenvironment{myexercise}[2]
|
||||||
{
|
{
|
||||||
\addcontentsline{toc}{subsubsection}{Exercise #1}
|
\addcontentsline{toc}{subsubsection}{Exercise #1}
|
||||||
\begin{minipage}{\textwidth}
|
|
||||||
\begin{flushleft}
|
\begin{flushleft}
|
||||||
{
|
{
|
||||||
\Huge
|
\Large
|
||||||
\textbf{Exercise #1.} (p. #2)
|
\textbf{Exercise #1.} (p. #2)
|
||||||
}
|
}
|
||||||
\end{flushleft}
|
\end{flushleft}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
\end{minipage}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
% Create a new environment for big quote with `primarycolor' coloured quote sign
|
% Create a new environment for big quote with `primarycolor' coloured quote sign
|
||||||
\newenvironment{myquote}
|
\newenvironment{myquote}
|
||||||
{
|
{
|
||||||
\begin{minipage}{\textwidth}
|
|
||||||
\begin{flushleft}
|
\begin{flushleft}
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -45,22 +41,22 @@
|
||||||
|
|
||||||
\end{flushright}
|
\end{flushright}
|
||||||
\end{flushleft}
|
\end{flushleft}
|
||||||
\end{minipage}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
\newenvironment{myanswer}
|
\newenvironment{myanswer}
|
||||||
{
|
{
|
||||||
\begin{minipage}{\textwidth}
|
|
||||||
\begin{itshape}
|
\begin{itshape}
|
||||||
\begin{flushleft}
|
\begin{flushleft}
|
||||||
{
|
{
|
||||||
\Large
|
|
||||||
\textbf{My Answer}:
|
\textbf{My Answer}:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
\end{flushleft}
|
\end{flushleft}
|
||||||
\end{itshape}
|
\end{itshape}
|
||||||
\end{minipage}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
\usepackage{algorithmicx}
|
||||||
|
\usepackage{algorithm}
|
||||||
|
\usepackage{algpseudocodex}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue