diff --git a/src/Intermediate/An Introduction to Graph Theory/main.tex b/src/Intermediate/An Introduction to Graph Theory/main.tex new file mode 100755 index 0000000..84c1ce3 --- /dev/null +++ b/src/Intermediate/An Introduction to Graph Theory/main.tex @@ -0,0 +1,31 @@ +% use [nosolutions] flag to hide solutions. +% use [solutions] flag to show solutions. +\documentclass[ + solutions, + singlenumbering +]{../../../lib/tex/ormc_handout} +\usepackage{../../../lib/tex/macros} + + +\input{tikxset.tex} +\usepackage{adjustbox} + +\uptitlel{Intermediate 2} +\uptitler{\smallurl{}} +\title{An Introduction to Graph Theory} +\subtitle{ + Prepared by Mark on \today \\ + Based on a handout by Oleg Gleizer +} + +\begin{document} + + \maketitle + + + \input{parts/0 intro.tex} + \input{parts/1 paths.tex} + \input{parts/2 planar.tex} + %\input{parts/3 counting.tex} + +\end{document} \ No newline at end of file diff --git a/src/Intermediate/An Introduction to Graph Theory/meta.toml b/src/Intermediate/An Introduction to Graph Theory/meta.toml new file mode 100644 index 0000000..56e9e19 --- /dev/null +++ b/src/Intermediate/An Introduction to Graph Theory/meta.toml @@ -0,0 +1,6 @@ +[metadata] +title = "An Introduction to Graph Theory" + +[publish] +handout = true +solutions = false diff --git a/src/Intermediate/An Introduction to Graph Theory/parts/0 intro.tex b/src/Intermediate/An Introduction to Graph Theory/parts/0 intro.tex new file mode 100644 index 0000000..08207d1 --- /dev/null +++ b/src/Intermediate/An Introduction to Graph Theory/parts/0 intro.tex @@ -0,0 +1,133 @@ +\section{Graphs} + +\definition{} +A \textit{set} is an unordered collection of objects. \par +This means that the sets $\{1, 2, 3\}$ and $\{3, 2, 1\}$ are identical. + + +\definition{} +A \textit{graph} $G = (N, E)$ consists of two sets: a set of \textit{vertices} $V$, and a set of \textit{edges} $E$. \par +Vertices are simply named \say{points,} and edges are connections between pairs of vertices. \par +In the graph below, $V = \{a, b, c, d\}$ and $E = \{~ (a,b),~ (a,c),~ (a,d),~ (c,d) ~\}$. + +\begin{center} +\begin{tikzpicture} + \begin{scope}[layer = nodes] + \node[main] (a) at (0, 0) {$a$}; + \node[main] (b) at (0, -1) {$b$}; + \node[main] (c) at (2, -1) {$c$}; + \node[main] (d) at (4, 0) {$d$}; + \end{scope} + + \draw[-] + (a) edge (b) + (a) edge (c) + (a) edge (d) + (c) edge (d) + ; +\end{tikzpicture} +\end{center} + +Vertices are also sometimes called \textit{nodes}. You'll see both terms in this handout. \par + + + +\problem{} +Draw the graph defined by the following vertex and edge sets: \par +$V = \{A,B,C,D,E\}$ \par +$E = \{~ (A,B),~ (A,C),~ (A,D),~ (A,E),~ (B,C),~ (C,D),~ (D,E) ~\}$\par + +\vfill + + +We can use graphs to solve many different kinds of problems. \par +Most situations that involve some kind of \say{relation} between elements can be represented by a graph. + +\pagebreak + + +Graphs are fully defined by their vertices and edges. The exact position of each vertex and edge doesn't matter---only which nodes are connected to each other. The same graph can be drawn in many different ways. + + +\problem{} +Show that the graphs below are equivalent by comparing the sets of their vertices and edges. + +\begin{center} +\adjustbox{valign=c}{ +\begin{tikzpicture} + \begin{scope}[layer = nodes] + \node[main] (a) at (0, 0) {$a$}; + \node[main] (b) at (2, 0) {$b$}; + \node[main] (c) at (2, -2) {$c$}; + \node[main] (d) at (0, -2) {$d$}; + \end{scope} + + \draw[-] + (a) edge (b) + (b) edge (c) + (c) edge (d) + (d) edge (a) + (a) edge (c) + (b) edge (d) + ; +\end{tikzpicture} +} +\hspace{20mm} +\adjustbox{valign=c}{ +\begin{tikzpicture} + \begin{scope}[layer = nodes] + \node[main] (a) at (0, 0) {$a$}; + \node[main] (b) at (-2, -2) {$b$}; + \node[main] (c) at (0, -2) {$c$}; + \node[main] (d) at (2, -2) {$d$}; + \end{scope} + + \draw[-] + (a) edge (b) + (b) edge (c) + (c) edge (d) + (d) edge (a) + (a) edge (c) + (b) edge[out=270, in=270, looseness=1] (d) + ; + \end{tikzpicture} +} +\end{center} +\vfill +\pagebreak + + +\definition{} +The degree $D(v)$ of a vertex $v$ of a graph +is the number of the edges of the graph +connected to that vertex. + + +\theorem{Handshake Lemma} +In any graph, the sum of the degrees of its vertices equals twice the number of the edges. + + +\problem{} +Prove \ref{handshake}. +\vfill + + +\problem{} +Show that all graphs have an even number number of vertices with odd degree. +\vfill + + +\problem{} +One girl tells another, \say{There are 25 kids +in my class. Isn't it funny that each of them +has 5 friends in the class?} \say{This cannot be true,} immediately replies the other girl. +How did she know? + + +\vfill + +\problem{} +Say $G$ is a graph with nine vertices. Show that $G$ has at least five vertices of degree six or at least six vertices of degree 5. + +\vfill +\pagebreak \ No newline at end of file diff --git a/src/Intermediate/An Introduction to Graph Theory/parts/1 paths.tex b/src/Intermediate/An Introduction to Graph Theory/parts/1 paths.tex new file mode 100644 index 0000000..44b7e7e --- /dev/null +++ b/src/Intermediate/An Introduction to Graph Theory/parts/1 paths.tex @@ -0,0 +1,237 @@ +\section{Paths and cycles} + +A \textit{path} in a graph is, intuitively, a sequence of edges: $(x_1, x_2, x_4, ... )$. \par +I've highlighted one possible path in the graph below. + +\begin{center} +\begin{tikzpicture}[ + node distance={15mm}, + thick, + main/.style = {draw, circle} +] + + \node[main] (1) {$x_1$}; + \node[main] (2) [above right of=1] {$x_2$}; + \node[main] (3) [below right of=1] {$x_3$}; + \node[main] (4) [above right of=3] {$x_4$}; + \node[main] (5) [above right of=4] {$x_5$}; + \node[main] (6) [below right of=4] {$x_6$}; + \node[main] (7) [below right of=5] {$x_7$}; + + \draw[-] (1) -- (2); + \draw[-] (1) -- (3); + \draw[-] (2) -- (5); + \draw[-] (2) -- (4); + \draw[-] (3) -- (6); + \draw[-] (3) -- (4); + \draw[-] (4) -- (5); + \draw[-] (5) -- (7); + \draw[-] (6) -- (7); + + \draw [ + line width=2mm, + draw=black, + opacity=0.4 + ] (1) -- (2) -- (4) -- (3) -- (6); +\end{tikzpicture} +\end{center} + +A \textit{cycle} is a path that starts and ends on the same vertex: + +\begin{center} + \begin{tikzpicture}[ + node distance={15mm}, + thick, + main/.style = {draw, circle} + ] + + \node[main] (1) {$x_1$}; + \node[main] (2) [above right of=1] {$x_2$}; + \node[main] (3) [below right of=1] {$x_3$}; + \node[main] (4) [above right of=3] {$x_4$}; + \node[main] (5) [above right of=4] {$x_5$}; + \node[main] (6) [below right of=4] {$x_6$}; + \node[main] (7) [below right of=5] {$x_7$}; + + \draw[-] (1) -- (2); + \draw[-] (1) -- (3); + \draw[-] (2) -- (5); + \draw[-] (2) -- (4); + \draw[-] (3) -- (6); + \draw[-] (3) -- (4); + \draw[-] (4) -- (5); + \draw[-] (5) -- (7); + \draw[-] (6) -- (7); + + \draw[ + line width=2mm, + draw=black, + opacity=0.4 + ] (2) -- (4) -- (3) -- (6) -- (7) -- (5) -- (2); +\end{tikzpicture} +\end{center} + + +A \textit{Eulerian\footnotemark} path is a path that traverses each edge exactly once. \par +A Eulerian cycle is a cycle that does the same. + +\footnotetext{Pronounced ``oiler-ian''. These terms are named after a Swiss mathematician, Leonhard Euler (1707-1783), who is usually considered the founder of graph theory.} + +\vspace{2mm} + +Similarly, a {\it Hamiltonian} path is a path in a graph that visits each vertex exactly once, \par +and a Hamiltonian cycle is a closed Hamiltonian path. + +\medskip + +An example of a Hamiltonian path is below. + +\begin{center} + \begin{tikzpicture}[ + node distance={15mm}, + thick, + main/.style = {draw, circle} + ] + + \node[main] (1) {$x_1$}; + \node[main] (2) [above right of=1] {$x_2$}; + \node[main] (3) [below right of=1] {$x_3$}; + \node[main] (4) [above right of=3] {$x_4$}; + \node[main] (5) [above right of=4] {$x_5$}; + \node[main] (6) [below right of=4] {$x_6$}; + \node[main] (7) [below right of=5] {$x_7$}; + + \draw[-] (1) -- (2); + \draw[-] (1) -- (3); + \draw[-] (2) -- (5); + \draw[-] (2) -- (4); + \draw[-] (3) -- (6); + \draw[-] (3) -- (4); + \draw[-] (4) -- (5); + \draw[-] (5) -- (7); + \draw[-] (6) -- (7); + + \draw [ + line width=2mm, + draw=black, + opacity=0.4 + ] (1) -- (2) -- (4) -- (3) -- (6) -- (7) -- (5); +\end{tikzpicture} +\end{center} + +\vfill +\pagebreak + + +\definition{} +We say a graph is \textit{connected} if there is a path between every pair of vertices. A graph is called \textit{disconnected} otherwise. + +\problem{} +Draw a disconnected graph with four vertices. \par +Then, draw a graph with four vertices, all of degree one. +\vfill + + +\problem{} +Find a Hamiltonian cycle in the following graph. + +\begin{center} + \begin{tikzpicture}[ + node distance={20mm}, + thick, + main/.style = {draw, circle} + ] + + \node[main] (1) {$x_1$}; + \node[main] (2) [above right of=1] {$x_2$}; + \node[main] (3) [below right of=1] {$x_3$}; + \node[main] (4) [above right of=3] {$x_4$}; + \node[main] (5) [above right of=4] {$x_5$}; + \node[main] (6) [below right of=4] {$x_6$}; + \node[main] (7) [below right of=5] {$x_7$}; + + \draw[-] (1) -- (2); + \draw[-] (1) -- (3); + \draw[-] (2) -- (5); + \draw[-] (2) -- (4); + \draw[-] (3) -- (6); + \draw[-] (3) -- (4); + \draw[-] (4) -- (5); + \draw[-] (5) -- (7); + \draw[-] (6) -- (7); +\end{tikzpicture} +\end{center} +\vfill +\pagebreak + + +\problem{} +Is there an Eulerian path in the following graph? \par + +\begin{center} + \begin{tikzpicture}[ + node distance={20mm}, + thick, + main/.style = {draw, circle} + ] + + \node[main] (1) {$x_1$}; + \node[main] (2) [above right of=1] {$x_2$}; + \node[main] (3) [below right of=1] {$x_3$}; + \node[main] (4) [above right of=3] {$x_4$}; + \node[main] (5) [above right of=4] {$x_5$}; + \node[main] (6) [below right of=4] {$x_6$}; + \node[main] (7) [below right of=5] {$x_7$}; + + \draw[-] (1) -- (2); + \draw[-] (1) -- (3); + \draw[-] (2) -- (5); + \draw[-] (2) -- (4); + \draw[-] (3) -- (6); + \draw[-] (3) -- (4); + \draw[-] (4) -- (5); + \draw[-] (5) -- (7); + \draw[-] (6) -- (7); +\end{tikzpicture} +\end{center} + +\vfill + +\problem{} +Is there an Eulerian path in the following graph? \par + +\begin{center} +\begin{tikzpicture}[ + node distance={20mm}, + thick, + main/.style = {draw, circle} +] + + \node[main] (1) {$x_1$}; + \node[main] (2) [above right of=1] {$x_2$}; + \node[main] (3) [below right of=1] {$x_3$}; + \node[main] (4) [above right of=3] {$x_4$}; + \node[main] (5) [above right of=4] {$x_5$}; + \node[main] (6) [below right of=4] {$x_6$}; + \node[main] (7) [below right of=5] {$x_7$}; + + \draw[-] (1) -- (2); + \draw[-] (1) -- (3); + \draw[-] (2) -- (4); + \draw[-] (3) -- (6); + \draw[-] (3) -- (4); + \draw[-] (4) -- (5); + \draw[-] (5) -- (7); + \draw[-] (6) -- (7); +\end{tikzpicture} +\end{center} + + +\vfill + +\problem{} +When does an Eulerian path exist? \par +\hint{Look at the degree of each node.} + +\vfill +\pagebreak \ No newline at end of file diff --git a/src/Intermediate/An Introduction to Graph Theory/parts/2 planar.tex b/src/Intermediate/An Introduction to Graph Theory/parts/2 planar.tex new file mode 100644 index 0000000..8f43e79 --- /dev/null +++ b/src/Intermediate/An Introduction to Graph Theory/parts/2 planar.tex @@ -0,0 +1,7 @@ +\section{Planar Graphs} + +\textbf{TODO.} Will feature planar graphs, euler's formula, utility problem, utility problem on a torus + + +\vfill +\pagebreak \ No newline at end of file diff --git a/src/Intermediate/An Introduction to Graph Theory/parts/3 counting.tex b/src/Intermediate/An Introduction to Graph Theory/parts/3 counting.tex new file mode 100644 index 0000000..d54bd8d --- /dev/null +++ b/src/Intermediate/An Introduction to Graph Theory/parts/3 counting.tex @@ -0,0 +1,157 @@ +\section{Counting Graphs} + +\definition{} +A graph is \textit{bipartite} if its nodes can be split into two groups, where no two nodes in the same group share an edge. One such graph is shown below. + +\problem{} +Draw a bipartite graph with 5 vertices. + +\vfill + +\problem{} +Is the following graph bipartite? \par +\hint{Be careful.} + +\begin{center} +\begin{tikzpicture} + % Nodes + \begin{scope} + \node[main] (A) at (0mm, 0mm) {$A$}; + \node[main] (B) at (0mm, -10mm) {$B$}; + \node[main] (C) at (0mm, -20mm) {$C$}; + + \node[main] (D) at (20mm, 0mm) {$D$}; + \node[main] (E) at (20mm, -10mm) {$E$}; + \node[main] (F) at (20mm, -20mm) {$F$}; + \end{scope} + + % Edges + \draw + (A) edge (D) + (A) edge (E) + (B) edge (F) + (C) edge (E) + (C) edge (D) + (E) edge (F) + ; +\end{tikzpicture} +\end{center} + +\vfill + +\definition{} +A \textit{subgraph} is a graph inside another graph. \par +In the next problem, the left graph contains the left graph. \par +The triangle is a subgraph of the larger graph. + + +\problem{} +Find two subgraphs of the triangle in the larger graph. + +\begin{center} +\adjustbox{valign=c}{ +\begin{tikzpicture} + % Nodes + \begin{scope} + \node[main] (1) {1}; + \node[main] (2) [right of=1] {2}; + \node[main] (3) [below of=1] {3}; + \end{scope} + + % Edges + \draw + (1) edge (2) + (2) edge (3) + (3) edge (1) + ; +\end{tikzpicture} +} +\hspace{20mm} +\adjustbox{valign=c}{ +\begin{tikzpicture} + % Nodes + \begin{scope} + \node[main] (1) {1}; + \node[main] (4) [below of=1] {4}; + \node[main] (3) [left of=4] {3}; + \node[main] (5) [right of=4] {5}; + \node[main] (6) [right of=5] {6}; + \node[main] (2) [above of=6] {2}; + \node[main] (7) [below of=4] {7}; + \end{scope} + + % Edges + \draw + (1) edge (4) + (2) edge (5) + (2) edge (6) + (3) edge (4) + (4) edge (5) + (4) edge (7) + (5) edge (6) + (3) edge (7) + ; +\end{tikzpicture} +} +\end{center} + + + +\vfill +\pagebreak + +A few special graphs have names. Here are a few you should know before we begin: + +\definition{The path graph} +The \textit{path graph} on $n$ vertices (written $P_n$) is a straight line of vertices connected by edges. \par +$P_5$ is shown below. +\begin{center} +\begin{tikzpicture} + \node[main] (1) {1}; + \node[main] (2) [right of=1] {2}; + \node[main] (3) [right of=2] {3}; + \node[main] (4) [right of=3] {4}; + \node[main] (5) [right of=4] {5}; + + \draw[-] (1) -- (2); + \draw[-] (2) -- (3); + \draw[-] (3) -- (4); + \draw[-] (4) -- (5); +\end{tikzpicture} +\end{center} + + +\definition{The complete graph} +The \textit{complete graph} on $n$ vertices (written $K_n$) is the graph that has $n$ nodes, all of which share an edge. +$K_4$ is shown below. + +\begin{center} +\begin{tikzpicture} + \node[main] (1) {A}; + \node[main] (2) [above right of=1] {B}; + \node[main] (3) [below right of=1] {C}; + \node[main] (4) [above right of=3] {D}; + + \draw[-] (1) -- (2); + \draw[-] (1) -- (3); + \draw[-] (1) -- (4); + \draw[-] (2) -- (3); + \draw[-] (2) -- (4); + \draw[-] (3) -- (4); +\end{tikzpicture} +\end{center} + + + +\problem{} +\begin{enumerate} + \item How many times does $P_4$ appear in $K_9$? + \item How many times does $C_4$ appear in $K_9$? + \item How many times does $K_{4,4}$ appear in $K_9$? + \item How many times does $C_5$ appear in $K_8$? + \item How many times does $K_{3,3}$ appear in $K_{12}$? + \item How many times does $K_{3,3}$ appear in $K_{6,6}$? +\end{enumerate} + + + diff --git a/src/Intermediate/An Introduction to Graph Theory/tikxset.tex b/src/Intermediate/An Introduction to Graph Theory/tikxset.tex new file mode 100644 index 0000000..c567ce2 --- /dev/null +++ b/src/Intermediate/An Introduction to Graph Theory/tikxset.tex @@ -0,0 +1,45 @@ +\usetikzlibrary{arrows.meta} +\usetikzlibrary{shapes.geometric} +\usetikzlibrary{patterns} + +% We put nodes in a separate layer, so we can +% slightly overlap with paths for a perfect fit +\pgfdeclarelayer{nodes} +\pgfdeclarelayer{path} +\pgfsetlayers{main,nodes} + +% Layer settings +\tikzset{ + % Layer hack, lets us write + % later = * in scopes. + layer/.style = { + execute at begin scope={\pgfonlayer{#1}}, + execute at end scope={\endpgfonlayer} + }, + % + % Arrowhead tweak + >={Latex[ width=2mm, length=2mm ]}, + % + % Labels inside edges + label/.style = { + rectangle, + % For automatic red background in solutions + fill = \ORMCbgcolor, + draw = none, + rounded corners = 0mm + }, + % + % Nodes + main/.style = { + draw, + circle, + fill = white, + line width = 0.4mm + }, + every path/.style = { + line width = 0.3mm + }, + node distance={20mm}, + thick, + main/.style = {draw, circle} +} \ No newline at end of file diff --git a/src/Intermediate/Combinatorics/main.tex b/src/Intermediate/Combinatorics/main.tex new file mode 100755 index 0000000..fd09188 --- /dev/null +++ b/src/Intermediate/Combinatorics/main.tex @@ -0,0 +1,274 @@ +% use [nosolutions] flag to hide solutions. +% use [solutions] flag to show solutions. +\documentclass[ + solutions +]{../../../lib/tex/ormc_handout} +\usepackage{../../../lib/tex/macros} + + + +\newcommand{\nck}[2] { + \ensuremath{ + {}_{#1}C_{#2} + } +} + +\newcommand{\npk}[2] { + \ensuremath{ + {}_{#1}P_{#2} + } +} + +\uptitlel{Advanced 1} +\uptitler{\smallurl{}} +\title{Combinatorics} +\subtitle{Prepared by Mark on \today} + +\begin{document} + + \maketitle + + \section{Getting started} + + An \textbf{ordered} arrangement of objects is called a \textit{permutation}. \par + An \textbf{unordered} selection of objects is called a \textit{combination}\footnotemark{}\hspace{-1ex}. \par + All the following problems involve permutations. + + \footnotetext{A \say{combination lock} cares about the order of its digits, so its name is inaccurate. Such an object is actually a \textit{permutation} lock!} + + + \problem{} + How many different ways are there to rearrange the letters ABCDE? + + \begin{solution} + $5 \times 4 \times 3 \times 2 \times 1 = 120$ + \end{solution} + + \vfill + + \problem{} + How many different ways are there to arrange the letters ABCDEFG...XYZ? \par + You don't need to fully evaluate your answer, it is a \textit{very} big number. \par + \hint{Look at \ref{ABCDE} again, and try to create a general strategy.} + + + \begin{instructornote} + A hint for students that are stuck: \par + In \ref{ABCDE}, start with five blank spaces. How many choices are there for A's position? \par + Once A is placed, how many are left for B? + \end{instructornote} + + \vfill + \pagebreak + + \definition{} + The \textit{factorial} of a positive integer $x$ is $x \times (x-1) \times ... \times 1$. We denote this $x!$. \par + For example, $8! = 8 \times 7 \times 6 \times 5 \times 4 \times 3 \times 2 \times 1 = 40320$. + + \problem{} + Compute $\frac{10!}{8!}$ + \vfill + + \problem{} + Convince yourself that $(n+1)! = n! \times (n+1)$, and use this fact to show that $0! = 1$. + \vfill + + \problem{} + How many ways are there to choose three student council officers from a class of 20 students? \par + How many ways are there to choose a president, a vice-president, and a treasurer from the same class? \par + \hint{You answers should be different. In which case does order matter?} + + \begin{instructornote} + Have your students consider the non-unique arrangements and count how many are redundant. + \end{instructornote} + + \vfill + \pagebreak + + \problem{} + Say you have 4 red balls and 3 green balls. How many different ways can you arrange them on the table in font of you? \par + + \begin{solution} + Consider the sequence RRRRGGG. There are $4!$ ways to rearrange the red balls, and $3!$ ways to rearrange the green balls. This is true for any sequence. + + So, our solution is $\frac{7!}{3!4!}$. + \end{solution} + + \vfill + + \problem{} + How many \textit{unique} anagrams can we create from the word CRESCENDO? + + + \begin{solution} + CRESCENDO = CC EE RSNDO, our solution is $\frac{9!}{2!2!} = 90720$ + \end{solution} + \vfill + + \problem{}<3fromABCDE> + Given the letters ABCDE, how many different three-letter words can we make without repeating letters? + \vfill + \pagebreak + + \section{Permutations} + + It would be convenient to have a general tool for counting permutations. Let us try to create one. \par + (Remember, permutations are \textit{ordered} arrangements of objects.) + + First, let's create a function $\npk{n}{k}$, which tells us how many $k$-object permutations we can choose from a group of $n$ objects. + + \problem{} + What is $\npk{5}{3}$? \par + \hint{See \ref{3fromABCDE}} + + + \vfill + ``Choosing $k$ items from $n$'' is a lot like splitting our $n$ objects into two groups: those we choose, and those we don't. + + \begin{center} + \begin{tikzpicture} + % Points + \path [draw=black, fill=black] (0,0) circle (5pt); + \path [draw=black, fill=black] (1,0) circle (5pt); + \path [draw=black, fill=white] (2,0) circle (5pt); + + % "Choose these" bracket + \draw[shift={(-0.5, -1)}, color=oblue, thick] (0pt,0pt) -- (0pt,3pt); + \draw[color=oblue, thick] (-0.5, -1) -- (2.5, -1) node[below, midway] {Choose $k$ objects}; + \draw[shift={(2.5, -1)}, color=oblue, thick] (0pt,0pt) -- (0pt,3pt); + + + \draw[-] (3, -0.5) -- (3, 0.5); + + \path [draw=black, fill=white] (4,0) circle (5pt); + \path [draw=black, fill=black] (5,0) circle (5pt); + + % "Leave these" bracket + \draw[shift={(3.5, -1)}, color=oblue, thick] (0pt,0pt) -- (0pt,3pt); + \draw[color=oblue, thick] (3.5, -1) -- (5.5, -1) node[below, midway] {Leave the rest}; + \draw[shift={(5.5, -1)}, color=oblue, thick] (0pt,0pt) -- (0pt,3pt); + \end{tikzpicture} + \end{center} + + If we rearrange these, we get different permutations. How can we count them? + + \problem{} + Using the above diagram, create a formula for $\npk{n}{k}$. \par + \hint{We're counting \textit{permutations}, so the order of items in the first group matters.} + + \begin{solution} + $\npk{n}{k}= \frac{n!}{(n-k)!}$ + + There are $n!$ possible arrangements of $n$ objects. However, since the order of the elements not chosen does not matter, we'll end up with $(n-k)!$ redundant orderings of each. + \end{solution} + + + \vfill + \pagebreak + + \section{Combinations} + + Now, let's count \textit{combinations}. \par + Here, we only care about \textit{which} items we choose---not the order in which we choose them. + We'll make a function $\nck{n}{k}$ (\say{n choose k}), which will tell us + how many different ways we can choose $k$ items from a set of $n$. + + \problem{} + Find an expression for $\nck{n}{k}$ by modifying your definition of $\npk{n}{k}$. + + + \vfill + + Usually, $\nck{n}{k}$ is written as $\binom{n}{k}$. This is also called the \textit{binomial coefficient}. + + + \problem{} + Say you have a few coins on the table in font of you: + \begin{itemize} + \item 8 identical 1-kopek\footnotemark{} coins + \item 3 identical 2-kopek coins + \item 6 identical 5-kopek coins + \item 4 identical 10-kopek coins + \end{itemize} + How many distinct ways are there to arrange these coins in a row? + \footnotetext{Russian currency. Comparable to a penny, since 100 kopeks make a ruble.} + + + \vfill + + + \problem{} + Now, derive the \textit{multinomial coefficient} $\binom{n}{k_1, k_2, ..., k_m}$. \par + \vspace{1mm} + The multinomial coefficient tells us how many distinct ways there to arrange $n$ objects + of $m$ classes, where each class $i$ contains $k_i$ identical objects. \par + \hint{ + In \ref{manyballs}, $n = 21$ and $(k_1, k_2, k_3, k_4) = (8, 3, 6, 4)$. \\ + So, the solution to \ref{manyballs} should be given by the multinomial coefficient $\binom{21}{8,3,6,4}$. + } + + + + + + \vfill + \pagebreak + + \section{Applications} + + \problem{} + How many ways can a class of 27 people be seated in 30 seats? + + \vfill + + \problem{} + The following is the map of a city. Each line is a one-way road, you can only drive up or right. \par + How many different paths can you take from A to B? \par + How many of them go through the center point? + + \begin{tikzpicture} + \draw [step=0.5,gray] (0,0) grid (7*0.5,4*0.5); + + \path [draw=black, fill=black] (0 * 0.5, 0 * 0.5) circle (2pt) node[below] {A}; + \path [draw=black, fill=black] (3 * 0.5, 2 * 0.5) circle (2pt); + \path [draw=black, fill=black] (7 * 0.5, 4 * 0.5) circle (2pt) node[above] {B}; + \end{tikzpicture} + + \vfill + + \problem{} + How many ways can you put 19 identical balls into 6 bins, leaving no bin empty? + + \vfill + + \problem{} + Given an exam with 4 problems, how many ways are there to assign positive point values to each problem so that the exam contains a total of 100 points? + + \vfill + + \problem{} + How many ways can we split the number 2016 into a sum of positive integers? \par + \note{Consider $2016 + 1$ and $1 + 2016$ distinct sums. Order matters.} + + \begin{solution} + Split 2016 into ones, and put a \say{bit} between each pair. \par + This gives us $2^{2015}$ positions to place a bar, and thus $2^{2016}$ possible sums. + + \vspace{2mm} + + You could also sum over the usual stars-and-bars technique to get the same result. \par + Showing that they're equal could be a good bonus problem! + \end{solution} + + + + + \vfill + + \problem{} + A staircase must be built up a wall. It will start 4.5 meters away from the wall, which is 1.5 meters tall. The height of each step is exactly 30 centimeters. The width of each step must be an integer multiple of 50 centimeters. In how many ways can the staircase be constructed? + + \vfill + \pagebreak + +\end{document} diff --git a/src/Intermediate/Combinatorics/meta.toml b/src/Intermediate/Combinatorics/meta.toml new file mode 100644 index 0000000..cef0b9c --- /dev/null +++ b/src/Intermediate/Combinatorics/meta.toml @@ -0,0 +1,6 @@ +[metadata] +title = "Combinatorics" + +[publish] +handout = true +solutions = true diff --git a/src/Intermediate/Instant Insanity/4Dcube2.jpg b/src/Intermediate/Instant Insanity/4Dcube2.jpg new file mode 100755 index 0000000..d2ca423 Binary files /dev/null and b/src/Intermediate/Instant Insanity/4Dcube2.jpg differ diff --git a/src/Intermediate/Instant Insanity/II.jpg b/src/Intermediate/Instant Insanity/II.jpg new file mode 100755 index 0000000..db587fa Binary files /dev/null and b/src/Intermediate/Instant Insanity/II.jpg differ diff --git a/src/Intermediate/Instant Insanity/dodecahedron.jpg b/src/Intermediate/Instant Insanity/dodecahedron.jpg new file mode 100755 index 0000000..c137f88 Binary files /dev/null and b/src/Intermediate/Instant Insanity/dodecahedron.jpg differ diff --git a/src/Intermediate/Instant Insanity/main.tex b/src/Intermediate/Instant Insanity/main.tex new file mode 100755 index 0000000..3ae53c7 --- /dev/null +++ b/src/Intermediate/Instant Insanity/main.tex @@ -0,0 +1,1127 @@ +% use [nosolutions] flag to hide solutions. +% use [solutions] flag to show solutions. +\documentclass[ + solutions +]{../../../lib/tex/ormc_handout} +\usepackage{../../../lib/tex/macros} + + +\usepackage{tkz-graph} + + +\uptitlel{Intermediate 2} +\uptitler{\smallurl{}} +\title{Graph Theory and Instant Insanity} +\subtitle{ + Prepared by Mark on \today \\ + Based on a handout by Oleg Gleizer +} + +\begin{document} + + \maketitle + + + \section{Instant Insanity} + + The puzzle you have in front of you is called {\it Instant Insanity}. + + It consists of four cubes, with faces colored with four colors: + red, blue, green, and white. The objective is to put the cubes in a row + so that each side, front, back, upper, and lower, + of the row shows each of the four colors. \\ + + \begin{center} + \includegraphics[width=2.2in] + {II.jpg} + \end{center} + + There are 41,472 different arrangements + of the cubes. Only one is a solution. + Finding it by trial and error is quite difficult, + but we have witnessed a few students + do just that. + + However, that rarely happens. + We'd like to solve this puzzle today, and + to do that, we'll need a few tools. + + \section{Cubic Nets} + + A {\it cubic net} is a 2D picture + simultaneously showing all the six sides + (a.k.a.~faces) of a 3D cube, + please take a look at the examples below. \\ + + \begin{center} + \begin{tikzpicture} [scale = .3] + \draw [line width = 1.5pt] (0,0) -- (12,0) -- + (12,3) -- (0,3) -- (0,0); + \draw [line width = 1.5pt] (6,-3) -- + (9,-3) -- (9,6) -- (6,6) -- (6,-3); + \draw [line width = 1.5pt] (3,0) -- (3,3); + + \draw [line width = 1.5pt] (21,0) -- (33,0) -- + (33,3) -- (21,3) -- (21,0); + \draw [line width = 1.5pt] (24,0) -- + (24,6) -- (27,6) -- (27,0); + \draw [line width = 1.5pt] (27,0) -- + (27,-3) -- (30,-3) -- (30,3); + \end{tikzpicture} + \end{center} + + \problem{} + Draw a cubic net different from the two above. + + \vfill + \pagebreak + + + \problem{} + An ant wants to crawl from point $A$ of a cubic room + to the opposite point $B$, as in the picture below. + + \begin{center} \begin{small} + \begin{tikzpicture} + \draw (1,1) -- (4,1) -- (4,4) -- (1,4) -- (1,1); + \draw (0,0) -- (3,0) -- (3,3) -- (0,3) -- (0,0); + \draw (0,0) -- (1,1); + \draw (3,0) -- (4,1); + \draw (0,3) -- (1,4); + \draw (3,3) -- (4,4); + \filldraw (0,0) circle (3pt); + \filldraw (4,4) circle (3pt); + \coordinate [label=below left:{A}] (a) at (0,0); + \coordinate [label=above right:{B}] (b) at (4,4); + \end{tikzpicture} + \end{small} \end{center} + + The insect can crawl on any surface, + a floor, ceiling, or wall, but cannot fly through the air. + Find at least two different shortest paths for the ant + (there is more than one). + + Let's look at the nets of the puzzle's cubes. \\ + + \begin{center} \begin{small} + \begin{tikzpicture} [scale = .3] \label{pic:ii_cubes} + \filldraw [red] (0,0) -- (9,0) -- (9,3) -- (0,3) -- (0,0); + \filldraw [blue] (9,0) -- (12,0) -- (12,3) -- (9,3) -- (9,0); + \filldraw [green] (6,3) -- (9,3) -- (9,6) -- (6,6) -- (6,3); + \draw [line width = 1.5pt] (0,0) -- (12,0) -- + (12,3) -- (0,3) -- (0,0); + \draw [line width = 1.5pt] (6,-3) -- + (9,-3) -- (9,6) -- (6,6) -- (6,-3); + \draw [line width = 1.5pt] (3,0) -- (3,3); + \coordinate [label=below:{Cube 1}] (c1) at (7.6,-3.5); + + \node[text = white] at (0 + 1.5, 0 + 1.5) {\textbf{Red}}; + \node[text = white] at (0 + 4.5, 0 + 1.5) {\textbf{Red}}; + \node[text = white] at (0 + 7.5, 0 + 1.5) {\textbf{Red}}; + \node[text = white] at (0 + 10.5, 0 + 1.5) {\textbf{Blue}}; + \node[text = black] at (0 + 7.5, 0 + 4.5) {\textbf{Grn}}; + \node[text = black] at (0 + 7.5, 0 - 1.5) {\textbf{Wht}}; % spell:disable-line + + \filldraw [red] (21,0) -- (27,0) -- (27,3) -- + (21,3) -- (21,0); + \filldraw [green] (27,3) -- (27,0) -- (30,0) -- + (30,3) -- (27,3); + \filldraw [blue] (27,0) -- (27,-3) -- (30,-3) -- + (30,0) -- (27,0); + \draw [line width = 1.5pt] (21,0) -- (33,0) -- + (33,3) -- (21,3) -- (21,0); + \draw [line width = 1.5pt] (27,-3) -- + (30,-3) -- (30,6) -- (27,6) -- (27,-3); + \draw [line width = 1.5pt] (24,0) -- (24,3); + \coordinate [label=below:{Cube 2}] (c2) at (28.6,-3.5); + + \node[text = white] at (21 + 1.5, 0 + 1.5) {\textbf{Red}}; + \node[text = white] at (21 + 4.5, 0 + 1.5) {\textbf{Red}}; + \node[text = black] at (21 + 7.5, 0 + 1.5) {\textbf{Grn}}; + \node[text = black] at (21 + 10.5, 0 + 1.5) {\textbf{Wht}}; % spell:disable-line + \node[text = black] at (21 + 7.5, 0 + 4.5) {\textbf{Wht}}; % spell:disable-line + \node[text = white] at (21 + 7.5, 0 - 1.5) {\textbf{Blue}}; + + \filldraw [red] (0,-15) -- (3,-15) -- (3,-12) + -- (0,-12) -- (0,-15); + \filldraw [green] (3,-15) -- (6,-15) -- (6,-12) + -- (3,-12) -- (3,-15); + \filldraw [blue] (6,-18) -- (9,-18) -- (9,-12) + -- (6,-12) -- (6,-15); + \draw [line width = 1.5pt] (0,-15) -- (12,-15) -- + (12,-12) -- (0,-12) -- (0,-15); + \draw [line width = 1.5pt] (6,-18) -- + (9,-18) -- (9,-9) -- (6,-9) -- (6,-18); + \draw [line width = 1.5pt] (3,-15) -- (3,-12); + \coordinate [label=below:{Cube 3}] (c3) at (7.6,-18.5); + + \node[text = white] at (0 + 1.5, -15 + 1.5) {\textbf{Red}}; + \node[text = black] at (0 + 4.5, -15 + 1.5) {\textbf{Grn}}; + \node[text = white] at (0 + 7.5, -15 + 1.5) {\textbf{Blue}}; + \node[text = black] at (0 + 10.5, -15 + 1.5) {\textbf{Wht}}; % spell:disable-line + \node[text = black] at (0 + 7.5, -15 + 4.5) {\textbf{Wht}}; % spell:disable-line + \node[text = white] at (0 + 7.5, -15 - 1.5) {\textbf{Blue}}; + + \filldraw [red] (21,-15) -- (24,-15) -- + (24,-12) -- (21,-12) -- (21,-15); + \filldraw [blue] (24,-15) -- (27,-15) -- + (27,-12) -- (24,-12) -- (24,-15); + \filldraw [green] (27,-18) -- (30,-18) -- + (30,-12) -- (27,-12) -- (27,-18); + \filldraw [blue] (30,-15) -- (33,-15) -- + (33,-12) -- (30,-12) -- (30,-15); + \draw [line width = 1.5pt] (21,-15) -- (33,-15) -- + (33,-12) -- (21,-12) -- (21,-15); + \draw [line width = 1.5pt] (27,-18) -- + (30,-18) -- (30,-9) -- (27,-9) -- (27,-18); + \draw [line width = 1.5pt] (24,-15) -- (24,-12); + \coordinate [label=below:{Cube 4}] (c4) at (28.6,-18.5); + + \node[text = white] at (21 + 1.5, -15 + 1.5) {\textbf{Red}}; + \node[text = white] at (21 + 4.5, -15 + 1.5) {\textbf{Blue}}; + \node[text = black] at (21 + 7.5, -15 + 1.5) {\textbf{Grn}}; + \node[text = white] at (21 + 10.5, -15 + 1.5) {\textbf{Blue}}; + \node[text = black] at (21 + 7.5, -15 + 4.5) {\textbf{Wht}}; % spell:disable-line + \node[text = black] at (21 + 7.5, -15 - 1.5) {\textbf{Grn}}; + + \end{tikzpicture} + \end{small} \end{center} + \medskip + + Note that each cube is different. + + \vfill + \pagebreak + + \section{Graphs} + + \begin{tcolorbox}[ + colback=white, + colframe=gray!75!black, + title={Last week's lesson} + ] + A \textit{graph} is a collection of nodes (vertices) and connections between them (edges). If an edge $e$ connects the vertices $v_i$ and $v_j$, then we write $e = {v_i, v_j}$. An example is below. + + \begin{center} + \begin{tikzpicture} [scale = .6] \label{pic:1} + \SetGraphUnit{5} + \Vertex{B} + \WE(B){A} + \EA(B){C} + \Edge(B)(A) + \Edge(C)(B) + \tikzset{EdgeStyle/.append style = {bend left = 50}} + \Edge(A)(C) + \Edge(C)(A) + \coordinate [label=above:{$e_1$}] (e1) at (-2.1,.0); + \coordinate [label=above:{$e_2$}] (e2) at (0,2.45); + \coordinate [label=below:{$e_3$}] (e3) at (0,-2.5); + \coordinate [label=above:{$e_4$}] (e4) at (2.1,.0); + \end{tikzpicture} + \end{center} + + More formally, a graph is defined by a set of vertices $\{v_1, v_2, ...\}$, and a set of edges $\{\ \{v_1, v_2\}, \{v_1, v_3\}, ...\ \}$. + + \medskip + + If the order of the vertices in an edge does not matter, + a graph is called {\it undirected}. A graph is called + a {\it directed graph} if the order of the vertices does matter. + For example, the (undirected) graph above + has three vertices, $A$, $B$, and $C$, and four edges, + $e_1 =\{A,B\}$, $e_2 = \{A,C\}$, $e_3 = \{A,C\}$, + and $e_4 = \{B,C\}$. + + \end{tcolorbox} + + + Let's represent Cube 1 by a graph. \\ + The vertices will be the face colors: Blue, Green, Red, and White, so $V = \{B,G,R,W\}$. \\ + Two vertices are be connected by an edge if and only if the corresponding faces are opposing each other on the cube. \\ + Cube 1 has the following edges: $e_1 = \{B,R\}$, $e_2 = \{G,W\}$, and the loop $e_3 = \{R,R\}$. To emphasize that all the three edges represent the first cube, let us mark them with the number $1$. \\ + + \begin{center} \begin{small} + \begin{tikzpicture} + \filldraw [blue] (0,5) -- (1,5) -- (1,6) -- + (0,6) -- (0,5); + \draw [line width = 1.5pt] (0,5) -- + (1,5) -- (1,6) -- (0,6) -- (0,5); + \filldraw [green] (5,5) -- (6,5) -- (6,6) -- + (5,6) -- (5,5); + \draw [line width = 1.5pt] (5,5) -- + (6,5) -- (6,6) -- (5,6) -- (5,5); + \filldraw [red] (0,0) -- (1,0) -- (1,1) -- + (0,1) -- (0,0); + \draw [line width = 1.5pt] (0,0) -- + (1,0) -- (1,1) -- (0,1) -- (0,0); + \draw [line width = 1.5pt] (5,0) -- + (6,0) -- (6,1) -- (5,1) -- (5,0); + \draw (-.5,-.5) circle (.3) node {1}; + \draw [line width = 1.5pt] (0,.5) .. + controls (- .9,.4) and (-.65,-.2) .. (-.7,-.3); + \draw [line width = 1.5pt] (.5,0) .. + controls (.4,-.9) and (-.2,-.65) .. (-.3,-.7); + \draw (.5,2) circle (.3) node {1}; + \draw [line width = 1.5pt] (.5,1) -- (.5,1.7); + \draw [line width = 1.5pt] (.5,2.3) -- (.5,5); + \draw (5.5,4) circle (.3) node {1}; + \draw [line width = 1.5pt] (5.5,5) -- (5.5,4.3); + \draw [line width = 1.5pt] (5.5,3.7) -- (5.5,1); + + \node[text = white] at (0.5, 5.5) {\textbf{Blue}}; + \node[text = white] at (0.5, 0.5) {\textbf{Red}}; + \node[text = black] at (5.5, 0.5) {\textbf{Wht}}; % spell:disable-line + \node[text = black] at (5.5, 5.5) {\textbf{Grn}}; + + \end{tikzpicture} + \end{small} \end{center} + \bigskip + + Cube 2 has the following pairs + of opposing faces, $\{B,W\}$, $\{G,R\}$, + and $\{R,W\}$. Let us add them to the graph + as the edges $e_4$, $e_5$, and $e_6$. \\ + + \begin{center} \begin{small} + \begin{tikzpicture} + \filldraw [blue] (0,5) -- (1,5) -- (1,6) -- + (0,6) -- (0,5); + \draw [line width = 1.5pt] (0,5) -- + (1,5) -- (1,6) -- (0,6) -- (0,5); + \filldraw [green] (5,5) -- (6,5) -- (6,6) -- + (5,6) -- (5,5); + \draw [line width = 1.5pt] (5,5) -- + (6,5) -- (6,6) -- (5,6) -- (5,5); + \filldraw [red] (0,0) -- (1,0) -- (1,1) -- + (0,1) -- (0,0); + \draw [line width = 1.5pt] (0,0) -- + (1,0) -- (1,1) -- (0,1) -- (0,0); + \draw [line width = 1.5pt] (5,0) -- + (6,0) -- (6,1) -- (5,1) -- (5,0); + \draw (-.5,-.5) circle (.3) node {1}; + \draw [line width = 1.5pt] (0,.5) .. + controls (-.9,.4) and (-.65,-.2) .. (-.7,-.3); + \draw [line width = 1.5pt] (.5,0) .. + controls (.4,-.9) and (-.2,-.65) .. (-.3,-.7); + \draw (.5,2) circle (.3) node {1}; + \draw [line width = 1.5pt] (.5,1) -- (.5,1.7); + \draw [line width = 1.5pt] (.5,2.3) -- (.5,5); + \draw (5.5,4) circle (.3) node {1}; + \draw [line width = 1.5pt] (5.5,5) -- (5.5,4.3); + \draw [line width = 1.5pt] (5.5,3.7) -- (5.5,1); + \draw (2,4) circle (.3) node {2}; + \draw [line width = 1.5pt] (1,5) -- (1.8,4.2); + \draw [line width = 1.5pt] (5,1) -- (2.2,3.8); + \draw (4,4) circle (.3) node {2}; + \draw [line width = 1.5pt] (5,5) -- (4.2,4.2); + \draw [line width = 1.5pt] (1,1) -- (3.8,3.8); + \draw (4,.5) circle (.3) node {2}; + \draw [line width = 1.5pt] (1,.5) -- (3.7,.5); + \draw [line width = 1.5pt] (5,.5) -- (4.3,.5); + + \node[text = white] at (0.5, 5.5) {\textbf{Blue}}; + \node[text = white] at (0.5, 0.5) {\textbf{Red}}; + \node[text = black] at (5.5, 0.5) {\textbf{Wht}}; % spell:disable-line + \node[text = black] at (5.5, 5.5) {\textbf{Grn}}; + \end{tikzpicture} + \end{small} \end{center} + \bigskip + + Let us now make the graph + representing all four cubes. \\ + + \begin{center} \begin{small} + \begin{tikzpicture} \label{pic:II_comfiguration} + \filldraw [blue] (0,5) -- (1,5) -- (1,6) -- + (0,6) -- (0,5); + \draw [line width = 1.5pt] (0,5) -- + (1,5) -- (1,6) -- (0,6) -- (0,5); + \filldraw [green] (5,5) -- (6,5) -- (6,6) -- + (5,6) -- (5,5); + \draw [line width = 1.5pt] (5,5) -- + (6,5) -- (6,6) -- (5,6) -- (5,5); + \filldraw [red] (0,0) -- (1,0) -- (1,1) -- + (0,1) -- (0,0); + \draw [line width = 1.5pt] (0,0) -- + (1,0) -- (1,1) -- (0,1) -- (0,0); + \draw [line width = 1.5pt] (5,0) -- + (6,0) -- (6,1) -- (5,1) -- (5,0); + \draw (-.5,-.5) circle (.3) node {1}; + \draw [line width = 1.5pt] (0,.5) .. + controls (-.9,.4) and (-.65,-.2) .. (-.7,-.3); + \draw [line width = 1.5pt] (.5,0) .. + controls (.4,-.9) and (-.2,-.65) .. (-.3,-.7); + \draw (.5,2) circle (.3) node {1}; + \draw [line width = 1.5pt] (.5,1) -- (.5,1.7); + \draw [line width = 1.5pt] (.5,2.3) -- (.5,5); + \draw (5.5,4) circle (.3) node {1}; + \draw [line width = 1.5pt] (5.5,5) -- (5.5,4.3); + \draw [line width = 1.5pt] (5.5,3.7) -- (5.5,1); + \draw (1.5,3.5) circle (.3) node {2}; + \draw [line width = 1.5pt] (.8,5) .. + controls (.8,4.6) and (1,4.2) .. (1.3,3.7); + \draw [line width = 1.5pt] (5,.8) .. + controls (2.5,1.5) and (2.1,2.5) .. (1.6,3.22); + \draw (4,4) circle (.3) node {2}; + \draw [line width = 1.5pt] (5,5) -- (4.2,4.2); + \draw [line width = 1.5pt] (1,1) -- (3.8,3.8); + \draw (4,.5) circle (.3) node {2}; + \draw [line width = 1.5pt] (1,.5) -- (3.7,.5); + \draw [line width = 1.5pt] (5,.5) -- (4.3,.5); + \draw (-1,3) circle (.3) node {3}; + \draw [line width = 1.5pt] (0,5) .. + controls (-.7,4.3) and (-.9,3.6) .. (-1,3.3); + \draw [line width = 1.5pt] (0,1) .. + controls (-.7,1.7) and (-.9,2.3) .. (-1,2.7); + \draw (2.5,4) circle (.3) node {3}; + \draw [line width = 1.5pt] (1,5.2) .. + controls (1.4,5.2) and (2,4.5) .. (2.3,4.2); + \draw [line width = 1.5pt] (5.2,1) .. + controls (4.7,1.8) and (3.5,3) .. (2.7,3.8); + \draw (7,3) circle (.3) node {3}; + \draw [line width = 1.5pt] (6,5) .. + controls (6.7,4.3) and (6.9,3.6) .. (7,3.3); + \draw [line width = 1.5pt] (6,1) .. + controls (6.7,1.7) and (6.9,2.3) .. (7,2.7); + \draw (-.5,6.5) circle (.3) node {4}; + \draw [line width = 1.5pt] (0,5.5) .. + controls (-.9,5.4) and (-.65,6.2) .. (-.7,6.26); + \draw [line width = 1.5pt] (-.24,6.65) .. + controls (.1,6.7) and (.45,6.7) .. (.5,6); + \draw (8.5,3) circle (.3) node {4}; + \draw [line width = 1.5pt] (6,5.5) .. + controls (7.3,5) and (8.2,4) .. (8.5,3.3); + \draw [line width = 1.5pt] (6,.8) .. + controls (7.3,1) and (8.2,2) .. (8.5,2.7); + \draw (2.3,1.2) circle (.3) node {4}; + \draw [line width = 1.5pt] (1,.8) -- (2.04,1.1); + \draw [line width = 1.5pt] (2.6,1.3) .. + controls (4,2) and (5,4) .. (5.2,5); + + \node[text = white] at (0.5, 5.5) {\textbf{Blue}}; + \node[text = white] at (0.5, 0.5) {\textbf{Red}}; + \node[text = black] at (5.5, 0.5) {\textbf{Wht}}; % spell:disable-line + \node[text = black] at (5.5, 5.5) {\textbf{Grn}}; + \end{tikzpicture} + \end{small} \end{center} + + \problem{} + Check if the above representation + is correct for Cubes 3 and 4. + \vfill + \pagebreak + + With the help of the above graph, + solving the puzzle becomes as easy + as a walk in the park, literally. + Imagine that the vertices of the above graph + are the clearings and the edges are the paths. + An edge marked by the number $i$ represents + two opposing faces of the $i$-th cube. + Let us try to find a closed walk, a.k.a.~a cycle, + in the graph that visits each clearing once + and uses the paths marked by the different numbers, + $i=1,2,3,4$. If we order the front and rear sides + of the cubes accordingly, + then the front and rear of the stack + will show all the four different colors + in the order prescribed by our walk. \\ + + For example, here is such an (oriented) cycle, + represented by the magenta arrows + on the picture below. \\ + + \begin{center} \begin{small} + \begin{tikzpicture} + \draw [line width = 3pt, color = magenta, <-] + (.5,1) -- (.5,1.7); + \draw [line width = 3pt, color = magenta, <-] + (.5,2.3) -- (.5,5); + \draw [line width = 3pt, color = magenta, <-] + (5,5) -- (4.2,4.2); + \draw [line width = 3pt, color = magenta, ->] + (1,1) -- (3.8,3.8); + \draw [line width = 3pt, color = magenta, ->] + (6,5.5) .. controls (7.3,5) and (8.2,4) .. (8.5,3.3); + \draw [line width = 3pt, color = magenta, <-] + (6,.8) .. controls (7.3,1) and (8.2,2) .. (8.5,2.7); + \draw [line width = 3pt, color = magenta, <-] + (1,5.2) .. controls (1.4,5.2) and (2,4.5) .. (2.3,4.2); + \draw [line width = 3pt, color = magenta, ->] + (5.2,1) .. controls (4.7,1.8) and (3.5,3) .. (2.7,3.8); + + + \filldraw [blue] (0,5) -- (1,5) -- (1,6) -- + (0,6) -- (0,5); + \draw [line width = 1.5pt] (0,5) -- + (1,5) -- (1,6) -- (0,6) -- (0,5); + \filldraw [green] (5,5) -- (6,5) -- (6,6) -- + (5,6) -- (5,5); + \draw [line width = 1.5pt] (5,5) -- + (6,5) -- (6,6) -- (5,6) -- (5,5); + \filldraw [red] (0,0) -- (1,0) -- (1,1) -- + (0,1) -- (0,0); + \draw [line width = 1.5pt] (0,0) -- + (1,0) -- (1,1) -- (0,1) -- (0,0); + \draw [line width = 1.5pt] (5,0) -- + (6,0) -- (6,1) -- (5,1) -- (5,0); + \draw (-.5,-.5) circle (.3) node {1}; + \draw [line width = 1.5pt] (0,.5) .. + controls (-.9,.4) and (-.65,-.2) .. (-.7,-.3); + \draw [line width = 1.5pt] (.5,0) .. + controls (.4,-.9) and (-.2,-.65) .. (-.3,-.7); + \draw (.5,2) circle (.3) node {1}; + \draw (5.5,4) circle (.3) node {1}; + \draw [line width = 1.5pt] (5.5,5) -- (5.5,4.3); + \draw [line width = 1.5pt] (5.5,3.7) -- (5.5,1); + \draw (1.5,3.5) circle (.3) node {2}; + \draw [line width = 1.5pt] (.8,5) .. + controls (.8,4.6) and (1,4.2) .. (1.3,3.7); + \draw [line width = 1.5pt] (5,.8) .. + controls (2.5,1.5) and (2.1,2.5) .. (1.6,3.22); + \draw (4,4) circle (.3) node {2}; + \draw (4,.5) circle (.3) node {2}; + \draw [line width = 1.5pt] (1,.5) -- (3.7,.5); + \draw [line width = 1.5pt] (5,.5) -- (4.3,.5); + \draw (-1,3) circle (.3) node {3}; + \draw [line width = 1.5pt] (0,5) .. + controls (-.7,4.3) and (-.9,3.6) .. (-1,3.3); + \draw [line width = 1.5pt] (0,1) .. + controls (-.7,1.7) and (-.9,2.3) .. (-1,2.7); + \draw (2.5,4) circle (.3) node {3}; + \draw (7,3) circle (.3) node {3}; + \draw [line width = 1.5pt] (6,5) .. + controls (6.7,4.3) and (6.9,3.6) .. (7,3.3); + \draw [line width = 1.5pt] (6,1) .. + controls (6.7,1.7) and (6.9,2.3) .. (7,2.7); + \draw (-.5,6.5) circle (.3) node {4}; + \draw [line width = 1.5pt] (0,5.5) .. + controls (-.9,5.4) and (-.65,6.2) .. (-.7,6.26); + \draw [line width = 1.5pt] (-.24,6.65) .. + controls (.1,6.7) and (.45,6.7) .. (.5,6); + \draw (8.5,3) circle (.3) node {4}; + \draw (2.3,1.2) circle (.3) node {4}; + \draw [line width = 1.5pt] (1,.8) -- (2.04,1.1); + \draw [line width = 1.5pt] (2.6,1.3) .. + controls (4,2) and (5,4) .. (5.2,5); + + + \node[text = white] at (0.5, 5.5) {\textbf{Blue}}; + \node[text = white] at (0.5, 0.5) {\textbf{Red}}; + \node[text = black] at (5.5, 0.5) {\textbf{Wht}}; % spell:disable-line + \node[text = black] at (5.5, 5.5) {\textbf{Grn}}; + \end{tikzpicture} + \end{small} \end{center} + \bigskip + + The first leg of the walk tells us + to take Cube 1 and to make sure + that its blue side is facing forward. + Then the red side, opposite to the blue one, + will face the rear. + + \begin{center} + \begin{tikzpicture} + \coordinate [label=center:{Front:}] (f) at (0,.5); + \filldraw [blue] (1,0) -- (2,0) -- (2,1) -- (1,1) -- (1,0); + \draw [line width = 1.5pt] (1,0) -- (2,0) -- + (2,1) -- (1,1) -- (1,0); + + \coordinate [label=center:{Rear:}] (f) at (0,-1); + \filldraw [red] (1,-1.5) -- (2,-1.5) -- (2,-.5) -- + (1,-.5) -- (1,-1.5); + \draw [line width = 1.5pt] (1,-1.5) -- (2,-1.5) -- (2,-.5) -- + (1,-.5) -- (1,-1.5); + + \node[text = white] at (1.5, 0.5) {\textbf{Blue}}; + \node[text = white] at (1.5, -1) {\textbf{Red}}; + \end{tikzpicture} + \end{center} + \bigskip + + The next leg of the walk tells us + to take Cube 2 and to place it in such a way + that its red side faces + us while the opposing green side faces the rear. + Since we go in a cycle that visits all the colors + one-by-one, neither color repeats the ones + already used on their sides of the stack. \\ + + \begin{center} + \begin{tikzpicture} + \coordinate [label=center:{Front:}] (f) at (0,.5); + \filldraw [blue] (1,0) -- (2,0) -- (2,1) -- (1,1) -- (1,0); + \filldraw [red] (2,0) -- (3,0) -- (3,1) -- (2,1) -- (2,0); + \draw [line width = 1.5pt] (1,0) -- (2,0) -- + (2,1) -- (1,1) -- (1,0); + \draw [line width = 1.5pt] (2,0) -- (3,0) -- + (3,1) -- (2,1); + + \coordinate [label=center:{Rear:}] (f) at (0,-1); + \filldraw [red] (1,-1.5) -- (2,-1.5) -- (2,-.5) -- + (1,-.5) -- (1,-1.5); + \filldraw [green] (2,-1.5) -- (3,-1.5) -- (3,-.5) -- + (2,-.5) -- (2,-1.5); + \draw [line width = 1.5pt] (1,-1.5) -- (2,-1.5) -- (2,-.5) -- + (1,-.5) -- (1,-1.5); + \draw [line width = 1.5pt] (2,-1.5) -- (3,-1.5) -- + (3,-.5) -- (2,-.5); + + \node[text = white] at (1.5, 0.5) {\textbf{Blue}}; + \node[text = black] at (2.5, 0.5) {\textbf{Red}}; + \node[text = white] at (1.5, -1) {\textbf{Red}}; + \node[text = black] at (2.5, -1) {\textbf{Grn}}; + + \end{tikzpicture} + \end{center} + \bigskip + + The third leg of the walk tells us + to take Cube 4, not Cube 3, and to place it + green side forward, white side facing the rear. \\ + + \begin{center} + \begin{tikzpicture} + \coordinate [label=center:{Front:}] (f) at (0,.5); + \filldraw [blue] (1,0) -- (2,0) -- (2,1) -- (1,1) -- (1,0); + \filldraw [red] (2,0) -- (3,0) -- (3,1) -- (2,1) -- (2,0); + \filldraw [green] (4,0) -- (5,0) -- (5,1) -- (4,1) -- (4,0); + \draw [line width = 1.5pt] (1,0) -- (2,0) -- + (2,1) -- (1,1) -- (1,0); + \draw [line width = 1.5pt] (2,0) -- (3,0) -- + (3,1) -- (2,1); + \draw [line width = 1.5pt] (4,0) -- (5,0) -- + (5,1) -- (4,1) -- (4,0); + + \coordinate [label=center:{Rear:}] (f) at (0,-1); + \filldraw [red] (1,-1.5) -- (2,-1.5) -- (2,-.5) -- + (1,-.5) -- (1,-1.5); + \filldraw [green] (2,-1.5) -- (3,-1.5) -- (3,-.5) -- + (2,-.5) -- (2,-1.5); + \draw [line width = 1.5pt] (1,-1.5) -- (2,-1.5) -- (2,-.5) -- + (1,-.5) -- (1,-1.5); + \draw [line width = 1.5pt] (2,-1.5) -- (3,-1.5) -- + (3,-.5) -- (2,-.5); + \draw [line width = 1.5pt] (4,-1.5) -- (5,-1.5) -- + (5,-.5) -- (4,-.5) -- (4,-1.5); + + \node[text = white] at (1.5, 0.5) {\textbf{Blue}}; + \node[text = black] at (2.5, 0.5) {\textbf{Red}}; + \node[text = white] at (1.5, -1) {\textbf{Red}}; + \node[text = black] at (2.5, -1) {\textbf{Grn}}; + + \node[text = black] at (4.5, 0.5) {\textbf{Grn}}; + \node[text = black] at (4.5, -1) {\textbf{Wht}}; % spell:disable-line + + \end{tikzpicture} + \end{center} + \bigskip + + Finally, the last leg of the walk + tells us to take Cube 3 and to place it + the white side facing forward, + the opposite blue side facing the rear. \\ + + \begin{center} + \begin{tikzpicture} + \coordinate [label=center:{Front:}] (f) at (0,.5); + \filldraw [blue] (1,0) -- (2,0) -- (2,1) -- (1,1) -- (1,0); + \filldraw [red] (2,0) -- (3,0) -- (3,1) -- (2,1) -- (2,0); + \filldraw [green] (4,0) -- (5,0) -- (5,1) -- (4,1) -- (4,0); + \draw [line width = 1.5pt] (1,0) -- (2,0) -- + (2,1) -- (1,1) -- (1,0); + \draw [line width = 1.5pt] (2,0) -- (3,0) -- + (3,1) -- (2,1); + \draw [line width = 1.5pt] (4,0) -- (5,0) -- + (5,1) -- (4,1) -- (4,0); + \draw [line width = 1.5pt] (3,0) -- (4,0); + \draw [line width = 1.5pt] (3,1) -- (4,1); + + \coordinate [label=center:{Rear:}] (f) at (0,-1); + \filldraw [red] (1,-1.5) -- (2,-1.5) -- (2,-.5) -- + (1,-.5) -- (1,-1.5); + \filldraw [green] (2,-1.5) -- (3,-1.5) -- (3,-.5) -- + (2,-.5) -- (2,-1.5); + \filldraw [blue] (3,-1.5) -- (4,-1.5) -- (4,-.5) -- + (3,-.5) -- (3,-1.5); + \draw [line width = 1.5pt] (1,-1.5) -- (2,-1.5) -- (2,-.5) -- + (1,-.5) -- (1,-1.5); + \draw [line width = 1.5pt] (2,-1.5) -- (3,-1.5) -- + (3,-.5) -- (2,-.5); + \draw [line width = 1.5pt] (4,-1.5) -- (5,-1.5) -- + (5,-.5) -- (4,-.5) -- (4,-1.5); + \draw [line width = 1.5pt] (3,-1.5) -- (4,-1.5); + \draw [line width = 1.5pt] (3,-.5) -- (4,-.5); + + \node[text = white] at (1.5, 0.5) {\textbf{Blue}}; + \node[text = black] at (2.5, 0.5) {\textbf{Red}}; + \node[text = white] at (1.5, -1) {\textbf{Red}}; + \node[text = black] at (2.5, -1) {\textbf{Grn}}; + \node[text = black] at (3.5, 0.5) {\textbf{Wht}}; % spell:disable-line + \node[text = white] at (3.5, -1) {\textbf{Blue}}; + \node[text = black] at (4.5, 0.5) {\textbf{Grn}}; + \node[text = black] at (4.5, -1) {\textbf{Wht}}; % spell:disable-line + \end{tikzpicture} + \end{center} + \bigskip + + Now the front and rear of the stack are done. + If we manage to find a second oriented cycle + in the original graph that has all the properties + of the first cycle, but uses none of its edges, + we would be able to do the upper and lower sides + of the stack and to complete the puzzle. + Using the edges we have already traversed + during our first walk will mess up + the front-rear configuration, but there are still + a plenty of the edges left! + + \problem{} + Complete the puzzle. + + \vfill + \pagebreak + + + \section{Traveling salesman problem} + + \problem{} \label{pr:tsp} + A salesman with the home office + in Albuquerque has to fly to Boston, + Chicago, and Denver, visiting each city once, + and then to come back to the home office. + The airfare prices, shown on the graph below, + do not depend on the direction of the travel. + Find the cheapest way. \\ + \note{This was on last week's handout, but not everyone had the chance to solve it.} + + \begin{center} + \begin{normalsize} + \begin{tikzpicture} + \tikzset{EdgeStyle/.append style = {-}} + \SetGraphUnit{3} + \Vertex{A} + \SOWE(A){B} + \SOEA(A){C} + \SO(A){D} + \Edge(A)(B) + \Edge(A)(C) + \Edge(A)(D) + \Edge(B)(D) + \Edge(C)(D) + \tikzset{EdgeStyle/.append style = {bend right = 70}} + \Edge(B)(C) + \coordinate [label=left:{\$1400}] (ab) at (-1.8,-1.75); + \coordinate [label=right:{\$1000}] (ac) at (1.8,-1.75); + \coordinate [label=right:{\$400}] (ad) at (-.1,-1.75); + \coordinate [label=below:{\$800}] (bc) at (0,-4.8); + \coordinate [label=below:{\$1200}] (bd) at (-1.5,-3); + \coordinate [label=below:{\$900}] (cd) at (1.5,-3); + \end{tikzpicture} + \end{normalsize} + \end{center} + + \vfill + \pagebreak + + \section{Planar graphs} + \label{sec:PG} + + A graph is called {\it planar}, + if it can be drawn in the plane in such a way + that no edges cross one another. + \problem{} + Show that the following graph is planar. + + \begin{center} + \tikzset{EdgeStyle/.append style = {-}} + \begin{tikzpicture} [scale = .8] + \SetGraphUnit{3.5} + \draw [color = white] (0,0) -- (0,-5); + \Vertex{A} + \EA(A){B} + \SO(B){C} + \SO(A){D} + \Edge(A)(B) + \Edge(A)(C) + \Edge(A)(D) + \Edge(B)(C) + \Edge(B)(D) + \Edge(C)(D) + \end{tikzpicture} + \end{center} + \vfill + + \problem{} + Is it possible to connect three houses, + A, B, and C, to three utility sources, + water (W), gas (G), and electricity (E), + without using the third dimension, + either on the plane or sphere, + so that the utility lines do not intersect? \\ + + \begin{center} + \begin{tikzpicture} [scale = .8] + \draw (0,0) circle (.5); + \coordinate [label=center:{W}] (w) at (-.05,-.03); + \draw (4,0) circle (.5); + \coordinate [label=center:{G}] (g) at (3.95,-.03); + \draw (8,0) circle (.5); + \coordinate [label=center:{E}] (e) at (7.95,-.03); + \draw (0,3) circle (.5); + \coordinate [label=center:{A}] (a) at (-.05,2.97); + \draw (4,3) circle (.5); + \coordinate [label=center:{B}] (b) at (3.95,2.97); + \draw (8,3) circle (.5); + \coordinate [label=center:{C}] (c) at (7.95,2.97); + \end{tikzpicture} + \end{center} + + \vfill + \pagebreak + + A {\it subdivision} of a graph $G$ + is a graph resulting from the subdivision + of the edges of $G$. The subdivision + of an edge $e = (v_1,v_2)$ is a graph + containing one new vertex $v_3$, + with the edges $e_1 = (v_1,v_3)$ and + $e_2 = (v_3,v_2)$ replacing the edge $e$. \\ + + \begin{center} + \begin{tikzpicture} [scale = .8] + \draw (0,0) circle (.5); + \coordinate [label=center:{$v_1$}] (v12) at (0,-.03); + \draw (4,0) circle (.5); + \coordinate [label=center:{$v_3$}] (v3) at (4,-.03); + \draw (8,0) circle (.5); + \draw (.5,0) -- (3.5,0); + \draw (4.5,0) -- (7.5,0); + \draw (.5,3) -- (7.5,3); + \coordinate [label=center:{$v_2$}] (v22) at (8,-.03); + \draw (0,3) circle (.5); + \coordinate [label=center:{$v_1$}] (v11) at (0,2.97); + \draw (8,3) circle (.5); + \coordinate [label=center:{$v_2$}] (v21) at (8,2.97); + \coordinate [label=above:{$e$}] (e) at (4,3); + \coordinate [label=above:{$e_1$}] (e1) at (2,0); + \coordinate [label=above:{$e_2$}] (e2) at (6,0); + \end{tikzpicture} + \end{center} + + \problem{} + What is the degree of a subdivision vertex? + + \vfill + + A graph $H$ is called a {\it subgraph} + of a graph $G$ if the sets of vertices + and edges of $H$ are subsets of the sets + of vertices and edges of $G$. \\ + + The following graphs are known as $K_{3,3}$ + and $K_5$. \\ + + \begin{center} + \begin{tikzpicture} %[scale = .8] + \filldraw (0,0) circle (3pt); + \filldraw (2,0) circle (3pt); + \filldraw (4,0) circle (3pt); + \filldraw (0,2) circle (3pt); + \filldraw (2,2) circle (3pt); + \filldraw (4,2) circle (3pt); + \draw (0,0) -- (0,2); + \draw (0,0) -- (2,2); + \draw (0,0) -- (4,2); + \draw (2,0) -- (0,2); + \draw (2,0) -- (2,2); + \draw (2,0) -- (4,2); + \draw (4,0) -- (0,2); + \draw (4,0) -- (2,2); + \draw (4,0) -- (4,2); + \coordinate [label=below:{$K_{3,3}$}] (l) at (2,-.2); + \end{tikzpicture} \hspace{60pt} + \begin{tikzpicture} %[scale = .8] + \filldraw (90:2) circle (3pt); + \filldraw (162:2) circle (3pt); + \filldraw (234:2) circle (3pt); + \filldraw (306:2) circle (3pt); + \filldraw (18:2) circle (3pt); + \draw (90:2) -- (162:2); + \draw (90:2) -- (234:2); + \draw (90:2) -- (306:2); + \draw (90:2) -- (18:2); + \draw (162:2) -- (234:2); + \draw (162:2) -- (306:2); + \draw (162:2) -- (18:2); + \draw (234:2) -- (306:2); + \draw (234:2) -- (18:2); + \draw (306:2) -- (18:2); + \coordinate [label=below:{$K_5$}] (l) at (0,-1.7); + \end{tikzpicture} + \end{center} + \vspace{15pt} + + Let $H$ be a graph that is a subdivision + of either $K_{3,3}$ or $K_5$. If $H$ is + a subgraph of a graph $G$, then $H$ is called + a {\it Kuratowski subgraph}, + after a famous Polish mathematician + Kazimierz Kuratowski (1896-1980). \\ + + \pagebreak + + \theorem{} + A graph is planar if and only if + it has no Kuratowski subgraph. + + \problem{} + Is the following graph planar? + Why or why not? \\ + + \begin{center} + \begin{tikzpicture} [scale = .8] + \filldraw (90:2) circle (3pt); + \filldraw (150:2) circle (3pt); + \filldraw (210:2) circle (3pt); + \filldraw (270:2) circle (3pt); + \filldraw (330:2) circle (3pt); + \filldraw (30:2) circle (3pt); + \draw (90:2) -- (150:2); + \draw (90:2) -- (210:2); + \draw (90:2) -- (270:2); + \draw (90:2) -- (330:2); + \draw (90:2) -- (30:2); + \draw (150:2) -- (210:2); + \draw (150:2) -- (270:2); + \draw (150:2) -- (330:2); + \draw (150:2) -- (30:2); + \draw (210:2) -- (270:2); + \draw (210:2) -- (330:2); + \draw (210:2) -- (330:2); + \draw (210:2) -- (30:2); + \draw (270:2) -- (330:2); + \draw (270:2) -- (30:2); + \draw (330:2) -- (30:2); + \end{tikzpicture} + \end{center} + + \vfill + + \problem{} + Is the following graph planar? + Why or why not? + + \begin{center} + \includegraphics[width=2.2in]{4Dcube2.jpg} + \end{center} + + \vfill + \pagebreak + + + \section{Euler characteristic} + + Let $G$ be a planar graph, + drawn with no edge intersections. + The edges of $G$ divide the plane into regions, + called {\it faces}. The regions + enclosed by the graph are called + the {\it interior faces}. + The region surrounding the graph is called + the {\it exterior (or infinite) face}. + The faces of $G$ include both the interior faces + and the exterior one. For example, + the following graph has two interior faces, + $F_1$, bounded by the edges $e_1$, $e_2$, $e_4$; + and $F_2$, bounded by the edges $e_1$, $e_3$, $e_4$. + Its exterior face, $F_3$, is bounded by the edges + $e_2$, $e_3$. + + \begin{center} \label{pic:nsgrap} + \begin{tikzpicture} [scale = .6] + \SetGraphUnit{5} + \Vertex{B} + \WE(B){A} + \EA(B){C} + \Edge(B)(A) + \Edge(C)(B) + \tikzset{EdgeStyle/.append style = {bend left = 50}} + \Edge(A)(C) + \Edge(C)(A) + \coordinate [label=above:{$e_1$}] (e1) at (-2.1,.0); + \coordinate [label=above:{$e_2$}] (e2) at (0,2.45); + \coordinate [label=below:{$e_3$}] (e3) at (0,-2.5); + \coordinate [label=above:{$e_4$}] (e4) at (2.1,.0); + \end{tikzpicture} + \end{center} + + The {\it Euler characteristic} of a graph + is the number of the graph's vertices minus + the number of the edges plus the number of the faces. + \begin{equation} + \chi = V - E + F + \end{equation} + + \problem{} + Compute the Euler characteristic + of the graph above. + \vfill + + \problem{} + Compute the Euler characteristic + of the following graph. + + + \begin{center} + \begin{tikzpicture} [scale = .8] + \draw (.5,3) -- (7.5,3); + \draw (0,3) circle (.5); + \coordinate [label=center:{$v_1$}] (v11) at (0,2.97); + \draw (8,3) circle (.5); + \coordinate [label=center:{$v_2$}] (v21) at (8,2.97); + \coordinate [label=above:{$e$}] (e) at (4,3); + \end{tikzpicture} + \end{center} + + \vfill + \pagebreak + + \problem{}<3Dcube> + Is the following graph planar? + If you think it is, please re-draw + the graph so that it has no intersecting edges. + If you think the graph is not planar, + please explain why. \\ + + \begin{center} + \begin{tikzpicture} + \draw (1,1) -- (4,1) -- (4,4) -- (1,4) -- (1,1); + \draw (0,0) -- (3,0) -- (3,3) -- (0,3) -- (0,0); + \draw (0,0) -- (1,1); + \draw (3,0) -- (4,1); + \draw (0,3) -- (1,4); + \draw (3,3) -- (4,4); + \filldraw (0,0) circle (3pt); + \filldraw (3,0) circle (3pt); + \filldraw (0,3) circle (3pt); + \filldraw (3,3) circle (3pt); + \filldraw (4,1) circle (3pt); + \filldraw (1,1) circle (3pt); + \filldraw (1,4) circle (3pt); + \filldraw (4,4) circle (3pt); + \end{tikzpicture} + \end{center} + + \vfill + + \problem{} + Compute the Euler characteristic of the graph + from Problem \ref{3Dcube}. + + \vfill + \pagebreak + + Let us consider the below picture + of a {\it regular dodecahedron} as a graph, + the vertices representing those of the graph, + and the edges, both solid and dashed, + representing the edges of the graph. + + \problem{} + Is the graph planar? + If you think it is planar, + please re-draw the graph so that it has + no intersecting edges. If you think the graph + is not planar, please explain why. \\ + + \begin{center} + \includegraphics[width=2.5in] + {dodecahedron.jpg} + \end{center} + + \vfill + + \problem{} + Compute the Euler characteristic of the graph + from Problem \ref{dodec}. + Can you conjecture what the Euler characteristic + of every planar graph is equal to? + + \vfill + \pagebreak + + A graph is called a {\it tree} + if it is connected and has no cycles. + Here is an example. \\ + + \begin{center} + \begin{tikzpicture} [scale = .6] + \SetGraphUnit{5} + \Vertex{A} + \SOWE(A){B} + \SO(A){C} + \SOEA(A){D} + \SOWE(B){E} + \SO(B){F} + \SOEA(D){G} + \Edge(A)(B) + \Edge(A)(C) + \Edge(A)(D) + \Edge(B)(E) + \Edge(B)(F) + \Edge(D)(G) + %\tikzset{EdgeStyle/.append style = {bend left = 50}} + \end{tikzpicture} + \end{center} + \bigskip + + A path is called {\it simple} + if it does not include any of its edges + more than once. + + \problem{} + Prove that a graph in which any two vertices are connected by one + and only one simple path is a tree. + + \problem{} + What is the Euler characteristic + of a finite tree? + + \theorem{} + Let a finite connected planar graph have + $V$ vertices, $E$ edges, and $F$ faces. + Then $V - E + F = 2$. + + \problem{} + Prove Theorem \ref{eu_char}. + Hint: removing an edge from a cycle + does not change the number of vertices + and reduces the number of edges and faces + by one. + + \problem{} + There are three ponds in a botanical garden, + connected by ten non-intersecting brooks + so that the ducks can sweem from any pond to any other. + How many islands are there in the garden? + + \problem{} + All the vertices of a finite graph + have degree three. + Prove that the graph has a cycle. + + \problem{} + Draw an infinite tree with every vertex + of degree three. + + \problem{} + Prove that a connected finite graph is a tree + if and only if $V = E + 1$. + + \problem{} + Give an example of a finite graph + that is not a tree, + but satisfies the relation $V = E + 1$. + +\end{document} \ No newline at end of file diff --git a/src/Intermediate/Instant Insanity/meta.toml b/src/Intermediate/Instant Insanity/meta.toml new file mode 100644 index 0000000..a34a07f --- /dev/null +++ b/src/Intermediate/Instant Insanity/meta.toml @@ -0,0 +1,6 @@ +[metadata] +title = "Instant Insanity" + +[publish] +handout = true +solutions = false diff --git a/src/Intermediate/Newton's Laws/main.tex b/src/Intermediate/Newton's Laws/main.tex new file mode 100755 index 0000000..ee9dda9 --- /dev/null +++ b/src/Intermediate/Newton's Laws/main.tex @@ -0,0 +1,536 @@ +% use [nosolutions] flag to hide solutions. +% use [solutions] flag to show solutions. +\documentclass[ + solutions +]{../../../lib/tex/ormc_handout} +\usepackage{../../../lib/tex/macros} + + + +\uptitlel{Intermediate 2} +\uptitler{\smallurl{}} +\title{Newton's Laws of Motion} +\subtitle{ + Prepared by Mark on \today \\ + Based on a handout by Oleg Gleizer +} + +\begin{document} + + \maketitle + + \section{Newton's First Law} + If the net force acting on an object is zero, the velocity of that object does not change. \\ + Conversely, if the velocity of an object doesn't change, the net force acting on it is zero. + + \medskip + + In the context of vectors, the ``net force'' is the sum of all the force vectors acting on the object. ``Speed'' is the length (or \textit{magnitude}) of the velocity vector. + + + \problem{} + There are no forces acting on the object + $A$ below. The current velocity of the object, + in meters per second, is represented by the vector $\overrightarrow{v}$. + Draw the position of the object two seconds later. + + \begin{center} + \begin{normalsize} + \begin{tikzpicture} [scale=.7] + \draw[step=1cm, gray, very thin] (-11,-7) grid (1,1); + \draw [line width = 1.5pt, ->] (-9,0) -- (-5,-3); + \coordinate [label = above:{$\overrightarrow{v}$}] (v) at (-6.9,-1.5); + \filldraw (-9,0) circle (3pt); + \coordinate [label = left:{$A$}] (a) at (-9,0); + \end{tikzpicture} + \end{normalsize} + \end{center} + + The sides of the grid squares + on the picture above are one metre long. + What is the speed of the object? + \vfill + + What distance would the object cover + in two seconds? \\ + \vfill + + \pagebreak + + \problem{} + There are no forces acting on the object + $A$ below. + The current velocity of this object, + in miles per hour, + is represented by the vector $\overrightarrow{v}$. + Draw the position of the object half an hour later. + \vspace{20pt} + + \begin{center} + \begin{normalsize} + \begin{tikzpicture} [scale=.7] + \draw[step=1cm, gray, very thin] (-11,-7) grid (1,1); + \draw [line width = 1.5pt, ->] (-9,0) -- (-1,-6); + \coordinate [label = above:{$\overrightarrow{v}$}] (v) at (-4.8,-3); + \filldraw (-9,0) circle (3pt); + \coordinate [label = left:{$A$}] (a) at (-9,0); + \end{tikzpicture} + \end{normalsize} + \end{center} + + The sides of the grid squares + on the picture above are ten miles long. + What is the speed of this object? + + \vfill + + What distance would the object cover + in half an hour? \\ + + \vfill + + What distance would the object cover + in three hours? \\ + + \vfill + + \pagebreak + + \definition{Acceleration} + \textit{Acceleration} is the rate at which velocity changes. + Let's represent acceleration by the vector $\overrightarrow{a}$. + + If $\overrightarrow{a}$ does not change over time, then the speed + of an object at time $t$ is given by the following equation: + + \begin{equation} \label{eq:ac} + \overrightarrow{v_t} = \overrightarrow{v_0} + + t \overrightarrow{a}. + \end{equation} + + \problem{} + It takes a minivan seven seconds to accelerate from 0 to 60 miles per hour. Find its acceleration in meters per second squared. \\ + \hint{1 mile $\approx$ 1600 meters} + + \vfill + + Note that in the previous problem, motion is one-dimensional (it happens on a straight line). In this case, both velocity and acceleration are one-dimensional vectors---in other words, (real) numbers! \\ + + In general, velocity and acceleration are \textit{not} numbers, but vectors. You'll see this in the next few problems. + + \pagebreak + + + Now, let's try a few examples with vectors: \\ + \medskip + Consider an object, currently at $P_0$, moving along the vector $\overrightarrow{v_0}$. + + As before, let $\overrightarrow{a}$ represent the acceleration of the object. This could be caused by gravity, current, or any other constant force. + + \medskip + + One second later, the object will be at $P_1$, and has the velocity vector $\overrightarrow{v_1} = \overrightarrow{v_0} + \overrightarrow{a}$. + + \medskip + + Two seconds later, the object will be positioned at $P_2$ and will have the velocity vector $\overrightarrow{v_2} = \overrightarrow{v_0} + 2\overrightarrow{a}$. + + \begin{center} + \begin{normalsize} + \begin{tikzpicture} [scale=.7] + \draw[step=1cm, gray, very thin] (-19,-15) grid (1,1); + + \draw [line width = 1.5pt, ->] (-18,-1) -- (-16,-4); + \coordinate [label = left:{$\overrightarrow{v_0}$}] + (v0) at (-17.1,-2.6); + \draw [line width = 1.5pt, ->] (-18,-1) -- (-15,-2); + \coordinate [label = above:{$\overrightarrow{a}$}] + (a) at (-16.4,-1.5); + \filldraw (-18,-1) circle (3pt); + \coordinate [label = above:{$P_0$}] (p0) at (-18,-1); + + \filldraw (-14.5,-4.5) circle (3pt); + \coordinate [label = right:{$P_1$}] (p1) at (-14.45,-4.4); + \draw [line width = 1.5pt, ->] (-14.5,-4.5) -- (-9.5,-8.5); + \coordinate [label = right:{$\overrightarrow{v_1}$}] + (v1) at (-11.75,-6.5); + \draw [->] (-14.5,-4.5) -- (-12.5,-7.5); + \coordinate [label = left:{$\overrightarrow{v_0}$}] + (v01) at (-13.6,-6); + \draw (-12.5,-7.5) -- (-9.5,-8.5); + \coordinate [label = left:{$\overrightarrow{a}$}] + (a1) at (-11,-8.3); + + \filldraw (-8,-9) circle (3pt); + \coordinate [label = above:{$P_2$}] (b) at (-8,-9); + \draw [->] (-8,-9) -- (-6,-12); + \coordinate [label = left:{$\overrightarrow{v_0}$}] + (v02) at (-7,-10.5); + \draw (-6,-12) -- (0,-14); + \coordinate [label = left:{$2\overrightarrow{a}$}] + (a1) at (-3.5,-13); + \draw [line width = 1.5pt, ->] (-8,-9) -- (0,-14); + \end{tikzpicture} + \end{normalsize} + \end{center} + + $t$ seconds later, the object + will have the velocity + \[ + \overrightarrow{v_t} = \overrightarrow{v_0} + t \overrightarrow{a} + \] + + Note that the word {\it acceleration} has two different meanings. + One is a vector, as in the example above. + The other meaning is the length + of the vector that represents the magnitude + of the velocity change. In this case, + we do not put an arrow above the letter + $a$ representing acceleration. + In other words, $a = |\overrightarrow{a}|$. + Similarly, speed is the length + of the velocity vector, + $v = |\overrightarrow{v}|$. + + \vfill + \pagebreak + + + \example{} + Moving with a constant acceleration, + an object moves from point $A$ to point $B$ + in one second. The velocities of the motion, + in metres per second, are represented + by the vectors $\overrightarrow{v_0}$ and + $\overrightarrow{v_1}$. + Find the acceleration vector. \\ + + \begin{center} + \begin{normalsize} + \begin{tikzpicture} [scale=.7] + \draw[step=1cm, gray, very thin] (-18,-8) grid (1,1); + \draw [line width = 1.5pt, ->] (-17,-1) -- (-13,-4); + \coordinate [label = above:{$\overrightarrow{v_0}$}] + (v0) at (-14.9,-2.5); + \filldraw (-17,-1) circle (3pt); + \coordinate [label = left:{$A$}] (a) at (-17,-1); + \filldraw (-10,-3) circle (3pt); + \coordinate [label = above right:{$B$}] (b) at (-10,-3.1); + \draw [line width = 1.5pt, ->] (-10,-3) -- (0,-4); + \coordinate [label = above:{$\overrightarrow{v_1}$}] + (v1) at (-5,-3.5); + \end{tikzpicture} + \end{normalsize} + \end{center} + + According to formula on the previous page, + $\overrightarrow{v_1} = \overrightarrow{v_0} + (1\text{ sec}) \times \overrightarrow{a}$. \\ + + \begin{center} + \begin{normalsize} + \begin{tikzpicture} [scale=.7] + \draw[step=1cm, gray, very thin] (-18,-8) grid (1,1); + \draw [line width = 1.5pt, ->] (-17,-1) -- (-13,-4); + \coordinate [label = above:{$\overrightarrow{v_0}$}] + (v0) at (-14.9,-2.5); + \filldraw (-17,-1) circle (3pt); + \coordinate [label = left:{$A$}] (a) at (-17,-1); + \filldraw (-10,-3) circle (3pt); + \coordinate [label = above right:{$B$}] (b) at (-10,-3.1); + \draw [line width = 1.5pt, ->] (-10,-3) -- (0,-4); + \coordinate [label = above:{$\overrightarrow{v_1}$}] + (v1) at (-5,-3.5); + \draw [line width = 1.5pt, ->] (-10,-3) -- (-6,-6); + \coordinate [label = below:{$\overrightarrow{v_0}$}] + (v01) at (-8.2,-4.5); + \end{tikzpicture} + \end{normalsize} + \end{center} + + \problem{} + Complete \ref{accel_example}: \\ + Draw the acceleration vector on the above diagram. + + + \vfill + \pagebreak + + \problem{} + At an initial moment in time, + the object at point $A$ + is moving with the velocity vector + $\overrightarrow{v_0}$, + measured in metres per second. + The constant acceleration + acting on the object + is represented by the vector + $\overrightarrow{a}$, + measured in meters per second squared. + Two seconds later, the object is located + at point $B$. Draw its velocity vector + at that moment. + + \begin{center} + \begin{normalsize} + \begin{tikzpicture} [scale=.7] + \draw[step=1cm, gray, very thin] (-19,-15) grid (1,1); + \draw [line width = 1.5pt, ->] (-18,-1) -- (-16,-4); + \coordinate [label = left:{$\overrightarrow{v_0}$}] + (v0) at (-17.1,-2.6); + \draw [line width = 1.5pt, ->] (-18,-1) -- (-15,-2); + \coordinate [label = above:{$\overrightarrow{a}$}] + (a) at (-16.4,-1.5); + \filldraw (-18,-1) circle (3pt); + \coordinate [label = left:{$A$}] (a) at (-18,-1); + \filldraw (-8,-9) circle (3pt); + \coordinate [label = left:{$B$}] (b) at (-8,-9); + %\draw [line width = 1.5pt, ->] (-8,-9) -- (0,-14); + \end{tikzpicture} + \end{normalsize} + \end{center} + \vspace{12pt} + + + The side length of the grid squares + on the picture above is one metre. + Find the speed of the object when it is + at point $B$. + + \vfill + \pagebreak + + \section{Newton's Second Law} + + The second law is simple: + \[ + \overrightarrow{F} = m \times \overrightarrow{a} + \] + + Here, $\overrightarrow{F}$ is the net force acting on an object with mass $m$, and $\overrightarrow{a}$ is the acceleration the object experiences as a result of this action. Mass is a measure of an object's \textit{inertia}: the heavier an object is, the more effort it takes to change its velocity. \\ + + In civilized countries, mass is measured in grams and force is measured in \textit{newtons}. One newton is the force it takes to accelerate 1 kg of mass to 1 meter per second. In other words, + + \[ + 1\ N = (1\ kg) (1\ \frac{m}{s}) + \] + + \problem{} + The {\it Millennium Falcon}, at point $A$ at the moment, + is trying to escape from the Death Star, which is trying + to arrest the ship using its attracting beam. + The thrust of the Falcon's engines, + 200,000 kN in total, is represented + by the vector $\overrightarrow{T}$. + The force of the beam is represented + by the vector $\overrightarrow{B}$. + In addition, a nearby star + exerts a gravitational force of + $\overrightarrow{G}$ on the ship. + Draw the vector of the net force + acting on the vessel. \\ + + \begin{center} + \begin{normalsize} + \begin{tikzpicture} [scale=.7] + \draw[step=1cm, gray, very thin] (-16,-9) grid (1,1); + \draw [line width = 1.5pt, ->] (-8,-5) -- (-12,-5); + \coordinate [label = below:{$\overrightarrow{T}$}] (v) at (-10,-5.1); + \filldraw (-8,-5) circle (3pt); + \coordinate [label = below:{$A$}] (a) at (-8,-5.1); + \draw [line width = 1.5pt, ->] (-8,-5) -- (-3,-6); + \coordinate [label = above:{$\overrightarrow{B}$}] (b) at (-5.4,-5.5); + \draw [line width = 1.5pt, ->] (-8,-5) -- (-9,-2); + \coordinate [label = left:{$\overrightarrow{G}$}] (g) at (-8.6,-3.5); + \end{tikzpicture} + \end{normalsize} + \end{center} + + The mass of the ship + is 400,000 kg. What acceleration, + in metres per second squared, + does the ship experience? + \vfill + + + + The purpose of this daring mission + was to find out the force + that the the attracting beam exerts. + However, Han Solo is not particularly + good with vectors. Please help him complete the mission. + \vfill + \pagebreak + + + \section{Newton's Third Law} + + Newton's third law also concerns forces. It states that \textit{every action has an equal and opposite reaction}. + + In other words, this means that when one object exerts force on another, the second simultaneously exerts a force equal in magnitude and opposite in direction to the force exerted on it by the first. + + \medskip + + In fact, we saw this in our first handout! + + \begin{tcolorbox}[ + colback=white, + colframe=gray!75!black, + title={ Handout 1, Page 7 } + ] + + Here is an important example of an inverse vector. When you stand still, the floor pushes you up with the force opposite to the force of the gravitational pull, a.k.a. \textit{weight}. + + \begin{center} + \begin{tikzpicture} + \begin{normalsize} + \draw (0,0) -- (6,0); + \draw (2.5,0) -- (3,1); + \draw (3.5,0) -- (3,1); + \draw (3,1) -- (3,2); + \draw (3,2.3) circle (.3); + \draw (2.6,1.7) -- (3.4,1.7); + \draw [->, line width = 2pt] (2.5,0) -- (2.5,-1); + \coordinate [label = below: {weight}] + (g) at (2.5,-1.1); + \draw [->, line width = 2pt] (3.5,0) -- (3.5,1); + \coordinate [label = right: {floor reaction}] + (w) at (3.7,1); + \end{normalsize} + \end{tikzpicture} + \end{center} + The two opposing vectors add up to the zero vector, and therefore you don't move. + + \end{tcolorbox} + + \problem{} + In a second, the truck and car on the picture below will collide in a crash test. + The weight of the truck is 20 metric tons. The weight of the car is 2 metric tons. + Find the ratio of the accelerations, + $a_t$ (acceleration of the truck) and + $a_c$ (that of the car), + the vehicles will undergo. \\ + + \begin{center} + \begin{tikzpicture} + \draw [gray!50!black] (-7,0) -- (7,0); + + \filldraw [gray!80!blue] (-3.6,1.5) -- (-4.4,1.5) -- + (-4.4,2) -- (-6.8,2) -- (-6.8,.3) -- (-3.6,.3) -- + (-3.6,1.5); + \filldraw (-6,.3) circle (.3); + \filldraw [gray] (-6,.3) circle (.15); + \filldraw (-4,.3) circle (.3); + \filldraw [gray] (-4,.3) circle (.15); + + \filldraw [red!80!white] (4,.2) -- (6.6,.2) -- (6.55,.6) -- + (6.2,.6) -- (6.1,.8) -- (4.9,.8) -- (4.7,.6)-- + (4.2,.6) -- (4,.45) -- (4,.2); + \filldraw (6,.2) circle (.2); + \filldraw [gray] (6,.2) circle (.1); + \filldraw (4.6,.2) circle (.2); + \filldraw [gray] (4.6,.2) circle (.1); + \end{tikzpicture} + \end{center} + + \medskip + + \begin{huge} + $a_t \div a_c =$ + \end{huge} + + \vfill + \newpage + + \section{Bonus Problems} + + \problem{} + Use vector algebra to prove + that diagonals of a parallelogram + in the Euclidean plane + split each other in halves. \\ + + \begin{center} + \begin{tikzpicture} + \begin{normalsize} + \draw (0,0) -- (4,-2); + \coordinate [label = left: {$A$}] (a) at (0,0); + \coordinate [label = right: {$B$}] (b) at (4,-2); + \coordinate [label = above: {$\overrightarrow{v}$}] (v1) at (2,-.9); + \draw (-1,-3) -- (3,-5); + \coordinate [label = left: {$C$}] (c) at (-1,-3); + \coordinate [label = right: {$D$}] (d) at (3,-5); + \coordinate [label = below: {$\overrightarrow{v}$}] (v2) at (1,-4.1); + \draw (-1,-3) -- (0,0); + \draw (3,-5) -- (4,-2); + \coordinate [label = left: {$\overrightarrow{w}$}] (w1) at (-.55,-1.5); + \coordinate [label = right: {$\overrightarrow{w}$}] (w2) at (3.55,-3.5); + \draw (0,0) -- (3,-5); + \draw (-1,-3) -- (4,-2); + \coordinate [label = above: {$M$}] (m) at (1.7,-2.5); + \end{normalsize} + \end{tikzpicture} + \end{center} + + \vfill + \newpage + + \problem{} + Use vector algebra to prove that + all the three medians of a triangle + in the Euclidean plane intersect + at one point that splits each of the medians + in the ratio 2:1, counting from the vertices. \\ + + \begin{center} + \begin{normalsize} + \begin{tikzpicture} + \draw (0,0) -- (6,-1); + \draw (0,0) -- (3,-5); + \draw (3,-5) -- (6,-1); + \draw [color = white] (3,-5) -- (9,-6); + \draw [color = white] (6,-1) -- (9,-6); + \coordinate [label = left: {$A$}] (a) at (0,0); + \coordinate [label = right: {$B$}] (b) at (6,-1); + \coordinate [label = below: {$C$}] (c) at (3,-5); + \coordinate [label = above: {$\overrightarrow{v}$}] + (v) at (3,-.45); + \coordinate [label = left: {$\overrightarrow{w}$}] + (w) at (1.45,-2.5); + \filldraw (4.5,-3) circle (1.5pt); + \coordinate [label = right: {$M_A$}] (ma) at (4.65,-2.85); + \draw (0,0) -- (4.5,-3); + \end{tikzpicture} + \end{normalsize} + \end{center} + + \vfill + \newpage + + \problem{} + Find the area of an equilateral triangle + with the side length $a$. + \vfill + + \problem{} + Does there exist an equilateral triangle + in the Euclidean plane + such that all of its vertices + have integral coordinates? + Why or why not? \\ + + \begin{center} + \begin{normalsize} + \begin{tikzpicture} [scale=.7] + \draw[step=1cm, gray, very thin] (-15,-9) grid (1,1); + \draw [line width = 1.5pt, ->] (-7,-9) -- (-7,1); + \coordinate [label = above:{$y$}] (y) at (-7,1); + \draw [line width = 1.5pt, ->] (-15,-4) -- (1,-4); + \coordinate [label = right:{$x$}] (x) at (1,-4); + \coordinate [label = below:{$1$}] (ox) at (-6,-4); + \coordinate [label = left:{$1$}] (oy) at (-7,-3); + \end{tikzpicture} + \end{normalsize} + \end{center} + \vfill + +\end{document} \ No newline at end of file diff --git a/src/Intermediate/Newton's Laws/meta.toml b/src/Intermediate/Newton's Laws/meta.toml new file mode 100644 index 0000000..ea4c0a3 --- /dev/null +++ b/src/Intermediate/Newton's Laws/meta.toml @@ -0,0 +1,6 @@ +[metadata] +title = "Newton's Laws" + +[publish] +handout = true +solutions = false diff --git a/src/Intermediate/Probability/main.tex b/src/Intermediate/Probability/main.tex new file mode 100755 index 0000000..a7deb79 --- /dev/null +++ b/src/Intermediate/Probability/main.tex @@ -0,0 +1,345 @@ +% use [nosolutions] flag to hide solutions. +% use [solutions] flag to show solutions. +\documentclass[solutions]{../../../lib/tex/ormc_handout} +\usepackage{../../../lib/tex/macros} + + +% Quick P() macro. +% \P is already defined, +% but we won't need it in this doc. +\renewcommand{\P}[1] {P(#1)} +\newcommand{\Pt}[1] { + \ensuremath{\P{\text{#1}}} +} + + +\uptitlel{Intermediate 2} +\uptitler{\smallurl{}} +\title{Probability} +\subtitle{ + Prepared by Mark on \today \\ + Based on a handout by Oleg Gleizer +} + +\begin{document} + + \maketitle + + + \problem{} + A Zoo manager thinks of a way + to set up a new pavilion. + He has 7 different plants + and 12 different animals. \\ + + \begin{itemize} + \item How many ways are there to choose two animals and three plants? + \vfill + \item The manager finds that he only has 5 exhibits available. How many different sets of animals can he choose, if only one can be in each exhibit time? + \vfill + \end{itemize} + + \problem{} + How many different 7-symbol license plates are possible if the first three symbols are letters and the remaining four are digits 0-9? \\ + \hint{Symbols can repeat, but letters must be uppercase} + \vfill + + \pagebreak + + \problem{} + There are two plates on a table. + One plate has 10 identical candies, + the other has 8 different fruits. \\ + + \begin{itemize} + \item How many ways are there to choose one candy? + \vfill + \item How many ways are there to choose seven candies? + \vfill + \item How many ways are there to choose five fruits? + \vfill + \item How many ways are there to choose three candies and six fruits? + \vfill + \item Gregory chooses two fruits and two candies, and lines up the four objects on the table. In how many ways can he do it? + \vfill + \item Gregory chooses five fruits and seven candies, and lines up the twelve objects on the table. In how many ways can he do it? + \vfill + \end{itemize} + + + \pagebreak + + + + \vspace{190pt} + + \pagebreak + + \begin{center} + \section{Probability} + \end{center} + \vspace{10pt} + + A \textit{probability}, also known as a \textit{chance}, is a number showing how likely some event is to happen. Let us call the event $X$. Then the probability of $X$ taking place is + + $$ + \P{X} = \frac{ + \text{The number of the outcomes such that $X$ happens.} + }{ + \text{The number of all the possible outcomes.} + } + $$ + + Note that by definition, $0 \leq P(X) \leq 1$. \\ + + In some of the following problems, we will be flipping a coin. Let us use $H$ to represent the event of the coin landing heads, and $T$, the event of the coin landing tails. + + + \problem{} + Compute each of the following: + \begin{enumerate} + \item \Pt{Rolling a six-sided die and getting 2} + \item \Pt{Flipping a coin twice and getting the sequence HH} + \item \Pt{Flipping a coin twice and getting one head and one tail in any order} + \item \Pt{Rolling two six-sided dice and getting a sum of 5} + \end{enumerate} + + + \vfill + \pagebreak + + Some parts of the previous problem involve repeated trials: two dice, or two coins. You may have solved these by listing out all the possible outcomes. Though this simple approach works for small problems, it isn't particularly useful for larger ones: ten coin flips create 1024 possible outcomes, and ten dice rolls, 60466174. + + \medskip + + A better way to think about repeated trials is as a ``tree,'' where each outcome represents a path. The following tree represents two coin flips, and the four paths down it (from left to right) correspond to the four possible outcomes: HH, HT, TH, TT. + + % Ugly hack + \tikzstyle{level 1}=[level distance=3.5cm, sibling distance=3.5cm] + \tikzstyle{level 2}=[level distance=3.5cm, sibling distance=2cm] + \tikzstyle{split} = [text width=1em, text centered] + \tikzstyle{tsplit} = [text width=0, text centered] + \tikzstyle{end} = [minimum width=3pt, inner sep=0pt] + + \begin{center} + \begin{tikzpicture}[grow=right] + \node[tsplit] {} + child { + node[split] {T} + child { + node[end, label=right:{T\ \ \ (TT)}] {} + edge from parent + } + child { + node[end, label=right:{H\ \ \ (TH)}] {} + edge from parent + } + edge from parent + } + child { + node[split] {H} + child { + node[end, label=right:{T\ \ \ (HT)}] {} + edge from parent + } + child { + node[end, label=right:{H\ \ \ (HH)}] {} + edge from parent + } + edge from parent + }; + \end{tikzpicture} + \end{center} + + If we label each edge with the probability of each event, we can calculate the probability of each outcome by multiplying the edges we passed: + + \begin{center} + \begin{tikzpicture}[grow=right] + \node[tsplit] {} + child { + node[split] {T} + child { + node[end, label=right:{T\ \ \ ({TT, $\frac{1}{4}$})}] {} + edge from parent + node[below] {$\frac{1}{2}$} + } + child { + node[end, label=right:{H\ \ \ ({TH, $\frac{1}{4}$})}] {} + edge from parent + node[below] {$\frac{1}{2}$} + } + edge from parent + node[below] {$\frac{1}{2}$} + } + child { + node[split] {H} + child { + node[end, label=right:{T\ \ \ ({HT, $\frac{1}{4}$})}] {} + edge from parent + node[below] {$\frac{1}{2}$} + } + child { + node[end, label=right:{H\ \ \ ({HH, $\frac{1}{4}$})}] {} + edge from parent + node[below] {$\frac{1}{2}$} + } + edge from parent + node[below] {$\frac{1}{2}$} + }; + \end{tikzpicture} + \end{center} + + We can formalize this idea as follows: + + \proposition{} + If we have two independent events $A$ and $B$, then $\Pt{A and B} = \P{A} \times \P{B}$. \\ + Usually we write $\Pt{A and B}$ as $\P{A \cap B}$. \\ + + \vfill + + Here's another important thought: + + \proposition{} + If the probability of event $A$ happening is $\P{A}$, the probability of $A$ \textit{not} happening is $1 - \P{A}$ + + \pagebreak + + \problem{} + There are three cans of white paint and two cans of black paint in a dark storage room. You take two cans out without looking. What is the probability that you'll choose two cans of the same color? + \vfill + + \problem{} + Hospital records show that of patients + suffering from a certain disease, + 75\% die of it. What is the probability + that of 5 randomly selected patients, + 4 will recover? \\ + \hint{What is the probability of a patient recovering?} + \vfill + + \problem{} + When Oleg calls his daughter Anya, + the chance of the call getting through is 60\%. + How likely is it to have at least one connection + in four calls? + \vfill + + \problem{} + The chance of a runner to improve + his own personal record in a race is $p$. + What is the probability that his record will improve after 3 races? + \vfill + + \newpage + + \problem{} + You toss a pair of fair dice five times. + What is the probability that you get a sum of ten exactly two times? + \vfill + + \problem{} + You toss a pair of fair dice five times. + What is the probability that you get ten + at least twice? + \vfill + + \problem{} + A fair coin is tossed 4 times. What is the chance of getting more heads than tails? + \vfill + + + + \problem{} + A pharmaceutical study shows that a new drug causes negative side effects in 3 of every 100 patients. + To check the number, a researcher chooses 5 random people to survey. + Assuming the study is accurate, what is the probability of the following? \\ + + \begin{enumerate} + \item None of the five patients experience side effects. + \item At least two experience side effects. + \end{enumerate} + + \vfill + \pagebreak + + \problem{} + You pick up a natural number (positive integer) + at random. What is the probability + that the number is divisible by either two + or three? + + \vfill + + \problem{} + Three players are tossing a fair coin. + The first to have a HEAD wins. + What are the players' chances of winning? + + \vfill + + \section{Harder Probabilities} + + \problem{} + Oleg wrote ten letters to Math Circle parents + and addressed the ten envelopes. However, he + left the final stages of mailing to a careless clerk who + didn't pay attention, inserting the letters + into the envelopes at random. + (However, he did manage to fit exactly + one letter in each envelope.) + What is the probability that exactly nine of + the ten letters is correctly addressed? + + \vfill + + \problem{} + On a sold-out flight, the first person to + board the plane forgot which seat was his + and chose a random seat. Subsequent passengers + took their assigned seat if available, or a + randomly chosen seat if not. When the last + person boards, there is only one seat left. + What is the probability that this was the + seat assigned to the last passenger? + + \vfill + \pagebreak + + \problem{} + Your new neighbor has two children. + Assuming that it is equally likely + for a child to be a boy or a girl, + what is the probability that both + of the neighbor's children are girls? + Does the probability change if you + discover that one of the children + is indeed a girl? If so, how? + + \vfill + + + \problem{} + A bag contains a marble which is either + black or white --- but we don't know which. + We put a white marble into the bag and shake it. + We then draw out a white marble. + What is the probability that the marble + left inside the bag is also white? + + \vfill + + \problem{The Monty Hall Problem} + You are a contestant on a certain game show. + There are three doors. + Behind one door is a brand-new car. + Behind the other two doors are goats. + You are invited to choose one of the doors. + Before opening the selected door, the game show host + opens one of the other two doors, revealing a goat. + You can now either keep your (original) + choice, or switch to the other unopened door. + Which choice gives you a better chance of winning + the car? Does it matter? Explain your answer. + \vfill + +\end{document} \ No newline at end of file diff --git a/src/Intermediate/Probability/meta.toml b/src/Intermediate/Probability/meta.toml new file mode 100644 index 0000000..7d7367b --- /dev/null +++ b/src/Intermediate/Probability/meta.toml @@ -0,0 +1,6 @@ +[metadata] +title = "Probability" + +[publish] +handout = true +solutions = false diff --git a/src/Intermediate/Proof Techniques/main.tex b/src/Intermediate/Proof Techniques/main.tex new file mode 100755 index 0000000..50161c1 --- /dev/null +++ b/src/Intermediate/Proof Techniques/main.tex @@ -0,0 +1,30 @@ +% use [nosolutions] flag to hide solutions. +% use [solutions] flag to show solutions. +\documentclass[ + solutions, + singlenumbering +]{../../../lib/tex/ormc_handout} +\usepackage{../../../lib/tex/macros} + +\usepackage{units} + +\uptitlel{Intermediate} +\uptitler{\smallurl{}} +\title{Proof Techniques} +\subtitle{Prepared by Mark on \today{}} + +% Default \implies is ugly +\let\implies\Rightarrow +\let\rimplies\Leftarrow +\let\iff\Leftrightarrow +\let\notimplies\nRightarrow + +\begin{document} + + \maketitle + + \input{parts/0 intro} + \input{parts/1 contradiction} + \input{parts/2 induction} + +\end{document} \ No newline at end of file diff --git a/src/Intermediate/Proof Techniques/meta.toml b/src/Intermediate/Proof Techniques/meta.toml new file mode 100644 index 0000000..b566c29 --- /dev/null +++ b/src/Intermediate/Proof Techniques/meta.toml @@ -0,0 +1,6 @@ +[metadata] +title = "Proof Techniques" + +[publish] +handout = false +solutions = true diff --git a/src/Intermediate/Proof Techniques/parts/0 intro.tex b/src/Intermediate/Proof Techniques/parts/0 intro.tex new file mode 100644 index 0000000..6744c7a --- /dev/null +++ b/src/Intermediate/Proof Techniques/parts/0 intro.tex @@ -0,0 +1,203 @@ +\section{Introduction} + + +\definition{} +A \textit{proof} is a mathematical argument that irrefutably +demonstrates the truth of a given proposition. + +\vspace{2mm} + +Every proof involves some sort of \textit{implication}, denoted $\implies$. \par +The statement \say{$A$ implies $B$} (written $A \implies B$), means that $B$ is true whenever $A$ is true. + +\problem{} +Which of the following are true? \par +\note{You don't need to provide a proof.} + +\begin{itemize} + \item $x$ is prime $\implies$ $x$ is odd. + \item $x$ is real $\implies$ $x$ is rational. + \item $x$ is odd $\implies$ $x$ is prime. +\end{itemize} + +\vfill + + + +\problem{} +As you saw above, $A \implies B$ does not guarantee that $B \implies A$. \par +Find two new statements $A$ and $B$ so that $A \implies B$ but $B \notimplies A$. \par +\hint{\say{new} as in \say{not from \ref{trueimplies}}} + +\begin{solution} + A fairly trite example is below. \par + Note that \say{$X$ is a square} is a subset of the statement \say{$X$ is a rectangle.} + + \vspace{2mm} + + $X$ is a square $\implies$ $X$ is a rectangle, but $X$ is a rectangle $\notimplies$ $X$ is a square. +\end{solution} + + + +\vfill +\pagebreak + + +\definition{} +As we just saw, implication is one-directional. \par +The statements $A \implies B$ and $B \implies A$ are independent of one another. \par + +\vspace{1mm} + +If both are true, we write $A \iff B$. This can be read as \say{$A$ if and only if $B$.} \par +In text, \say{if and only if} is often abbreviated as iff. \par + +\vspace{1mm} + +Bidirectional implication is the strongest relationship we can have between two statements: \par +If $A \iff B$, $A$ and $B$ are \textit{equivalent.} They are always either both true or both false. + +\definition{} +The \textit{floor} of $x$ is the largest integer $a$ so that $a \leq x$. This is denoted $\lfloor x \rfloor$. \par +The \textit{ceiling} of $x$ is the largest integer $a$ so that $a \geq x$. This is denoted $\lceil x \rceil$. + + +\generic{Property:} +If $b_1 \leq a \leq b_2$ and $b_1 = b_2$, we must have that $b_1 = a = b_2$. \par + +\vspace{1mm} + +Also, if $a \leq b$ and $a \geq b$, we must have that $a = b$. \par +This is a trick we often use when showing that two quantities are equal. + + + + +\problem{} +Although $A \iff B$ looks like a single statement, we often need to prove each direction separately. \par +Show that $x \in \mathbb{Z}$ iff $\lfloor x \rfloor = \lceil x \rceil$ + +\begin{solution} + \textbf{Forwards:} $x \in \mathbb{Z} ~\implies~ \lfloor x \rfloor = \lceil x \rceil$ \par + If $x \in \mathbb{Z}$, by definition we have that $\lfloor x \rfloor = x$ and $\lceil x \rceil = x$ \par + So, $\lfloor x \rfloor = \lceil x \rceil$ + + \vspace{2mm} + + \textbf{Backwards:} $x \in \mathbb{Z} ~\rimplies~ \lfloor x \rfloor = \lceil x \rceil$ \par + Assume that $\lfloor x \rfloor = \lceil x \rceil$, and show that $x$ is an integer. \par + Note that $\lfloor x \rfloor \leq x \leq \lceil x \rceil$ (by definition) \par + Since $\lfloor x \rfloor = \lceil x \rceil$, we must have that $\lfloor x \rfloor = x = \lceil x \rceil$. \par + $\lfloor x \rfloor$ is an integer, so $x$ must be an integer. +\end{solution} + + +\vfill +\pagebreak + +\problem{} +We don't always need to prove each direction of an iff statement separately. \par + +\begin{itemize}[itemsep = 1mm] + \item Convince yourself that we can \say{chain} iffs together: \par + If we show that $A \iff B \iff C \iff D$, do we know that $A \iff D$? + + \item Does this still work if $A \iff B \implies C \iff D$? + + \item Show that $x^2 - 6x - 6 = 3 \iff x = 3$ by building a chain of iffs. \par + \hint{You remember how to factor quadratics, right?} +\end{itemize} + +\begin{solution} + Does this still work if $A \iff B \implies C \iff D$? \par + Of course not. $D \notimplies A$ since $C \notimplies B$. + We can only conclude that $A \implies D$. + + \linehack{} + + $x^2 - 6x - 6 = 3$ \par + $\iff x^2 - 6x - 9 = 0$ \par + $\iff (x-3)^2 = 0$ \par + $\iff x-3 = 0$ \par + $\iff x = 0$ + + Note that this is a well-defined argument. Every step is an iff statement we can rigorously justify. + We're not hand-wavily \say{rearranging} one equation into another, + we're building a chain of implications that eventually bring us to our result. + This is the logic behind most algebraic proofs. +\end{solution} + + +\vfill + +\problem{} +Another trick you may find useful is the \say{implication cycle.} \par +Convince yourself that if $A \implies B \implies C \implies D \implies A$, \par +we can conclude that $A$, $B$, $C$, and $D$ are equivalent. \par +\note{$A \iff B$ means that $A$ and $B$ are equivalent. See \ref{iffdef}.} + +\vfill + +\problem{Bonus} +Use an implication cycle to show that the following definitions of a \textit{squarefree integer} are equivalent. +%\hint{Show that $A \implies B \implies C \implies D \implies A$} +\begin{enumerate} + \item $n^2$ does not divide $q$ for any $n \in \mathbb{Z}^+$, $n \neq 1$ + \item $p^2$ does not divide $q$ for any prime $p$ + \item $q$ is a product of distinct primes + \item $q ~|~ n^k \implies q ~|~ n$ for all $n, k \in \mathbb{Z}^+$ +\end{enumerate} + +\begin{solution} + Assume $q$ has a square factor, so that $q = an^2$ for some $a, n \in \mathbb{Z}^+$ \par + By D, we know that $q ~|~ (an)^2 \implies q ~|~ an$ \par + But $q ~|~ an \implies an^2 ~|~ an$ \par + $\implies n = 1$ + + \vspace{2mm} + + So, $q$ cannot have a square factor that isn`t 1. +\end{solution} + + +\vfill +\pagebreak + +Often enough, proving a statement is simply a matter of \say{definition chasing,} +where we expand the symbols used in the statement we're proving, and then do a bit of +rearranging to arrive at the result we want. + + +\definition{} +Let $n, x \in \mathbb{Z}$. \par +We say \say{$n$ divides $x$} if $x = kn$ for some $k \in \mathbb{Z}$ + +\definition{} +Let $a, b \in \mathbb{Z}$ and $n \in \mathbb{Z}^+$. \par +We say \say{$a$ is congruent to $b$ modulo $n$} (and write $a \equiv_{n} b$) if $n$ divides $a - b$. \par + +\definition{} +Let $a, b \in \mathbb{Z}$. We define $a ~\%~ b$ as the remainder of $a \div b$. + +\problem{} +Let $a, b, n$ be positive integers. \par +Show that $a + b ~\equiv_n (a ~\%~ n) + (b ~\%~ n)$ + +\begin{solution} + $a + b ~\equiv_n (a ~\%~ n) + (b ~\%~ n)$ \par + + \vspace{2mm} + ...can be rewritten as... \par + $n$ divides $a + b - (a ~\%~ n) - (b ~\%~ n)$ \par + + \vspace{2mm} + ...which can be rearranged to... \par + $n$ divides $(a - (a ~\%~ n)) + (b - (b ~\%~ n))$ + + \vspace{2mm} + ...which is clearly true, if you think about the meaning of \say{$n$ divides $x$} and \say{$a ~\%~ b$}. +\end{solution} + +\vfill +\pagebreak \ No newline at end of file diff --git a/src/Intermediate/Proof Techniques/parts/1 contradiction.tex b/src/Intermediate/Proof Techniques/parts/1 contradiction.tex new file mode 100644 index 0000000..7de6416 --- /dev/null +++ b/src/Intermediate/Proof Techniques/parts/1 contradiction.tex @@ -0,0 +1,63 @@ +\section{Proofs by Contradiction} + +\definition{} +A very common proof technique is \textit{proof by contradiction}. +It works as follows: + +\vspace{2mm} + +Say we want to prove a statement $P$. Assume that $P$ is false, and show that this implies a false statement. +In other words, we show that $P$ can't \textit{not} be true. \par +If it's false, we either get a known impossibility ($1 = 2$, pigs fly, et cetera), \par +or we find that (not $P$) $\implies$ (not (not $P$)), which is a contradiction in itself. + + +\problem{} +Show that the set of integers has no maximum using a proof by contradiction. + +\begin{solution} + Assume there is a maximal integer $x$. \par + $x + 1$ is also an integer. \par + $x + 1$ is larger than $x$, which contradicts our original assumption! + + \vspace{2mm} + + This is a \textit{proof by infinite descent}, a special type of proof by contradiction.\par + Such proofs have the following structure: + \begin{itemize} + \item Assume there is a smallest (or largest) object with property $X$. + \item Show that we have an even smaller object that has the same property $X$. + \end{itemize} +\end{solution} + +\vfill + +\definition{} +We say a number $x \in \mathbb{R}$ is \textit{rational} if we can write $x$ as $\nicefrac{p}{q}$, \par +where $p, q$ are integers with no common factors. + +\problem{} +Show that $\sqrt{2}$ is irrational. \par +\hint{Start by chasing definitions. \say{Not irrational} $=$ \say{rational.}} + +\begin{solution} + Suppose $\sqrt{2}$ is rational. Then, there exist $p, q$ so that $\sqrt{2} = \frac{p}{q}$. + + \vspace{2mm} + + Multiply by $q$ and square to find that $2q^2 = p^2$, which implies that $p^2$ is even. \par + This then implies that $p$ is even, \par + which implies that $p^2$ is divisible by 4, \par + which implies that $q^2$ is divisible by 2, \par + and thus we see that $q$ is also even. + + \vspace{2mm} + + $p$ and $q$ are both even, so they cannot be coprime. \par + Therefore, we cannot write $\sqrt{2}$ as $\nicefrac{p}{q}$ for comprime $p, q$, \par + and $\sqrt{2}$ is therefore irrational. +\end{solution} + + +\vfill +\pagebreak \ No newline at end of file diff --git a/src/Intermediate/Proof Techniques/parts/2 induction.tex b/src/Intermediate/Proof Techniques/parts/2 induction.tex new file mode 100644 index 0000000..0528787 --- /dev/null +++ b/src/Intermediate/Proof Techniques/parts/2 induction.tex @@ -0,0 +1,240 @@ +\section{Proofs by Induction} + +\definition{} +The last proof technique we'll discuss in this handout is \textit{induction.} \par +This is particularly useful when we have a \say{countable} variable, usually an integer. \par +Let's say we're proving a statement $A$ for all positive integers $n$. \par +We'll write the special case \say{$A$ holds for $n$} as $A_n$. + +\vspace{2mm} + +A proof by induction consists of two parts: a \textit{base case} and a \textit{inductive step}. \par +The base case is usually fairly simple: we show that our statement holds for $n = 0$. \par +In other words, the base case shows that $A_0$ is true. + +The inductive step is a bit more confusing: we show that if our statement holds for +$n$, it must hold for $n = 1$. In other words, we show that $A_n \implies A_{n + 1}$. + +\vspace{2mm} + +In this way, we build an infinite implication chain: \par +The base case proves that $A_0$. By the inductive step, +$A_0 \implies A_1$, $A_1 \implies A_2$, and so on. \par +We can thus conclude that $A_n$ is true for all $n \in \{0, 1, 2, 3, ...\}$ + +\problem{} +Proof by induction will make a bit more sense with an example. \par +Read and understand the following proof. + +\begin{examplesolution} + Show that $1 + 2 + ... + n = \frac{n(n+1)}{2}$ + + \linehack{} + + \textbf{Base case:} $n = 1$ \par + Substitute $n = 1$ into the hypothesis: + $1 \qe \frac{1(1 + 1)}{2}$ \par + + but we have that + $\frac{1(1 + 1)}{2} = \frac{2}{2} = 1$, + so this is of course true. + + \vspace{2mm} + + \textbf{Inductive step:} \par + Now, we assume our hypothesis is true for $n$, \par + and show it is true for $n + 1$. + + \vspace{2mm} + + Write the hypothesis for $n + 1$: + $$ + 1 + 2 + ... + n + (n + 1) \qe \frac{(n+1)(n+2)}{2} + $$ + We know that $1 + 2 + ... + n = \frac{n(n+1)}{2}$, so: + $$ + 1 + 2 + ... + n + (n + 1) = \frac{n(n+1)}{2} + (n+1) + $$ + now we can complete the proof with some algebra: + $$ + \frac{n(n+1)}{2} + (n+1) = \frac{n(n+1) + 2(n+1)}{2} = \frac{(n + 2)(n+1)}{2} + $$ + So, we've shown that the $n^\text{th}$ case implies the $(n+1)^\text{th}$ case.\par + We're therefore done, the hypothesis is true for $n \in \{1, 2, 3, ...\}$ +\end{examplesolution} + +\vfill +\pagebreak + +\problem{} +Why do we need a base case when constructing a proof by induction? \par +\hint{Try to prove that $n = n + 1$ for all $n \in \mathbb{Z}^+$} + +\begin{solution} + Consider the following example: \par + Say we want to prove that $n = n + 1$ for all $n \in \mathbb{Z}^+$. + + \vspace{2mm} + + \textbf{Inductive step:} + Assume our hypothesis is true for $n$ (that is $n = n + 1$). Is this true for $n + 1$? \par + Adding 1 to both sides, we get $n+1=n+1+1$, which means that $(n+1)=(n+1)+1$, + which is the statement we wanted to prove. We've thus completed the inductive step! + + \vspace{2mm} + + Our problem is as follows: we've shown that $A_1 \implies A_2 \implies ...$, + but we have no reason to believe that $A_1$ is true. If it was, our hypothesis + would be correct---but since it isn't, this is not a complete proof. +\end{solution} + +\vfill + + + +\problem{} +Show that $1^2 + 2^2 + 3^3 + ... + n^2 = \frac{1}{6}(n)(n+1)(2n+1)$. + +\begin{solution} + \textbf{Base case:}\par + $1^2 = \frac{1}{6}(1)(1+1)(2 + 1) = 1$, which is true. + + \vspace{2mm} + + \textbf{Induction:}\par + Assume $1^2 + ... + n^2$ satisfies the equation above. \par + $$ + 1^2 + 2^2 + ... + n^2 + (n+1)^2 = + \frac{(n)(n+1)(2n+1)}{6} + (n + 1)^2 + $$ + which is equal to + $$ + \frac{(n)(n+1)(2n+1) + 6(n+1)^2}{6} + $$ + now expand and factor to get + $$ + \frac{(n+1)(n+2)(2(n+1)+1)}{6} + $$ +\end{solution} + +\vfill + + + +\problem{} +Show that $2^n - 1$ is divisible by 3 for all odd $n$ \par +\hint{If $n$ is odd, the next odd number is $n + 2$.} + +\begin{solution} + \textbf{Base case:} \par + $2^2 - 1 = 3$, which is divisible by 3.. + + \vspace{2mm} + + \textbf{Induction:}\par + Assume $2^n - 1$ is divisible by 3. \par + $2^{(n+2)} - 1 = 4(2^n) - 1 = 4(2^n - 1) + 3$ \par + By our induction hypothesis, $(2^n - 1)$ has a factor of 3. \par + Therefore, $4(2^n - 1) + 3$ must also have a factor of 3. +\end{solution} + +\vfill +\pagebreak + + + + + + + +\definition{} +As you may already know, \say{n choose k} is defined as follows: \par +$$ + \binom{n}{k} = \frac{n!}{k!(n-k)!} +$$ +This counts the number of ways to choose $k$ things from a set of $n$, +disregarding the order of the chosen items. + +\theorem{Pascal's Identity} +The binomial coefficient defined above satisfies the following equality: +$$ + \binom{n+1}{k} = \binom{n}{k-1} \times \binom{n}{k} +$$ + +\problem{} +Using induction, show that +$$ + \binom{n}{0} + \binom{n}{1} + ... + \binom{n}{n} = 2^n. +$$ + + + + + + + + + + +\vfill + +Note that although induction is a powerful proof technique, it usually leads to uninteresting results. \par +If we prove a statement using induction, we conclude that it is true---but we get very little insight on +\textit{why} it is true. + +\vspace{2mm} + +Alternative proofs are take a bit more work than inductive proofs, but they are much more valuable. \par +For example, see the proof of the statement in \ref{binomsum} on the next page. + +\pagebreak + + +\begin{ORMCbox}{Alternative Proof}{ogrape!10!white}{ogrape} + Consider the following problem: \par + How many ways are there to write a number $x$ as an ordered sum of positive integers? \par + \note{ + An \say{ordered sum} means that the order of numbers in the sum matters. \\ + For example, if $x = 5$, we will consider $4 + 1$ and $1 + 4$ as distinct sums. + } + + \vspace{2mm} + + First, we'll think of $x$ as an array of $1$s which we want to group + into positive integers. If $x = 3$, We have $x = 1~1~1$, which we can + group as $1+1+1$,~ $(1+1) + 1$,~ $1 + (1+1)$,~ and $(1+1+1)$. + + + \linehack{} + + \textbf{Solution 1:}\par + One way to solve this is to use the usual \say{stars and bars} method, \par + where we count the number of ways we can place $n$ \say{bars} between + $x$ \say{stars}. Each bar corresponds to a \say{$+$} in the array of ones. \par + \note[Note]{Convince yourself that there are $\binom{x-1}{n}$ ways to place $n$ bars + between $x$ objects.} + + If we add the number of ways to write $x$ as a sum of $n \in \{1, 2, ..., x\}$ integers, we get: + + $$ + \sum_{n = 1}^{x-1} \binom{x-1}{n} = \binom{x-1}{0} + \binom{n}{1} + ... + \binom{x-1}{x-1} + $$ + + + \linehack{} + + \textbf{Solution 2:}\par + We could also observe that there are $x - 1$ places to put a \say{bar} in + the array of ones. This corresponds to $x - 1$ binary positions, and thus + $2^{x-1}$ ways to separate our array of $1$s with bars. + + \linehack{} + + \textbf{Conclusion:}\par + We've found that the number of ways to split $x$ can be written as either + $\sum_{n = 1}^{x-1} \binom{x-1}{n}$ or $2^{x-1}$, + and therefore $\sum_{n = 1}^{x-1} \binom{x-1}{n} = 2^{x-1}$. +\end{ORMCbox} + + +\pagebreak \ No newline at end of file diff --git a/src/Intermediate/Slide Rules/main.tex b/src/Intermediate/Slide Rules/main.tex new file mode 100755 index 0000000..2ea33da --- /dev/null +++ b/src/Intermediate/Slide Rules/main.tex @@ -0,0 +1,81 @@ +% use [nosolutions] flag to hide solutions. +% use [solutions] flag to show solutions. +\documentclass[ + solutions +]{../../../lib/tex/ormc_handout} +\usepackage{../../../lib/tex/macros} + + +\usepackage{pdfpages} +\usepackage{sliderule} +\usepackage{changepage} + +% Args: +% x, top scale y, label +\newcommand{\slideruleind}[3]{ + \draw[ + line width=1mm, + draw=black, + opacity=0.3, + text opacity=1 + ] + ({#1}, {#2 + 1}) + -- + ({#1}, {#2 - 1.1}) + node [below] {#3}; +} + + +\uptitlel{Intermediate 2} +\uptitler{\smallurl{}} +\title{Slide Rules} +\subtitle{Prepared by Mark on \today} + +\begin{document} + + \maketitle + + + \begin{center} + \begin{minipage}{6cm} + Dad says that anyone who can't use + a slide rule is a cultural illiterate + and should not be allowed to vote. + + \vspace{1ex} + + \textit{Have Space Suit --- Will Travel, 1958} + \end{minipage} + \end{center} + \hfill + + \input{parts/0 logarithms.tex} + \input{parts/1 intro.tex} + \input{parts/2 multiplication.tex} + \input{parts/3 division.tex} + \input{parts/4 squares.tex} + \input{parts/5 inverses.tex} + \input{parts/6 log.tex} + + % Make sure the slide rule is on an odd page, + % so that double-sided printing won't require + % students to tear off problems. + \checkoddpage + \ifoddpage\else + \vspace*{\fill} + \begin{center} + { + \Large + \textbf{This page unintentionally left blank.} + } + \end{center} + \vspace{\fill} + \pagebreak + \fi + + \includepdf[ + pages=1, + fitpaper=true + ]{resources/rule.pdf} + +\end{document} \ No newline at end of file diff --git a/src/Intermediate/Slide Rules/meta.toml b/src/Intermediate/Slide Rules/meta.toml new file mode 100644 index 0000000..43d74f7 --- /dev/null +++ b/src/Intermediate/Slide Rules/meta.toml @@ -0,0 +1,6 @@ +[metadata] +title = "Slide Rules" + +[publish] +handout = true +solutions = true diff --git a/src/Intermediate/Slide Rules/parts/0 logarithms.tex b/src/Intermediate/Slide Rules/parts/0 logarithms.tex new file mode 100644 index 0000000..ecf8d18 --- /dev/null +++ b/src/Intermediate/Slide Rules/parts/0 logarithms.tex @@ -0,0 +1,103 @@ +\section{Logarithms} + +\definition{} +The \textit{logarithm} is the inverse of the exponent. That is, if $b^p = c$, then $\log_b{c} = p$. \\ +In other words, $\log_b{c}$ asks the question ``what power do I need to raise $b$ to to get $c$?'' \\ + +\medskip + +In both $b^p$ and $\log_b{c}$, the number $b$ is called the \textit{base}. + + +\problem{} +Evaluate the following by hand: + +\begin{enumerate} + \item $\log_{10}{(1000)}$ + \vfill + \item $\log_2{(64)}$ + \vfill + \item $\log_2{(\frac{1}{4})}$ + \vfill + \item $\log_x{(x)}$ for any $x$ + \vfill + \item $log_x{(1)}$ for any $x$ + \vfill +\end{enumerate} + +\pagebreak + + +\definition{} +There are a few ways to write logarithms: +\begin{itemize} + \item[] $\log{x} = \log_{10}{x}$ + \item[] $\lg{x} = \log_{10}{x}$ + \item[] $\ln{x} = \log_e{x}$ +\end{itemize} + +\definition{} +The \textit{domain} of a function is the set of values it can take as inputs. \\ +The \textit{range} of a function is the set of values it can produce. + +\medskip + +For example, the domain and range of $f(x) = x$ is $\mathbb{R}$, all real numbers. \\ +The domain of $f(x) = |x|$ is $\mathbb{R}$, and its range is $\mathbb{R}^+ \cup \{0\}$, all positive real numbers and 0. \\ + +\medskip + +Note that the domain and range of a function are not always equal. + +\problem{} +What is the domain of $f(x) = 5^x$? \\ +What is the range of $f(x) = 5^x$? +\vfill + +\problem{} +What is the domain of $f(x) = \log{x}$? \\ +What is the range of $f(x) = \log{x}$? +\vfill + +\pagebreak + + +\problem{} +Prove the following identities: \\ + +\begin{enumerate}[itemsep=2mm] + \item $\log_b{(b^x)} = x$ + \item $b^{\log_b{x}} = x$ + \item $\log_b{(xy)} = \log_b{(x)} + \log_b{(y)}$ + \item $\log_b{(\frac{x}{y})} = \log_b{(x)} - \log_b{(y)}$ + \item $\log_b{(x^y)} = y \log_b{(x)}$ +\end{enumerate} + +\vfill + +\begin{instructornote} + A good intro to the following sections is the linear slide rule: + + \begin{center} + \begin{tikzpicture}[scale=1] + \linearscale{2}{1}{} + \linearscale{0}{0}{} + + \slideruleind + {5} + {1} + {2 + 3 = 5} + \end{tikzpicture} + \end{center} + + Take two linear rulers, offset one, and you add. \\ + If you do the same with a log scale, you multiply! \\ + \vspace{1ex} + Note that the slide rules above start at 0. + + \linehack{} + + After assembling the paper slide rule, you can make a visor with some transparent tape. Wrap a strip around the slide rule, sticky side out, and stick it to itself to form a ring. Cover the sticky side with another layer of tape, and trim the edges to make them straight. Use the edge of the visor to read your slide rule! +\end{instructornote} + +\pagebreak \ No newline at end of file diff --git a/src/Intermediate/Slide Rules/parts/1 intro.tex b/src/Intermediate/Slide Rules/parts/1 intro.tex new file mode 100644 index 0000000..54a8eb7 --- /dev/null +++ b/src/Intermediate/Slide Rules/parts/1 intro.tex @@ -0,0 +1,43 @@ +\section{Introduction} + +Mathematicians, physicists, and engineers needed to quickly solve complex equations even before computers were invented. + +\medskip + +The \textit{slide rule} is an instrument that uses the logarithm to solve this problem. Before you continue, cut out and assemble your slide rule. + +\medskip + +There are four scales on your slide rule, each labeled with a letter on the left side: + +\def\sliderulewidth{13} +\begin{center} +\begin{tikzpicture}[scale=1] + \tscale{0}{9}{T} + \kscale{0}{8}{K} + \abscale{0}{7}{A} + + \abscale{0}{5.5}{B} + \ciscale{0}{4.5}{CI} + \cdscale{0}{3.5}{C} + + \cdscale{0}{2}{D} + \lscale{0}{1}{L} + \sscale{0}{0}{S} +\end{tikzpicture} +\end{center} + +Each scale's ``generating function'' is on the right: +\begin{itemize} + \item T: $\tan$ + \item K: $x^3$ + \item A,B: $x^2$ + \item CI: $\frac{1}{x}$ + \item C, D: $x$ + \item L: $\log_{10}(x)$ + \item S: $\sin$ +\end{itemize} + +Once you understand the layout of your slide rule, move on to the next page. + +\pagebreak diff --git a/src/Intermediate/Slide Rules/parts/2 multiplication.tex b/src/Intermediate/Slide Rules/parts/2 multiplication.tex new file mode 100644 index 0000000..da5a7bb --- /dev/null +++ b/src/Intermediate/Slide Rules/parts/2 multiplication.tex @@ -0,0 +1,284 @@ +\section{Multiplication} + +We'll use the C and D scales of your slide rule to multiply. \\ + +Say we want to multiply $2 \times 3$. First, move the \textit{left-hand index} of the C scale over the smaller number, $2$: + +\def\sliderulewidth{10} +\begin{center} +\begin{tikzpicture}[scale=1] + \cdscale{\cdscalefn(2)}{1}{C} + \cdscale{0}{0}{D} +\end{tikzpicture} +\end{center} + +Then we'll find the second number, $3$ on the C scale, and read the D scale under it: + +\begin{center} +\begin{tikzpicture}[scale=1] + \cdscale{\cdscalefn(2)}{1}{C} + \cdscale{0}{0}{D} + + \slideruleind + {\cdscalefn(6)} + {1} + {6} + +\end{tikzpicture} +\end{center} + +Of course, our answer is 6. + +\problem{} +What is $1.15 \times 2.1$? \\ +Use your slide rule. + +\begin{solution} + \begin{center} + \begin{tikzpicture}[scale=1] + \cdscale{\cdscalefn(1.15)}{1}{C} + \cdscale{0}{0}{D} + + \slideruleind + {\cdscalefn(1.15)} + {1} + {1.15} + + \slideruleind + {\cdscalefn(1.15) + \cdscalefn(2.1)} + {1} + {2.415} + + \end{tikzpicture} + \end{center} +\end{solution} + +\vfill + +Note that your answer isn't exact. $1.15 \times 2.1 = 2.415$, but an answer accurate within two decimal places is close enough for most practical applications. \\ + +\pagebreak + +Look at your C and D scales again. They contain every number between 1 and 10, but no more than that. +What should we do if we want to calculate $32 \times 210$? \\ + +\problem{} +Using your slide rule, calculate $32 \times 210$. \\ +%\hint{$32 = 3.2 \times 10^1$} + +\begin{solution} + \begin{center} + \begin{tikzpicture}[scale=1] + \cdscale{\cdscalefn(2.1)}{1}{C} + \cdscale{0}{0}{D} + + \slideruleind + {\cdscalefn(2.1)} + {1} + {2.1} + + \slideruleind + {\cdscalefn(2.1) + \cdscalefn(3.2)} + {1} + {6.72} + + \end{tikzpicture} + \end{center} + + Placing the decimal point correctly is your job. \\ + $10^1 \times 10^2 = 10^3$, so our final answer is $6.72 \times 10^3 = 672$. +\end{solution} + +\vfill + +%This method of writing numbers is called \textit{scientific notation}. In the form $a \times 10^b$, $a$ is called the \textit{mantissa}, and $b$, the \textit{exponent}. \\ + +%You may also see expressions like $4.3\text{e}2$. This is equivalent to $4.3 \times 10^2$, but is more compact. + + +\problem{} +Compute the following: +\begin{enumerate} + \item $1.44 \times 52$ + \item $0.38 \times 1.24$ + \item $\pi \times 2.35$ +\end{enumerate} + +\begin{solution} + \begin{enumerate} + \item $1.44 \times 52 = 74.88$ + \item $0.38 \times 1.24 = 0.4712$ + \item $\pi \times 2.35 = 7.382$ + \end{enumerate} +\end{solution} + +\vfill +\pagebreak + +\problem{} +Note that the numbers on your C and D scales are logarithmically spaced. + +\def\sliderulewidth{13} +\begin{center} +\begin{tikzpicture}[scale=1] + \cdscale{0}{1}{C} + \cdscale{0}{0}{D} +\end{tikzpicture} +\end{center} + +Why does our multiplication procedure work? \\ +%\hint{See \ref{logids}} + +\vfill +\pagebreak + +Now we want to compute $7.2 \times 5.5$: + +\def\sliderulewidth{10} +\begin{center} +\begin{tikzpicture}[scale=0.8] + \cdscale{\cdscalefn(5.5)}{1}{C} + \cdscale{0}{0}{D} + + \slideruleind + {\cdscalefn(5.5)} + {1} + {5.5} + + \slideruleind + {\cdscalefn(5.5) + \cdscalefn(7.2)} + {1} + {???} + +\end{tikzpicture} +\end{center} + +No matter what order we go in, the answer ends up off the scale. There must be another way. \\ + +\medskip + +Look at the far right of your C scale. There's an arrow pointing to the $10$ tick, labeled \textit{right-hand index}. Move it over the \textit{larger} number, $7.2$: + +\begin{center} +\begin{tikzpicture}[scale=1] + \cdscale{\cdscalefn(7.2) - \cdscalefn(10)}{1}{C} + \cdscale{0}{0}{D} + + \slideruleind + {\cdscalefn(7.2)} + {1} + {7.2} + +\end{tikzpicture} +\end{center} + +Now find the smaller number, $5.5$, on the C scale, and read the D scale under it: + +\begin{center} +\begin{tikzpicture}[scale=1] + \cdscale{\cdscalefn(7.2) - \cdscalefn(10)}{1}{C} + \cdscale{0}{0}{D} + + + \slideruleind + {\cdscalefn(7.2)} + {1} + {7.2} + + \slideruleind + {\cdscalefn(3.96)} + {1} + {3.96} + +\end{tikzpicture} +\end{center} + +Our answer should be about $7 \times 5 = 35$, so let's move the decimal point: $5.5 \times 7.2 = 39.6$. We can do this by hand to verify our answer. \\ + +\medskip + +\iftrue + \problem{} + Why does this work? + +\else + Why does this work? \\ + + \medskip + + Consider the following picture, where I've put two D scales next to each other: + + \begin{center} + \begin{tikzpicture}[scale=0.7] + \cdscale{\cdscalefn(7.2) - \cdscalefn(10)}{1}{C} + \cdscale{0}{0}{} + \cdscale{-10}{0}{} + + \draw[ + draw=black, + ] + (0, 0) + -- + (0, -0.3) + node [below] {D}; + + \draw[ + draw=black, + ] + (-10, 0) + -- + (-10, -0.3) + node [below] {D}; + + \slideruleind + {-10 + \cdscalefn(7.2)} + {1} + {7.2} + + \slideruleind + {\cdscalefn(7.2)} + {1} + {7.2} + + \slideruleind + {\cdscalefn(3.96)} + {1} + {3.96} + + \end{tikzpicture} + \end{center} + + \medskip + + The second D scale has been moved to the right by $(\log{10})$, so every value on it is $(\log{10})$ smaller than it should be. + + \medskip + + \medskip + In other words, the answer we get from reverse multiplication is the following: $\log{a} + \log{b} - \log{10}$. \\ + This reduces to $\log{(\frac{a \times b}{10})}$, which explains the misplaced decimal point in $7.2 \times 5.5$. +\fi + +\vfill +\pagebreak + +\problem{} +Compute the following using your slide rule: +\begin{enumerate} + \item $9 \times 8$ + \item $15 \times 35$ + \item $42.1 \times 7.65$ + \item $6.5^2$ +\end{enumerate} + +\begin{solution} + \begin{enumerate} + \item $9 \times 8 = 72$ + \item $15 \times 35 = 525$ + \item $42.1 \times 7.65 = 322.065$ + \item $6.5^2 = 42.25$ + \end{enumerate} +\end{solution} + +\vfill +\pagebreak \ No newline at end of file diff --git a/src/Intermediate/Slide Rules/parts/3 division.tex b/src/Intermediate/Slide Rules/parts/3 division.tex new file mode 100644 index 0000000..193965b --- /dev/null +++ b/src/Intermediate/Slide Rules/parts/3 division.tex @@ -0,0 +1,92 @@ +\section{Division} + +Now that you can multiply, division should be easy. All you need to do is work backwards. \\ +Let's look at our first example again: $3 \times 2 = 6$. + +\medskip + +We can easily see that $6 \div 3 = 2$ + +\begin{center} +\begin{tikzpicture}[scale=1] + \cdscale{\cdscalefn(2)}{1}{C} + \cdscale{0}{0}{D} + + \slideruleind + {\cdscalefn(6)} + {1} + {Align here} + + \slideruleind + {\cdscalefn(2)} + {1} + {2} +\end{tikzpicture} +\end{center} + +and that $6 \div 2 = 3$: +\begin{center} +\begin{tikzpicture}[scale=1] + \cdscale{\cdscalefn(3)}{-3}{C} + \cdscale{0}{-4}{D} + + + \slideruleind + {\cdscalefn(6)} + {-3} + {Align here} + + \slideruleind + {\cdscalefn(3)} + {-3} + {3} + +\end{tikzpicture} +\end{center} + +If your left-hand index is off the scale, read the right-hand one. \\ +Consider $42.25 \div 6.5 = 6.5$: + +\begin{center} +\begin{tikzpicture}[scale=1] + \cdscale{\cdscalefn(6.5) - \cdscalefn(10)}{1}{C} + \cdscale{0}{0}{D} + + + \slideruleind + {\cdscalefn(4.225)} + {1} + {Align here} + + \slideruleind + {\cdscalefn(6.5)} + {1} + {6.5} + +\end{tikzpicture} +\end{center} + +Place your decimal points carefully. + +\vfill +\pagebreak + +\problem{} +Compute the following using your slide rule. \\ + +\begin{enumerate} + \item $135 \div 15$ + \item $68.2 \div 0.575$ + \item $(118 \times 0.51) \div 6.6$ +\end{enumerate} + +\begin{solution} + \begin{enumerate} + \item $135 \div 15 = 9$ + \item $68.2 \div 0.575 = 118.609$ + \item $(118 \times 0.51) \div 6.6 = 9.118$ + \end{enumerate} +\end{solution} + +\vfill +\pagebreak \ No newline at end of file diff --git a/src/Intermediate/Slide Rules/parts/4 squares.tex b/src/Intermediate/Slide Rules/parts/4 squares.tex new file mode 100644 index 0000000..6887bf2 --- /dev/null +++ b/src/Intermediate/Slide Rules/parts/4 squares.tex @@ -0,0 +1,62 @@ +\section{Squares, Cubes, and Roots} + +Now, take a look at scales A and B, and note the label on the right: $x^2$. If C, D are $x$, A and B are $x^2$, and K is $x^3$. + +\medskip + +Finding squares of numbers up to ten is straightforward: just read the scale. \\ +Square roots are also easy: find your number on B and read its pair on C. \\ + + +\def\sliderulewidth{13} +\begin{center} +\begin{tikzpicture}[scale=1] + \abscale{0}{1}{B} + \cdscale{0}{0}{C} +\end{tikzpicture} +\end{center} + +\problem{} +Compute the following. +\begin{enumerate} + \item $1.5^2$ + \item $3.1^2$ + \item $7^3$ + \item $\sqrt{14}$ + \item $\sqrt[3]{150}$ +\end{enumerate} + +\begin{solution} + \begin{enumerate} + \item $1.5^2 = 2.25$ + \item $3.1^2 = 9.61$ + \item $7^3 = 343$ + \item $\sqrt{14} = 3.74$ + \item $\sqrt[3]{150} = 5.313$ + \end{enumerate} +\end{solution} + +\vfill +\problem{} +Compute the following. +\begin{enumerate} + \item $42^2$ + \item $\sqrt{200}$ + \item $\sqrt{2000}$ + \item $\sqrt{0.9}$ + \item $\sqrt[3]{0.12}$ +\end{enumerate} + +\begin{solution} + \begin{enumerate} + \item $42^2 = 1,764$ + \item $\sqrt{200} = 14.14$ + \item $\sqrt{2000} = 44.72$ + \item $\sqrt{0.9} = 0.948$ + \item $\sqrt[3]{0.12} = 0.493$ + \end{enumerate} +\end{solution} + + +\vfill +\pagebreak \ No newline at end of file diff --git a/src/Intermediate/Slide Rules/parts/5 inverses.tex b/src/Intermediate/Slide Rules/parts/5 inverses.tex new file mode 100644 index 0000000..fdb3554 --- /dev/null +++ b/src/Intermediate/Slide Rules/parts/5 inverses.tex @@ -0,0 +1,19 @@ +\section{Inverses} + +Try finding $1 \div 32$ using your slide rule. \\ +The procedure we learned before doesn't work! + +\medskip + +This is why we have the CI scale, or the ``C Inverse'' scale. + +\problem{} +Figure out how the CI scale works and compute the following: +\begin{enumerate}[itemsep=1mm] + \item $\frac{1}{7}$ + \item $\frac{1}{120}$ + \item $\frac{1}{\pi}$ +\end{enumerate} + +\vfill +\pagebreak \ No newline at end of file diff --git a/src/Intermediate/Slide Rules/parts/6 log.tex b/src/Intermediate/Slide Rules/parts/6 log.tex new file mode 100644 index 0000000..6282882 --- /dev/null +++ b/src/Intermediate/Slide Rules/parts/6 log.tex @@ -0,0 +1,105 @@ +\section{Logarithms Base 10} + +When we take a logarithm, the resulting number has two parts: the \textit{characteristic} and the \textit{mantissa}. \\ +The characteristic is the integral (whole-numbered) part of the answer, and the mantissa is the fractional part (what comes after the decimal). \\ + +\medskip + +For example, $\log_{10}{18} = 1.255$, so in this case the characteristic is $1$ and the mantissa is $0.255$. + +\problem{} +Approximate the following logs without a slide rule. Find the exact characteristic, and approximate the mantissa. +\begin{enumerate} + \item $\log_{10}{20}$ + \item $\log_{2}{18}$ +\end{enumerate} + +\begin{solution} + \begin{enumerate} + \item $\log_{10}{20} = 1.30$ + \item $\log_{2}{18} = 4.17$ + \end{enumerate} +\end{solution} + +\vfill + +Now, find the L scale on your slide rule. As you can see on the right, its generating function is $\log_{10}{x}$. + +\problem{} +Compute the following logarithms using your slide rule. \\ +You'll have to find the characteristic yourself, but your L scale will give you the mantissa. \\ +Don't forget your log identities! + +\begin{enumerate} + \item $\log_{10}{20}$ + \item $\log_{10}{15}$ + \item $\log_{10}{150}$ + \item $\log_{10}{0.024}$ +\end{enumerate} + +\begin{solution} + Careful with number 4. + + \begin{enumerate} + \item $\log_{10}{20} = 1.30$ + \item $\log_{10}{15} = 1.176$ + \item $\log_{10}{150} = 2.176$ + \item $\log_{10}{0.024} = -1.6197$ + \end{enumerate} +\end{solution} + +\vfill +\pagebreak + +%\problem{} +%Find the following. +%\begin{enumerate}[itemsep=2mm] +% \item $\frac{118 \times 0.51}{6.6}$ +% \item $\sqrt{33.8} \times \sqrt[3]{226}$ +% \item $\frac{\sqrt{152}}{\sqrt[3]{4.95}}$ +% \item $\frac{\sqrt{96 \times 250}}{\sqrt{7 \times 0.88}}$ +% \item The area of a circle with radius $1.47$ +% \item The circumference of a circle with radius $31.4$ +% \item The radius of a circle with area $6\pi$ +% \item $\log_{10}{17.38}$ +%\end{enumerate} +%\vfill +%\pagebreak + +\section{Logarithms in Any Base} + +Our slide rule easily computes logarithms in base 10, but we can also use it to find logarithms in \textit{any} base. + +\proposition{} +This is usually called the \textit{change-of-base} formula: + +\[ + \log_{b}{a} = \frac{\log_c{a}}{\log_c{b}} +\] + +\problem{} +Using log identities, prove \ref{logcob}. + +\vfill + +\problem{} +Approximate the following: +\begin{enumerate} + \item $\log_{2}{56}$ + \item $\log_{5.2}{26}$ + \item $\log_{12}{500}$ + \item $\log_{43}{134}$ +\end{enumerate} + +\begin{solution} + \begin{enumerate} + \item $\log_{2}{56} = 5.81$ + \item $\log_{5.2}{26} = 1.97$ + \item $\log_{12}{500} = 2.50$ + \item $\log_{43}{134} = 1.30$ + \end{enumerate} +\end{solution} + + +\vfill +\pagebreak \ No newline at end of file diff --git a/src/Intermediate/Slide Rules/resources/rule.svg b/src/Intermediate/Slide Rules/resources/rule.svg new file mode 100755 index 0000000..9506a6d --- /dev/null +++ b/src/Intermediate/Slide Rules/resources/rule.svg @@ -0,0 +1,24144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Intermediate/Slide Rules/sliderule.sty b/src/Intermediate/Slide Rules/sliderule.sty new file mode 100755 index 0000000..13e3995 --- /dev/null +++ b/src/Intermediate/Slide Rules/sliderule.sty @@ -0,0 +1,534 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{sliderule}[2022/08/22 Slide rule tools] + +\RequirePackage{tikz} +\RequirePackage{ifthen} + + +% Scale functions: +% See https://sliderulemuseum.com/SR_Scales.htm +% +% l: length of the rule +% n: the number on the rule +% +% A/B: (l/2) * log(n) +% C/D: l / log(n) +% CI: abs(l * log(10 / n) - l) +% K: (l/3) * log(n) +% +% L: n * l +% T: l * log(10 * tan(n)) +% S: l * log(10 * sin(n)) + +\def\sliderulewidth{10} + +\def\abscalefn(#1){(\sliderulewidth/2) * log10(#1)} +\def\cdscalefn(#1){(\sliderulewidth * log10(#1))} +\def\ciscalefn(#1){(\sliderulewidth - \cdscalefn(#1))} +\def\kscalefn(#1){(\sliderulewidth/3) * log10(#1)} +\def\lscalefn(#1){(\sliderulewidth * #1)} +\def\tscalefn(#1){(\sliderulewidth * log10(10 * tan(#1)))} +\def\sscalefn(#1){(\sliderulewidth * log10(10 * sin(#1)))} + + +% Arguments: +% Label +% x of start +% y of start +\newcommand{\linearscale}[3]{ + \draw[black] ({#1}, #2) -- ({#1 + \sliderulewidth}, #2); + \draw[black] ({#1}, #2 + 0.9) -- ({#1 + \sliderulewidth}, #2 + 0.9); + \draw[black] ({#1}, #2 + 0.9) -- ({#1}, #2 + 0.7); + \draw[black] ({#1 + \sliderulewidth}, #2 + 0.9) -- ({#1 + \sliderulewidth}, #2 + 0.7); + + \draw ({#1 - 0.1}, #2 + 0.5) node[left] {#3}; + + % Numbers and marks + \foreach \i in {0,..., 10}{ + \draw[black] + ({#1 + (\sliderulewidth / 10) * \i}, #2) -- + ({#1 + (\sliderulewidth / 10) * \i}, #2 + 0.3) + node[above] {\i}; + } + + % Submarks + \foreach \n in {0, ..., 9} { + \foreach \i in {1,..., 9} { + \ifthenelse{\i=5}{ + \draw[black] + ({#1 + (\sliderulewidth / 10) * (\n + \i / 10)}, #2) -- + ({#1 + (\sliderulewidth / 10) * (\n + \i / 10)}, #2 + 0.2); + } { + \draw[black] + ({#1 + (\sliderulewidth / 10) * (\n + \i / 10)}, #2) -- + ({#1 + (\sliderulewidth / 10) * (\n + \i / 10)}, #2 + 0.1); + } + } + } +} + + +% Arguments: +% Label +% x of start +% y of start +\newcommand{\abscale}[3]{ + \draw[black] ({#1}, #2) -- ({#1 + \sliderulewidth}, #2); + \draw[black] ({#1}, #2 + 0.9) -- ({#1 + \sliderulewidth}, #2 + 0.9); + \draw[black] ({#1}, #2 + 0.9) -- ({#1}, #2 + 0.7); + \draw[black] ({#1 + \sliderulewidth}, #2 + 0.9) -- ({#1 + \sliderulewidth}, #2 + 0.7); + + + \draw ({#1 - 0.1}, #2 + 0.5) node[left] {#3}; + + % Numbers and marks 1 - 9 + \foreach \i in {1,..., 9}{ + \draw[black] + ({#1 + \abscalefn(\i)}, #2) -- + ({#1 + \abscalefn(\i)}, #2 + 0.3) + node[above] {\i}; + } + % Numbers and marks 10 - 100 + \foreach \i in {1,..., 10}{ + \draw[black] + ({#1 + \abscalefn(10 * \i)}, #2) -- + ({#1 + \abscalefn(10 * \i)}, #2 + 0.3) + node[above] {\ifthenelse{\i=10}{1}{\i}}; + } + + % Submarks 1 - 9 + \foreach \n in {1, ..., 9} { + \ifthenelse{\n<5}{ + \foreach \i in {1,..., 9} + } { + \foreach \i in {2,4,6,8} + } + { + \ifthenelse{\i=5}{ + \draw[black] + ({#1 + \abscalefn(\n + \i / 10)}, #2) -- + ({#1 + \abscalefn(\n + \i / 10)}, #2 + 0.2); + } { + \draw[black] + ({#1 + \abscalefn(\n + \i / 10)}, #2) -- + ({#1 + \abscalefn(\n + \i / 10)}, #2 + 0.1); + } + } + } + + % Submarks 10 - 100 + \foreach \n in {10,20,...,90} { + \ifthenelse{\n<50}{ + \foreach \i in {1,..., 9} + } { + \foreach \i in {2,4,6,8} + } + { + \ifthenelse{\i=5}{ + \draw[black] + ({#1 + \abscalefn(\n + \i)}, #2) -- + ({#1 + \abscalefn(\n + \i)}, #2 + 0.2); + } { + \draw[black] + ({#1 + \abscalefn(\n + \i)}, #2) -- + ({#1 + \abscalefn(\n + \i)}, #2 + 0.1); + } + } + } +} + +\newcommand{\cdscale}[3]{ + \draw[black] ({#1}, #2) -- ({#1 + \sliderulewidth}, #2); + \draw[black] ({#1}, #2 + 0.9) -- ({#1 + \sliderulewidth}, #2 + 0.9); + \draw[black] ({#1}, #2 + 0.9) -- ({#1}, #2 + 0.7); + \draw[black] ({#1 + \sliderulewidth}, #2 + 0.9) -- ({#1 + \sliderulewidth}, #2 + 0.7); + + + \draw ({#1 - 0.1}, #2 + 0.5) node[left] {#3}; + + % Numbers and marks 1 - 10 + \foreach \i in {1,..., 10}{ + \draw[black] + ({#1 + \cdscalefn(\i)}, #2) -- + ({#1 + \cdscalefn(\i)}, #2 + 0.3) + node[above] {\ifthenelse{\i=10}{1}{\i}}; + } + + % Submarks 1 - 9 + \foreach \n in {1, ..., 9} { + \ifthenelse{\n<3}{ + \foreach \i in {5,10,...,95} + } { + \foreach \i in {10,20,...,90} + } + { + \ifthenelse{\i=50}{ + \draw[black] + ({#1 + \cdscalefn(\n + \i / 100)}, #2) -- + ({#1 + \cdscalefn(\n + \i / 100)}, #2 + 0.2); + \ifthenelse{\n=1}{ + \draw + ({#1 + \cdscalefn(\n + \i / 100)}, #2 + 0.2) + node [above] {1.5}; + }{} + } { + \ifthenelse{ + \i=10 \OR \i=20 \OR \i=30 \OR \i=40 \OR + \i=60 \OR \i=70 \OR \i=80 \OR \i=90 + }{ + \draw[black] + ({#1 + \cdscalefn(\n + \i / 100)}, #2) -- + ({#1 + \cdscalefn(\n + \i / 100)}, #2 + 0.15); + } { + \draw[black] + ({#1 + \cdscalefn(\n + \i / 100)}, #2) -- + ({#1 + \cdscalefn(\n + \i / 100)}, #2 + 0.1); + } + } + } + } +} + +\newcommand{\ciscale}[3]{ + \draw[black] ({#1}, #2) -- ({#1 + \sliderulewidth}, #2); + \draw[black] ({#1}, #2 + 0.9) -- ({#1 + \sliderulewidth}, #2 + 0.9); + \draw[black] ({#1}, #2 + 0.9) -- ({#1}, #2 + 0.7); + \draw[black] ({#1 + \sliderulewidth}, #2 + 0.9) -- ({#1 + \sliderulewidth}, #2 + 0.7); + + + \draw ({#1 - 0.1}, #2 + 0.5) node[left] {#3}; + + % Numbers and marks + \foreach \i in {1,...,10}{ + \draw[black] + ({#1 + \ciscalefn(\i)}, #2) -- + ({#1 + \ciscalefn(\i)}, #2 + 0.3) + node[above] {\ifthenelse{\i=10}{1}{\ifthenelse{\i=0}{0}{.\i}}}; + } + + % Submarks 1 - 9 + \foreach \n in {1, ..., 9} { + \ifthenelse{\n<3}{ + \foreach \i in {5,10,...,95} + } { + \foreach \i in {10,20,...,90} + } + { + \ifthenelse{\i=50}{ + \draw[black] + ({#1 + \ciscalefn(\n + \i / 100)}, #2) -- + ({#1 + \ciscalefn(\n + \i / 100)}, #2 + 0.2); + \ifthenelse{\n=1}{ + \draw + ({#1 + \ciscalefn(\n + \i / 100)}, #2 + 0.2) + node [above] {1.5}; + }{} + } { + \ifthenelse{ + \i=10 \OR \i=20 \OR \i=30 \OR \i=40 \OR + \i=60 \OR \i=70 \OR \i=80 \OR \i=90 + }{ + \draw[black] + ({#1 + \ciscalefn(\n + \i / 100)}, #2) -- + ({#1 + \ciscalefn(\n + \i / 100)}, #2 + 0.15); + } { + \draw[black] + ({#1 + \ciscalefn(\n + \i / 100)}, #2) -- + ({#1 + \ciscalefn(\n + \i / 100)}, #2 + 0.1); + } + } + } + } +} + +\newcommand{\kscale}[3]{ + \draw[black] ({#1}, #2) -- ({#1 + \sliderulewidth}, #2); + \draw[black] ({#1}, #2 + 0.9) -- ({#1 + \sliderulewidth}, #2 + 0.9); + \draw[black] ({#1}, #2 + 0.9) -- ({#1}, #2 + 0.7); + \draw[black] ({#1 + \sliderulewidth}, #2 + 0.9) -- ({#1 + \sliderulewidth}, #2 + 0.7); + + + \draw ({#1 - 0.1}, #2 + 0.5) node[left] {#3}; + + % Numbers and marks 1 - 9 + \foreach \i in {1,...,9}{ + \draw[black] + ({#1 + \kscalefn(\i)}, #2) -- + ({#1 + \kscalefn(\i)}, #2 + 0.3) + node[above] {\i}; + } + % Numbers and marks 10 - 90 + \foreach \i in {1,..., 9}{ + \draw[black] + ({#1 + \kscalefn(10 * \i)}, #2) -- + ({#1 + \kscalefn(10 * \i)}, #2 + 0.3) + node[above] {\ifthenelse{\i=10}{1}{\i}}; + } + % Numbers and marks 100 - 1000 + \foreach \i in {1,..., 10}{ + \draw[black] + ({#1 + \kscalefn(100 * \i)}, #2) -- + ({#1 + \kscalefn(100 * \i)}, #2 + 0.3) + node[above] {\ifthenelse{\i=10}{1}{\i}}; + } + + % Submarks 1 - 9 + \foreach \n in {1, ..., 9} { + \ifthenelse{\n<4}{ + \foreach \i in {1,..., 9} + } { + \foreach \i in {2,4,6,8} + } + { + \ifthenelse{\i=5}{ + \draw[black] + ({#1 + \kscalefn(\n + \i / 10)}, #2) -- + ({#1 + \kscalefn(\n + \i / 10)}, #2 + 0.2); + } { + \draw[black] + ({#1 + \kscalefn(\n + \i / 10)}, #2) -- + ({#1 + \kscalefn(\n + \i / 10)}, #2 + 0.1); + } + } + } + + % Submarks 10 - 90 + \foreach \n in {10,20,...,90} { + \ifthenelse{\n<40}{ + \foreach \i in {1,..., 9} + } { + \foreach \i in {2,4,6,8} + } + { + \ifthenelse{\i=5}{ + \draw[black] + ({#1 + \kscalefn(\n + \i)}, #2) -- + ({#1 + \kscalefn(\n + \i)}, #2 + 0.2); + } { + \draw[black] + ({#1 + \kscalefn(\n + \i)}, #2) -- + ({#1 + \kscalefn(\n + \i)}, #2 + 0.1); + } + } + } + + % Submarks 100 - 1000 + \foreach \n in {100,200,...,900} { + \ifthenelse{\n<400}{ + \foreach \i in {10,20,...,90} + } { + \foreach \i in {20,40,60,80} + } + { + \ifthenelse{\i=50}{ + \draw[black] + ({#1 + \kscalefn(\n + \i)}, #2) -- + ({#1 + \kscalefn(\n + \i)}, #2 + 0.2); + } { + \draw[black] + ({#1 + \kscalefn(\n + \i)}, #2) -- + ({#1 + \kscalefn(\n + \i)}, #2 + 0.1); + } + } + } +} + +\newcommand{\lscale}[3]{ + \draw[black] ({#1}, #2) -- ({#1 + \sliderulewidth}, #2); + \draw[black] ({#1}, #2 + 0.9) -- ({#1 + \sliderulewidth}, #2 + 0.9); + \draw[black] ({#1}, #2 + 0.9) -- ({#1}, #2 + 0.7); + \draw[black] ({#1 + \sliderulewidth}, #2 + 0.9) -- ({#1 + \sliderulewidth}, #2 + 0.7); + + + \draw ({#1 - 0.1}, #2 + 0.5) node[left] {#3}; + + % Numbers and marks + \foreach \i in {0,..., 10}{ + \draw[black] + ({#1 + \lscalefn(\i / 10)}, #2) -- + ({#1 + \lscalefn(\i / 10)}, #2 + 0.3) + node[above] {\ifthenelse{\i=10}{1}{\ifthenelse{\i=0}{0}{.\i}}}; + } + + % Submarks + \foreach \n in {0, ..., 9} { + \foreach \i in {1,...,19} { + \ifthenelse{\i=10}{ + \draw[black] + ({#1 + \lscalefn((\n + (\i / 20))/10)}, #2) -- + ({#1 + \lscalefn((\n + (\i / 20))/10)}, #2 + 0.2); + } { + \ifthenelse{ + \i=1 \OR \i=3 \OR \i=5 \OR \i=7 \OR + \i=9 \OR \i=11 \OR \i=13 \OR \i=15 \OR + \i=17 \OR \i=19 + }{ + \draw[black] + ({#1 + \lscalefn((\n + (\i / 20))/10)}, #2) -- + ({#1 + \lscalefn((\n + (\i / 20))/10)}, #2 + 0.1); + } { + \draw[black] + ({#1 + \lscalefn((\n + (\i / 20))/10)}, #2) -- + ({#1 + \lscalefn((\n + (\i / 20))/10)}, #2 + 0.15); + } + } + } + } +} + +\newcommand{\tscale}[3]{ + \draw[black] ({#1}, #2) -- ({#1 + \sliderulewidth}, #2); + \draw[black] ({#1}, #2 + 0.9) -- ({#1 + \sliderulewidth}, #2 + 0.9); + \draw[black] ({#1}, #2 + 0.9) -- ({#1}, #2 + 0.7); + \draw[black] ({#1 + \sliderulewidth}, #2 + 0.9) -- ({#1 + \sliderulewidth}, #2 + 0.7); + + % First line + \draw[black] ({#1}, #2) -- ({#1}, #2 + 0.2); + + + \draw ({#1 - 0.1}, #2 + 0.5) node[left] {#3}; + + % Numbers and marks 6 - 10 + \foreach \i in {6,...,9,10,15,...,45}{ + \draw[black] + ({#1 + \tscalefn(\i)}, #2) -- + ({#1 + \tscalefn(\i)}, #2 + 0.3) + node[above] {\i}; + } + + % Submarks 6 - 10 + \foreach \n in {6, ..., 9} { + \foreach \i in {1,...,9}{ + \ifthenelse{\i=5}{ + \draw[black] + ({#1 + \tscalefn(\n + \i / 10)}, #2) -- + ({#1 + \tscalefn(\n + \i / 10)}, #2 + 0.2); + } { + \draw[black] + ({#1 + \tscalefn(\n + \i / 10)}, #2) -- + ({#1 + \tscalefn(\n + \i / 10)}, #2 + 0.1); + } + } + } + + % Submarks 15 - 45 + \foreach \n in {10, 15, ..., 40} { + \foreach \i in {1,...,24}{ + \ifthenelse{ + \i=5 \OR \i=10 \OR \i=15 \OR \i=20 + } { + \draw[black] + ({#1 + \tscalefn(\n + \i / 5)}, #2) -- + ({#1 + \tscalefn(\n + \i / 5)}, #2 + 0.2); + } { + \draw[black] + ({#1 + \tscalefn(\n + \i / 5)}, #2) -- + ({#1 + \tscalefn(\n + \i / 5)}, #2 + 0.1); + } + } + } +} + +\newcommand{\sscale}[3]{ + \draw[black] ({#1}, #2) -- ({#1 + \sliderulewidth}, #2); + \draw[black] ({#1}, #2 + 0.9) -- ({#1 + \sliderulewidth}, #2 + 0.9); + \draw[black] ({#1}, #2 + 0.9) -- ({#1}, #2 + 0.7); + \draw[black] ({#1 + \sliderulewidth}, #2 + 0.9) -- ({#1 + \sliderulewidth}, #2 + 0.7); + + % First line + \draw[black] ({#1}, #2) -- ({#1}, #2 + 0.2); + + + \draw ({#1 - 0.1}, #2 + 0.5) node[left] {#3}; + + % Numbers and marks + \foreach \i in {6,...,9,10,15,...,30,40,50,...,60,90}{ + \draw[black] + ({#1 + \sscalefn(\i)}, #2) -- + ({#1 + \sscalefn(\i)}, #2 + 0.3) + node[above] {\i}; + } + + % Submarks 6 - 10 + \foreach \n in {6, ..., 9} { + \foreach \i in {1,...,9}{ + \ifthenelse{\i=5}{ + \draw[black] + ({#1 + \sscalefn(\n + \i / 10)}, #2) -- + ({#1 + \sscalefn(\n + \i / 10)}, #2 + 0.2); + } { + \draw[black] + ({#1 + \sscalefn(\n + \i / 10)}, #2) -- + ({#1 + \sscalefn(\n + \i / 10)}, #2 + 0.1); + } + } + } + + % Submarks 15 - 30 + \foreach \n in {10, 15, ..., 25} { + \foreach \i in {1,...,24}{ + \ifthenelse{ + \i=5 \OR \i=10 \OR \i=15 \OR \i=20 + } { + \draw[black] + ({#1 + \sscalefn(\n + \i / 5)}, #2) -- + ({#1 + \sscalefn(\n + \i / 5)}, #2 + 0.2); + } { + \draw[black] + ({#1 + \sscalefn(\n + \i / 5)}, #2) -- + ({#1 + \sscalefn(\n + \i / 5)}, #2 + 0.1); + } + } + } + + % Submarks 30 + \foreach \n in {30} { + \foreach \i in {1,...,19}{ + \ifthenelse{ + \i=2 \OR \i=4 \OR \i=6 \OR \i=8 \OR + \i=10 \OR \i=12 \OR \i=14 \OR \i=16 \OR + \i=18 + } { + \draw[black] + ({#1 + \sscalefn(\n + \i / 2)}, #2) -- + ({#1 + \sscalefn(\n + \i / 2)}, #2 + 0.2); + } { + \draw[black] + ({#1 + \sscalefn(\n + \i / 2)}, #2) -- + ({#1 + \sscalefn(\n + \i / 2)}, #2 + 0.1); + } + } + } + + % Submarks 40 - 50 + \foreach \n in {40, 50} { + \foreach \i in {1,...,9}{ + \ifthenelse{ + \i=5 \OR \i=10 \OR \i=15 \OR \i=20 + } { + \draw[black] + ({#1 + \sscalefn(\n + \i)}, #2) -- + ({#1 + \sscalefn(\n + \i)}, #2 + 0.2); + } { + \draw[black] + ({#1 + \sscalefn(\n + \i)}, #2) -- + ({#1 + \sscalefn(\n + \i)}, #2 + 0.1); + } + } + } + + % Submarks 60 + \foreach \i in {1,...,10}{ + \ifthenelse{ + \i=5 \OR \i=10 + } { + \draw[black] + ({#1 + \sscalefn(60 + \i * 2)}, #2) -- + ({#1 + \sscalefn(60 + \i * 2)}, #2 + 0.2); + } { + \draw[black] + ({#1 + \sscalefn(60 + \i * 2)}, #2) -- + ({#1 + \sscalefn(60 + \i * 2)}, #2 + 0.1); + } + } +} diff --git a/src/Intermediate/Vectors 1/main.tex b/src/Intermediate/Vectors 1/main.tex new file mode 100755 index 0000000..f112369 --- /dev/null +++ b/src/Intermediate/Vectors 1/main.tex @@ -0,0 +1,491 @@ +% use [nosolutions] flag to hide solutions. +% use [solutions] flag to show solutions. +\documentclass[solutions]{../../../lib/tex/ormc_handout} +\usepackage{adjustbox} +\usepackage{../../../lib/tex/macros} + + +\uptitlel{Intermediate 2} +\uptitler{\smallurl{}} +\title{Vectors 1} +\subtitle{ + Prepared by Mark on \today \\ + Based on a handout by Oleg Gleizer +} + +\begin{document} + + \maketitle + + \section{Warm-Up} + + \problem{} + Simplify the following fraction: \\ + + $\displaystyle{ + \frac{ + \displaystyle{\frac12} + }{ + \phantom{..} + \displaystyle{\frac13} - + \displaystyle{\frac14} + \phantom{..} + } + } =$ + \vfill + + \problem{} + Simplify the following fraction: \\ + $\displaystyle{ + \frac{ + \displaystyle{\frac{a}{b}} - + \displaystyle{\frac{c}{d}} + }{ + \phantom{..} + \displaystyle{\frac{a}{d}} + + \displaystyle{\frac{c}{b}} + \phantom{..} + } + } =$ + \vfill + + + \problem{} + The point $A$ is placed inside a circle. + + \begin{center} \begin{normalsize} + \begin{tikzpicture} + \draw (0,0) circle (2cm); + \filldraw (40:1.2cm) circle (2pt); + \coordinate [label = left: {$A$}] (a) at (40:1.2cm); + \filldraw (0,0) circle (2pt); + \end{tikzpicture} + \end{normalsize} \end{center} + + Cut the circle into two parts so that you can move one to make a circle centered at $A$. + + \vfill + \pagebreak + + \section{Vectors} + + \definition{} + A vector in the Euclidean plane is a directed line segment. + \begin{center} + \begin{tikzpicture} + \begin{normalsize} + \draw [->, line width = 2pt] (0,0) -- (4,-2); + \coordinate [label = left: {$A$}] (a) at (0,0); + \coordinate [label = right: {$B$}] (b) at (4,-2); + \coordinate [label = above: {$v$}] (v) at (2,-.9); + \end{normalsize} + \coordinate [label = left: + {$v = \overrightarrow{AB}$}] (c) at (10,-1); + \end{tikzpicture} + \end{center} + \vspace{30pt} + + For the vector $v = \overrightarrow{AB}$, point $A$ is called {\it initial} and point $B$ is called {\it terminal}. \\ + Two vectors, $v = \overrightarrow{AB}$ and $w = \overrightarrow{CD}$ are considered equivalent if the quadrilateral $ABDC$ is a parallelogram. + \vspace{20pt} + + \begin{center} + \begin{tikzpicture} + \begin{normalsize} + \draw [->, line width = 2pt] (0,0) -- (4,-2); + \coordinate [label = left: {$A$}] (a) at (0,0); + \coordinate [label = right: {$B$}] (b) at (4,-2); + \coordinate [label = above: {$v$}] (v) at (2,-.9); + \draw [->, line width = 2pt] (-1,-3) -- (3,-5); + \coordinate [label = left: {$C$}] (c) at (-1,-3); + \coordinate [label = right: {$D$}] (d) at (3,-5); + \coordinate [label = below: {$w$}] (w) at (1,-4.1); + \draw (-1,-3) -- (0,0); + \draw (3,-5) -- (4,-2); + \end{normalsize} + \end{tikzpicture} + \end{center} + \vspace{20pt} + + In other words, two vectors are equivalent if they have the same length and direction. If this is the case, we write $v = w$. + + \note[Note 1]{ + Convince yourself that this is true. Why are these two definitions of vector equivalence interchangeable? + } + + \note[Note 2]{ + A vector is characterized by its direction and length. One cannot make a formal definition out of this observation, because a ``direction'' is formally defined in terms of a vector. + } + + \vfill + \pagebreak + + \theorem{} + If two distinct straight lines in the Euclidean plane form the angles of equal size with a third straight line in the plane, then they are parallel. + + In other words, to check that the lines $a$ and $b$ on the picture below have no common point, you don't need to travel to infinity. + All you need to do is to measure the angles $\alpha$ and $\gamma$. If $\alpha = \gamma$, then $a$ is parallel to $b$. \\ + + \begin{center} + \begin{footnotesize} + \begin{tikzpicture} + \draw [line width=1pt] (-5,0) -- (5,0); + \draw [line width=1pt] (-4,-2) -- (2,4); + \draw[blue] (-1,0) arc (0:45:1); + \coordinate [label=right:{$\gamma$}] (g) at (-1.1,0.5); + \draw [line width=1pt] (-5,2) -- (5,2); + \draw[blue] (1,2) arc (0:45:1); + \coordinate [label=right:{$\alpha$}] (a) at (0.9,2.5); + \coordinate [label=right:{$b$}] (b) at (5,2); + \coordinate [label=right:{$a$}] (a) at (5,0); + \coordinate [label=right:{$c$}] (c) at (2,4); + \end{tikzpicture} + \end{footnotesize} + \end{center} + + \vfill + + \theorem{Euclid's 5th postulate:} + For any straight line in the (Euclidean) plane and for any point away from it, there exists a unique straight line that passes through the point and is parallel to the original line. \\ + + \begin{center} + \begin{footnotesize} + \begin{tikzpicture} + \draw [line width=1pt] (-6,0) -- (6,0); + \filldraw [black] (3,2) circle (2pt); + \draw [line width=1pt] (-6,2) -- (6,2); + \end{tikzpicture} + \end{footnotesize} + \end{center} + + \vfill + + \problem{} + Use a compass and a ruler to draw a straight line parallel to the one given below and passing through the given point not lying on the original straight line. + + \begin{center} + \begin{footnotesize} + \begin{tikzpicture} + \draw [line width=1pt] (-6,0) -- (6,0); + \filldraw [black] (3,4) circle (2pt); + \end{tikzpicture} + \end{footnotesize} + \end{center} + + \vfill + \newpage + + + \problem{} + Use a compass and a ruler to construct a vector $w$ with initial point $C$ equal to the vector $v$ below. + + \begin{center} + \begin{tikzpicture} + \begin{normalsize} + \draw [->, line width = 2pt] (0,0) -- (6,-2); + \coordinate [label = above: {$v$}] (v) at (3,-.9); + \filldraw (-4,-5) circle (1.5pt); + \coordinate [label = below left: {$C$}] (c) at (-4,-5.1); + \end{normalsize} + \end{tikzpicture} + \end{center} + + \vfill + + Physical forces, such as the force of gravity or the force that pulls together two magnets are vectors in three dimensions. The direction of a vector shows the direction in which the corresponding force is acting. The length of the vector shows the strength of the force. \\ + + \problem{} + On the picture below, draw the vectors of the gravitational pull the Earth exerts on you and on your Math Circle leader. + + \begin{center} + \begin{normalsize} + \begin{tikzpicture} + \draw (0,0) circle (3); + \coordinate [label = above: {Earth}] (a) at (0,2); + \filldraw (0,0) circle (1pt); + \coordinate [label = below: {centre}] (c) at (0,-.1); + \draw [line width = 1pt] (30:3) -- (25:3.5); + \draw [line width = 1pt] (20:3) -- (25:3.5); + \draw [line width = 1pt] (25:4) -- (25:3.5); + \draw (25:4.15) circle (.15); + \draw [line width = 1pt] (3.3,1.9) -- (3.6,1.3); + \coordinate [label = above right: {Oleg}] (o) at (25:4.3); + \draw [line width = 1pt] (190:3) -- (188:3.2); + \draw [line width = 1pt] (186:3) -- (188:3.2); + \draw [line width = 1pt] (188:3.5) -- (188:3.2); + \draw (188:3.65) circle (.15); + \draw [line width = 1pt] (-3.35,-.23) -- (-3.28,-.68); + \coordinate [label = above left: {Me}] (m) at (188:3.85); + \end{tikzpicture} + \end{normalsize} + \end{center} + + \begin{itemize} + \item Where do the gravitational force vectors point? Why? + \item If Oleg is twice as heavy as you are, how would you draw the gravitational pull vectors on the above picture? + \end{itemize} + + \vfill + \pagebreak + + \vspace{60pt} + + Motion can be represented by a vector, too. The direction of the velocity vector shows the direction in which an object is moving at the moment. The length of the velocity vector represents the object's \textit{speed}. It shows how fast an object is moving at the moment. \\ + + \problem{} + The truck on the picture below + is going 30 mph. + The car on the same picture + is speeding at 90 mph the opposite way. + Draw the corresponding velocity vectors. \\ + + \begin{center} + \begin{tikzpicture} + \draw [gray!50!black] (-7,0) -- (7,0); + + \filldraw [gray!80!blue] (-3.6,1.5) -- (-4.4,1.5) -- + (-4.4,2) -- (-6.8,2) -- (-6.8,.3) -- (-3.6,.3) -- + (-3.6,1.5); + \filldraw (-6,.3) circle (.3); + \filldraw [gray] (-6,.3) circle (.15); + \filldraw (-4,.3) circle (.3); + \filldraw [gray] (-4,.3) circle (.15); + + \filldraw [red!80!white] (4,.2) -- (6.6,.2) -- (6.55,.6) -- + (6.2,.6) -- (6.1,.8) -- (4.9,.8) -- (4.7,.6)-- + (4.2,.6) -- (4,.45) -- (4,.2); + \filldraw (6,.2) circle (.2); + \filldraw [gray] (6,.2) circle (.1); + \filldraw (4.6,.2) circle (.2); + \filldraw [gray] (4.6,.2) circle (.1); + \end{tikzpicture} + \end{center} + \vspace{40pt} + + Velocities and forces of the real world are vectors in three dimensions. To keep things simple, we'll begin our study of vectors in two dimensions. Everything we are going to learn about vectors in two-dimensional space is be valid in a Euclidean space of three---or more---dimensions. + + \vfill + + \section{Adding Vectors} + + To find the sum of two vectors $v$ and $w$, one needs to take $w$ so that the initial point of $w$ coincides with the terminal point of $v$. The vector originating at the initial point of $v$ and terminating at the terminal point of $w$ is the sum $v + w$. \\ + + \begin{center} + \begin{tikzpicture} + \begin{normalsize} + \draw [->, line width = 2pt] (0,0) -- (4,-2); + %\coordinate [label = left: {$A$}] (a) at (0,0); + %\coordinate [label = right: {$B$}] (b) at (4,-2); + \coordinate [label = above: {$v$}] (v) at (2,-.9); + \draw [->, line width = 2pt] (4,-2) -- (2,-4); + %\coordinate [label = left: {$D$}] (d) at (-2,-2); + %\coordinate [label = right: {$C$}] (c) at (2.15,-4); + \coordinate [label = right: {$w$}] (w) at (3.1,-3.1); + \draw [->, line width = 2pt] (0,0) -- (2,-4); + \coordinate [label = left: + {$v + w$}] (p) at (.9,-2.15); + \end{normalsize} + \end{tikzpicture} + \end{center} + + \vfill + \pagebreak + + \problem{} + Use a compass and a ruler to construct the sum $v + w$ of the vectors $v$ and $w$ given below. \\ + + \begin{center} + \begin{tikzpicture} + \begin{normalsize} + \draw [->, line width = 2pt] (0,0) -- (5,-2); + \coordinate [label = above: {$v$}] (v) at (2.5,-.95); + \draw [->, line width = 2pt] (-3,-3) -- (-2,-6); + \coordinate [label = left: {$w$}] (w) at (-2.55,-4.5); + \end{normalsize} + \end{tikzpicture} + \end{center} + + \definition{The Zero Vector} + A vector that has coinciding initial and terminal points is called the {\it zero vector} and is denoted as $\overrightarrow{0}$. According to the above definition of the vector addition, + \begin{equation} + v + \overrightarrow{0} = + \overrightarrow{0} + v = + v + \end{equation} + for any vector $v$. + + \vfill + + \definition{Inverses of Vectors} + A vector $w$ such that $w + v = \overrightarrow{0}$ is called the \textit{inverse} of $v$ and is denoted as $-v$. The vector $-v$ lies either on the same straight line as $v$ or on a parallel one, has the same length as $v$, but points in the opposite direction: \\ + + \begin{center} + \begin{tikzpicture} + \begin{normalsize} + \draw [->, line width = 2pt] (0,0) -- (4,-2); + \coordinate [label = above: {$v$}] (v) at (2,-.9); + \draw [<-, line width = 2pt] (-1,-3) -- (3,-5); + \coordinate [label = below: {$-v$}] (n) at (.85,-4.1); + \end{normalsize} + \end{tikzpicture} + \end{center} + \vspace{20pt} + + Note that $-v + v = \overrightarrow{0}$ by definition, but the validity of the equation $v + (-v) = \overrightarrow{0}$ follows from the definitions of vector addition and the zero vector. We can combine both into the following: + \begin{equation} + -v + v = + v + (-v) = + \overrightarrow{0} + \end{equation} + + \vfill + \pagebreak + + Here is an important example of an inverse vector. When you stand still, the floor pushes you up with the force opposite to the force of the gravitational pull, a.k.a. \textit{weight}. \\ + + \begin{center} + \begin{tikzpicture} + \begin{normalsize} + \draw (0,0) -- (6,0); + \draw (2.5,0) -- (3,1); + \draw (3.5,0) -- (3,1); + \draw (3,1) -- (3,2); + \draw (3,2.3) circle (.3); + \draw (2.6,1.7) -- (3.4,1.7); + \draw [->, line width = 2pt] (2.5,0) -- (2.5,-1); + \coordinate [label = below: {weight}] + (g) at (2.5,-1.1); + \draw [->, line width = 2pt] (3.5,0) -- (3.5,1); + \coordinate [label = right: {floor reaction}] + (w) at (3.7,1); + \end{normalsize} + \end{tikzpicture} + \end{center} + The two opposing vectors add up to the zero vector, and therefore you don't move. + + \problem{} + Give an example of a different pair of opposite forces. + + \vfill + + + The following is the last thing we'll mention about the opposite vectors. The formula $w - v$ is defined as $w + (-v)$ for any vectors $v$ and $w$: + \begin{equation} + w - v = + w + (-v) + \end{equation} + + \newpage + + \problem{Dividing a segment into parts} + Using your compass and ruler, divide a segment into three equal parts. How would you split it into four? five? Have an instructor check your answer before moving on. + + \hint{Don't skip this problem, you'll need it later. Make sure you check your answer!} + + \vfill + + \begin{center} + \begin{tikzpicture} \begin{normalsize} + \filldraw (0,0) circle (1.5pt); + \coordinate [label = left: {$A$}] (a) at (0,0); + \filldraw (12,0) circle (1.5pt); + \coordinate [label = right: {$B$}] (b) at (12,0); + \draw [line width = 1.5 pt] (0,0) -- (12,0); + \end{normalsize} \end{tikzpicture} + \end{center} + \vfill + + \begin{center} + \begin{tikzpicture} \begin{normalsize} + \filldraw (0,0) circle (1.5pt); + \coordinate [label = left: {$A$}] (a) at (0,0); + \filldraw (12,0) circle (1.5pt); + \coordinate [label = right: {$B$}] (b) at (12,0); + \draw [line width = 1.5 pt] (0,0) -- (12,0); + \end{normalsize} \end{tikzpicture} + \end{center} + + \vfill + \newpage + + \problem{} + Is it possible to check whether $v = w$ on the picture below using only a compass? Why or why not? \\ + + \begin{center} + + \begin{tikzpicture} + \begin{normalsize} + \draw [->, line width = 2pt] (0,0) -- (4,-2); + %\coordinate [label = left: {$A$}] (a) at (0,0); + %\coordinate [label = right: {$B$}] (b) at (4,-2); + \coordinate [label = above: {$v$}] (v) at (2,-.9); + \draw [->, line width = 2pt] (-1,-3) -- (3,-5); + %\coordinate [label = left: {$C$}] (c) at (-1,-3); + %\coordinate [label = right: {$D$}] (d) at (3,-5); + \coordinate [label = below: {$w$}] (w) at (1,-4.1); + + \end{normalsize} + \end{tikzpicture} + \end{center} + + \vfill + + \problem{} + Use a compass and a ruler to construct the vector $w = -.75 v$ for the vector $v$ given below such that point $C$ is its terminal point. + + \begin{center} + \begin{tikzpicture} + \begin{normalsize} + \draw [->, line width = 2pt] (0,0) -- (6,-2); + \coordinate [label = above: {$v$}] (v) at (3,-.9); + \filldraw (-4,-5) circle (1.5pt); + \coordinate [label = below left: {$C$}] (c) at (-4,-5.1); + \end{normalsize} + \end{tikzpicture} + \end{center} + + \vfill + + \note[Note]{ + With the tools we have thus far, we can multiply vectors by any rational number using only a compass and a ruler. Multiplying a vector by an irrational number is a bit more tricky, but it is doable... + } + + \newpage + + \problem{} + Use a compass and a ruler to construct the vector $w = \sqrt{3} v$ for the vector $v$ given below so that $C$ is its initial point. \\ + \hint{Pythagoras.} + + \begin{center} + \begin{tikzpicture} + \begin{normalsize} + \draw [->, line width = 2pt] (0,0) -- (5,-2); + \coordinate [label = above: {$v$}] (v) at (2.5,-.9); + \filldraw (-5,-6) circle (1.5pt); + \coordinate [label = below left: {$C$}] (c) at (-5,-6.1); + \end{normalsize} + \end{tikzpicture} + \end{center} + + + + \vfill + \newpage + + + \section{Bonus} + + \problem{Oldaque de Freitas' Puzzle} + + % spell:off + Two ladies are sitting in a street caf\'e, talking about their children. One lady says that she has three daughters. The product of the girls' ages equals 36 and the sum of their ages is the same as the number of the house across the street. The second lady replies that this information is not enough to figure out the age of each child. The first lady agrees and adds that her oldest daughter has beautiful blue eyes. The second lady then solves the puzzle. Please do the same. + % spell:on + + \vfill + + \problem{There must be a better way...} + Using pen and paper, sum up all the integers from $1$ to $1000$. + + \vfill + +\end{document} diff --git a/src/Intermediate/Vectors 1/meta.toml b/src/Intermediate/Vectors 1/meta.toml new file mode 100644 index 0000000..98a4a91 --- /dev/null +++ b/src/Intermediate/Vectors 1/meta.toml @@ -0,0 +1,6 @@ +[metadata] +title = "Vectors 1" + +[publish] +handout = true +solutions = false diff --git a/src/Intermediate/Vectors 2/main.tex b/src/Intermediate/Vectors 2/main.tex new file mode 100755 index 0000000..55c3755 --- /dev/null +++ b/src/Intermediate/Vectors 2/main.tex @@ -0,0 +1,599 @@ +% use [nosolutions] flag to hide solutions. +% use [solutions] flag to show solutions. +\documentclass[solutions]{../../../lib/tex/ormc_handout} +\usepackage{../../../lib/tex/macros} + + +\uptitlel{Intermediate 2} +\uptitler{\smallurl{}} +\title{Vectors 2} +\subtitle{ + Prepared by Mark on \today \\ + Based on a handout by Oleg Gleizer +} + +\begin{document} + + \maketitle + + \section{Review} + + \definition{} + A \textit{vector} is a directed line segment. In the vector below, $A$ is its initial point and $B$ is its terminal point. + + \begin{center} + \begin{tikzpicture} + \begin{normalsize} + \draw [->, line width = 2pt] (0,0) -- (4,-1); + \coordinate [label = left: {$A$}] (a) at (0,0); + \coordinate [label = right: {$B$}] (b) at (4,-1); + \coordinate [label = above: {$v$}] (v) at (2,-1); + \end{normalsize} + \end{tikzpicture} + \end{center} + + + \definition{Equivalence} + We say two vectors are equal if the quadrilateral they form is a parallelogram. In other words, two vectors are equal if they have the same length and direction. + + \begin{center} + \begin{tikzpicture} + \begin{normalsize} + \draw [->, line width = 2pt] (0,0) -- (4, -1); + \coordinate [label = left: {$A$}] (a) at (0, 0); + \coordinate [label = right: {$B$}] (b) at (4, -1); + \coordinate [label = above: {$v$}] (v) at (2, -1); + + \draw [->, line width = 2pt] (-1,-1) -- (3,-2); + \coordinate [label = left: {$C$}] (c) at (-1,-1); + \coordinate [label = right: {$D$}] (d) at (3,-2); + \coordinate [label = below: {$w$}] (w) at (1,-1.6); + \draw (-1,-1) -- (0,0); + \draw (3,-2) -- (4,-1); + \end{normalsize} + \end{tikzpicture} + \end{center} + + + + \definition{Addition} + To add two vectors $v$ and $w$, we move $w$ so that the initial point of $w$ coincides with the terminal point of $v$. The vector originating at the initial point of $v$ and terminating at the terminal point of $w$ is the sum $v + w$. \\ + + \begin{center} + \begin{tikzpicture} + \begin{normalsize} + \draw [->, line width = 2pt] (0,0) -- (4,-1); + \coordinate [label = above: {$v$}] (v) at (2,-.9); + + \draw [->, line width = 2pt] (4,-1) -- (2,-2); + \coordinate [label = right: {$w$}] (w) at (3, -1.7); + + \draw [->, line width = 2pt] (0,0) -- (2,-2); + \coordinate [label = left: {$v + w$}] (p) at (1,-1.2); + \end{normalsize} + \end{tikzpicture} + \end{center} + + + Note that $v+w = w+v$. If we create a parallelogram with sides $w$ and $v$ (\ref{vec_eq}), the sums create the same diagonal: + + \begin{center} + \begin{tikzpicture} + \begin{normalsize} + \draw [->, line width = 1pt] (0,0) -- (4,-1); + \coordinate [label = above: {$v$}] (v) at (2,-.9); + + \draw [->, line width = 1pt] (4,-1) -- (2,-2); + \coordinate [label = right: {$w$}] (w) at (3, -1.7); + + \draw [<-, line width = 1pt] (2,-2) -- (-2,-1); + \coordinate [label = above: {$v$}] (v) at (0.2,-2); + + \draw [<-, line width = 1pt] (-2,-1) -- (0, 0); + \coordinate [label = right: {$w$}] (w) at (-1.5, -0.3); + + \draw [->, line width = 2pt] (0,0) -- (2,-2); + \coordinate [label = left: {$v + w$}] (p) at (1,-1.2); + + + \end{normalsize} + \end{tikzpicture} + \end{center} + + \vfill + \pagebreak + + \definition{The Zero Vector} + A vector that has coinciding initial and terminal points is called the {\it zero vector} and is denoted as $\overrightarrow{0}$. According to the above definition of the vector addition, + \begin{equation*} + v + \overrightarrow{0} = + \overrightarrow{0} + v = + v + \end{equation*} + for any vector $v$. + + + \definition{Inverse Vectors} + A vector $w$ such that $w + v = \overrightarrow{0}$ is called the \textit{inverse} of $v$ and is denoted as $-v$. The vector $-v$ lies either on the same straight line as $v$ or on a parallel one, has the same length as $v$, but points in the opposite direction: \\ + + + \begin{center} + \begin{tikzpicture} + \begin{normalsize} + \draw [->, line width = 2pt] (0,0) -- (4, -1); + \coordinate [label = above: {$v$}] (v) at (2, -1); + \draw [<-, line width = 2pt] (-1,-1) -- (3,-2); + \coordinate [label = below: {$-v$}] (w) at (1,-1.6); + \end{normalsize} + \end{tikzpicture} + \end{center} + + + + \vfill + \pagebreak + + \section{Vectors} + + \problem{} + For the given vector $\overrightarrow{v}$ + and point $A$, construct the vector + $\overrightarrow{w} = \overrightarrow{v}$ + having $A$ as its initial point + on the graph paper below. + Use the grid instead of a compass and ruler. \\ + + \begin{center} + \begin{normalsize} + \begin{tikzpicture} [scale=.7] + \draw[step=1cm, gray, very thin] (-8,-8) grid (1,1); + \draw [line width = 1.5pt, ->] (-5,-1) -- (-1,-3); + \coordinate [label = above:{$\overrightarrow{v}$}] (v) at (-2.8,-2.1); + \filldraw (-6,-4) circle (2pt); + \coordinate [label = left:{$A$}] (a) at (-6,-4); + \end{tikzpicture} + \end{normalsize} + \end{center} + \vfill + + \problem{} + For the given vector $\overrightarrow{v}$ + and point $A$, construct the vector + $\overrightarrow{w} = -\overrightarrow{v}$ + having $A$ as its initial point + on the graph paper below. \\ + + \begin{center} + \begin{normalsize} + \begin{tikzpicture} [scale=.7] + \draw[step=1cm, gray, very thin] (-12,-7) grid (1,1); + \draw [line width = 1.5pt, ->] (-5,-1) -- (-1,-3); + \coordinate [label = above:{$\overrightarrow{v}$}] (v) at (-2.8,-2.1); + \filldraw (-6,-4) circle (2pt); + \coordinate [label = below:{$A$}] (a) at (-6,-4.1); + \end{tikzpicture} + \end{normalsize} + \end{center} + \vfill + \pagebreak + + \problem{} + For the given vector $\overrightarrow{v}$ + and point $A$, construct the vector + $\overrightarrow{w} = 1.5 \overrightarrow{v}$ + having $A$ as its initial point + on the graph paper below. \\ + + \begin{center} + \begin{normalsize} + \begin{tikzpicture} [scale=.7] + \draw[step=1cm, gray, very thin] (-9,-9) grid (1,1); + \draw [line width = 1.5pt, ->] (-6,-1) -- (-2,-3); + \coordinate [label = above:{$\overrightarrow{v}$}] (v) at (-3.8,-2.1); + \filldraw (-7,-4) circle (2pt); + \coordinate [label = left:{$A$}] (a) at (-7,-4.1); + \end{tikzpicture} + \end{normalsize} + \end{center} + \vfill + + \problem{} + For the given vector $\overrightarrow{v}$ + and point $A$, construct the vector + $\overrightarrow{w} = -2 \overrightarrow{v}$ + having $A$ as its initial point + on the graph paper below. \\ + + \begin{center} + \begin{normalsize} + \begin{tikzpicture} [scale=.7] + \draw[step=1cm, gray, very thin] (-16,-8) grid (1,1); + \draw [line width = 1.5pt, ->] (-5,-2) -- (-1,-4); + \coordinate [label = above:{$\overrightarrow{v}$}] (v) at (-2.8,-3.1); + \filldraw (-6,-5) circle (2pt); + \coordinate [label = below:{$A$}] (a) at (-6,-5.1); + \end{tikzpicture} + \end{normalsize} + \end{center} + \vfill + \pagebreak + + \problem{} + For the given vector $\overrightarrow{v}$ + and point $A$, construct the vector + $\overrightarrow{w} = -\frac13 \overrightarrow{v}$ + having $A$ as its initial point + on the graph paper below. \\ + + \begin{center} + \begin{normalsize} + \begin{tikzpicture} [scale=.7] + \draw[step=1cm, gray, very thin] (-11,-6) grid (1,1); + \draw [line width = 1.5pt, ->] (-7,-1) -- (-1,-4); + \coordinate [label = above:{$\overrightarrow{v}$}] (v) at (-3.8,-2.4); + \filldraw (-6,-4) circle (2pt); + \coordinate [label = below:{$A$}] (a) at (-6,-4.1); + \end{tikzpicture} + \end{normalsize} + \end{center} + \vfill + + \problem{} + For the given vectors $\overrightarrow{v}$ + and $\overrightarrow{w}$, + construct the vector + $\overrightarrow{w} + \overrightarrow{v}$ + on the graph paper below. \\ + + \begin{center} + \begin{normalsize} + \begin{tikzpicture} [scale=.7] + \draw[step=1cm, gray, very thin] (-12,-10) grid (1,1); + \draw [line width = 1.5pt, ->] (-5,0) -- (0,-4); + \coordinate [label = above:{$\overrightarrow{v}$}] (v) at (-2.4,-2.1); + \draw [line width = 1.5pt, ->] (-10,-1) -- (-9,-5); + \coordinate [label = left:{$\overrightarrow{w}$}] (w) at (-9.5,-3.1); + \end{tikzpicture} + \end{normalsize} + \end{center} + \vfill + \pagebreak + + \problem{} + For the given vectors $\overrightarrow{v}$ + and $\overrightarrow{w}$, + construct the vector + $\overrightarrow{w} - \overrightarrow{v}$ + on the graph paper below. \\ + + \begin{center} + \begin{normalsize} + \begin{tikzpicture} [scale=.7] + \draw[step=1cm, gray, very thin] (-12,-6) grid (1,1); + \draw [line width = 1.5pt, ->] (-11,0) -- (-6,-4); + \coordinate [label = above:{$\overrightarrow{v}$}] (v) at (-8.4,-2.1); + \draw [line width = 1.5pt, ->] (-1,-1) -- (0,-5); + \coordinate [label = right:{$\overrightarrow{w}$}] (w) at (-.5,-3.1); + \end{tikzpicture} + \end{normalsize} + \end{center} + \vfill + + \problem{} + For the given vectors $\overrightarrow{v}$ + and $\overrightarrow{w}$, + construct the vector + $2\overrightarrow{v} - 3\overrightarrow{w}$ + on the graph paper below. \\ + + \begin{center} + \begin{normalsize} + \begin{tikzpicture} [scale=.7] + \draw[step=1cm, gray, very thin] (-13,-10) grid (1,1); + \draw [line width = 1.5pt, ->] (-12,-1) -- (-7,-5); + \coordinate [label = left:{$\overrightarrow{v}$}] (v) at (-9.6,-3.1); + \draw [line width = 1.5pt, ->] (-1,-2) -- (0,-5); + \coordinate [label = right:{$\overrightarrow{w}$}] (w) at (-.5,-3.6); + \end{tikzpicture} + \end{normalsize} + \end{center} + \vfill + \pagebreak + + \problem{} + For the given vectors $\overrightarrow{v}$ + and $\overrightarrow{w}$, + construct the vector + $1.75\overrightarrow{v} - \frac23 \overrightarrow{w}$ + on the graph paper below. + + \begin{center} + \begin{normalsize} + \begin{tikzpicture} [scale=.7] + \draw[step=1cm, gray, very thin] (-19,-9) grid (1,1); + \draw [line width = 1.5pt, ->] (-18,-1) -- (-10,-5); + \coordinate [label = left:{$\overrightarrow{v}$}] (v) at (-14.4,-3.1); + \draw [line width = 1.5pt, ->] (-3,0) -- (0,-6); + \coordinate [label = right:{$\overrightarrow{w}$}] (w) at (-1.5,-3); + \end{tikzpicture} + \end{normalsize} + \end{center} + \vfill + + \problem{} + For the given vectors $\overrightarrow{v}$ + and $\overrightarrow{w}$, + construct the vector + $\overrightarrow{v} + \overrightarrow{w}$ + originating at the same point + as the vector $\overrightarrow{v}$ + and the vector + $\overrightarrow{w} + \overrightarrow{v}$ + originating at the same point + as the vector $\overrightarrow{w}$. + Is $\overrightarrow{v} + \overrightarrow{w} = + \overrightarrow{w} + \overrightarrow{v}$? + Why or why not? + + \begin{center} + \begin{normalsize} + \begin{tikzpicture} [scale=.7] + \draw[step=1cm, gray, very thin] (-17,-7) grid (1,1); + \draw [line width = 1.5pt, ->] (-16,-1) -- (-11,-5); + \coordinate [label = left:{$\overrightarrow{v}$}] (v) at (-13.6,-3.1); + \draw [line width = 1.5pt, ->] (-8,-6) -- (-5,-1); + \coordinate [label = right:{$\overrightarrow{w}$}] (w) at (-6.5,-4.5); + \end{tikzpicture} + \end{normalsize} + \end{center} + \vfill + \pagebreak + + + \section{Pythagoras' Theorem} + + \problem{} + Formulate and prove the Pythagoras' theorem. + \vfill + \pagebreak + + \problem{} + Use the Pythagorean theorem to find $x$ + for the following right triangles. \\ + + \noindent a.~~ + + \begin{center} + \begin{normalsize} + \begin{tikzpicture} + \draw (0,0) -- (3,0) -- (0,3) -- (0,0); + \coordinate [label = left:{$1$}] (a) at (0,1.5); + \coordinate [label = below:{$1$}] (b) at (1.5,-.1); + \coordinate [label = right:{$x$}] (x) at (1.6,1.5); + \end{tikzpicture} + \end{normalsize} + \end{center} + \bigskip + + \noindent b.~~ + + \begin{center} + \begin{normalsize} + \begin{tikzpicture} + \draw (0,0) -- (4,0) -- (0,3) -- (0,0); + \coordinate [label = left:{$3$}] (a) at (0,1.5); + \coordinate [label = below:{$x$}] (x) at (2,-.1); + \coordinate [label = right:{$5$}] (b) at (2.1,1.6); + \end{tikzpicture} + \end{normalsize} + \end{center} + \bigskip + + \noindent c.~~ + + \begin{center} + \begin{normalsize} + \begin{tikzpicture} + \draw (0,0) -- (4.5,0) -- (0,3) -- (0,0); + \coordinate [label = left:{$x$}] (x) at (0,1.5); + \coordinate [label = below:{$\sqrt{2}$}] (a) at (2,-.1); + \coordinate [label = right:{$\sqrt3$}] (b) at (2.2,1.7); + \end{tikzpicture} + \end{normalsize} + \end{center} + + \vfill + \pagebreak + + + \problem{} + Construct a segment of length $\sqrt{2} a$ + on the graph paper below. \\ + + \begin{center} + \begin{normalsize} + \begin{tikzpicture} [scale=.7] + \draw[step=1cm, gray, very thin] (-7,-7) grid (1,1); + \draw [line width = 1.5pt] (-5,-1) -- (-1,-1); + \coordinate [label = above:{$a$}] (a) at (-3,-.9); + \end{tikzpicture} + \end{normalsize} + \end{center} + \vfill + + \problem{} + Construct a segment of length $\sqrt{5} a$ + on the graph paper below. \\ + + \begin{center} + \begin{normalsize} + \begin{tikzpicture} [scale=.7] + \draw[step=1cm, gray, very thin] (-12,-6) grid (1,1); + \draw [line width = 1.5pt] (-5,-1) -- (-1,-1); + \coordinate [label = above:{$a$}] (a) at (-3,-.9); + \end{tikzpicture} + \end{normalsize} + \end{center} + \vfill + + \problem{} + The side length of a grid square below + is one unit. Find the length + the vector $\overrightarrow{v}$. \\ + + \begin{center} + \begin{normalsize} + \begin{tikzpicture} [scale=.7] + \draw[step=1cm, gray, very thin] (-5,-3) grid (1,1); + \draw [line width = 1.5pt, ->] (-4,0) -- (0,-2); + \coordinate [label = above:{$\overrightarrow{v}$}] (v) at (-2.7,-2.1); + \end{tikzpicture} + \end{normalsize} + \end{center} + \vfill + \pagebreak + + \problem{} + The side length of a grid square below + is three units. Find the length + the vector $\overrightarrow{w}$. \\ + + \begin{center} + \begin{normalsize} + \begin{tikzpicture} [scale=.7] + \draw[step=1cm, gray, very thin] (-6,-3) grid (1,1); + \draw [line width = 1.5pt, <-] (-5,0) -- (0,-2); + \coordinate [label = above:{$\overrightarrow{w}$}] (w) at (-2.5,-2); + \end{tikzpicture} + \end{normalsize} + \end{center} + \medskip + + + \section{Rationals} + + A number is called {\it rational} + if it can be represented as a ratio $p/q$ + of an integer $p$ and a positive integer $q$ + such that $p$ and $q$ have no common + factors. Otherwise, that number is called {\it irrational} \\ + + \problem{} + Decide whether the following numbers + are rational or irrational. + In each case, give a reason. \\ + + \begin{enumerate}[itemsep=2mm] + \item $\displaystyle{\frac{375}{376}}$ + \item $10$ + \item $0.5$ + \item $-5$ + \item $1.2345$ + \item $0.111111111...$ + \item $\sqrt{2}$ + \item $\sqrt[3]{10}$ + \end{enumerate} + + \vfill + \pagebreak + + \problem{} + Find $\left\lfloor \sqrt[3]{10} \right\rfloor$ + and $\left\lceil \sqrt[3]{10} \right\rceil$. + \vfill + + \problem{} + Simplify $\sqrt{8}$. + \vfill + \pagebreak + + \problem{} + A man is crossing a river in a boat. + The speed of the boat is three meters per second. + The speed of the water in the river + is one meter per second. + In what direction should the man steer the boat, + if he wants the vessel to move + perpendicular to the banks? + Construct the velocity vector. \\ + + \begin{center} + \begin{normalsize} + \begin{tikzpicture} + \draw (0,10) -- (10,10); + \draw (0,0) -- (10,0); + \draw (4.5,1) -- (5.5,1) --(5.5,3) -- (5,3.5) -- (4.5,3) --(4.5,1) ; + \filldraw (5,2.1) circle (2pt); + \draw [line width = 2pt, ->] (5,2.1) -- (7,2.1); + \coordinate [label = below: {$1\frac{m}{s}$}] (w) at (6.3,1.9); + \end{tikzpicture} + \end{normalsize} + \end{center} + \bigskip + + The width of the river + is $10\sqrt{2}$ meters. + How long would it take the man + to cross the river? + + \vfill + \pagebreak + + + \problem{} + You need to slide a heavy box over + the floor from point $A$ to point $B$. + The box is about twice as tall as you are. + Which way is easier, to push or to pull? + Why? \vspace{60pt} + + \begin{center} + \begin{normalsize} + \begin{tikzpicture} + \filldraw [gray!90!blue] (1,0) -- (1,2) -- + (4,2) -- (4,0) -- (1,0); + \draw (0,0) -- (10,0); + \filldraw (2.5,0) circle (1.5pt); + \coordinate [label = below: {$A$}] (a) at (2.5,-.1); + \filldraw (7.5,0) circle (1.5pt); + \coordinate [label = below: {$B$}] (b) at (7.5,-.1); + \end{tikzpicture} + \end{normalsize} + \end{center} + + \vfill + + \problem{} + The dot on the picture below + represents a spaceship. + There are three forces acting on the ship. + $\overrightarrow{T}$ is the thrust + of the ship's engine. + $\overrightarrow{P}$ is the gravitational pull + of the neighboring planet. + $\overrightarrow{S}$ is the gravitational pull + of the planet's home star. + You are the captain. + Use a compass and a ruler to figure out + where the resulting force would steer the ship. + \vspace{100pt} + + \begin{center} + \begin{normalsize} + \begin{tikzpicture} + \filldraw (0,0) circle (2pt); + \draw [line width = 1pt, ->] (0,0) -- (225:6); + \coordinate [label = below: {$\overrightarrow{T}$}] + (t) at (230:3); + \draw [line width = 1pt, ->] (0,0) -- (4,0); + \coordinate [label = above: {$\overrightarrow{P}$}] + (p) at (2,.1); + \draw [line width = 1pt, ->] (0,0) -- (150:3); + \coordinate [label = right: {$\overrightarrow{S}$}] + (s) at (140:1.5); + \end{tikzpicture} + \end{normalsize} + \end{center} + \vfill + +\end{document} \ No newline at end of file diff --git a/src/Intermediate/Vectors 2/meta.toml b/src/Intermediate/Vectors 2/meta.toml new file mode 100644 index 0000000..eb9496b --- /dev/null +++ b/src/Intermediate/Vectors 2/meta.toml @@ -0,0 +1,6 @@ +[metadata] +title = "Vectors 2" + +[publish] +handout = true +solutions = false