New build system
Some checks failed
Lints / typos (push) Successful in 21s
Build and deploy / build (push) Has been cancelled

This commit is contained in:
Mark 2025-01-21 18:35:58 -08:00
parent a14656d94f
commit a82cc8c79f
Signed by: Mark
GPG Key ID: C6D63995FE72FD80
354 changed files with 870 additions and 1658 deletions

View File

@ -13,16 +13,45 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Download Tectonic # Could instead install `texlive-full`, but that takes ~20 minutes.
run: # We'll specify the packages we need manually.
wget "https://github.com/tectonic-typesetting/tectonic/releases/download/tectonic%400.15.0/tectonic-0.15.0-x86_64-unknown-linux-musl.tar.gz" && - name: "Install TeXLive"
tar -xf "tectonic-0.15.0-x86_64-unknown-linux-musl.tar.gz" run: |
sudo apt update
DEBIAN_FRONTEND=noninteractive \
sudo apt install --yes \
texlive texlive-xetex \
texlive-games texlive-fonts-extra texlive-latex-extra \
texlive-pictures texlive-pstricks
- name: Build LaTeX handouts # Typst isn't packaged, and manual download gives us
run: bash build.sh # more control anyway.
- name: "Download Typst"
run: |
wget -q "https://github.com/typst/typst/releases/download/v0.12.0/typst-x86_64-unknown-linux-musl.tar.xz"
tar -xf "typst-x86_64-unknown-linux-musl.tar.xz"
mv "typst-x86_64-unknown-linux-musl/typst" .
rm "typst-x86_64-unknown-linux-musl.tar.xz"
rm -dr "typst-x86_64-unknown-linux-musl"
- uses: actions/upload-artifact@v3 # Builds all handouts, LaTeX and Typst
- name: "Build handouts"
run: TYPST_PATH="$(pwd)/typst" python tools/build/main.py
# Upload logs, even if build fails.
# LaTeX stdout/stderr isn't always helpful.
- name: "Save LaTeX logs"
uses: actions/upload-artifact@v3
if: always()
with: with:
name: output name: "LaTeX logs"
path: "**/*.log"
retention-days: 1
# Upload build output
- name: "Save output"
uses: actions/upload-artifact@v3
with:
name: "Build output"
path: "output/*" path: "output/*"
retention-days: 10 retention-days: 10

View File

@ -12,4 +12,4 @@ jobs:
- name: Check typos - name: Check typos
uses: crate-ci/typos@master uses: crate-ci/typos@master
with: with:
config: ./typos.toml config: ./tools/typos.toml

5
.gitignore vendored
View File

@ -2,19 +2,18 @@
venv venv
__pycache__ __pycache__
*.ignore *.ignore
.mypy_cache
# Output files # Output files
/output /output
/output.zip /output.zip
/index.json
main.pdf
**/build
*.pdf *.pdf
# TeX build files # TeX build files
*.synctex.gz* *.synctex.gz*
*.latexmk *.latexmk
*.aux *.aux
*.out
*.log *.log
*.fls *.fls
*.fdb_latexmk *.fdb_latexmk

24
.vscode/settings.json vendored
View File

@ -1,23 +1,3 @@
{ {
//"latex-workshop.latex.recipe.default": "latexmk (lualatex)", "latex-workshop.latex.recipe.default": "latexmk (xelatex)"
}
"latex-workshop.latex.recipe.default": "tectonic",
//"latex-workshop.latex.outDir": "%DIR%/../build/main",
"latex-workshop.latex.outDir": "%DIR%",
"latex-workshop.latex.recipes": [
{
"name": "tectonic",
"tools": ["tectonic"]
}
],
"latex-workshop.latex.tools": [
{
"name": "tectonic",
"command": "/home/mark/.cargo/bin/tectonic",
"args": ["-X", "compile", "--keep-intermediates", "--keep-logs", "%DOC_EXT%"],
"env": {}
}
]
}

View File

@ -1,32 +0,0 @@
% use [nosolutions] flag to hide solutions.
% use [solutions] flag to show solutions.
\documentclass[
solutions,
singlenumbering,
shortwarning
]{../../resources/ormc_handout}
\usepackage{../../resources/macros}
\usepackage{tikz}
\usetikzlibrary{patterns}
\usepackage{graphicx}
\uptitlel{Advanced 2}
\uptitler{\smallurl{}}
\title{Geometry of Masses I}
\subtitle{Prepared by Sunny \& Mark on \today{}}
\begin{document}
\maketitle
\input{parts/0 balance}
\input{parts/1 continuous}
\input{parts/2 pappus}
\end{document}

View File

@ -1,160 +0,0 @@
\section{Balance}
\example{}
Consider a mass $m_1$ on top of a pin in two-dimensional space. \par
Due to gravity, the mass exerts a force on the pin at the point of contact. \par
For simplicity, we'll say that the magnitude of this force is equal the mass of the object---
that is, $m_1$.
\begin{center}
\begin{tikzpicture}[scale=2]
\fill[color = black] (0, 0.1) circle[radius=0.1];
\node[above] at (0, 0.20) {$m_1$};
\draw[line width = 0.25mm, pattern=north west lines] (0, 0) -- (-0.15, -0.3) -- (0.15, -0.3) -- cycle;
\draw[color = black, opacity = 0.5] (1, 0.1) circle[radius=0.1];
\draw[line width = 0.25mm, pattern=north west lines, opacity = 0.5] (1, 0) -- (0.85, -0.3) -- (1.15, -0.3) -- cycle;
\draw[->, line width = 0.5mm] (1, 0) -- (1, -0.5) node[below] {$m_1$};
%\draw[->, line width = 0.5mm, dashed] (1, 0) -- (1, 0.5) node[above] {$-m_1$};
\fill[color = red] (1, 0) circle[radius=0.025];
\end{tikzpicture}
\end{center}
The pin exerts an opposing force on the mass at the same point, and the system thus stays still.
\remark{}<fakeunits>
Forces, distances, and torques in this handout will be provided in arbitrary (though consistent) units. \par
We have no need for physical units in this handout.
\example{}
Now attach this mass to a massless rod and try to balance the resulting system. \par
As you might expect, it is not stable: the rod pivots and falls down.
\begin{center}
\begin{tikzpicture}[scale=2]
\fill[color = black] (-0.3, 0.0) circle[radius=0.1];
\node[above] at (-0.3, 0.1) {$m_1$};
\draw[-, line width = 0.5mm] (-0.8, 0) -- (0.5, 0);
\draw[line width = 0.25mm, pattern=north west lines] (0, 0) -- (-0.15, -0.3) -- (0.15, -0.3) -- cycle;
\draw[color = black, opacity = 0.5] (1.2, 0.0) circle[radius=0.1];
\draw[-, line width = 0.5mm, opacity = 0.5] (0.7, 0) -- (1.9, 0);
\draw[line width = 0.25mm, pattern=north west lines, opacity = 0.5] (1.5, 0) -- (1.35, -0.3) -- (1.65, -0.3) -- cycle;
\draw[->, line width = 0.5mm] (1.2, 0) -- (1.2, -0.5) node[below] {$m_1$};
%\draw[->, line width = 0.5mm, dashed] (1.5, 0) -- (1.5, 0.5) node[above] {$f_p$};
\end{tikzpicture}
\end{center}
This is because the force $m_1$ is offset from the pivot (i.e, the tip of the pin). \par
It therefore exerts a \textit{torque} on the mass-rod system, causing it to rotate and fall.
\pagebreak
\definition{Torque}
Consider a rod on a single pivot point.
If a force with magnitude $m_1$ is applied at an offset $d$ from the pivot point,
the system experiences a \textit{torque} with magnitude $m_1 \times d$.
\begin{center}
\begin{tikzpicture}[scale=2]
\draw[-, line width = 0.5mm] (-1.2, 0) -- (0.5, 0);
\draw[line width = 0.25mm, pattern=north west lines] (0, 0) -- (-0.15, -0.3) -- (0.15, -0.3) -- cycle;
\draw[->, line width = 0.5mm, dashed] (-0.8, 0) -- (-0.8, -0.5) node[below] {$m_1$};
\fill[color = red] (-0.8, 0.0) circle[radius=0.05];
\draw[-, line width = 0.3mm, double] (-0.8, 0.1) -- (-0.8, 0.2) -- (0, 0.2) node [midway, above] {$d$} -- (0, 0.1);
\end{tikzpicture}
\end{center}
We'll say that a \textit{positive torque} results in \textit{clockwise} rotation,
and a \textit{negative torque} results in a \textit{counterclockwise rotation}.
As stated in \ref{fakeunits}, torque is given in arbitrary \say{torque units}
consistent with our units of distance and force.
\vspace{2mm}
% I believe the convention used in physics is opposite ours, but that's fine.
% Positive = clockwise is more intuitive given our setup,
% and we only use torque to define CoM anyway.
Look at the diagram above and convince yourself that this convention makes sense:
\begin{itemize}
\item $m_1$ is positive \note{(masses are usually positive)}
\item $d$ is negative \note{($m_1$ is \textit{behind} the pivot)}
\item therefore, $m_1 \times d$ is negative.
\end{itemize}
\definition{Center of mass}
The \textit{center of mass} of a physical system is the point at which one can place a pivot \par
so that the total torque the system experiences is 0. \par
\note{In other words, it is the point at which the system may be balanced on a pin.}
\problem{}
Consider the following physical system:
we have a massless rod of length $1$, with a mass of size 3 at position $0$
and a mass of size $1$ at position $1$.
Find the position of this system's center of mass. \par
\begin{center}
\begin{tikzpicture}[scale=2]
\draw[line width = 0.25mm, pattern=north west lines] (0, 0) -- (-0.15, -0.3) -- (0.15, -0.3) -- cycle;
\draw[-, line width = 0.5mm] (-0.5, 0) -- (1.5, 0);
\fill[color = black] (-0.5, 0) circle[radius=0.1];
\node[above] at (-0.5, 0.2) {$3$};
\fill[color = black] (1.5, 0) circle[radius=0.08];
\node[above] at (1.5, 0.2) {$1$};
\end{tikzpicture}
\end{center}
\vfill
\problem{}
Do the same for the following system, where $m_1$ and $m_2$ are arbitrary masses.
\begin{center}
\begin{tikzpicture}[scale=2]
\draw[line width = 0.25mm, pattern=north west lines] (0.7, 0) -- (0.55, -0.3) -- (0.85, -0.3) -- cycle;
\draw[-, line width = 0.5mm] (-0.5, 0) -- (1.5, 0);
\fill[color = black] (-0.5, 0) circle[radius=0.1];
\node[above] at (-0.5, 0.2) {$m_1$};
\fill[color = black] (1.5, 0) circle[radius=0.08];
\node[above] at (1.5, 0.2) {$m_2$};
\end{tikzpicture}
\end{center}
\vfill
\pagebreak
\problem{}<massline>
Consider a massless horizontal rod of infinite length. \par
Attach $n$ masses $m_1, m_2, ..., m_n$ to it, placing each $m_i$ at position $x_i$. \par
Find the resulting system's center of mass.
\vfill
\problem{}
Extend \ref{massline} into two dimensions: \par
Place $n$ masses $m_1, m_2, ..., m_n$ at positions $(x_1, y_1),~ (x_2, y_2),~ (x_3, y_3)$
on a massless plane. \par
Find the coordinates of the resulting system's center of mass. \par
\hint{If a plane balances on a pin, it does not tilt in the $x$ or $y$ direction.}
\vfill
\pagebreak

View File

@ -1,64 +0,0 @@
\section{Continuous mass}
Now let's extend this idea to a \textit{continuous distribution} of masses rather than discrete point masses. This isn't so different; a continuous distribution of mass is really just a lot of point-masses, only that there are so many of them so close together that you can't even count them\footnote{For example, your pencil might seem like a continuous distribution of mass, but it's really just a whole lot of atoms.}. In general, finding the CoM requires integral calculus, but not always...\footnote{Many of the following problems can be solved with integration even though you're meant to solve them without it. But remember, in math, whenever you accomplish the same task two different ways, that really means that they're somehow the same thing.}
\problem{}
You are given a cardboard cutout of Figure \ref{seahorse} and some office supplies. How might you determine the CoM? Does your strategy also work in 3D?
\vfill
\problem{}
Where is the CoM of a right isosceles triangle? What about any isosceles triangle?
\vfill
\problem{}
How can you easily find the CoM of any triangle? Why does this work?
\vfill
\pagebreak
\problem{}
Consider Figure \ref{soda} depicting a simplified soda can.
If you leave just the right amount,
you can get it to balance on the beveled edge, as seen in Figure
\ref{soda filled}.
\begin{figure}[htp]
\centering
\begin{minipage}{0.5\textwidth}
\centering
\includegraphics[width=0.6\linewidth]{img/soda.png}
\caption{}
\label{soda}
\end{minipage}\hfill
\begin{minipage}{0.5\textwidth}
\centering
\includegraphics[width=0.6 \linewidth]{img/soda_filled.png}
\caption{}
\label{soda filled}
\end{minipage}
\end{figure}
\problem{}
See Figure \ref{soda filled}. Let's take the can to be massless and initially empty. Let's also assume that we live in two dimensions. We start slowly filling it up with soda to a vertical height $h$. What is $h$ just before the can tips over?
\vfill
\problem{}<3D soda>
Think about how you might approach this problem in 3D. Does $h$ become larger or smaller?
\vfill
\pagebreak
So far we've made the assumption our shapes have mass that is \textit{uniformly distributed}. But that doesn't have to be the case.
\problem{}
A mathemagical wizard will give you his staff if you can balance it horizontally on your finger. The strange magical staff has unit length and it's mass is distributed in a very special way. It's density decreases linearly from $\lambda_0$ at one end to $0$ at the other. Where is the staff's balancing point?
\vfill
\pagebreak

View File

@ -1,57 +0,0 @@
\section{Pappus's Centroid Theorem}
\begin{figure}[htp]
\centering
\includegraphics[width=0.6\linewidth]{img/pappus_1.png}
\caption{}
\label{pappus1}
\end{figure}
\textit{Centroids} are closely related to, and often synonymous with, centres of mass. A centroid is the geometric centre of an object, regardless of the mass distribution. Thus, the centroid and centre of mass coincide when the mass is uniformly distributed.
Figure \ref{pappus1} depicts three different surfaces constructed by revolving a line segment (in red) about a central axis. These are often called \textit{surfaces of revolution}.
\textit{Pappus's First Centroid Theorem} allows you to determine the area of a surface of revolution using information about the line segment and the axis of rotation.
Can you intuitively come up with Pappus's First Centroid Theorem for yourself? Figure \ref{pappus1} is very helpful. It may also help to draw from surface area formulae you already know. What limitations are there on the theorem?
\vfill
\pagebreak
\textit{Pappus's Second Centroid Theorem} simply extends this concept to \textit{solids of revolution}, which are exactly what you think they are.
Now that you've done the first theorem, what do you think Pappus's Second Centroid Theorem states?
\vfill
The centroid of a semi-circular line segment is already given in Figure \ref{pappus1}, but what about the centroid of a filled semi-circle? (Hint: For a sphere of radius $r$, $V=\frac{4}{3}\pi r^3$)
\begin{figure}[htp]
\centering
\includegraphics[width=0.4\linewidth]{img/arc.png}
\caption{}
\label{arc}
\end{figure}
\label{arc centroid} Given arc $AB$ with radius $r$ and subtended by $2\alpha$, determine $OG$, the distance from the centre of the circle to the centroid of the arc.
\vfill
\pagebreak
Using your answers from Problem \ref{isosceles centroid} and Problem \ref{arc centroid}. Where is the centroid of the \textit{sector} of the circle in Figure \ref{arc}. (Hint: Cut it up.)
\vfill
Seeing your success with his linear staff, the wizard challenges you with another magical staff to balance. It looks identical to the first one, but you're told that the density decreases from $\lambda_0$ to $0$ according to the function $\lambda(x) = \lambda_0\sqrt{1-x^2}$.
\vfill
Infinitely many masses $m_i$ are placed at $x_i$ along the positive $x$-axis, starting with $m_0 = 1$ placed at $x_0 = 1$. Each successive mass is placed twice as far from the origin compared to the previous one. But also, each successive mass has a quarter the weight of the previous one. Find the CoM if it exists.
\vfill
(Bonus) Try to actually find $h$ from Problem \ref{3D soda}. Good luck.
%\item (Bonus, not related to the packet) Spongebob, Patrick, and Squidward are all hiding from the Sea Bear. Initially, Spongebob and Patrick are keeping watch 100 yards apart with Squidward halfway in between them. When Spongebob gets scared, he runs to hide halfway between Squidward and Patrick. Then Patrick, not wanting to be the farthest from the centre, runs to be halfway between Squidward and Patrick. Squidward, seeing this, quickly finds the new halfway point between Spongebob and Patrick. This pattern keeps repeating until all three of them are pointlessly clambering on top of each other. Where do they end up relative to their initial positions?

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 212 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 221 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

View File

@ -1,36 +0,0 @@
% use [nosolutions] flag to hide solutions.
% use [solutions] flag to show solutions.
\documentclass[
solutions
]{../../resources/ormc_handout}
\usepackage{../../resources/macros}
\usepackage{subfiles}
\usepackage{graphicx}
\graphicspath{ {./images} }
\uptitlel{Intermediate 2}
\uptitler{\smallurl{}}
\title{Warm - Up}
\subtitle{
Prepared by Mark on \today \\
\medskip
These problems were originally found in \\
Boris Kordemsky's \textit{The Moscow Puzzles}
}
\begin{document}
\maketitle
\subfile{problems/217}
\vfill
\pagebreak
\subfile{problems/101}
\vfill
\pagebreak
\end{document}

View File

@ -1,23 +0,0 @@
\documentclass[../main.tex]{subfiles}
\begin{document}
\problem{The Courageous Garrison}
A courageous garrison was defending a snow fort. The commander arranged his forces as shown in the square frame (the inner square showing the garrison's total strength of 40 boys): 11 boys defending each side of the fort.
\begin{figure}[h]
\centering
\includegraphics[width=12cm]{101a}
\end{figure}
The garrison ``lost'' 4 boys during each of the first, second, third, and fourth assaults and 2 during the fifth and last. But after each charge 11 boys defended each side of the snow fort. How?
\vfill
\begin{figure}[h]
\centering
\includegraphics[width=4cm]{101b}
\end{figure}
\end{document}

View File

@ -1,16 +0,0 @@
\documentclass[../main.tex]{subfiles}
\begin{document}
\problem{Knight's Move}
To solve this problem you need not be a chess player. You need only know the way a knight moves on the chessboard: two squares in one direction and one square at right angles to the first direction. The diagram shows 16 black pawns on a board.
\begin{figure}[h]
\centering
\includegraphics[width=12cm]{110}
\end{figure}
Can a knight capture all 16 pawns in 16 moves?
\end{document}

View File

@ -1,24 +0,0 @@
\documentclass[../main.tex]{subfiles}
\begin{document}
\problem{One Hundred and Forty-Five Doors}
A prisoner was thrown into a medieval dungeon with 145 doors. Nine, shown by black bars, are locked, but each one will open if before you reach it you pass through exactly 8 open doors. \\
You don't have to go through every open door but you do have to go through every cell and all 9 locked doors. If you enter a cell or go through a door a second time, the doors clang shut, trapping you. \\
\medskip
The prisoner (in the lower right corner cell) had a drawing of the dungeon. He thought a long time before he set out. He went through all the locked doors and escaped through the last, upper left corner one. What was his route?
\begin{figure}[h]
\centering
\includegraphics[width=8cm]{120}
\end{figure}
\begin{figure}[h]
\centering
\includegraphics[width=8cm]{120}
\end{figure}
\end{document}

View File

@ -1,37 +0,0 @@
\documentclass[../main.tex]{subfiles}
\begin{document}
\problem{How Does the Prisoner Escape?}
This dungeon has $49$ cells. In $7$ cells ($A$ to $G$ in the diagram) there is a locked door (black bar). The keys are in cells $a$ to $g$ respectively. The other doors open only from one side, as shown. \\
\medskip
How does the prisoner in cell $O$ escape? He can pass through any door any number of times and need not unlock the doors in any special order. His aim is to get the key from cell $g$ and use it to escape through cell $G$
\vfill
\begin{figure}[h]
\centering
\includegraphics[width=8cm]{121}
\end{figure}
\vfill
Extra copies of the dungeon are on the next page.
\pagebreak
\vfill
\begin{figure}[h]
\centering
\includegraphics[width=8cm]{121}
\end{figure}
\vfill
\begin{figure}[h]
\centering
\includegraphics[width=8cm]{121}
\end{figure}
\vfill
\pagebreak
\end{document}

View File

@ -1,9 +0,0 @@
\documentclass[../main.tex]{subfiles}
\begin{document}
\problem{Mutual Aid}
During the rebuilding after World War II, the Soviet Union was short of tractors. The machine and tractor stations would lend each other equipment as needed. Three machine and tractor stations were neighbors. The first lent the second and third as many tractors as they each already had. A few months later, the second lent the first and third as many as they each had. Still later, the third lent the first and second as many as they each already had. Each station now had 24 tractors. How many tractors did each station originally have?
\end{document}

View File

@ -1,16 +0,0 @@
\documentclass[../main.tex]{subfiles}
\begin{document}
\problem{The Air Parade}
Volodya asked, ``What plane did you fly during the air parade?'' His father sketched a formation of 9 planes.
\begin{figure}[h]
\centering
\includegraphics[width=9cm]{239}
\end{figure}
``The number of planes to the right of me multiplied by the number of planes to the left of me is 3 less than it would have been if my plane had been 3 places to the right of me.'' How did Volodya solve the problem?
\end{document}

View File

@ -1,40 +0,0 @@
\documentclass[../main.tex]{subfiles}
\begin{document}
\problem{An Elephant and a Mosquito}
Does the weight of an elephant equal the weight of a mosquito? Let $x$ be the weight of an elephant, and $y$ that of a mosquito.
\begin{figure}[h]
\centering
\includegraphics[width=10cm]{252}
\end{figure}
Call the sum of the two weights $2v$, then $x + y = 2v$.
From this equation we can obtain two more:
\[
x - 2v = -y \text{; } x = - y + 2v
\]
Multiply:
\[
x^2 - 2vx = y^2 - 2vy
\]
Add $v^2$:
\[
x^2 - 2vx + v^2 = y^2 - 2vy + v^2 \text{, or } (x - v)^2 = (y - v)^2
\]
Take square roots:
\[
x - v = y - v \text{; } x = y
\]
That is, the elephant's weight ($x$) equals the mosquito's weight ($y$). What is wrong here?
\end{document}

View File

@ -1,16 +0,0 @@
\documentclass[../main.tex]{subfiles}
\begin{document}
\problem{The Lucas Problem}
This problem was invented by Edouard Lucas, a French nineteenth-century mathematician. \\
``Every day at noon,'' Lucas said, ``a ship leaves Le Havre for New York and another ship leaves New York for Le Havre. The trip lasts 7 days and 7 nights. How many New York-Le Havre ships will the ship leaving Le Havre today meet during its journey to New York? Can you answer graphically?
\begin{figure}[h]
\centering
\includegraphics[width=10cm]{255}
\end{figure}
\end{document}

View File

@ -1,16 +0,0 @@
\documentclass[../main.tex]{subfiles}
\begin{document}
\problem{A Shooting Match}
Andryusha, Borya, and Volodya each fired 6 shots, and each got 71 points.
\begin{figure}[h]
\centering
\includegraphics[width=8cm]{263}
\end{figure}
Andryusha's first 2 shots got 22 points and Volodya's first shot got only 3 points. \\
Who hit the bull's-eye?
\end{document}

View File

@ -35,7 +35,7 @@ To compile one handout, do the following:
```latex ```latex
\documentclass[ \documentclass[
... ...
]{../../resources/ormc_handout} ]{../../../lib/tex/ormc_handout}
``` ```
with with

153
build.sh
View File

@ -1,153 +0,0 @@
#!/usr/bin/env bash
#
# This script builds every document in this repo,
# (handout and solutions, if they exist), and creates
# a zip of all resulting files.
# Where we're running this script
run_dir=$(pwd)
tectonic=$(pwd)/tectonic
# Output files
target_dir="${run_dir}/output"
target_zip="${run_dir}/output.zip"
# Clean up previous build
rm -drf "${target_dir}"
rm -f "${target_zip}"
# Build one document.
# Args: <target_dir> <job_name> <doc_dir> <main_file>
# target_dir: move output pdf to this directory
# job_name: name of this document. Output is saved as job_name.pdf
# doc_dir: cd here before building.
# main_file: build this tex file. Usually main.tex
# solutions: if 1, build solutions too
function build() {
local b_target_dir="${1}"
local job_name="${2}"
local doc_dir="${3}"
local main_file="${4}"
echo "|> Building ${job_name}..."
cd "${doc_dir}"
tectonic_args=(
--chatter minimal
#--web-bundle "https://static.betalupi.com/tectonic/texlive2023.tar"
)
# Build handout
echo "\\def\\argNoSolutions{1}\\input{${main_file}}" |
"${tectonic}" \
"${tectonic_args[@]}" \
--outfmt pdf \
-
handout_stat=$?
if [[ $handout_stat == 0 ]]; then
mkdir -p "${b_target_dir}"
mv texput.pdf "${b_target_dir}/${job_name}.pdf"
else
rmdir --ignore-fail-on-non-empty "${b_target_dir}"
rm -f texput.pdf
echo "|> Handout build failed"
echo ""
fi
if [[ $5 == 1 ]]; then
# Build solutions
echo "\\def\\argYesSolutions{1}\\input{${main_file}}" |
"${tectonic}" \
"${tectonic_args[@]}" \
--outfmt pdf \
-
solution_stat=$?
if [[ $solution_stat == 0 ]]; then
mkdir -p "${b_target_dir}"
mv texput.pdf "${b_target_dir}/${job_name}.sols.pdf"
else
rmdir --ignore-fail-on-non-empty "${b_target_dir}"
rm -f texput.pdf
echo "|> Solution build failed"
fi
# Clean up if files contents are identical
#if [[ $(cmp -bl "${b_target_dir}/${job_name}.sols.pdf" "${b_target_dir}/${job_name}.pdf" | wc -l) < 200 ]]; then
# echo "|> Versions identical, removing ${job_name}.sols.pdf"
# rm "${b_target_dir}/${job_name}.sols.pdf"
# solution_stat=1;
#fi
fi
echo ""
if [[ $handout_stat == 0 ]]; then
(
echo -n "{"
echo -n "\"title\": \"${job_name}\"",
echo -n "\"type\": \"$(realpath --relative-to="${target_dir}" "${b_target_dir}")\"",
echo -n "\"description\": \"${job_name}\"",
echo -n "\"handout\": \"https://static.betalupi.com/ormc/$(realpath --relative-to="${target_dir}" "${b_target_dir}")/${job_name}.pdf\","
if [[ $solution_stat == 0 ]]; then
echo -n "\"solutions\": \"https://static.betalupi.com/ormc/$(realpath --relative-to="${target_dir}" "${b_target_dir}")/${job_name}.sols.pdf\","
fi
if [ -f "starred" ]; then
echo -n "\"starred\": true"
else
echo -n "\"starred\": false"
fi
echo -n "},"
) >>"$target_dir/index.json"
fi
cd "${run_dir}"
}
mkdir -p "${target_dir}"
echo -n "[" >"$target_dir/index.json"
for d in "${run_dir}/Misc/Warm-Ups"/*.tex; do
file="$(basename "${d}")"
build \
"${target_dir}/Warm-Ups" \
"${file%.*}" \
"${run_dir}/Misc/Warm-Ups" \
"${file}" \
0
done
for d in "${run_dir}/Advanced"/*/; do
doc_dir=$(realpath "${d}")
job_name="$(basename "${doc_dir}")"
build \
"${target_dir}/Advanced" \
"${job_name}" \
"${doc_dir}" \
"main.tex" \
1
done
for d in "${run_dir}/Intermediate"/*/; do
doc_dir=$(realpath "${d}")
job_name="$(basename "${doc_dir}")"
build \
"${target_dir}/Intermediate" \
"${job_name}" \
"${doc_dir}" \
"main.tex" \
1
done
echo -n "{}]" >>"$target_dir/index.json"
# cd so paths in zip are relative
cd "${target_dir}"
zip -FSr "${target_zip}" .
zip -d "${target_zip}" "index.json" # We don't need this in the zip

View File

@ -1,12 +1,12 @@
\NeedsTeXFormat{LaTeX2e} \NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{macros}[2023/10/16 ORMC Macros] \ProvidesPackage{../../../lib/tex/macros}[2023/10/16 ORMC Macros]
\RequirePackage{hyperref} \RequirePackage{hyperref}
\RequirePackage{pgf} \RequirePackage{pgf}
\RequirePackage{xcolor} \RequirePackage{xcolor}
% Link to this repo, used in titles % Link to this repository
\newcommand{\smallurl}{\small\texttt{\href{https://betalupi.com/handouts}{https://betalupi.com/handouts}}} \newcommand{\smallurl}{\small\texttt{\href{https://betalupi.com/handouts}{https://betalupi.com/handouts}}}
@ -75,7 +75,7 @@
\endgroup \endgroup
} }
% Ruble symbol, per official Kremlin specification % Ruble symbol, per official specification
% %
%\DeclareRobustCommand*{\Rub}{% %\DeclareRobustCommand*{\Rub}{%
% \begingroup % \begingroup

View File

@ -14,7 +14,7 @@
% along with this program. If not, see <https://www.gnu.org/licenses/>. % along with this program. If not, see <https://www.gnu.org/licenses/>.
\NeedsTeXFormat{LaTeX2e} \NeedsTeXFormat{LaTeX2e}
\ProvidesClass{ormc_handout}[2023/05/29 2.0.2 ORMC Handout] \ProvidesClass{../../../lib/tex/ormc_handout}[2023/05/29 2.0.2 ORMC Handout]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 637 KiB

Binary file not shown.

View File

@ -1,49 +0,0 @@
# Game ideas
- Math dominos:
- Each problem is a domino tile, by difficulty.
- Score is sum if 1st try, max if 2nd try. Subtract min if no solution.
- Each team can have 2-3 dominos at a time. No free swaps.
- Pick up dominos without knowing problem.
- что-где-когда:
- All teams solve one problem at once.
- Spacewar!:
- Two teams, each starts in one root node.
- Graph of problems, symmetric across middle
- easy problems close, hard problems far.
- Goal: capture as many nodes as possible
- Solve a problem, capture a node
- solve a problem on the other team's side, capture their node.
- TODO: a fun way to resolve conflicts?
# Topics:
- Divisibility proofs & properties
- 1 exists ==> assume 2 exist
- <= , >= ==> =
- pidgeonhole
# Handout ideas:
- Notation toolbox
- Propositional logic
- Rubik's group
- Graph combinatorics
- Fourier transforms
- Probabilistic proofs
- Bayesian / Frequentist probability
- Data structures
# Handouts to clean up:
- Euler's number
- Lattices
- Nim handout
- Stocks
# Problems to record:
- Nikita: weight of 100 cows
- Seat swapping: everyone wants a seat that's not their own, no two people want the same seat. Each cycle, everyone swaps. Min # of cycles? Solution: 2, reflect. use even and odd cycles. Takeaway: composition of reflections is rotation.
- Geometric optimization: ant on cube shortest path, ant on brick shortest path, ribbon on brick (over-under, h-shape) minimal length, Farthest point from corner of brick
- 180: Sperner lemma and brouwer theorem
- 25 horses. 5 at a time. find top 3? (7 races)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,68 +0,0 @@
- Telescoping sums
- Division algorithm
- Peano axions
- Proof basics
- Show that irrational
- Voting systems
- Weighings
# Beginners 1
Grades 2 - 4
- Basic cyphers
- Modular Arithmetic
- Numbers in other bases
# Beginners 2:
Grades 4 - 6
- Pidgeonhole principle
- Combinatorics
- N choose K (c and p)
- stars and bars
- Induction
- Boosted induction (cauchy, etc)
- Compass-and-Ruler constructions
# Intermediate 1:
Grades 5 - 7
- Graphs
- Instant Insanity
- Euler walks and paths
- Konigsberg
- Logs & Slide rules
- Vectors and Applications
- Probability
- Monty Hall problem
# Intermediate 2:
Grades 6 - 9
# Advanced 1:
Grades 9 - 10
- Linear Algebra Basics
- Graph Theory
- Algorithms:
- Ford-Fulkerson
- Dijkstra
- Minimal spanning tree
- Three-color theorem
# Advanced 2:
Grades 11 - 12
- Logic
- Exists, forall, not. (Definable sets handout)
- Mockingbird, lambda
- Numerical cryptography
- Group Theory
- Understand Euler's Number
- Relations

View File

@ -1,35 +0,0 @@
% use [nosolutions] flag to hide solutions.
% use [solutions] flag to show solutions.
\documentclass[
solutions,
singlenumbering
]{./ormc_handout}
\title{The Size of Sets}
\subtitle{Prepared by Mark on \today{}}
\begin{document}
\maketitle
\section{Set Basics}
\definition{}
A \textit{set} is a collection of objects. \par
If $a$ is an element of set $S$, we write $a \in S$. This is pronounced \say{$a$ in $S$.} \par
The position of each element in a set or the number of times it is repeated doesn't matter. \par
All that matters is \textit{which} elements are in the set.
\vspace{2mm}
We say two sets $A$ and $B$ are equal if every element of $A$ is in $B$, and every element of $B$ is in $A$. This is known as the \textit{principle of extensionality.}
\problem{}
Convince yourself that $\{a, b\} = \{b, a\} = \{a, b, a, b, b\}$.
\begin{solution}
This is a solution.
\end{solution}
\end{document}

View File

@ -3,8 +3,8 @@
\documentclass[ \documentclass[
solutions, solutions,
singlenumbering singlenumbering
]{../../resources/ormc_handout} ]{../../../lib/tex/ormc_handout}
\usepackage{../../resources/macros} \usepackage{../../../lib/tex/macros}
\input{tikzset.tex} \input{tikzset.tex}
\usepackage{units} \usepackage{units}

View File

@ -0,0 +1,6 @@
[metadata]
title = "Compression"
[publish]
handout = true
solutions = true

View File

@ -5,8 +5,8 @@
shortwarning, shortwarning,
singlenumbering, singlenumbering,
unfinished unfinished
]{../../resources/ormc_handout} ]{../../../lib/tex/ormc_handout}
\usepackage{../../resources/macros} \usepackage{../../../lib/tex/macros}
\usepackage{multicol} \usepackage{multicol}

View File

@ -0,0 +1,6 @@
[metadata]
title = "Continued Fractions"
[publish]
handout = true
solutions = true

View File

@ -4,8 +4,8 @@
solutions, solutions,
singlenumbering, singlenumbering,
shortwarning shortwarning
]{../../resources/ormc_handout} ]{../../../lib/tex/ormc_handout}
\usepackage{../../resources/macros} \usepackage{../../../lib/tex/macros}
\usepackage{multicol} \usepackage{multicol}
\usepackage{mathtools} \usepackage{mathtools}

View File

@ -0,0 +1,6 @@
[metadata]
title = "Cryptography"
[publish]
handout = true
solutions = true

Some files were not shown because too many files have changed in this diff Show More