% LaTeX solution template for Math 235
% -----------------------------------------------------------------

% Like most advanced LaTeX files, this one begins with a lot of
% boilerplate. You don't need to understand (or even read) most of it.
% All you need to do is fill in your name, email address,
% and the number of the pset. (Search for "METADATA" to find the place
% for this.) Then, you can go straight to the "EXERCISE 1"
% section and start writing your solutions.
% The "VARIOUS USEFUL COMMANDS" section is probably worth taking a
% look at at some point.

% If you are here to learn about LaTeX, search for
% "START READING HERE" and start reading there.

%----------------------------------------------------------------------------------------
%	PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------
\documentclass[paper=a4, fontsize=12pt]{scrartcl} % A4 paper and 12pt font size
\usepackage[T1]{fontenc} % Use 8-bit encoding that has 256 glyphs
\usepackage[english]{babel} % English language/hyphenation
\usepackage{amsmath,amsfonts,amsthm,amssymb} % Math packages
\usepackage{mathrsfs}    % More math packages
\usepackage{sectsty}  % Allows customizing section commands
\allsectionsfont{\centering \normalfont\scshape} % Make all section titles centered, the default font and small caps %remove this to left align section tites
\usepackage{hyperref} % Turns cross-references into hyperlinks,
                      % and defines \url and \href commands.
\usepackage{graphicx} % For embedding graphics files.
\usepackage{framed}   % For the "leftbar" environment used below.
\usepackage{ifthen}   % Used for the \powset command below.
\usepackage{lastpage} % for counting the number of pages
\usepackage[headsepline,footsepline,manualmark]{scrlayer-scrpage}
\usepackage[height=10in,a4paper,hmargin={1in,0.8in}]{geometry}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{tikz}     % This is a powerful tool to draw vector
                      % graphics inside LaTeX. In particular, you can
                      % use it to draw graphs.
\usepackage{verbatim} % For the "verbatim" environment, in which
                      % special symbols can be used freely without
                      % confusing the compiler. (And it's typeset in
                      % a constant-width font.)
                      % Useful, e.g., for quoting code (or ASCII art).

%\numberwithin{table}{section} % Number tables within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)

\setlength\parindent{20pt} % Makes indentation for paragraphs longer.
                           % This makes paragraphs stand out more.

%----------------------------------------------------------------------------------------
%	VARIOUS USEFUL COMMANDS
%----------------------------------------------------------------------------------------
% The commands below might be convenient. For example, you probably
% prefer to write $\powset[2]{V}$ for the set of $2$-element subsets
% of $V$, rather than writing $\mathcal{P}_2(V)$.
% Notice that you can easily define your own commands like this.
% Caveat: Some of these commands need to be properly "guarded" when
% they occur in subscripts or superscripts. So you should not write
% $K_\CC$, but rather $K_{\CC}$.
\newcommand{\CC}{\mathbb{C}} % complex numbers
\newcommand{\RR}{\mathbb{R}} % real numbers
\newcommand{\QQ}{\mathbb{Q}} % rational numbers
\newcommand{\NN}{\mathbb{N}} % nonnegative integers
\newcommand{\Z}[1]{\mathbb{Z}/#1\mathbb{Z}} % integers modulo k
                                            % (syntax: "\Z{k}")
\newcommand{\ZZ}{\mathbb{Z}} % integers
\newcommand{\id}{\operatorname{id}} % identity map
\newcommand{\lcm}{\operatorname{lcm}}
% Lowest common multiple. For historical reasons, LaTeX has a \gcd
% command built in, but not an \lcm command. The preceding line
% rectifies that.
\newcommand{\fract}{\operatorname{frac}} % fractional part
\newcommand{\rev}{\operatorname{rev}} % reversal of a walk
\newcommand{\powset}[2][]{\ifthenelse{\equal{#2}{}}{\mathcal{P}\left(#1\right)}{\mathcal{P}_{#1}\left(#2\right)}}
% $\powset[k]{S}$ stands for the set of all $k$-element subsets of
% $S$. The argument $k$ is optional, and if not provided, the result
% is the whole powerset of $S$.
\newcommand{\set}[1]{\left\{ #1 \right\}}
% $\set{...}$ compiles to {...} (set-brackets).
\newcommand{\abs}[1]{\left| #1 \right|}
% $\abs{...}$ compiles to |...| (absolute value, or size of a set).
\newcommand{\tup}[1]{\left( #1 \right)}
% $\tup{...}$ compiles to (...) (parentheses, or tuple-brackets).
\newcommand{\ive}[1]{\left[ #1 \right]}
% $\ive{...}$ compiles to [...] (Iverson bracket, aka truth value).
\newcommand{\floor}[1]{\left\lfloor #1 \right\rfloor}
% $\floor{...}$ compiles to |_..._| (floor function).
\newcommand{\verts}[1]{\operatorname{V}\left( #1 \right)}
% $\verts{...}$ compiles to V(...) (vertex set of a graph/digraph).
\newcommand{\edges}[1]{\operatorname{E}\left( #1 \right)}
% $\edges{...}$ compiles to E(...) (edge set of a graph).
\newcommand{\arcs}[1]{\operatorname{A}\left( #1 \right)}
% $\arcs{...}$ compiles to A(...) (arc set of a digraph).
\newcommand{\lf}[2]{#1^{\underline{#2}}}
% $\lf{...1}{...2}$ compiles to $...1^{\underline{...2}}$.
% This is a notation for the falling factorial.
\newcommand{\underbrack}[2]{\underbrace{#1}_{\substack{#2}}}
% $\underbrack{...1}{...2}$ yields
% $\underbrace{...1}_{\substack{...2}}$. This is useful for doing
% local rewriting transformations on mathematical expressions with
% justifications. For example, try this out:
% $ \underbrack{(a+b)^2}{= a^2 + 2ab + b^2 \\ \text{(by the binomial formula)}} $
\newcommand{\horrule}[1]{\rule{\linewidth}{#1}} % Create horizontal rule command with 1 argument of height
\newcommand{\nnn}{\nonumber\\} % Don't number this line in an "align" environment, and move on to the next line.
\newcommand{\explain}[1]{\tup{\hspace{-0.5pc}\text{\begin{tabular}{c}#1\end{tabular}\hspace{-0.5pc}}}}
% $\explain{...}$ interprets the "..." as text (you can
% nest some math inside by putting it in $...$'s as you
% would in any other text block) and puts it in parentheses.

%----------------------------------------------------------------------------------------
%	MAKING SUMMATION SIGNS ALWAYS PUT THEIR BOUNDS ABOVE AND BELOW
%	THE SIGN
%----------------------------------------------------------------------------------------
% The following are hacks to ensure that sums (such as
% $\sum_{k=1}^n k$) always put their bounds (i.e., the $k=1$ and the
% $n$) underneath and above the sign, as opposed to on its right.
% Same for products (\prod), set unions (\bigcup) and set
% intersections (\bigcap). Remove the 8 lines below if you do not want
% this behavior.
\let\sumnonlimits\sum
\let\prodnonlimits\prod
\let\cupnonlimits\bigcup
\let\capnonlimits\bigcap
\renewcommand{\sum}{\sumnonlimits\limits}
\renewcommand{\prod}{\prodnonlimits\limits}
\renewcommand{\bigcup}{\cupnonlimits\limits}
\renewcommand{\bigcap}{\capnonlimits\limits}

%----------------------------------------------------------------------------------------
%	ENVIRONMENTS
%----------------------------------------------------------------------------------------
% The incantations below define how theorem environments
% (\begin{theorem} ... \end{theorem}) and their likes will look like.
\newtheoremstyle{plainsl}% <name>
  {8pt plus 2pt minus 4pt}% <Space above>
  {8pt plus 2pt minus 4pt}% <Space below>
  {\slshape}% <Body font>
  {0pt}% <Indent amount>
  {\bfseries}% <Theorem head font>
  {.}% <Punctuation after theorem head>
  {5pt plus 1pt minus 1pt}% <Space after theorem headi>
  {}% <Theorem head spec (can be left empty, meaning `normal')>

% Environments which make the text inside them slanted:
\theoremstyle{plainsl}
  \newtheorem{theorem}{Theorem}[section]
  \newtheorem{proposition}[theorem]{Proposition}
  \newtheorem{lemma}[theorem]{Lemma}
  \newtheorem{corollary}[theorem]{Corollary}
  \newtheorem{conjecture}[theorem]{Conjecture}
% Environments that don't:
\theoremstyle{definition}
  \newtheorem{definition}[theorem]{Definition}
  \newtheorem{example}[theorem]{Example}
  \newtheorem{exercise}[theorem]{Exercise}
  \newtheorem{examples}[theorem]{Examples}
  \newtheorem{algorithm}[theorem]{Algorithm}
  \newtheorem{question}[theorem]{Question}
 \theoremstyle{remark}
  \newtheorem{remark}[theorem]{Remark}
\newenvironment{statement}{\begin{quote}}{\end{quote}}
\newenvironment{fineprint}{\begin{small}}{\end{small}}

%----------------------------------------------------------------------------------------
%	METADATA
%----------------------------------------------------------------------------------------
\newcommand{\myname}{Darij Grinberg} % ENTER YOUR NAME HERE
\newcommand{\mymail}{darij.grinberg@drexel.edu} % ENTER YOUR EMAIL HERE
\newcommand{\psetnumber}{6} % ENTER THE NUMBER OF THIS PSET HERE

%----------------------------------------------------------------------------------------
%	HEADER AND FOOTER
%----------------------------------------------------------------------------------------
\ihead{Solutions to homework set \#\psetnumber} % Page header left
\ohead{page \thepage\ of \pageref{LastPage}} % Page header right
\ifoot{\myname} % left footer
\ofoot{\mymail} % right footer

%----------------------------------------------------------------------------------------
%	TITLE SECTION
%----------------------------------------------------------------------------------------
\title{	
\normalfont \normalsize 
\textsc{Drexel University, Department of Mathematics} \\ [25pt] % Your university, school and/or department name(s)
\horrule{0.5pt} \\[0.4cm] % Thin top horizontal rule
\huge Math 235: Mathematical Problem Solving, \\
Fall 2020:
Homework \psetnumber\\% The assignment title
\horrule{2pt} \\[0.5cm] % Thick bottom horizontal rule
}
\author{\myname}

\begin{document}

\maketitle % This command causes the title part to be printed.

%----------------------------------------------------------------------------------------
%	EXERCISE 1
%----------------------------------------------------------------------------------------
\horrule{0.3pt} \\[0.4cm]

\section{Exercise 1}

\subsection{Problem}

Let $n$ be a positive integer. Consider a round-robin
tournament in which $n$ players participate.
(``Round-robin'' means that each pair of distinct players play
exactly one match against one another.)
No match ends with a draw.

A player $a$ is said to have \textit{directly owned}
a player $b$ if $a$ has won the match against $b$.

A player $a$ is said to have \textit{indirectly owned}
a player $b$ if there exists a player $c$ such that
$a$ has won a match against $c$ and $c$ has won a
match against $b$.

Prove that there exists a player who has (directly or
indirectly) owned all other players.

\subsection{Solution}

...

%----------------------------------------------------------------------------------------
%	EXERCISE 2
%----------------------------------------------------------------------------------------
\horrule{0.3pt} \\[0.4cm]

\section{Exercise 2}

\subsection{Problem}

Let $n \in \NN$.
Assume that $a_1, a_2, \ldots, a_{2n+1}$ are $2n+1$
integers with the following property:

\begin{statement}
\textit{Weaker splitting property:} If any of the
first $2n$ numbers $a_1, a_2, \ldots, a_{2n}$ is
removed, then the remaining $2n$ numbers
(including $a_{2n+1}$) can be split into two
equinumerous heaps with equal sum.
(``Equinumerous'' means that each heap
contains exactly $n$ numbers.)
\end{statement}

Prove that all $2n+1$ numbers
$a_1, a_2, \ldots, a_{2n+1}$ are equal.

\subsection{Solution}

...

%----------------------------------------------------------------------------------------
%	EXERCISE 3
%----------------------------------------------------------------------------------------
\horrule{0.3pt} \\[0.4cm]

\section{Exercise 3}

\subsection{Problem}

Let $X$ be a finite set. Let $n = \abs{X}$.
Let $f : X \to X$ be a map. Let $x \in X$.
Let $p, q \in \NN$.
Prove that there exists some
$k \in \set{1, 2, \ldots, n}$ such that
$f^{k+p} \tup{x} = f^{2k+q} \tup{x}$.

\subsection{Solution}

...

%----------------------------------------------------------------------------------------
%	EXERCISE 4
%----------------------------------------------------------------------------------------
\horrule{0.3pt} \\[0.4cm]

\section{Exercise 4}

\subsection{Problem}

Let $X$ be a finite nonempty set. Let $n = \abs{X}$.
Let $f : X \to X$ be a map. Prove that
$f^n \tup{X} = f^{n-1} \tup{X}$.

\subsection{Solution}

...

%----------------------------------------------------------------------------------------
%	EXERCISE 5
%----------------------------------------------------------------------------------------
\horrule{0.3pt} \\[0.4cm]

\section{Exercise 5}

\subsection{Problem}

Let $X$ be a set. Let $f : X \to X$ be a map.
Prove the following:

\begin{enumerate}

\item[\textbf{(a)}]
If some $x \in X$ and $k \in \NN$ satisfy
$f^k \tup{x} = f^{2k} \tup{x}$, then
$f^{ik} \tup{x} = f^k \tup{x}$ for every positive integer $i$.

Now, assume that $X$ is finite, and let $n = \abs{X}$. Then:

\item[\textbf{(b)}] We have $f^{n!} = f^{2n!}$.

\item[\textbf{(c)}] If $f$ is a permutation of $X$, then $f^{n!} = \id_X$.

\end{enumerate}

\subsection{Solution}

...

%----------------------------------------------------------------------------------------
%	EXERCISE 6
%----------------------------------------------------------------------------------------
\horrule{0.3pt} \\[0.4cm]

\section{Exercise 6}

\subsection{Problem}

Complete the solution to Exercise 6.2.3 in the notes
(about periodicity of $\tup{x_0 \% m, x_1 \% m, x_2 \% m, \ldots}$)
by proving Claims 1, 2 and 3.

\subsection{Solution}

% I'm copying the notations and the claims from the notes:

Let $m$ be a positive integer.
Let $a$ and $b$ be integers such that $b \perp m$.
Let $\tup{x_0, x_1, x_2, \ldots}$ be any
$\tup{a, b}$-recurrent sequence.
Let $M$ be the $m$-element set $\set{0, 1, \ldots, m-1}$.

For each integer $z$, let $\widetilde{z}$ denote the
remainder $z \% m$. Thus, every integer $z$ satisfies
$\widetilde{z}= z\%m \in M$ and
\begin{equation}
\widetilde{z} = z\%m\equiv z \mod m
\label{sol.php.abrec-per.ztil=zmodm}
\end{equation}

Define a map $f : M\times M \to M \times M$ by
\[
f \tup{ \tup{p, q} }
= \tup{q, \widetilde{aq+bp}}
\qquad \qquad
\text{for each } \tup{p, q} \in M \times M.
\]

Let $\omega$ be the pair
$\tup{ \widetilde{x_0}, \widetilde{x_1} }
\in M \times M$.

Now, we claim the following:

\begin{statement}
\textit{Claim 1:} The map $f$ is bijective
(thus a permutation of the set $M \times M$).
\end{statement}

\begin{statement}
\textit{Claim 2:} We have
$f \tup{ \tup{ \widetilde{x_i}, \widetilde{x_{i+1}} } }
= \tup{ \widetilde{x_{i+1}}, \widetilde{x_{i+2}} }$
for each $i \in \NN$.
\end{statement}

\begin{statement}
\textit{Claim 3:} We have
$\tup{ \widetilde{x_i}, \widetilde{x_{i+1}} }
= f^i \tup{\omega}$ for each $i \in \NN$.
\end{statement}
...

%----------------------------------------------------------------------------------------
%	EXERCISE 7
%----------------------------------------------------------------------------------------
\horrule{0.3pt} \\[0.4cm]

\section{Exercise 7}

\subsection{Problem}

Improve Exercise 6.2.3 as follows:

Let $m > 1$ be an integer.
Let $a$ and $b$ be integers such that $b \perp m$.
Let $\tup{x_0, x_1, x_2, \ldots}$ be any
$\tup{a, b}$-recurrent sequence.
Prove that the sequence
$\tup{x_0 \% m, x_1 \% m, x_2 \% m, \ldots}$
is $k$-periodic for some
$k \in \set{1, 2, \ldots, m^2-1}$.

\subsection{Solution}

...

%----------------------------------------------------------------------------------------
%	EXERCISE 8
%----------------------------------------------------------------------------------------
\horrule{0.3pt} \\[0.4cm]

\section{Exercise 8}

\subsection{Problem}

Let $n \geq 3$ be an integer.
Let $a_1, a_2, \ldots, a_{n-1}$ be any $n-1$ integers.
Assume that $n \nmid a_1 - a_2$.
Prove that there exists a nonempty subset $I$ of
$\set{1, 2, \ldots, n-1}$ such that
\[
n \mid \sum_{i \in I} a_i .
\]

\subsection{Solution}

...

%----------------------------------------------------------------------------------------
%	EXERCISE 9
%----------------------------------------------------------------------------------------
\horrule{0.3pt} \\[0.4cm]

\section{Exercise 9}

\subsection{Problem}

For every $x \in \RR$, we define the \textit{fractional part}
$\fract x$ of $x$ to be the number $x - \floor{x}$.
Note that $0 \leq \fract x < 1$ for each $x \in \RR$.
Prove the following:

\begin{enumerate}

\item[\textbf{(a)}]
For each $x \in \RR$ and each positive integer $n$, there
exists a positive integer $m$ such that $\fract \tup{mx}$
is either $< \dfrac{1}{n}$ or $> \dfrac{n-1}{n}$.

\item[\textbf{(b)}]
For any positive real $\varepsilon$ and any real $z$, there
exists a positive integer $m$ such that
$\abs{ \sin \tup{mz} } < \varepsilon$.

\end{enumerate}

[\textbf{Hint:} For part \textbf{(a)}, subdivide the half-open interval
$\left[0, 1\right)$ into $n$ intervals
\[
    \left[\dfrac{0}{n}, \dfrac{1}{n}\right),
\ \ \left[\dfrac{1}{n}, \dfrac{2}{n}\right),
\ \ \ldots,
\ \ \left[\dfrac{n-1}{n}, \dfrac{n}{n}\right),
\]
and argue that two of the numbers $\fract \tup{0x},
\fract \tup{1x}, \ldots, \fract \tup{nx}$
must lie in one of these $n$ intervals. If these are
$\fract \tup{ix}$ and $\fract \tup{jx}$ (with $i < j$),
then what can you say about $\fract \tup{jx - ix}$?]

\subsection{Solution}

...

%----------------------------------------------------------------------------------------
%	EXERCISE 10
%----------------------------------------------------------------------------------------
\horrule{0.3pt} \\[0.4cm]

\section{Exercise 10}

\subsection{Problem}

Let $R = \set{ \dfrac{1}{1}, \dfrac{1}{2}, \dfrac{1}{3},
\ldots }$. Find the smallest positive real $\varepsilon$
such that the entire set $R$ can be covered with $5$
\textbf{closed} intervals of length $\varepsilon$ each.

\subsection{Solution}

...


\horrule{0.3pt} \\[0.4cm]

\begin{thebibliography}{99999999}                                                                                         %

\end{thebibliography}

\end{document}

