% 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{\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}{5} % 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 2024:
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.

\begin{center}
\Large
\textbf{Please solve 4 of the 8 exercises!} \\
\textbf{Deadline:} November 6, 2024
\end{center}

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

\section{Exercise 1}

\subsection{Problem}

\begin{enumerate}

\item[\textbf{(a)}]
Does Exercise 5.2.2 in
\href{https://www.cip.ifi.lmu.de/~grinberg/t/20f/mps.pdf}{the notes}%
\footnote{Let $n$ be a positive integer. Let
$I_1, I_2, \ldots, I_n$ be $n$ nonempty finite closed
intervals on the real axis. Assume that for any three
distinct elements $i, j, k \in \set{1, 2, \ldots, n}$,
at least two of the three intervals $I_i, I_j, I_k$
intersect. Prove that there exist two reals $a$ and
$b$ such that each of the intervals
$I_1, I_2, \ldots, I_n$ contains at least one of $a$
and $b$.}
remain valid if we
replace ``real axis''\ by ``unit circle'',
replace ``intervals''\ by ``arcs'', and
replace ``reals''\ by ``points''?

\item[\textbf{(b)}] Does it help if we weaken the
claim to ``there exist three points $a,b,c$ such that
each of the arcs $I_1, I_2, \ldots, I_n$ contains at
least one of $a,b,c$''?

\item[\textbf{(c)}] Find an analogous variant of
Exercise 5.4.8 in
\href{https://www.cip.ifi.lmu.de/~grinberg/t/20f/mps.pdf}{the notes}%
\footnote{Let $n$ and $k$ be positive integers with
$k \geq 2$. Let $I_1, I_2, \ldots, I_n$ be $n$
nonempty finite closed intervals on the real axis.
Assume that for any $k$ distinct elements $i_1, i_2,
\ldots, i_k \in \set{1, 2, \ldots, n}$, at least
two of the $k$ intervals $I_{i_1}, I_{i_2}, \ldots,
I_{i_k}$ intersect. Prove that there exist $k-1$
reals $a_1, a_2, \ldots, a_{k-1}$ such that each of
the intervals $I_1, I_2, \ldots, I_n$ contains at
least one of $a_1, a_2, \ldots, a_{k-1}$.}
for arcs on the unit circle instead of intervals on the
real axis.

\end{enumerate}

\subsection{Solution}

...

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

\section{Exercise 2}

\subsection{Problem}

Find all $5$-tuples $\tup{x_1, x_2, x_3, x_4, x_5}$
of nonnegative real numbers that satisfy the system
of equations
\[
\left\{
\begin{array}[c]{l}
x_5 + x_2 = x_1^2;\\
x_1 + x_3 = x_2^2;\\
x_2 + x_4 = x_3^2;\\
x_3 + x_5 = x_4^2;\\
x_4 + x_1 = x_5^2
\end{array}
\right.
\]
(that is, $x_{i-1} + x_{i+1} = x_i^2$ for all
$i \in \set{1, 2, 3, 4, 5}$, where $x_0 := x_5$ and
$x_6 := x_1$).

\subsection{Remark}

Without the ``nonnegative''\ requirement, this system
has some messy solutions that cannot be written in
any reasonable form.

\subsection{Solution}

...

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

\section{Exercise 3}

\subsection{Problem}

Let $n \in \NN$. Let $A$ be an $n \times n$-matrix
whose $n^2$ entries are distinct real numbers. Each
row of $A$ contains a largest entry; this entry will
be called a \emph{rowmax}. Each column of $A$
contains a largest entry; this entry will be called a
\emph{colmax}.

\begin{enumerate}

\item[\textbf{(a)}] Assume that all the $n$ rowmaxes
lie in distinct columns, and that all the $n$ colmaxes
lie in distinct rows. Prove that the rowmaxes are
exactly the colmaxes.

\item[\textbf{(b)}] Find a matrix $A$ that does
satisfy these assumptions.

\end{enumerate}

\subsection{Solution}

...

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

\section{Exercise 4}

\subsection{Problem}

Consider an $n \times m$-matrix $A$ whose entries
are $0$'s and $1$'s. Assume that each row of $A$
contains at least one $0$, whereas each column of
$A$ contains at least one $1$. Let $A_{r,c}$
denote the entry of $A$ in the $r$-th row and the
$c$-th column.

Prove that there exist two distinct
$r, s \in \set{1, 2, \ldots, n}$ and two distinct
$c, d \in \set{1, 2, \ldots, m}$ such that
$A_{r,c} = A_{s,d} = 1$ but $A_{r,d} = A_{s,c} = 0$.

\subsection{Solution}

...

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

\section{Exercise 5}

\subsection{Problem}

For each $n \in \NN$, define an integer $a_n$ as
follows: We know from Theorem 5.2.1 in
\href{https://www.cip.ifi.lmu.de/~grinberg/t/20f/mps.pdf}{the notes}
that there is a unique finite subset $T$ of $\NN$
such that $n = \sum_{t \in T} 2^t$. Consider this
subset $T$, and set
\[
a_n := \sum_{t \in T} \tup{2^{t+1} - 1}.
\]
For instance, for $n = 10$, we have $T = \set{3, 1}$
(since $n = 10 = 2^3 + 2^1$) and thus
$a_n = \sum_{t \in \set{3, 1}} \tup{2^{t+1} - 1}
= \tup{2^4 - 1} + \tup{2^2 - 1} = 18$.

\begin{enumerate}

\item[\textbf{(a)}] Prove that
$0 = a_0 < a_1 < a_2 < \cdots$.

\item[\textbf{(b)}] Prove that
$a_n = a_{\floor{n/2}} + n$ for each
$n \in \NN$.

\end{enumerate}

\subsection{Solution}

...

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

\section{Exercise 6}

\subsection{Problem}

Let $a, b, c$ be three integers. Prove that the
number $a^2 + b^2 + c^2$ cannot be written in the
form $4^k \tup{8m+7}$ with $k \in \NN$ and
$m \in \ZZ$.

\subsection{Remark}

This is part of the Legendre three-squares theorem.
The other (much harder) part is the converse:
Every nonnegative integer that is not of the form
$4^k \tup{8m+7}$ with $k \in \NN$ and $m \in \ZZ$
can be written as a sum of three perfect squares.
The proof of this can be found in some of the more
advanced texts on elementary number theory, such
as \cite[\S XIII.10]{UspHea39}.

\subsection{Solution}

...


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

\section{Exercise 7}

\subsection{Problem}

Let $\tup{a_0, a_1, a_2, \ldots}$ be a sequence of
positive integers such that
\[
a_n = \tup{a_{n-2}^2 \% a_{n-1}} + 1
\qquad \text{for each } n \geq 2.
\]
Prove that there exists some $m \in \NN$ such that
$a_m = a_{m+1} = a_{m+2} = \cdots = 1$.

\subsection{Solution}

...


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

\section{Exercise 8}

\subsection{Problem}

Let $u$ and $n$ be integers such that $n > 0$.
Prove the following:

\begin{enumerate}

\item[\textbf{(a)}]
We have $u-1 \mid \dbinom{un-1}{n}$.

\item[\textbf{(b)}]
If $u$ is odd, then $\sum_{k=0}^{n} \dbinom{un}{k}$
is even.

\end{enumerate}

\subsection{Solution}

...



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

\begin{thebibliography}{99999999}                                                                                         %
\bibitem[UspHea39]{UspHea39}J. V. Uspensky, M. A. Heaslet, \textit{Elementary
Number Theory}, 1st edition, McGraw-Hill 1939.\newline See
\url{https://projecteuclid.org/euclid.bams/1183502492} for some corrections.

\end{thebibliography}

\end{document}

