Added problem library prototype

This commit is contained in:
Mark 2023-05-17 13:00:54 -07:00
parent e9bd5b5631
commit a798ffd539
8 changed files with 920 additions and 0 deletions

64
Problems/all.tex Executable file
View File

@ -0,0 +1,64 @@
\documentclass[
solutions,
nowarning
]{../resources/ormc_handout}
\NewDocumentCommand{\p}{ m m }{
\textbf{#1 #2:} \par
{\color{gray}Difficulty:} {\color{cyan!50!gray} \bigstar \bigstar \bigstar}{\color{gray} \bigstar \bigstar}
\vspace{3mm}
\getproblem{#1}{#2}
\vspace{2mm}
\ifsolution{#1}{#2}{
\begin{solution}
\getsolution{#1}{#2}
\end{solution}
}[
\ifanswer{#1}{#2}{%
\vspace{2mm}%
{\color{red}\textbf{Solution:}} \getanswer{#1}{#2}
}
]
\vspace{20mm}
\vfill
}
\input{problem}
%\makeatletter
%\newcommand{\shoppinglist}[1]{Shopping list: #1\checknextarg}
%\newcommand{\checknextarg}{\@ifnextchar\bgroup{\gobblenextarg}{ and that's all!}}
%\newcommand{\gobblenextarg}[1]{ and also #1\@ifnextchar\bgroup%{\gobblenextarg}{ and that's all!}}
%\makeatother
\newcommand{\q}[1]{
\section{#1}
\csname#1:all\endcsname
\pagebreak
}
\begin{document}
\maketitle
{Mark's Problem Library}
{
This document lists all problems in this library. \\
Use it to find problems or debug \LaTeX{}.
}
\q{Algebra}
\q{Combinatorics}
\q{NumberTheory}
\q{Pidgeonhole}
\end{document}

194
Problems/main.tex Executable file
View File

@ -0,0 +1,194 @@
% use [nosolutions] flag to hide solutions.
% use [solutions] flag to show solutions.
\documentclass[
solutions
]{../resources/ormc_handout}
\NewDocumentCommand{\p}{ m m }{
\problem{}
\getproblem{#1}{#2}
\ifsolution{#1}{#2}{
\begin{solution}
\getsolution{#1}{#2}
\end{solution}
}[
\ifanswer{#1}{#2}{
{\color{red}\textbf{Solution:}} \getanswer{#1}{#2}
}
]
\vfill
}
% Defines a new problem.
% See problem definition files for usage examples.
\long\def\problemdef#1#2#3{
\ifcsname#1:problem:#2\endcsname
\PackageError{Problem Sets}{Problem #1:#2 is already defined}{}
\fi
% Use a group to limit scope of special commands.
\begingroup
% \gdef = \global\def
% This makes problem definitions global, and not restricted to this group.
%
% ##1: used to define parametrized macros in a parametrized macro.
% When \problemdef is expanded, ##1 becomes #1.
%
% \long\def: like \def, but allows multi-paragraph arguments
% \def\name#1{def: #1}: define a macro \name with one arg. TeX primitive.
%
% We don't use \newcommand or \renewcommand here because they will fail if
% a macro is defined/not defined. \def will always work, defining a new name
% in this group, temporarily redefining existing commands.
%
% \expandafter <macro> <tokens>
% \expandafter command delays expanding a macro until its arguments have been expanded.
\long\def\difficulty##1{\expandafter\gdef\csname#1:difficulty:#2\endcsname{##1}}
\long\def\statement##1{\expandafter\gdef\csname#1:problem:#2\endcsname{##1}}
\long\def\solution##1{\expandafter\gdef\csname#1:solution:#2\endcsname{##1}}
\long\def\answer##1{\expandafter\gdef\csname#1:answer:#2\endcsname{##1}}
#3
\endgroup
\ifcsname#1:all\endcsname
\expandafter\edef\csname#1:all\endcsname{\csname#1:all\endcsname \p{#1}{#2}}
\else
\expandafter\gdef\csname#1:all\endcsname{
\p{#1}{#2}
}
\fi
}
\input{problems/numbertheory}
\input{problems/algebra}
\input{problems/combinatorics}
\input{problems/pidgeonhole}
% Gets problem data.
% Arguments:
% #1: Category
% #2: Problem id
% #3: Field to get
\NewDocumentCommand{\get}{ m m m }{
\ifcsname#1:#3:#2\endcsname
\csname#1:#3:#2\endcsname
\else
\PackageError{Problem Sets}{Problem #1:#2 is not defined}{}
\fi
}
\NewDocumentCommand{\getdifficulty}{ m m }{\get{#1}{#2}{difficulty}}
\NewDocumentCommand{\getproblem}{ m m }{\get{#1}{#2}{problem}}
% #1: Category
% #2: Problem id
% #3: Show if this problem has an answer
% #4: Show if this problem doesn't have an answer
\NewDocumentCommand{\ifanswer}{ m m m d[]}{
\ifcsname#1:answer:#2\endcsname
#3
\else
\IfNoValueF{#4}{#4}
\fi
}
\NewDocumentCommand{\ifsolution}{ m m m d[]}{
\ifcsname#1:solution:#2\endcsname
#3
\else
\IfNoValueF{#4}{#4}
\fi
}
\NewDocumentCommand{\getanswer}{ m m }{
\ifanswer{#1}{#2}{
\get{#1}{#2}{answer}
}[
\PackageError{Problem Sets}{Problem #1:#2 has no answer}{}
]
}
\NewDocumentCommand{\getsolution}{ m m }{
\ifsolution{#1}{#2}{
\get{#1}{#2}{solution}
}[
\PackageError{Problem Sets}{Problem #1:#2 has no solution}{}
]
}
%\makeatletter
%\newcommand{\shoppinglist}[1]{Shopping list: #1\checknextarg}
%\newcommand{\checknextarg}{\@ifnextchar\bgroup{\gobblenextarg}{ and that's all!}}
%\newcommand{\gobblenextarg}[1]{ and also #1\@ifnextchar\bgroup%{\gobblenextarg}{ and that's all!}}
%\makeatother
\newcommand{\q}[1]{
\csname#1:all\endcsname
}
\begin{document}
\q{Algebra}
\maketitle
<Advanced 2>
<Winter 2022>
{Finite Automata}
{Prepared by Mark and Nikita on \today}
\section{Number Theory}
\p{NumberTheory}{1}
\p{NumberTheory}{2}
\p{NumberTheory}{3}
\p{NumberTheory}{4}
\p{NumberTheory}{5}
\pagebreak
\section{Algebra}
\p{Algebra}{1}
\p{Algebra}{2}
\p{Algebra}{3}
\p{Algebra}{4}
\p{Algebra}{5}
\pagebreak
\section{Combinatorics}
\p{Combinatorics}{1}
\p{Combinatorics}{2}
\p{Combinatorics}{3}
\p{Combinatorics}{4}
\p{Combinatorics}{5}
\pagebreak
\section{Pidgeonhole}
\p{Pidgeonhole}{1}
\p{Pidgeonhole}{2}
\p{Pidgeonhole}{3}
\p{Pidgeonhole}{4}
\p{Pidgeonhole}{5}
\p{Pidgeonhole}{6}
\p{Pidgeonhole}{7}
\p{Pidgeonhole}{8}
\p{Pidgeonhole}{9}
\p{Pidgeonhole}{10}
\p{Pidgeonhole}{11}
\p{Pidgeonhole}{12}
\p{Pidgeonhole}{13}
\p{Pidgeonhole}{14}
\p{Pidgeonhole}{15}
\p{Pidgeonhole}{16}
\p{Pidgeonhole}{17}
\p{Pidgeonhole}{18}
\p{Pidgeonhole}{19}
\end{document}

92
Problems/problem.tex Executable file
View File

@ -0,0 +1,92 @@
% Defines a new problem.
% See problem definition files for usage examples.
\long\def\problemdef#1#2#3{
\ifcsname#1:problem:#2\endcsname
\PackageError{Problem Sets}{Problem #1:#2 is already defined}{}
\fi
% Use a group to limit scope of special commands.
\begingroup
% \gdef = \global\def
% This makes problem definitions global, and not restricted to this group.
%
% ##1: used to define parametrized macros in a parametrized macro.
% When \problemdef is expanded, ##1 becomes #1.
%
% \long\def: like \def, but allows multi-paragraph arguments
% \def\name#1{def: #1}: define a macro \name with one arg. TeX primitive.
%
% We don't use \newcommand or \renewcommand here because they will fail if
% a macro is defined/not defined. \def will always work, defining a new name
% in this group, temporarily redefining existing commands.
%
% \expandafter <macro> <tokens>
% \expandafter command delays expanding a macro until its arguments have been expanded.
\long\def\difficulty##1{\expandafter\gdef\csname#1:difficulty:#2\endcsname{##1}}
\long\def\statement##1{\expandafter\gdef\csname#1:problem:#2\endcsname{##1}}
\long\def\solution##1{\expandafter\gdef\csname#1:solution:#2\endcsname{##1}}
\long\def\answer##1{\expandafter\gdef\csname#1:answer:#2\endcsname{##1}}
#3
\endgroup
\ifcsname#1:all\endcsname
\expandafter\edef\csname#1:all\endcsname{\csname#1:all\endcsname \p{#1}{#2}}
\else
\expandafter\gdef\csname#1:all\endcsname{
\p{#1}{#2}
}
\fi
}
% Gets problem data.
% Arguments:
% #1: Category
% #2: Problem id
% #3: Field to get
\NewDocumentCommand{\get}{ m m m }{%
\ifcsname#1:#3:#2\endcsname%
\csname#1:#3:#2\endcsname%
\else%
\PackageError{Problem Sets}{Problem #1:#2 is not defined}{}
\fi%
}
\NewDocumentCommand{\getdifficulty}{ m m }{\get{#1}{#2}{difficulty}}
\NewDocumentCommand{\getproblem}{ m m }{\get{#1}{#2}{problem}}
% #1: Category
% #2: Problem id
% #3: Show if this problem has an answer
% #4: Show if this problem doesn't have an answer
\NewDocumentCommand{\ifanswer}{ m m m d[] }{%
\ifcsname#1:answer:#2\endcsname%
#3%
\else%
\IfNoValueF{#4}{#4}%
\fi%
}
\NewDocumentCommand{\ifsolution}{ m m m d[] }{
\ifcsname#1:solution:#2\endcsname%
#3%
\else%
\IfNoValueF{#4}{#4}%
\fi%
}
\NewDocumentCommand{\getanswer}{ m m }{%
\ifanswer{#1}{#2}{\get{#1}{#2}{answer}}%
[\PackageError{Problem Sets}{Problem #1:#2 has no answer}{}]%
}
\NewDocumentCommand{\getsolution}{ m m }{
\ifsolution{#1}{#2}{\get{#1}{#2}{solution}}%
[\PackageError{Problem Sets}{Problem #1:#2 has no solution}{}]%
}
\input{problems/numbertheory}
\input{problems/algebra}
\input{problems/combinatorics}
\input{problems/pidgeonhole}

52
Problems/problems/algebra.tex Executable file
View File

@ -0,0 +1,52 @@
\problemdef{Algebra}{1}{
\statement{
Evaluate
$
\bigl( 1 - \frac{1}{4} \bigr)
\bigl( 1 - \frac{1}{9} \bigr)
\bigl( 1 - \frac{1}{16} \bigr)
~ ... ~
\bigl( 1 - \frac{1}{255} \bigr)
$
}
\answer{$\frac{8}{15}$}
}
\problemdef{Algebra}{2}{
\statement{
$(a + b)(a + b - 1) = ab$ and $a^2 + b^2 = 3$. Find $a^3 + b^3$.
}
\answer{3}
}
\problemdef{Algebra}{3}{
\statement{
Simplify $(2^{62} + 1)/(2^{31} + 2^{16} + 1)$
}
\answer{$2^{31} - 2^{16} + 1$}
}
\problemdef{Algebra}{4}{
\statement{
$x, y, z > 0$ and $xyz = 1$. \par
Also, $x + 1/z = 5$ and $y + 1/x = 29$.
Find $z + 1/y$.
}
\answer{$z + 1/y = 1/4$}
}
\problemdef{Algebra}{5}{
\statement{
Factor $x^8 + x^4 + 1$ into four quadratics.
}
\answer{$(x^2 - \sqrt{3} x + 1)~(x^2 + \sqrt{3} x + 1)~(x^2 - x + 1)~(x^2 + x + 1)$}
}

View File

@ -0,0 +1,42 @@
\problemdef{Combinatorics}{1}{
\statement{
A real estate investor asked a developer to paint 2017 houses so that at least 1000 are green and 1000 are red. What is the maximum number of colors the developer can use?
}
\answer{19}
}
\problemdef{Combinatorics}{2}{
\statement{
How many ways are there to cut one $3 \times 5$ rectangle into five $1 \times 3$ rectangles?
}
\answer{4}
}
\problemdef{Combinatorics}{3}{
\statement{
How many different integral solutions $(x, y, z)$ are there to $x+y+z = 20$?
}
\answer{$C_{19}^2$}
}
\problemdef{Combinatorics}{4}{
\statement{
Consider an uncolored $8 \times 8$ board. How many ways are there to paint the squares black or white so that we end up with exactly 31 black squares, none of which share an edge?
}
\answer{68}
}
\problemdef{Combinatorics}{5}{
\statement{
Let $A$ be the set of four-digit integers in which the first digit is equal to the sum of the other three. \par
Let $B$ be the set of four-digit integers in which the last digit is equal to the sum of the other three. \par
Which set is larger, and by how many elements?
}
\answer{$A$, by 54.}
}

43
Problems/problems/misc.tex Executable file
View File

@ -0,0 +1,43 @@
\problem{}
A carpenter cut a chessboard into $1 \times 1$ squares in 70 minutes. \\
How long will it take him to cut it into $2 \times 2$ squares? \\
\begin{solution}
30
\end{solution}
\problem{}
There are two kinds of books on a shelf: those on permissible magic and those on black magic. Two books on permissible magic cannot be set between exactly three other books, and two books on black magic may not stand next to each other. \\
What is the maximal amount of books that may be placed on the shelf?
\begin{solution}
8
\end{solution}
\problem{}
The numbers $1 ... 9$ are arranged in a $3 \times 3$ grid. \\
The sum of each row and column is then computed. \\
What is the maximum number of consecutive integers one may find in the set of these sums?
\begin{solution}
5
\end{solution}
\problem{}
16 rugby teams participate in a regional championship. Each pair of teams plays against each other twice. The 8 teams with the most wins will proceed to the national championship. If there is a tie in this ranking, the tied teams will draw lots. \\
Assume a rugby game can never tie. What is the minimum number of wins a team needs to guarantee a spot in the nationals?
\begin{solution}
23
\end{solution}
\problem{}
Five boxes are filled with pastries. We know that box C contains a third of the pastries in E, and that B contains two times more than C and E combined. A contains half the number of pastries in E, and a tenth of those in D. Box B contains four times more pastries than D. \\
What is the minimal possible positive number of pastries in all the boxes put together?
\begin{solution}
310
\end{solution}

View File

@ -0,0 +1,70 @@
\problemdef{NumberTheory}{1}{
\statement{
Starting September 1, four mathcirclers began to visit the cinema. The first visited it every fourth day, the second --- every fifth, the third --- every sixth and the fourth --- every ninth. \par
When will all the circlers meet at the cinema for the second time?
}
\answer{34}
}
\problemdef{NumberTheory}{2}{
% МАТЕМ + АТИКА = 187407
\statement{
Each letter in $MATHM + AJORS$ represents a single-digit number. Maximize this quantity.
}
\answer{UNKNOWN}
}
\problemdef{NumberTheory}{3}{
\statement{
$Q$ is a three digit number. \par
$Q - 7$ is divisible by 7. $Q - 8$ is divisible by 8. $Q - 9$ is divisible by 9. What is $Q$?
}
\answer{504}
}
\problemdef{NumberTheory}{4}{
\statement{
Alex and Anna share a tub of popcorn. Alex eats one kernel, Anna eats two. Alex then eats three, and the pattern continues. The person that takes the final turn consumes all the remaining popcorn, even if there aren't enough kernels for a complete turn.
Alex ate 2017 kernels. How many were left for Anna?
}
\answer{1980}
}
\problemdef{NumberTheory}{5}{
\statement{
Several positive integers were multiplied to get $224$. \par
The smallest of these was exactly equal to half the largest. \par
How many numbers were multiplied?
}
\answer{3}
}
\problemdef{NumberTheory}{6}{
\statement{
How many natural numbers $n$ less than 10,000 satisfy $2^n - n^2 \equiv 0~~\text{(mod 7)}$?
}
\answer{2858}
}

363
Problems/problems/pidgeonhole.tex Executable file
View File

@ -0,0 +1,363 @@
\problemdef{Pidgeonhole}{1}{
\statement{
Is it possible to cover an equilateral triangle with two smaller equilateral triangles? Why or why not?
}
\solution{
In order to completely cover an equilateral triangle, the two smaller triangles must cover all three vertices. Since the longest length of an equilateral triangle is one of its sides, a smaller triangle cannot cover more than one vertex. Therefore, we cannot completely cover the triangle with two smaller copies. \par
\textcolor{gray}{\textit{Bonus question:}} Can you cover a square with three smaller squares?
}
}
\problemdef{Pidgeonhole}{2}{
\statement{
You are given $n + 1$ integers. \par
Prove that at least two of them have a difference divisible by $n$.
}
\answer{}
\solution{
$n~|~(a-b) \iff a \equiv b \pmod{n}$ \par
Let $i_0 ... i_{n+1}$ be our set of integers. If we pick $i_0 ... i_{n+1}$ so that no two have a difference divisible by $n$, we must have $i_0 \not\equiv i_k \pmod{n}$ for all $1 \leq k \leq n+1$. There are $n$ such $i_k$, and there are $n$ equivalence classes mod $n$. \par
Therefore, either, $i_1 ... i_{n+1}$ must cover all equivalence classes mod $n$ (implying that $i_0 \equiv i_k \pmod{n}$ for some k), or there exist two elements in $i_1 ... i_{n+1}$ that are equivalent mod $n$. \par
In either case, we can find $a, b$ so that $a \equiv b \pmod{n}$, which implies that $n$ divides $a-b$.
}
}
\problemdef{Pidgeonhole}{3}{
\statement{
You have an $8 \times 8$ chess board with two opposing corner squares cut off. You also have a set of dominoes, each of which is the size of two squares. Is it possible to completely cover the the board with dominos, so that none overlap nor stick out?
}
\solution{
A domino covers two adjacent squares. Adjacent squares have different colors. \par
If you remove two opposing corners of a chessboard, you remove two squares of the same color, and you're left with $32$ of one and $30$ of the other. \par
Since each domino must cover two colors, you cannot cover the modified board.
}
}
\problemdef{Pidgeonhole}{4}{
\statement{
The ocean covers more than a half of the Earth's surface. Prove that the ocean has at least one pair of antipodal points.
}
\solution{
Let $W$ be the set of wet points, and $W^c$ the set of points antipodal to those in $W$. $W$ and $W^c$ each contain more than half of the points on the earth. The set of dry points, $D$, contains less than half of the points on the earth. Therefore, $W^c \not\subseteq D$. \par
\textcolor{gray}{\textit{Note:}} This solution isn't very convincing. However, it is unlikely that the students know enough to provide a fully rigorous proof.
}
}
\problemdef{Pidgeonhole}{5}{
\statement{
There are $n > 1$ people at a party. Prove that among them there are at least two people who have the same number of acquaintances at the gathering. (We assume that if A knows B, then B also knows A)
}
\solution{
Assume that every attendee knows a different number of people. There is only one way this may happen: the most popular person knows $n-1$ people (that is, everyone but himself), the second-most popular knows $n-2$, etc. The least-popular person must then know $0$ people. \par
This is impossible, since we know that someone must know $n-1$. \par
(Remember, ``knowing'' must be mutual.)
}
}
\problemdef{Pidgeonhole}{6}{
\statement{
Pick five points in $\mathbb{R}^2$ with integral coordinates. Show that two of these form a line segment that has an integral midpoint.
}
\solution{
Let $e, o$ represent even and odd integers. \par
There are four possible classes of points: $(e, e)$, $(o, o)$, $(e, o)$, $(o, e)$. \par
$\text{midpoint}(a, b) = (\frac{a_x + b_x}{2}, \frac{a_y + b_y}{2})$. If $a_x + b_x$ and $a_y + b_y$ are both even, the midpoint of points $a$ and $b$ will have integer coordinates. \par
Since we pick five points from four classes, at least two must come from the same class. \par
$e + e = e$ and $o + o = e$, so the midpoint between two points of the same class must have integral coordinates. \par
}
}
\problemdef{Pidgeonhole}{7}{
\statement{
Every point on a line is painted black or white. Show that there exist three points of the same color where one is the midpoint of the line segment formed by the other two.
}
\solution{
This is a proof by contradiction. We will try to construct a set of points where three points have such an arrangement. \par
We know that some two points on the line will have the same color:
\begin{center}
\begin{tikzpicture}
% Axis
\draw[latex-latex] (-3,0) -- (4,0);
% Ticks
\foreach \x in {-2,-1,0,1,2,3}
\draw[shift={(\x,0)},color=black] (0pt,3pt) -- (0pt,-3pt);
% Points
\path [draw=black, fill=black] (1,0) circle (2pt);
\path [draw=black, fill=black] (0,0) circle (2pt);
\end{tikzpicture}
\end{center}
This implies that the points one unit left and right of them must also be white---if they are not, they will form a line of equidistant black points.
\begin{center}
\begin{tikzpicture}
% Axis
\draw[latex-latex] (-3,0) -- (4,0);
% Ticks
\foreach \x in {-2,-1,0,1,2,3}
\draw[shift={(\x,0)},color=black] (0pt,3pt) -- (0pt,-3pt);
% Points
\path [draw=black, fill=black] (1,0) circle (2pt);
\path [draw=black, fill=black] (0,0) circle (2pt);
\path [draw=black, fill=white] (2,0) circle (2pt);
\path [draw=black, fill=white] (-1,0) circle (2pt);
\end{tikzpicture}
\end{center}
Our original assumption also implies that the center point is white. \par
This, however, creates a line of equidistant white points:
\begin{center}
\begin{tikzpicture}
% Axis
\draw[latex-latex] (-3,0) -- (4,0);
% Ticks
\foreach \x in {-2,-1,0,1,2,3}
\draw[shift={(\x,0)},color=black] (0pt,3pt) -- (0pt,-3pt);
% Points
\path [draw=black, fill=black] (1,0) circle (2pt);
\path [draw=black, fill=black] (0,0) circle (2pt);
\path [draw=black, fill=white] (0.5,0) circle (2pt);
\path [draw=black, fill=white] (2,0) circle (2pt);
\path [draw=black, fill=white] (-1,0) circle (2pt);
\end{tikzpicture}
\end{center}
It is thus impossible to create a set of points that does not have the property stated in the problem.
}
}
\problemdef{Pidgeonhole}{8}{
\statement{
Every point on a plane is painted black or white. Show that there exist two points in the plane that have the same color and are located exactly one foot away from each other.
}
\solution{Pick three points that form an equilateral triangle with side length 1.}
}
\problemdef{Pidgeonhole}{9}{
\statement{
Each point on a circle is colored either black or white. Prove that there exist three equally spaced points of the same color.
}
\solution{This problem is exactly the same as linethreecolor}
}
\problemdef{Pidgeonhole}{10}{
\statement{
Let n be an integer not divisible by $2$ and $5$. Show that n has a multiple consisting entirely of ones.
}
}
\problemdef{Pidgeonhole}{11}{
\statement{
Prove that for any $n > 1$, there exists an integer made of only sevens and zeros that is divisible by $n$.
}
}
\problemdef{Pidgeonhole}{12}{
\statement{
Choose $n + 1$ integers between $1$ and $2n$. Show that at least two of these are co-prime.
}
}
\problemdef{Pidgeonhole}{13}{
\statement{
Choose $n + 1$ integers between $1$ and $2n$. Show that you must select two numbers $a$ and $b$ such that $a$ divides $b$.
}
\solution{
Split the the set $\{1, ..., 2n\}$ into classes defined by each integer's greatest odd divisor. There will be $n$ classes since there are $\frac{k}{2}$ odd numbers between $1$ and $n$. Because we pick $n + 1$ numbers, at least two will come from the same class---they will be divisible. \par
For example, if $n = 5$, our classes are
\begin{itemize}
\item[1:] $\{1, 2, 4, 8\}$
\item[3:] $\{3, 6\}$
\item[5:] $\{5, 10\}$
\item[7:] $\{7\}$
\item[9:] $\{9\}$
\end{itemize}
}
}
\problemdef{Pidgeonhole}{14}{
\statement{
Show that it is always possible to choose a subset of the set of integers $a_1, a_2, ... , a_n$ so that the sum of the numbers in the subset is divisible by $n$.
}
}
\problemdef{Pidgeonhole}{15}{
\statement{
Show that there exists a positive integer divisible by $2013$ that has $2014$ as its last four digits.
}
}
\problemdef{Pidgeonhole}{16}{
\statement{
Let $n$ be an odd number. Let $a_1, a_2, ... , a_n$ be a permutation of the numbers $1, 2, ... , n$. \par
Show that $(a_1 - 1) \times (a_2 - 2) \times ... \times (a_n - n)$ is even.
}
\solution{
If $n$ is odd, there will be $m$ even and $m + 1$ odd numbers between $1$ and $n$. \par
Therefore, if we match each $a_n$ with an integer in $[1, ..., n]$, we will have to match at least one odd number with an odd number. \par
The difference of two odd numbers is even, so the product above will have at least one factor of two.
}
}
\problemdef{Pidgeonhole}{17}{
\statement{
A stressed-out student consumes at least one espresso every day of a particular year, drinking $500$ overall. Show the student drinks exactly $100$ espressos on some consecutive sequence of days.
}
\solution{
Rearrange the problem. Don't think about days, think about espressos. Consider the following picture:
\begin{center}
\begin{tikzpicture}
% Axis
\draw[-] (1,0) -- (12,0);
% Ticks
\foreach \x in {1, 2, 3, 4}
\draw[shift={(\x,0)},color=black] (0pt,3pt) -- (0pt,-3pt);
% Legend
\node[above] at (-0.5, 3pt) {Day consumed};
\node[below] at (-0.5,-3pt) {Espresso \#};
% Bottom numbers
\foreach \x in {1, 2, ..., 7}
\draw[shift={(\x,0)},color=black] (0pt,0pt) -- (0pt, -3pt) node[below] {$\x$};
\draw[shift={(9,0)},color=black] (0pt,0pt) -- (0pt, -3pt) node[below] {$...$};
\draw[shift={(11,0)},color=black] (0pt,0pt) -- (0pt, -3pt) node[below] {$499$};
\draw[shift={(12,0)},color=black] (0pt,0pt) -- (0pt, -3pt) node[below] {$500$};
% Top numbers
\draw[shift={(1,0)},color=black] (0pt,0pt) -- (0pt,3pt) node[above] {$1$};
\draw[shift={(2,0)},color=black] (0pt,0pt) -- (0pt,3pt) node[above] {$1$};
\draw[shift={(3,0)},color=black] (0pt,0pt) -- (0pt,3pt) node[above] {$2$};
\draw[shift={(4,0)},color=black] (0pt,0pt) -- (0pt,3pt) node[above] {$2$};
\draw[shift={(5,0)},color=black] (0pt,0pt) -- (0pt,3pt) node[above] {$3$};
\draw[shift={(6,0)},color=black] (0pt,0pt) -- (0pt,3pt) node[above] {$3$};
\draw[shift={(7,0)},color=black] (0pt,0pt) -- (0pt,3pt) node[above] {$3$};
\draw[shift={(9,0)},color=black] (0pt,0pt) -- (0pt,3pt) node[above] {$...$};
\draw[shift={(11,0)},color=black] (0pt,0pt) -- (0pt,3pt) node[above] {$365$};
\draw[shift={(12,0)},color=black] (0pt,0pt) -- (0pt,3pt) node[above] {$365$};
\draw[shift={(3, -1)}, color=orange, thick] (0pt,0pt) -- (0pt,3pt)
node[below, color=gray, shift={(0, -3pt)}] {$3$};
\draw[color=orange, thick] (3, -1) -- (8.5, -1) node[below, midway] {100 espressos};
\draw[shift={(8.5, -1)}, color=orange, thick] (0pt,0pt) -- (0pt,3pt)
node[below, color=gray, shift={(0, -3pt)}] {$102$};
\end{tikzpicture}
\end{center}
If there exists a sequence of days where the student drinks exactly 100 espressos, we must have at least one ``block'' (in orange, above) of 100 espressos that both begins and ends on a ``clean break'' between days. \par
There are $499$ ``breaks'' between $500$ espressos. \par
In a year, there are $364$ clean breaks. This leaves $499 - 364 = 135$ ``dirty'' breaks. \par
We therefore have $135$ places to start a block on a dirty break, and $135$ places to end a block on a dirty break. This gives us a maximum of $270$ dirty blocks. \par
However, there are $401$ possible blocks, since we can start one at the $1^{\text{st}}, 2^{\text{nd}}, ..., 401^{\text{st}}$ espresso. \par
Out of $401$ blocks, a maximum of $270$ can be dirty. We are therefore guaranteed at least $131$ clean blocks. This completes the problem---each clean block represents a set of consecutive, whole days during which exactly 100 espressos were consumed.
}
}
\problemdef{Pidgeonhole}{18}{
\statement{
Show that there are either three mutual acquaintances or four mutual strangers at a party with ten or more people.
}
}
\problemdef{Pidgeonhole}{19}{
\statement{
Given a table with a marked point, $O$, and with $2013$ properly working watches put down on the table, prove that there exists a moment in time when the sum of the distances from $O$ to the watches' centers is less than the sum of the distances from $O$ to the tips of the watches' minute hands.
}
}