% LaTeX solution template for Math 4281 (Owen Levin, Darij Grinberg)
% ------------------------------------------------------------------

% 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, UMN ID, 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.

%----------------------------------------------------------------------------------------
%	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{\PP}{\mathbb{P}} % positive 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{\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; also, set of first n integers).
\newcommand{\floor}[1]{\left\lfloor #1 \right\rfloor}
% $\floor{...}$ compiles to |_..._| (floor function).
\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{\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{\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.

%----------------------------------------------------------------------------------------
%	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{\myid}{00000000} % ENTER YOUR UMN ID HERE
\newcommand{\mymail}{dgrinber@umn.edu} % ENTER YOUR EMAIL HERE
\newcommand{\psetnumber}{0} % 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, \myid} % left footer
\ofoot{\mymail} % right footer

%----------------------------------------------------------------------------------------
%	TITLE SECTION
%----------------------------------------------------------------------------------------
\title{
\normalfont \normalsize
\textsc{University of Minnesota, School of Mathematics} \\ [25pt] % Your university, school and/or department name(s)
\horrule{0.5pt} \\[0.4cm] % Thin top horizontal rule
\huge Math 4281: Introduction to Modern Algebra, \\
Spring 2019:
Homework \psetnumber\\% The assignment title
\horrule{2pt} \\[0.5cm] % Thick bottom horizontal rule
}
\author{\myname}

\begin{document}

\maketitle % Print the title

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

\section{Exercise 1: Geometric series and a bit more}

\subsection{Problem}

Let $a \in \QQ$ and $b \in \QQ$.
        % "\QQ" is an abbreviation for "\mathbb{Q}", and stands for the rational numbers.
Prove that the equalities
\begin{align}
& \tup{a-b} \tup{ a^{n-1} + a^{n-2} b + a^{n-3} b^2 + \cdots + a b^{n-2} + b^{n-1} }
        % The "\tup{...}" command puts the "..." in parentheses.
        % The "\cdots" is the "right" way to get a vertically centered
        % ellipsis (I don't mind if you just write "...", but "\cdots" is
        % considered more professional).
\nonumber \\
        % An "\\" means "new line". So this is how you actually get a
        % linebreak if you want one. You can do this in text, too, not just
        % in align environments. See below for what "\nonumber" means.
& = a^n - b^n
\label{eq.exe.geo-series.1}
\end{align}
        % Several things are happening here.
        % 1. The "\begin{align}" and "\end{align}" commands delimit an "align"
        %    environment, which is a way to write several formulas one under
        %    the other while aligning them at some chosen places (e.g., at
        %    the equality signs if you wish).
        % 2. The "\tup{a-b}" yields "(a-b)" when compiled. You could achieve
        %    the same effect by just writing "(a-b)". The difference is mostly
        %    aesthetical: If you want something bigger than "a-b" inside the
        %    parentheses -- say, a fraction or a summation sign --, then
        %    writing "\tup{...}" will automatically stretch the parentheses to
        %    the size of whatever you put inside them, while "(...)" will
        %    just generate two normal-size parentheses. You don't have to
        %    follow my stylistic choice.
        % 3. The expression "b^2" means "b to the 2nd power".
        %    The expression "a^{n-2}" means "a to the (n-2)-nd power".
        %    Why did we put {...} braces around the "n-2" but not around the
        %    "2"? It's to tell LaTeX that the "n-2" all belongs in the
        %    exponent, and not just the "n". If you wrote "a^n-2" instead,
        %    only the "n" would end up in the exponent, so you would get
        %    "a to the n-th power, minus 2".
        %    Of course, when the exponent is only 1 letter long, no {...}
        %    braces are needed.
        % 4. The "&" symbol means "align the equations here".
        %    The "\label" command lets you give an equation a label by which
        %    you can later refer to it. So this equation is now labelled
        %    "eq.exe.geo-series.1", and you can refer to it using
        %    "\eqref{eq.exe.geo-series.1}". Note that the labels do *not* get
        %    printed in the compiled PDF; they just become "(1)", "(2)" etc.
        % 5. "\nonumber" means that the first line of the "align" environment
        %    gets no label.
and
\begin{align}
& \tup{a-b}^2 \tup{ 1 a^{n-1} + 2 a^{n-2} b + 3 a^{n-3} b^2 + \cdots + \tup{n-1} a b^{n-2} + n b^{n-1} } \nonumber \\
&= a^{n+1} - \tup{n+1} a b^n + n b^{n+1}
\label{eq.exe.geo-series.2}
\end{align}
hold for each $n \in \NN$.
        % "\NN" is an abbreviation for "\mathbb{N}", and stands for the nonnegative integers.

(Here and in the following, $\NN$ stands for the set
$\set{0, 1, 2, \ldots}$.
        % The "\set{...}" command puts the "..." in set-braces.
        % The "\ldots" command gives an ellipsis that looks a bit better than what you
        % would get by just writing "...". It's mostly a matter of taste,
        % and I don't mind if you just write "...".
We also recall that empty sums -- i.e., sums that have no
addends at all -- evaluate to $0$ by definition. This applies,
in particular, to the sums
$a^{n-1} + a^{n-2} b + a^{n-3} b^2 + \cdots + a b^{n-2} + b^{n-1}$
and
$1 a^{n-1} + 2 a^{n-2} b + 3 a^{n-3} b^2 + \cdots + \tup{n-1} a b^{n-2} + n b^{n-1}$
in the case when $n = 0$.)
        % LaTeX ignores single linebreaks in the sourcecode (or, rather,
        % treats them just as whitespaces). This is why the linebreak
        % between "have no" and "addends" doesn't cause a linebreak in the
        % PDF.

\subsection{Remark}

A consequence of the formulas
\eqref{eq.exe.geo-series.1} and \eqref{eq.exe.geo-series.2}
is that every rational number $x \neq 1$ satisfies
\begin{align*}
        % The "\begin{align*}" and "\end{align*}" commands do the same
        % as "\begin{align}" and "\end{align}", except that they don't
        % number the equations.
1 + x + x^2 + \cdots + x^{n-1} &= \dfrac{1 - x^n}{1 - x}
        % "\dfrac{a}{b}" gives the "a over b" fraction.
        % Actually, "\frac{a}{b}" does the same thing; you will only
        % see the difference if you use them in text (in which case
        % the "\frac{a}{b}" fraction will be a lot smaller than the
        % "\dfrac{a}{b}" one). Again, it is a matter of taste.
\qquad
        % "\qquad" produces an amount of white space, similar to a
        % "tab" in text editors. I usually put it between different
        % equations on a single line.
\text{and} \\
        % "\text{...}" allows you to write regular (non-italicized) text
        % inside a maths environment. For example, "\text{and}" will
        % make the "and" look like regular text.
1 + 2 x + 3 x^2 + \cdots + n x^{n-1}
&= \dfrac{1 - \tup{n+1} x^n + n x^{n+1}}{\tup{1 - x}^2} .
\end{align*}
Indeed, these equalities follow by setting $a = 1$ and $b = x$
in the equalities
\eqref{eq.exe.geo-series.1} and \eqref{eq.exe.geo-series.2}
and dividing by $1-x$ or $1-x^2$, respectively.

More generally, the formulas
\eqref{eq.exe.geo-series.1} and \eqref{eq.exe.geo-series.2}
remain true when $a$ and $b$ are two commuting elements of an
arbitrary ring
(we will later learn what this means; for now, let us
just say that, e.g., we could let $a$ and $b$ be two commuting
matrices instead of rational numbers).

\subsection{Solution}

We will use the summation sign when we solve this exercise.
This will make our formulas both shorter and clearer.
For example, instead of
``$1 a^{n-1} + 2 a^{n-2} b + 3 a^{n-3} b^2 + \cdots + \tup{n-1} a b^{n-2} + n b^{n-1}$'',
it will let us just write
``$\sum_{k=1}^n k a^{n-k} b^{k-1}$''.

Let us give a crash course on the use of the summation sign.
We refer to \cite[Section 1.4]{detnotes}
        % "\cite[...]{...}" is a way to cite other sources
        % (books, papers, anything). The syntax is
        % "\cite[place]{source you are citing}".
        % (The "place" can be a theorem or section or chapter,
        % or you can omit it and just write "\cite{source}".)
        % See the bibliography at the end of this homework for
        % what the "source" part should be.
for details and further information\footnote{and to
\cite[Section 2.14]{detnotes} for proofs of well-definedness
and basic properties}.
        % "\footnote" does what you would expect it to do.
        % Caveat: You can't put a \footnote inside a mathematical
        % expression or formula. (But you shouldn't anyway -- it would
        % look like an exponent.)

\begin{itemize}
        % "\begin{itemize}" gives a bullet list.
        % Use "\item" to place a bullet,
        % and "\end{itemize}" to end the list.

\item Assume that $S$ is a finite set, and that $a_s$ is a
      number (e.g., a real number) for each $s \in S$.
      Thus you have $\abs{S}$ many numbers $a_s$ in total.
      Then, $\sum_{s \in S} a_s$ shall denote the sum of all
      of these $\abs{S}$ many numbers.
      For example,
      \begin{align*}
      \sum_{s \in \set{2, 5, 6}} s^3 = 2^3 + 5^3 + 6^3
      \end{align*}
              % It is perfectly fine to use \begin{align*} and \end{align*}
              % for just a single line (so you are not actually aligning anything).
      (here, $S = \set{2, 5, 6}$ and $a_s = s^3$ for each
      $s \in S$)
      and
      \begin{align*}
      \sum_{s \in \set{5, 7, 9, 11}} \dfrac{1}{s}
       = \dfrac{1}{5} + \dfrac{1}{7} + \dfrac{1}{9} + \dfrac{1}{11}
      \end{align*}
      (here, $S = \set{5, 7, 9, 11}$ and $a_s = \dfrac{1}{s}$
      for each $s \in S$).

      The letter $s$ here plays the same role as the
      letter $s$ in ``$\set{s^2 \mid s \in \set{2, 3, 4}}$''
      or in ``the function that sends each integer $s$ to
      $s^2 - 1$''; it designates the ``moving part'' in a
      definition (it is what is called a ``bound variable''
      or a ``running index'').
      You don't have to use the specific letter $s$ for it;
      you can use any other letter instead (as long as it
      does not already have a different meaning) and get the
      same result.
      For example, the sum $\sum_{s \in \set{2, 5, 6}} s^3$
      can be rewritten as
      $\sum_{i \in \set{2, 5, 6}} i^3$ or as
      $\sum_{\mathfrak{G} \in \set{2, 5, 6}} \mathfrak{G}^3$.
        % "\mathfrak{...}" is the Fraktur font, used mostly
        % when running out of other letters and to scare off
        % readers. Most mathematicians go through a phase of
        % writing text with it.
      When the set $S$ is empty (so you have no numbers $a_s$
      at all), the sum $\sum_{s \in S} a_s$ is defined
      to be $0$; this is called an \textit{empty sum}.

\item Assume that $u$ and $v$ are two integers, and that $a_s$
      is a number (e.g., a real number) for each
      $s \in \set{u, u+1, \ldots, v}$.
      (When $u > v$, we understand the set
      $\set{u, u+1, \ldots, v}$ to be empty -- it does not
      contain any ``anti-integers'' either.)
      Then, $\sum_{s = u}^v a_s$ is just a shorthand for
      the sum $\sum_{s \in \set{u, u+1, \ldots, v}} a_s$.
      This sum can also be written as
      $a_u + a_{u+1} + \cdots + a_v$, but this notation
      presumes the reader to guess what the ``general term''
      $a_s$ looks like.
      For example,
      \begin{align*}
      \sum_{s = 5}^{10} s^s
      = 5^5 + 6^6 + 7^7 + 8^8 + 9^9 + 10^{10}
      = 5^5 + 6^6 + \cdots + 10^{10}
      \end{align*}
      (arguably, guessing the general term is easy here,
      but look at the sum in \eqref{eq.exe.geo-series.2}).
      For another example,
      \begin{align*}
      \sum_{s = -2}^{2} s^2
      = \tup{-2}^2 + \tup{-1}^2 + 0^2 + 1^2 + 2^2 .
      \end{align*}

\item Expressions of the form $\sum_{s \in S} a_s$ and
      $\sum_{s \in \set{u, u+1, \ldots, v}} a_s$ are called
      ``finite sums'', and the $\sum$ symbol is called the
      ``summation sign''.

\item Finite sums satisfy the rules that you would expect.
      For example, assume that a finite set $S$ is written
      as a union of two disjoint subsets $A$ and $B$ (so
      each element of $S$ belongs to one of $A$ and $B$,
      but not to both).
      Assume that $a_s$ is a number for each $s \in S$.
      Then,
      \begin{align*}
      \sum_{s \in S} a_s = \sum_{s \in A} a_s + \sum_{s \in B} a_s .
      \end{align*}
      For example, if $S = \set{1, 2, \ldots, 2n}$ for some
      $n \in \NN$, and if
      \begin{align*}
      A &= \set{\text{the even elements of } S} = \set{2, 4, 6, \ldots, 2n}
      \qquad \text{and} \\
      B &= \set{\text{the odd elements of } S} = \set{1, 3, 5, \ldots, 2n-1} ,
      \end{align*}
      then this formula becomes
      \begin{align*}
      a_1 + a_2 + \cdots + a_{2n}
      = \tup{a_2 + a_4 + a_6 + \cdots + a_{2n}}
        + \tup{a_1 + a_3 + a_5 + \cdots + a_{2n-1}} .
      \end{align*}
      This is exactly what you would expect: To sum the
      $2n$ numbers $a_1, a_2, \ldots, a_{2n}$, you can first
      split them into the ``even'' and the ``odd'' ones
      (to be pedantic: rather, the ones with the even subscripts
      and the ones with the odd subscripts), and separately
      sum the former and the latter, and subsequently add the
      two small sums together.
      See \cite[Section 1.4.2]{detnotes} for this and several
      other rules (and for their rigorous proofs, if you are
      that skeptical).
      You can use all these rules without saying, except
      for the ``telescoping sums'' rule (which you should
      cite by name when you apply it).
      For lots of practice with sums, see \cite[Chapter 2 and
      further]{GKP}.

\item The ``product sign'' $\prod$ is analogous to the summation
      sign $\sum$, but stands for products instead of sums.
      For example,
      \begin{align*}
      \prod_{s = 5}^{10} s^s
      = 5^5 \cdot 6^6 \cdot 7^7 \cdot 8^8 \cdot 9^9 \cdot 10^{10}
      = 5^5 \cdot 6^6 \cdot \cdots \cdot 10^{10} .
      \end{align*}
      An empty product (i.e., a product of the form
      $\prod_{s \in S} a_s$ when $S$ is empty) is defined to
      be $1$.
      See \cite[Section 1.4.4]{detnotes} for the properties
      of products.

\end{itemize}

The summation sign lets us rewrite the sum
$a^{n-1} + a^{n-2} b + a^{n-3} b^2 + \cdots + a b^{n-2} + b^{n-1}$
in \eqref{eq.exe.geo-series.1} as
$\sum_{k = 1}^n a^{n-k} b^{k-1}$,
and lets us rewrite the sum
$1 a^{n-1} + 2 a^{n-2} b + 3 a^{n-3} b^2 + \cdots + \tup{n-1} a b^{n-2} + n b^{n-1}$
in \eqref{eq.exe.geo-series.2} as
$\sum_{k = 1}^n k a^{n-k} b^{k-1}$.
So the two equalities \eqref{eq.exe.geo-series.1}
and \eqref{eq.exe.geo-series.2} rewrite as
\begin{align}
\tup{a-b} \sum_{k = 1}^n a^{n-k} b^{k-1} = a^n - b^n
\label{eq.exe.geo-series.1'}
\end{align}
and
\begin{align}
\tup{a-b}^2 \sum_{k = 1}^n k a^{n-k} b^{k-1}
= a^{n+1} - \tup{n+1} a b^n + n b^{n+1} ,
\label{eq.exe.geo-series.2'}
\end{align}
respectively.
It is in these forms that we will prove these equalities.

\begin{itemize}

\item \textit{Proof of \eqref{eq.exe.geo-series.1'}:}

We shall prove \eqref{eq.exe.geo-series.1'} by induction on $n$:

\textit{Induction base:}
Comparing the equalities $a^0 - b^0 = 1 - 1 = 0$ and
\begin{align*}
\tup{a-b}
\underbrace{\sum_{k = 1}^0 a^{0-k} b^{k-1}}_{=\tup{\text{empty sum}} = 0}
= \tup{a-b} 0 = 0,
\end{align*}
we obtain
\begin{align*}
\tup{a-b} \sum_{k = 1}^0 a^{0-k} b^{k-1}
= a^0 - b^0 .
\end{align*}
In other words, \eqref{eq.exe.geo-series.1'} holds for $n = 0$.
Thus the induction base is complete.

\textit{Induction step:}
Let $m \in \NN$.
Assume that \eqref{eq.exe.geo-series.1'} holds for $n = m$.
We must prove that \eqref{eq.exe.geo-series.1'} holds for $n = m+1$.

We have assumed that \eqref{eq.exe.geo-series.1'}
holds for $n = m$. In other words, we have
\begin{align}
\tup{a-b} \sum_{k = 1}^m a^{m-k} b^{k-1} = a^m - b^m .
\label{sol.geo-series.1'.pf.IH}
\end{align}
Now, splitting off the last addend of the sum
$\sum_{k = 1}^{m+1} a^{\tup{m+1}-k} b^{k-1}$, we obtain
\begin{align*}
  \sum_{k = 1}^{m+1} a^{\tup{m+1}-k} b^{k-1}
& = \sum_{k = 1}^m \underbrack{a^{\tup{m+1}-k}}{= a^{m-k+1} \\ = a a^{m-k}} b^{k-1}
      + \underbrack{a^{\tup{m+1}-\tup{m+1}}}{= a^0 = 1}
        \underbrack{b^{\tup{m+1}-1}}{= b^m} \\
        % Check the PDF to see what "\underbrack" does here.
        % I use it mainly to clarify computational steps in
        % which several things get rewritten at the same
        % time. It can also be used for additional
        % explanations.
& = \sum_{k = 1}^m a a^{m-k} b^{k-1} + b^m
  = a \sum_{k = 1}^m a^{m-k} b^{k-1} + b^m ,
\end{align*}
so that
\begin{align*}
& \tup{a-b} \sum_{k = 1}^{m+1} a^{{m+1}-k} b^{k-1} \\
& = \tup{a-b} \tup{a \sum_{k = 1}^m a^{m-k} b^{k-1} + b^m} \\
& = a \underbrack{\tup{a-b} \sum_{k = 1}^m a^{m-k} b^{k-1}}{= a^m - b^m \\ \text{(by \eqref{sol.geo-series.1'.pf.IH})}}
        % You don't need to be this detailed; I'm just showing off.
    + \tup{a-b} b^m
  = a \tup{a^m - b^m} + \tup{a-b} b^m \\
& = a a^m - a b^m + a b^m - b b^m
  = \underbrack{a a^m}{= a^{m+1}} - \underbrack{b b^m}{= b^{m+1}}
  = a^{m+1} - b^{m+1} .
\end{align*}
In other words, \eqref{eq.exe.geo-series.1'} holds for $n = m+1$.
This completes the induction step.
Thus, \eqref{eq.exe.geo-series.1'} is proven.

\item \textit{Proof of \eqref{eq.exe.geo-series.2'}:}
        % The advantage of typing solutions: You can basically
        % copy-paste the above proof of
        % \eqref{eq.exe.geo-series.1'} and make just the few
        % necessary changes.

We shall prove \eqref{eq.exe.geo-series.2'} by induction on $n$:

\textit{Induction base:}
Comparing the equalities $a^{0+1} - \tup{0+1} a b^0 + 0 b^{0+1}
= a^1 - a = a - a = 0$ and
\begin{align*}
\tup{a-b}^2
\underbrace{\sum_{k = 1}^0 k a^{0-k} b^{k-1}}_{=\tup{\text{empty sum}} = 0}
= \tup{a-b}^2 0 = 0,
\end{align*}
we obtain
\begin{align*}
\tup{a-b}^2 \sum_{k = 1}^0 k a^{0-k} b^{k-1}
= a^{0+1} - \tup{0+1} a b^0 + 0 b^{0+1} .
\end{align*}
In other words, \eqref{eq.exe.geo-series.2'} holds for $n = 0$.
Thus the induction base is complete.

\textit{Induction step:}
Let $m \in \NN$.
Assume that \eqref{eq.exe.geo-series.2'} holds for $n = m$.
We must prove that \eqref{eq.exe.geo-series.2'} holds for $n = m+1$.

We have assumed that \eqref{eq.exe.geo-series.2'}
holds for $n = m$. In other words, we have
\begin{align}
\tup{a-b}^2 \sum_{k = 1}^m k a^{m-k} b^{k-1}
= a^{m+1} - \tup{m+1} a b^m + m b^{m+1} .
\label{sol.geo-series.2'.pf.IH}
\end{align}
Now, splitting off the last addend of the sum
$\sum_{k = 1}^{m+1} k a^{\tup{m+1}-k} b^{k-1}$, we obtain
\begin{align*}
  \sum_{k = 1}^{m+1} k a^{\tup{m+1}-k} b^{k-1}
& = \sum_{k = 1}^m k \underbrack{a^{\tup{m+1}-k}}{= a^{m-k+1} \\ = a a^{m-k}} b^{k-1}
      + \tup{m+1}
        \underbrack{a^{\tup{m+1}-\tup{m+1}}}{= a^0 = 1}
        \underbrack{b^{\tup{m+1}-1}}{= b^m} \\
& = \sum_{k = 1}^m k a a^{m-k} b^{k-1} + \tup{m+1} b^m
  = a \sum_{k = 1}^m k a^{m-k} b^{k-1} + \tup{m+1} b^m ,
\end{align*}
so that
\begin{align*}
& \tup{a-b}^2 \sum_{k = 1}^{m+1} k a^{{m+1}-k} b^{k-1} \\
& = \tup{a-b}^2 \tup{a \sum_{k = 1}^m k a^{m-k} b^{k-1} + \tup{m+1} b^m} \\
& = a \underbrack{\tup{a-b}^2 \sum_{k = 1}^m k a^{m-k} b^{k-1}}{= a^{m+1} - \tup{m+1} a b^m + m b^{m+1} \\ \text{(by \eqref{sol.geo-series.2'.pf.IH})}}
    + \tup{a-b}^2 \tup{m+1} b^m \\
& = a \tup{a^{m+1} - \tup{m+1} a b^m + m b^{m+1}} + \tup{a-b}^2 \tup{m+1} b^m \\
& = \underbrack{a a^{m+1}}{= a^{m+2}}
    - \tup{m+1} \underbrack{a a}{= a^2} b^m + m a b^{m+1}
    + \underbrack{\tup{a-b}^2}{= a^2 - 2ab + b^2} \tup{m+1} b^m \\
& = a^{m+2} - \tup{m+1} a^2 b^m + m a b^{m+1}
    + \tup{a^2 - 2ab + b^2} \tup{m+1} b^m \\
& = a^{m+2} - \tup{m+1} a^2 b^m + m a b^{m+1}
    + \tup{m+1} a^2 b^m - 2 \tup{m+1} a b b^m + \tup{m+1} b^2 b^m \\
& = a^{m+2} + m a b^{m+1}
    - 2 \tup{m+1} a \underbrack{b b^m}{= b^{m+1}} + \tup{m+1} \underbrack{b^2 b^m}{= b^{m+2}} \\
& = a^{m+2} + \underbrack{m a b^{m+1} - 2 \tup{m+1} a b^{m+1}}{= \tup{m - 2 \tup{m+1}} a b^{m+1} \\ = - \tup{m+2} a b^{m+1} } + \tup{m+1} b^{m+2} \\
& = a^{m+2} - \tup{m+2} a b^{m+1} + \tup{m+1} b^{m+2} \\
& = a^{\tup{m+1}+1} - \tup{\tup{m+1}+1} a b^{m+1} + \tup{m+1} b^{\tup{m+1}+1} .
\end{align*}
In other words, \eqref{eq.exe.geo-series.2'} holds for $n = m+1$.
This completes the induction step.
Thus, \eqref{eq.exe.geo-series.2'} is proven.

\end{itemize}

So the exercise is solved.

\subsection{Remark}

The equality \eqref{eq.exe.geo-series.1'} can also be proved using
the telescope principle; see \cite[(18)]{detnotes} for this
argument.

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

\section{Exercise 2: Factorials 101}

\subsection{Problem}

Recall that the \textit{factorial} of a nonnegative integer $n$
is defined by
\begin{align*}
n! = \prod_{i=1}^n i = 1 \cdot 2 \cdot 3 \cdot \cdots \cdot n .
\end{align*}
Thus, in particular, $0! = 1$ (since we defined empty products
to be $1$); it is easy to see that
\begin{align*}
1! = 1, \qquad
2! = 2, \qquad
3! = 6, \qquad
4! = 24, \qquad
5! = 120, \qquad
6! = 720, \qquad
7! = 5040.
\end{align*}
This sequence grows very fast (see
\href{https://en.wikipedia.org/wiki/Stirling's_approximation}{Stirling's approximation}).

Prove the following properties of factorials:

\begin{enumerate}
        % This creates a list.

\item[\textbf{(a)}]
        % "\item[\textbf{(a)}]" starts the first item of the list, and names
        % (or numbers) it by a boldfaced "(a)".
We have $n! = n \cdot \tup{n-1}!$ for each positive integer $n$.

\item[\textbf{(b)}]
For each $n \in \NN$, we have
\[
1 \cdot 1! + 2 \cdot 2! + \cdots + n \cdot n!
= \tup{n+1}! - 1 .
\]
        % I said that you can use "\begin{align*}" and
        % "\end{align*}" for a single (unlabelled) equation.
        % The "\[" and "\]" commands can be used for the same
        % purpose and are a bit easier to type.
        % (Their main disadvantage is that if you find
        % yourself wanting to add a second line, you'll have
        % to replace them by "\begin{align*}" and
        % "\end{align*}".)

\item[\textbf{(c)}]
For each $n \in \NN$, we have
\[
1 \cdot 3 \cdot 5 \cdot \cdots \cdot \tup{2n-1}
= \dfrac{\tup{2n}!}{2^n n!} .
\]
(Here, the left hand side is understood to be the
product of the first $n$ odd positive integers, i.e.,
the product $\prod_{i=1}^n \tup{2i-1}$.)

\end{enumerate}
        % This ends the list.

\subsection{Solution}

\textbf{(a)}
Let $n$ be a positive integer.
Thus, $n \in \set{1, 2, \ldots, n}$.
The definition of $\tup{n-1}!$ yields
\begin{align}
\tup{n-1}! = \prod_{i=1}^{n-1} i .
\label{sol.factorial.101.a.1}
\end{align}
But the definition of $n!$ yields
\[
n!
= \prod_{i=1}^n i = \tup{\prod_{i=1}^{n-1} i} \cdot n
\]
(here, we have split off the factor for $i = n$ from the
product, since $n \in \set{1, 2, \ldots, n}$).
Hence,
\[
n! = \underbrack{\tup{\prod_{i=1}^{n-1} i}}{= \tup{n-1}! \\ \text{(by \eqref{sol.factorial.101.a.1})}}
      \cdot n
   = \tup{n-1}! \cdot n = n \tup{n-1}! .
\]
This solves part \textbf{(a)} of the exercise.

\vspace{0.8pc}
        % "\vspace{height}" creates a vertical space of given
        % height. Here I am using it to separate different
        % parts of the solution from each other.

\textbf{(b)}
Claims like this can often be proven in two ways:
by (fairly straightforward) induction,
and by (usually tricky) transformations.
In this particular case, the two proofs are actually very
similar, and can easily be transformed into one another;
nevertheless, let us show both of them.

\textit{Proof by induction:} We shall prove the claim of part \textbf{(b)}
by induction on $n$:

\textit{Induction base:} We have
\[
1\cdot 1! + 2\cdot 2! + \cdots + 0\cdot 0!
= \tup{\text{empty sum}} = 0.
\]
Comparing this with $\underbrack{\tup{0+1}!}{=1!=1} - 1 = 1-1 = 0$, we
obtain $1\cdot 1! + 2\cdot 2! + \cdots + 0\cdot 0! = \tup{0+1}! - 1$. Thus,
the claim of part \textbf{(b)} holds for $n = 0$.
This completes the induction base.

\textit{Induction step:} Let $m \in \NN$.
Assume that the claim of part \textbf{(b)} holds for $n = m$.
We must prove that the claim of part \textbf{(b)} holds for $n = m+1$.

We have assumed that the claim of part \textbf{(b)} holds for $n = m$.
In other words, we have
\[
1\cdot 1! + 2\cdot 2! + \cdots + m\cdot m! = \tup{m+1}! - 1.
\]
Now,
\begin{align}
  & 1\cdot 1! + 2\cdot 2! + \cdots + \tup{m+1}\cdot \tup{m+1}!
    \nonumber \\
= & \underbrack{\tup{ 1\cdot 1! + 2\cdot 2! + \cdots + m\cdot m! } }{= \tup{m+1}! - 1}
     + \tup{m+1} \cdot \tup{m+1}!  \nonumber \\
= & \tup{m+1}! - 1 + \tup{m+1} \cdot \tup{m+1}!  \nonumber \\
= & \underbrack{\tup{1 + \tup{m+1}}}{= m+2} \cdot \tup{m+1}! - 1
    \nonumber \\
= & \tup{m+2} \cdot \tup{m+1}! - 1.
\label{sol.factorial.101.b.1st.3}
\end{align}
But part \textbf{(a)} of this exercise (applied to $n = m+2$) yields
\[
\tup{m+2}!
= \tup{m+2} \cdot \tup{ \underbrack{ \tup{m+2}-1 }{= m+1} }!
= \tup{m+2} \cdot \tup{m+1}!.
\]
Hence, \eqref{sol.factorial.101.b.1st.3} becomes
\[
1\cdot 1! + 2\cdot 2! + \cdots + \tup{m+1}\cdot \tup{m+1}!
= \underbrack{\tup{m+2} \cdot \tup{m+1}!}{\substack{ = \tup{m+2}! \\
                        = \tup{ \tup{m+1}+1 } !}}
  - 1
= \tup{ \tup{m+1} + 1 }! - 1 .
\]
In other words, the claim of part \textbf{(b)} holds for $n = m+1$.
This completes the induction step.
Thus, the claim of part \textbf{(b)} is proven by induction.

\textit{Proof by tricky transformations:} This proof shall rely on the
following fact:

\begin{proposition} \label{prop.sums.telescope}
        % Using "\begin{proposition}" and "\end{proposition}",
        % you mark a piece of your text as a proposition
        % (basically a less important theorem).
        % The "\label{...}" command gives this proposition a
        % label, by which you can later refer to it
        % (via "\ref{...}").
        % The PDF file will replace the label by a number and
        % automatically put the right number in whenever you
        % refer to this proposition.
Let $m \in \NN$.
Let $a_0, a_1, \ldots, a_m$ be $m+1$
real numbers\footnote{I am saying ``real numbers''
just for the sake of saying something definite.
You could just as well state this principle for
``complex numbers'' or ``rational numbers'' or (once we have
learnt what an abelian group is) ``elements of an abelian
group (where the operation of the group is written as
addition)''; the proof will be the same in each case.}.
Then,
\[
\sum_{i=1}^{m} \tup{ a_i - a_{i-1} } = a_m - a_0 .
\]
\end{proposition}

Proposition \ref{prop.sums.telescope} is known as the ``telescope
principle'' since it contracts the sum
$\sum_{i=1}^{m} \tup{ a_i - a_{i-1} }$
to the single difference $a_m - a_0$, like folding a telescope.

The simplest way to convince yourself that
Proposition \ref{prop.sums.telescope} is true is by expanding the
left hand side:
\[
\sum_{i=1}^{m} \tup{ a_i - a_{i-1} }
= \tup{a_1 - a_0} + \tup{a_2 - a_1} + \tup{a_3 - a_2}
  + \cdots + \tup{a_m - a_{m-1}}
\]
and watching all the terms cancel each other out except for the $-a_0$ and
the $a_m$. More formally, this argument can be emulated by an induction on
$m$.
See \cite[proof of Proposition 2.2]{18f-hw0s} or
\cite[proof of (16)]{detnotes} for formal proofs of
Proposition \ref{prop.sums.telescope}.

Now, how can we apply Proposition \ref{prop.sums.telescope} to part
\textbf{(b)} of the exercise?
We have
$1\cdot 1! + 2\cdot 2! + \cdots + n\cdot n! = \sum_{i=1}^{n} i\cdot i!$.
If we could write each addend $i\cdot i!$ in
the form $a_i - a_{i-1}$ for some $n+1$ real numbers
$a_0,a_1,\ldots,a_n$, then we could use
Proposition \ref{prop.sums.telescope}.

The tricky part is finding these $a_i$. Namely, set
$a_i = \tup{i+1}!$ for each $i\in \set{0, 1, \ldots, n}$.
Then, I claim that
\begin{align}
i\cdot i! = a_i - a_{i-1}
\qquad \text{for each } i \in \set{1, 2, \ldots, n} .
\label{sol.factorial.101.b.2nd.diff}
\end{align}

The \textit{proof of \eqref{sol.factorial.101.b.2nd.diff}} is not tricky at
all:
Let $i \in \set{1, 2, \ldots, n}$.
Then, part \textbf{(a)} of the exercise (applied to $i+1$
instead of $n$) yields
\[
\tup{i+1}! = \tup{i+1} \cdot \tup{ \underbrack{\tup{i+1}-1}{= i} }!
= \tup{i+1} \cdot i! = i\cdot i! + i!.
\]
Solving this for $i\cdot i!$, we find
\[
i\cdot i! = \tup{i+1}! - i!.
\]
Comparing this with
\[
\underbrack{a_i}{= \tup{i+1}! \\ \text{(by the definition of $a_i$)}}
  - \underbrack{a_{i-1}}{= \tup{\tup{i-1}+1}! \\ \text{(by the definition of $a_{i-1}$)}}
= \tup{i+1}! - \tup{ \underbrack{\tup{i-1}+1}{= i} }!
= \tup{i+1}! - i!,
\]
we obtain $i\cdot i! = a_i - a_{i-1}$.
This proves \eqref{sol.factorial.101.b.2nd.diff}.

Now,
\begin{align*}
  & 1\cdot 1! + 2\cdot 2! + \cdots + n\cdot n! \\
= & \sum_{i=1}^{n} \underbrack{i\cdot i!}{= a_i - a_{i-1} \\
                  \text{(by \eqref{sol.factorial.101.b.2nd.diff})}}
=   \sum_{i=1}^{n} \tup{a_i - a_{i-1}} \\
= & \underbrack{a_n}{= \tup{n+1}! \\ \text{(by the definition of $a_n$)}}
  - \underbrack{a_0}{= \tup{0+1}! \\ \text{(by the definition of $a_0$)}}
  \qquad \tup{
     \text{by Proposition \ref{prop.sums.telescope}, applied to } m=n} \\
= & \tup{n+1}! - \underbrack{\tup{0+1}!}{= 1! = 1}
=   \tup{n+1}! - 1.
\end{align*}
This solves part \textbf{(b)} of the exercise again.

\vspace{0.806pc}

\textbf{(c)} Again, we give two proofs:

\textit{Proof by induction:} We shall prove the claim of part \textbf{(c)}
by induction on $n$:

\textit{Induction base:} We have
\[
1\cdot 3\cdot 5\cdot \cdots \cdot \tup{2 \cdot 0 - 1}
= \tup{\text{empty product}} = 1 .
\]
Comparing this with $\dfrac{\tup{2 \cdot 0}!}{2^0 0!}
= \dfrac{0!}{1\cdot 0!} = 1$, we obtain
$1\cdot 3\cdot 5\cdot \cdots \cdot \tup{2 \cdot 0 - 1}
=\dfrac{\tup{2 \cdot 0}!}{2^0 0!}$. Thus, the claim of
part \textbf{(c)} holds for $n = 0$.
This completes the induction base.

\textit{Induction step:} Let $m \in \NN$.
Assume that the claim of part \textbf{(c)} holds for $n = m$.
We must prove that the claim of part \textbf{(c)} holds for $n = m+1$.

We have assumed that the claim of part \textbf{(c)} holds for $n = m$.
In other words, we have
\begin{align}
1\cdot 3\cdot 5\cdot \cdots \cdot \tup{2m - 1}
= \dfrac{\tup{2m}!}{2^m m!}.
\label{sol.factorial.101.c.1st.IH}
\end{align}
Our goal is to show that
\begin{align}
1\cdot 3\cdot 5\cdot \cdots \cdot \tup{2\tup{m+1} - 1}
= \dfrac{\tup{2\tup{m+1}}!}{2^{m+1} \tup{m+1}!}.
\label{sol.factorial.101.c.1st.IG}
\end{align}
We start by rewriting the factorials on the right hand side of this alleged
equality in terms of the factorials in \eqref{sol.factorial.101.c.1st.IH}.
Clearly, $2\tup{m+1}$ is a positive integer.
Hence, part \textbf{(a)} of the exercise (applied to
$n = 2\tup{m+1}$) yields
\begin{align}
\tup{2\tup{m+1}}!
& = 2\tup{m+1} \cdot \tup{ \underbrack{2\tup{m+1}-1}{= 2m+1} }!
  = 2\tup{m+1} \cdot \underbrack{\tup{2m + 1}!}{= \tup{2m + 1} \cdot
        \tup{ \tup{2m + 1} - 1 }! \\
        \text{(by part \textbf{(a)} of the exercise,} \\
        \text{applied to $n = 2m + 1$)}} \nonumber \\
& = 2\tup{m+1} \cdot \tup{2m + 1} \cdot
        \tup{ \underbrack{\tup{2m + 1} - 1}{= 2m} }!
    \nonumber \\
& = 2\tup{m+1} \cdot \tup{2m + 1} \cdot \tup{2m}! .
\label{sol.factorial.101.c.1st.1}
\end{align}
Also, part \textbf{(a)} of the exercise (applied to $n = m+1$) yields
\begin{align}
\tup{m + 1}!
= \tup{m+1} \cdot \tup{ \underbrack{\tup{m+1}-1}{= m} } !
= \tup{m+1} \cdot m! .
\label{sol.factorial.101.c.1st.2}
\end{align}
Plugging the two equalities \eqref{sol.factorial.101.c.1st.1}
and \eqref{sol.factorial.101.c.1st.2} as well as the obvious
equality $2^{m+1} = 2 \cdot 2^m$ into the
expression $\dfrac{\tup{2\tup{m+1}}!}{2^{m+1} \tup{m+1}!}$, we
obtain
\begin{align*}
\dfrac{\tup{2\tup{m+1}}!}{2^{m+1} \tup{m+1}!}
=
\dfrac{2\tup{m+1} \cdot \tup{2m + 1} \cdot \tup{2m}!}
      { \tup{2 \cdot 2^m} \tup{m+1} \cdot m!}
= \dfrac{\tup{2m} !}{2^m m!}\cdot \tup{2m + 1} .
\end{align*}
Comparing this with
\begin{align*}
  1\cdot 3\cdot 5\cdot \cdots \cdot \tup{2\tup{m+1} - 1}
& = \underbrack{\tup{ 1\cdot 3\cdot 5\cdot \cdots \cdot \tup{2m - 1} }}
        {= \dfrac{\tup{2m}!}{2^m m!} \\
           \text{(by \eqref{sol.factorial.101.c.1st.IH})}}
    \cdot \tup{ \underbrack{2\tup{m+1} - 1}{= 2m + 1} } \\
& = \dfrac{\tup{2m}!}{2^m m!} \cdot \tup{2m + 1} ,
\end{align*}
we obtain precisely the equality \eqref{sol.factorial.101.c.1st.IG} that we
were trying to prove.
In other words, the claim of part \textbf{(c)} holds for $n = m+1$.
This completes the induction step.
Thus, the claim of part \textbf{(c)} is proven by induction.

\textit{Proof by tricky transformations:} Let $n \in \NN$. This time,
the trick is to split the product
$\tup{2n}! = 1\cdot 2\cdot \cdots \cdot \tup{2n}$ into two smaller products
-- one containing all its even factors and one containing its odd factors.
This yields
\begin{align*}
\tup{2n}!
& = 1\cdot 2\cdot \cdots \cdot \tup{2n} \\
& = \underbrack{\tup{ 2\cdot 4\cdot 6\cdot \cdots \cdot \tup{2n} }}
               {= 2^n \cdot \tup{ 1\cdot 2\cdot 3\cdot \cdots \cdot n} \\
                \text{(here, we have factored out a $2$} \\
                \text{from each factor)}}
    \cdot \tup{ 1\cdot 3\cdot 5\cdot \cdots \cdot \tup{2n - 1} } \\
& = 2^n \cdot \underbrack{\tup{ 1\cdot 2\cdot 3\cdot \cdots \cdot n }}
                         {= 1\cdot 2\cdot \cdots \cdot n = n! \\
                          \text{(since $n! = 1\cdot 2\cdot \cdots \cdot n$)}}
    \cdot \tup{ 1\cdot 3\cdot 5\cdot \cdots \cdot \tup{2n - 1} } \\
& = 2^n n! \cdot \tup{ 1\cdot 3\cdot 5\cdot \cdots \cdot \tup{2n - 1} } .
\end{align*}
Solving this equation for $1\cdot 3\cdot 5\cdot \cdots \cdot \tup{2n - 1}$,
we obtain
\[
1\cdot 3\cdot 5\cdot \cdots \cdot \tup{2n - 1}
= \dfrac{\tup{2n}!}{2^n n!}.
\]
Thus, part \textbf{(c)} is solved again.

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

\section{Exercise 3: Binomial coefficients 101}

\subsection{Problem}

For any $n \in \QQ$ and $k \in \NN$, we define the
\textit{binomial coefficient} $\dbinom{n}{k}$ by
\[
\dbinom{n}{k}
= \dfrac{ n \tup{n-1} \tup{n-2} \cdots \tup{n-k+1} }{k!}
= \dfrac{ \prod_{i=0}^{k-1} \tup{n-i} }{k!} .
\]
We furthermore set $\dbinom{n}{k} = 0$ for all rational
$k \notin \NN$.

For example,
\begin{align*}
\dbinom{5}{3} &= \dfrac{5 \cdot 4 \cdot 3}{3!} = \dfrac{60}{6} = 10; \\
\dbinom{1}{3} &= \dfrac{1 \cdot 0 \cdot \tup{-1}}{3!} = \dfrac{0}{6} = 0; \\
\dbinom{-2}{3} &= \dfrac{\tup{-2} \cdot \tup{-3} \cdot \tup{-4}}{3!} = \dfrac{-24}{6} = -4; \\
\dbinom{1/2}{3} &= \dfrac{\tup{1/2} \cdot \tup{-1/2} \cdot \tup{-3/2}}{3!} = \dfrac{3/8}{6} = \dfrac{1}{16}; \\
\dbinom{4}{1/2} &= 0 \qquad \tup{\text{since $1/2 \notin \NN$}} .
\end{align*}

Prove the following properties of binomial coefficients:

\begin{enumerate}

\item[\textbf{(a)}]
If $n \in \NN$ and $k \in \NN$ are such that $n \geq k$,
then
\[
\dbinom{n}{k}
= \dfrac{n!}{k! \tup{n-k}!} .
\]
(This is often used as a definition of the binomial coefficients,
but it is a lousy definition, as it
only covers the case when $n, k \in \NN$ and $n \geq k$.)

\item[\textbf{(b)}]
If $n \in \NN$ and $k \in \QQ$ are such that $k > n$, then
\[
\dbinom{n}{k} = 0.
\]

\item[\textbf{(c)}]
If $n \in \NN$ and $k \in \QQ$, then
\begin{align}
\dbinom{n}{k} = \dbinom{n}{n-k} .
\label{eq.exe.binom.101.c}
\end{align}
(This is known as the \textit{symmetry of binomial coefficients}.
Note that it fails if $n \notin \NN$.)

\item[\textbf{(d)}]
Any $n \in \QQ$ and $k \in \ZZ$ satisfy
\begin{align}
\dbinom{-n}{k} = \tup{-1}^k \dbinom{k + n - 1}{k} .
\label{eq.exe.binom.101.d}
\end{align}
(This is one of the versions of the \textit{upper negation formula}.)

\item[\textbf{(e)}]
Any $n \in \QQ$ and $k \in \QQ$ satisfy
\begin{align}
\dbinom{n}{k} = \dbinom{n-1}{k} + \dbinom{n-1}{k-1} .
\label{eq.exe.binom.101.e}
\end{align}
(This is the \textit{recurrence of the binomial coefficients},
and is the reason why each entry of
\href{https://en.wikipedia.org/wiki/Pascal%27s_triangle}{Pascal's triangle}
is the sum of the two entries above it.)

\item[\textbf{(f)}]
Any $n \in \QQ$ and $k \in \QQ$ satisfy
\begin{align}
k \dbinom{n}{k} = n \dbinom{n-1}{k-1} .
\label{eq.exe.binom.101.f}
\end{align}

\end{enumerate}

\subsection{Solution}

\textbf{(a)}
Let $n \in \NN$ and $k \in \NN$ be such that $n \geq k$.
From $k \in \NN$, we obtain $k \geq 0$, thus $n-k \leq n$.
Combining this with $n-k \geq 0$ (since $n \geq k$),
we obtain $0 \leq n-k \leq n$.
Therefore, we can split the product $1 \cdot 2 \cdot \cdots \cdot n$
into two smaller products by putting its first $n-k$ factors
into the first block and its last $k$ factors into the second:
\[
1 \cdot 2 \cdot \cdots \cdot n
= \tup{1 \cdot 2 \cdot \cdots \cdot \tup{n-k}}
  \cdot
  \tup{\tup{n-k+1} \cdot \tup{n-k+2} \cdot \cdots \cdot n} .
\]

Now, the definition of $n!$ yields
\begin{align*}
n!
&= 1 \cdot 2 \cdot \cdots \cdot n \\
&= \underbrack{\tup{1 \cdot 2 \cdot \cdots \cdot \tup{n-k}}}
              {= \tup{n-k}! \\ \text{(since $\tup{n-k}!$ was
                   defined as $1 \cdot 2 \cdot \cdots \cdot \tup{n-k}$)}}
     \cdot
     \underbrack{\tup{\tup{n-k+1} \cdot \tup{n-k+2} \cdot \cdots \cdot n}}
                {= n \tup{n-1} \tup{n-2} \cdots \tup{n-k+1} \\
                 \text{(here, we have reversed the order of multiplication)}} \\
&= \tup{n-k}! \cdot \tup{n \tup{n-1} \tup{n-2} \cdots \tup{n-k+1}} .
\end{align*}
Solving this for $n \tup{n-1} \tup{n-2} \cdots \tup{n-k+1}$,
we obtain
\begin{align}
n \tup{n-1} \tup{n-2} \cdots \tup{n-k+1}
= n! / \tup{n-k}! .
\label{sol.binom.101.a.1}
\end{align}
Now, $k \in \NN$; thus, the definition of $\dbinom{n}{k}$
yields
\begin{align*}
\dbinom{n}{k}
&= \dfrac{ n \tup{n-1} \tup{n-2} \cdots \tup{n-k+1} }{k!}
 = \dfrac{n! / \tup{n-k}!}{k!}
 \qquad \tup{\text{by \eqref{sol.binom.101.a.1}}} \\
&= \dfrac{n!}{k! \tup{n-k}!} .
\end{align*}
This solves part \textbf{(a)} of the exercise.

\vspace{0.8pc}

\textbf{(b)}
Let $n \in \NN$ and $k \in \QQ$ be such that $k > n$.
We must prove that $\dbinom{n}{k} = 0$.

If $k \notin \NN$, then this follows immediately from the
definition of $\dbinom{n}{k}$ (since $\dbinom{n}{k}$ is
simply defined to be $0$ in this case).
Thus, we WLOG assume that $k \in \NN$ for the rest of this
proof.

From $k > n$, we obtain $n < k$, thus $n \leq k-1$
(since both $n$ and $k$ are integers\footnote{thanks to
the $k \in \NN$ assumption that we just made}).
Thus, $n \in \set{0, 1, \ldots, k-1}$ (since $n \in \NN$).
Hence, one of the $k$ factors of the product
$\prod_{i=0}^{k-1} \tup{n-i}$ is $n-n = 0$.
Therefore, this product $\prod_{i=0}^{k-1} \tup{n-i}$
has at least one factor equal to $0$; thus, the whole
product is $0$.
In other words, $\prod_{i=0}^{k-1} \tup{n-i} = 0$.
Now, the definition of $\dbinom{n}{k}$ yields
\[
\dbinom{n}{k}
= \dfrac{ \prod_{i=0}^{k-1} \tup{n-i} }{k!}
= \dfrac{0}{k!}
\]
(since $\prod_{i=0}^{k-1} \tup{n-i} = 0$).
Thus, $\dbinom{n}{k} = \dfrac{0}{k!} = 0$.
This solves part \textbf{(b)} of the exercise.

\vspace{0.8pc}

\textbf{(c)}
Let $n \in \NN$ and $k \in \QQ$.
We must prove the equality \eqref{eq.exe.binom.101.c}.
If $k$ is not an integer, then this equality trivially
holds\footnote{\textit{Proof.} Assume that $k$ is not
an integer. If $n-k$ was an integer, then
$k = n - \tup{n-k}$ would be an integer as well (being
the difference of the two integers $n$ and $n-k$),
which would contradict the fact that $k$ is not an
integer.
Hence, $n-k$ cannot be an integer.
Thus, $n-k \notin \NN$.
Hence, $\dbinom{n}{n-k} = 0$ (by the definition of
$\dbinom{n}{n-k}$).
Also, $k \notin \NN$ (since $k$ is not an integer); thus,
$\dbinom{n}{k} = 0$ (by the definition of $\dbinom{n}{k}$).
Comparing these two equalities, we obtain
$\dbinom{n}{k} = \dbinom{n}{n-k}$.
In other words, \eqref{eq.exe.binom.101.c} holds.
Thus, we have proven \eqref{eq.exe.binom.101.c} in the case
when $k$ is not an integer.}.
Hence, for the rest of this proof, we WLOG assume that $k$
is an integer.

We are in one of the following three cases:

\textit{Case 1:} We have $k < 0$.

\textit{Case 2:} We have $k > n$.

\textit{Case 3:} We have neither $k < 0$ nor $k > n$.

Let us first consider Case 1.
In this case, we have $k < 0$.
Thus, $k \notin \NN$, so that $\dbinom{n}{k} = 0$
(by the definition of $\dbinom{n}{k}$).
On the other hand, from $k < 0$, we obtain $n-k > n$.
Hence, part \textbf{(b)} of this exercise (applied to $n-k$
instead of $k$) yields $\dbinom{n}{n-k} = 0$.
Comparing this with $\dbinom{n}{k} = 0$, we obtain
$\dbinom{n}{k} = \dbinom{n}{n-k}$.
Hence, \eqref{eq.exe.binom.101.c} is proven in Case 1.

Let us next consider Case 2.
In this case, we have $k > n$.
Thus, $n-k < 0$, so that $n-k \notin \NN$, and thus
$\dbinom{n}{n-k} = 0$
(by the definition of $\dbinom{n}{n-k}$).
On the other hand, part \textbf{(b)} of this exercise
yields $\dbinom{n}{k} = 0$.
Comparing this with $\dbinom{n}{n-k} = 0$, we obtain
$\dbinom{n}{k} = \dbinom{n}{n-k}$.
Hence, \eqref{eq.exe.binom.101.c} is proven in Case 2.

Let us finally consider Case 3.
In this case, we have neither $k < 0$ nor $k > n$.
Hence, we have $k \geq 0$ and $k \leq n$.
Thus, $n \geq k$ and $k \in \NN$ (since $k \geq 0$).
Hence, part \textbf{(a)} of this exercise
yields $\dbinom{n}{k} = \dfrac{n!}{k! \tup{n-k}!}$.
Also, $n-k \geq 0$ (since $n \geq k$), so that
$n-k \in \NN$. Also, from $k \geq 0$, we get $n \geq n-k$.
Thus, part \textbf{(a)} of this exercise (applied to $n-k$
instead of $k$) yields
\[
\dbinom{n}{n-k} = \dfrac{n!}{\tup{n-k}! \tup{n-\tup{n-k}}!}
= \dfrac{n!}{\tup{n-k}! k!} = \dfrac{n!}{k! \tup{n-k}!} .
\]
Comparing this with $\dbinom{n}{k} = \dfrac{n!}{k! \tup{n-k}!}$,
we obtain $\dbinom{n}{k} = \dbinom{n}{n-k}$.
Hence, \eqref{eq.exe.binom.101.c} is proven in Case 3.

We have now proven \eqref{eq.exe.binom.101.c} in all three
Cases 1, 2 and 3. Thus, \eqref{eq.exe.binom.101.c} always holds.
This solves part \textbf{(c)} of the exercise.

\vspace{0.8pc}

\textbf{(d)}
Let $n \in \QQ$ and $k \in \ZZ$.
We must prove the equality \eqref{eq.exe.binom.101.d}.
If $k \notin \NN$, then this equality trivially
holds\footnote{\textit{Proof.} Assume that $k \notin \NN$.
Then, $\dbinom{-n}{k} = 0$ (by the definition of
$\dbinom{-n}{k}$) and $\dbinom{k + n - 1}{k} = 0$
(by the definition of $\dbinom{k + n - 1}{k}$). In view of
these two equations, the equality
\eqref{eq.exe.binom.101.d} rewrites as $0 = \tup{-1}^k 0$,
which is obviously true.
Thus, we have proven \eqref{eq.exe.binom.101.d} in the case
when $k \notin \NN$.}.
Hence, for the rest of this proof, we WLOG assume that
$k \in \NN$.

Thus, the definition of $\dbinom{-n}{k}$ yields
\begin{align}
   \dbinom{-n}{k}
&= \dfrac{ \tup{-n} \tup{\tup{-n}-1} \tup{\tup{-n}-2} \cdots \tup{\tup{-n}-k+1} }{k!} \nonumber\\
&= \dfrac{1}{k!}
    \underbrack{\tup{ \tup{-n} \tup{\tup{-n}-1} \tup{\tup{-n}-2} \cdots \tup{\tup{-n}-k+1} }}
               {= \tup{-n} \tup{-\tup{n+1}} \tup{-\tup{n+2}} \cdots \tup{-\tup{n+k-1}} \\
                = \tup{-1}^k \tup{ n \tup{n+1} \tup{n+2} \cdots \tup{n+k-1} } \\
                \text{(here, we have factored a minus sign out of each factor)}} \nonumber \\
&= \dfrac{1}{k!} \tup{-1}^k \tup{ n \tup{n+1} \tup{n+2} \cdots \tup{n+k-1} }.
\label{sol.binom.101.d.2}
\end{align}
On the other hand, the definition of $\dbinom{k + n - 1}{k}$ yields
\begin{align*}
   \dbinom{k + n - 1}{k}
&= \dfrac{ \tup{k+n-1} \tup{\tup{k+n-1}-1} \tup{\tup{k+n-1}-2} \cdots \tup{\tup{k+n-1}-k+1} }{k!} \\
&= \dfrac{1}{k!}
    \underbrack{ \tup{k+n-1} \tup{\tup{k+n-1}-1} \tup{\tup{k+n-1}-2} \cdots \tup{\tup{k+n-1}-k+1} }
               {= \tup{k+n-1} \tup{k+n-2} \tup{k+n-3} \cdots n \\
                = n \tup{n+1} \tup{n+2} \cdots \tup{n+k-1} \\
                \text{(here, we have reversed the order of multiplication)}} \\
&= \dfrac{1}{k!} \tup{ n \tup{n+1} \tup{n+2} \cdots \tup{n+k-1} } ,
\end{align*}
so that
\begin{align*}
   \tup{-1}^k \dbinom{k + n - 1}{k}
&= \tup{-1}^k \dfrac{1}{k!} \tup{ n \tup{n+1} \tup{n+2} \cdots \tup{n+k-1} } \\
&= \dfrac{1}{k!} \tup{-1}^k \tup{ n \tup{n+1} \tup{n+2} \cdots \tup{n+k-1} }.
\end{align*}
Comparing this with \eqref{sol.binom.101.d.2}, we obtain
$\dbinom{-n}{k} = \tup{-1}^k \dbinom{k + n - 1}{k}$.
Thus, \eqref{eq.exe.binom.101.d} is proven.
This solves part \textbf{(d)} of the exercise.

\vspace{0.8pc}

\textbf{(e)}
Let $n \in \QQ$ and $k \in \QQ$.
We must prove the equality \eqref{eq.exe.binom.101.e}.
If $k \notin \NN$, then this equality trivially
holds\footnote{\textit{Proof.} Assume that $k \notin \NN$.
If we had $k-1 \in \NN$, then we would have
$k = \underbrack{k-1}{\in \NN} + \underbrack{1}{\in \NN} \in \NN$
as well, which would contradict the fact that $k \notin \NN$.
Hence, we must have $k-1 \notin \NN$.
Hence, $\dbinom{n-1}{k-1} = 0$ (by the definition of
$\dbinom{n-1}{k-1}$).
Also, $k \notin \NN$; thus,
$\dbinom{n}{k} = 0$ (by the definition of $\dbinom{n}{k}$) and
$\dbinom{n-1}{k} = 0$ (by the definition of $\dbinom{n-1}{k}$).
Now, the equality \eqref{eq.exe.binom.101.e} boils down to
$0 = 0 + 0$ (since $\dbinom{n}{k} = 0$ and
$\dbinom{n-1}{k} = 0$ and $\dbinom{n-1}{k-1} = 0$), which is
clearly true.
Thus, we have proven \eqref{eq.exe.binom.101.e} in the case
when $k \notin \NN$.}.
Hence, for the rest of this proof, we WLOG assume that $k \in \NN$.

We are in one of the following two cases:

\textit{Case 1:} We have $k = 0$.

\textit{Case 2:} We have $k \neq 0$.

Let us first consider Case 1.
In this case, we have $k = 0$.
Thus, $k-1 = -1 \notin \NN$, so that $\dbinom{n-1}{k-1} = 0$
(by the definition of $\dbinom{n-1}{k-1}$).
But $0 \in \NN$; thus, the definition of $\dbinom{n}{0}$ yields
\[
\dbinom{n}{0}
= \dfrac{ n \tup{n-1} \tup{n-2} \cdots \tup{n-0+1} }{0!} .
\]
Since $n \tup{n-1} \tup{n-2} \cdots \tup{n-0+1}
= \tup{\text{empty product}} = 1$ and $0! = 1$, this rewrites as
\[
\dbinom{n}{0} = \dfrac{1}{1} = 1.
\]
This rewrites as $\dbinom{n}{k} = 1$ (since $k = 0$).
The same argument (applied to $n-1$ instead of $n$) yields
$\dbinom{n-1}{k} = 1$.
Now, the equality \eqref{eq.exe.binom.101.e} boils down to
$1 = 1 + 0$ (since $\dbinom{n}{k} = 1$ and
$\dbinom{n-1}{k} = 1$ and $\dbinom{n-1}{k-1} = 0$), which is
true.
Hence, \eqref{eq.exe.binom.101.e} is proven in Case 1.

Let us next consider Case 2.
In this case, we have $k \neq 0$.
Thus, $k$ is a positive integer (since $k \in \NN$), so that
$k-1 \in \NN$.

Exercise 2 \textbf{(a)} (applied to $k$ instead of $n$) yields
$k! = k \cdot \tup{k-1}!$, so that $\tup{k-1}! = k! / k$ and thus
$\dfrac{1}{\tup{k-1}!} = \dfrac{1}{k! / k} = \dfrac{1}{k!} \cdot k$.

Recall that $k-1 \in \NN$. Hence, the definition of $\dbinom{n}{k-1}$
yields
\begin{align*}
\dbinom{n}{k-1}
&= \dfrac{n \tup{n-1} \tup{n-2} \cdots \tup{n - \tup{k-1} + 1}}{\tup{k-1}!} \\
&= \dfrac{1}{\tup{k-1}!} \cdot
    \tup{ n \tup{n-1} \tup{n-2} \cdots \tup{n - \tup{k-1} + 1} }.
\end{align*}
The same argument (applied to $n-1$ instead of $n$) yields
\begin{align}
\dbinom{n-1}{k-1}
&= \underbrack{\dfrac{1}{\tup{k-1}!}}{= \dfrac{1}{k!} \cdot k}
   \cdot
   \underbrack{\tup{ \tup{n-1} \tup{\tup{n-1} - 1} \tup{\tup{n-1} - 2}
                     \cdots \tup{\tup{n-1} - \tup{k-1} + 1} }}
              {= \tup{n-1} \tup{n-2} \cdots \tup{n-k+1} } \nonumber\\
&= \dfrac{1}{k!} \cdot k \cdot \tup{ \tup{n-1} \tup{n-2} \cdots \tup{n-k+1} } .
\label{sol.binom.101.e.1}
\end{align}

On the other hand, the definition of $\dbinom{n}{k}$ yields
\begin{align}
\dbinom{n}{k}
&= \dfrac{n \tup{n-1} \tup{n-2} \cdots \tup{n-k+1}}{k!} \nonumber \\
&= \dfrac{1}{k!} \tup{n \tup{n-1} \tup{n-2} \cdots \tup{n-k+1}} .
\label{sol.binom.101.e.2}
\end{align}
The same argument (applied to $n-1$ instead of $n$) yields
\begin{align*}
\dbinom{n-1}{k}
&= \dfrac{1}{k!}
     \underbrack{\tup{ \tup{n-1} \tup{\tup{n-1} - 1}
                       \tup{\tup{n-1} - 2} \cdots
                       \tup{\tup{n-1} - k + 1} }}
                {= \tup{n-1} \tup{n-2} \cdots \tup{n-k} \\
                 = \tup{\tup{n-1} \tup{n-2} \cdots \tup{n-k+1}} \cdot \tup{n-k} } \\
&= \dfrac{1}{k!}
   \cdot \tup{\tup{n-1} \tup{n-2} \cdots \tup{n-k+1}} \cdot \tup{n-k} \\
&= \dfrac{1}{k!} \tup{n-k} \cdot \tup{\tup{n-1} \tup{n-2} \cdots \tup{n-k+1}} .
\end{align*}
Adding \eqref{sol.binom.101.e.1} to this equality, we obtain
\begin{align*}
   \dbinom{n-1}{k} + \dbinom{n-1}{k-1}
&= \dfrac{1}{k!} \tup{n-k} \cdot \tup{\tup{n-1} \tup{n-2} \cdots \tup{n-k+1}} \\
& \qquad \qquad + \dfrac{1}{k!} \cdot k \cdot \tup{ \tup{n-1} \tup{n-2} \cdots \tup{n-k+1} } \\
&= \dfrac{1}{k!} \cdot \underbrack{\tup{\tup{n-k}+k}}{= n}
     \cdot \tup{ \tup{n-1} \tup{n-2} \cdots \tup{n-k+1} } \\
&= \dfrac{1}{k!} \cdot
     \underbrack{n \cdot \tup{ \tup{n-1} \tup{n-2} \cdots \tup{n-k+1} }}
                {= n \tup{n-1} \tup{n-2} \cdots \tup{n-k+1}} \\
&= \dfrac{1}{k!} \tup{ n \tup{n-1} \tup{n-2} \cdots \tup{n-k+1} }
=\dbinom{n}{k}
\end{align*}
(by \eqref{sol.binom.101.e.2}).
Hence, \eqref{eq.exe.binom.101.e} is proven in Case 2.

We have now proven \eqref{eq.exe.binom.101.e} in both
Cases 1 and 2. Thus, \eqref{eq.exe.binom.101.e} always holds.
This solves part \textbf{(e)} of the exercise.

\vspace{0.8pc}

\textbf{(f)}
Let $n \in \QQ$ and $k \in \QQ$.
We must prove the equality \eqref{eq.exe.binom.101.f}.
If $k \notin \NN$, then this equality trivially
holds\footnote{\textit{Proof.} Assume that $k \notin \NN$.
If we had $k-1 \in \NN$, then we would have
$k = \underbrack{k-1}{\in \NN} + \underbrack{1}{\in \NN} \in \NN$
as well, which would contradict the fact that $k \notin \NN$.
Hence, we must have $k-1 \notin \NN$.
Hence, $\dbinom{n-1}{k-1} = 0$ (by the definition of
$\dbinom{n-1}{k-1}$).
Also, $k \notin \NN$; thus,
$\dbinom{n}{k} = 0$ (by the definition of $\dbinom{n}{k}$).
Now, the equality \eqref{eq.exe.binom.101.f} boils down to
$k \cdot 0 = n \cdot 0$ (since $\dbinom{n}{k} = 0$ and
$\dbinom{n-1}{k-1} = 0$), which is
clearly true (since both sides equal $0$).
Thus, we have proven \eqref{eq.exe.binom.101.f} in the case
when $k \notin \NN$.}.
Hence, for the rest of this proof, we WLOG assume that $k \in \NN$.

We are in one of the following two cases:

\textit{Case 1:} We have $k = 0$.

\textit{Case 2:} We have $k \neq 0$.

Let us first consider Case 1.
In this case, we have $k = 0$.
Thus, $k-1 = -1 \notin \NN$, so that $\dbinom{n-1}{k-1} = 0$
(by the definition of $\dbinom{n-1}{k-1}$).
Hence, $n \dbinom{n-1}{k-1} = n \cdot 0 = 0$.
Comparing this with $\underbrack{k}{= 0} \dbinom{n}{k} = 0$,
we obtain $k \dbinom{n}{k} = n \dbinom{n-1}{k-1}$.
Hence, \eqref{eq.exe.binom.101.f} is proven in Case 1.

Let us next consider Case 2.
In this case, we have $k \neq 0$.
Thus, $k$ is a positive integer (since $k \in \NN$), so that
$k-1 \in \NN$.

As in the solution to part \textbf{(e)} above, we can prove
the equality \eqref{sol.binom.101.e.1}.
Multiplying both sides of this equality by $n$, we obtain
\begin{align}
n \dbinom{n-1}{k-1}
&= n \cdot \dfrac{1}{k!} \cdot k \cdot \tup{ \tup{n-1} \tup{n-2} \cdots \tup{n-k+1} } \nonumber\\
&= k \cdot \dfrac{1}{k!} \cdot
     \underbrack{n \cdot \tup{ \tup{n-1} \tup{n-2} \cdots \tup{n-k+1} }}
                {= n \tup{n-1} \tup{n-2} \cdots \tup{n-k+1}} \nonumber\\
&= k \cdot \dfrac{1}{k!} \cdot
     \tup{n \tup{n-1} \tup{n-2} \cdots \tup{n-k+1}} .
\label{sol.binom.101.f.1}
\end{align}

On the other hand, the definition of $\dbinom{n}{k}$ yields
\begin{align}
\dbinom{n}{k}
&= \dfrac{n \tup{n-1} \tup{n-2} \cdots \tup{n-k+1}}{k!} \nonumber \\
&= \dfrac{1}{k!} \tup{n \tup{n-1} \tup{n-2} \cdots \tup{n-k+1}} .
\end{align}
Multiplying both sides of this equality by $k$, we find
\[
k \dbinom{n}{k}
= k \cdot \dfrac{1}{k!} \tup{n \tup{n-1} \tup{n-2} \cdots \tup{n-k+1}} .
\]
Comparing this with \eqref{sol.binom.101.f.1},
we obtain $k \dbinom{n}{k} = n \dbinom{n-1}{k-1}$.
Hence, \eqref{eq.exe.binom.101.f} is proven in Case 2.

We have now proven \eqref{eq.exe.binom.101.f} in both
Cases 1 and 2. Thus, \eqref{eq.exe.binom.101.f} always holds.
This solves part \textbf{(f)} of the exercise.

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

\section{Exercise 4: General associativity for binary operations}

\subsection{Problem}

Let $S$ be a set.
A \textit{binary operation} on $S$ means a map from $S \times S$
to $S$.
(In other words, a binary operation on $S$ means a function that
takes two elements of $S$ and outputs an element of $S$.
For example, subtraction of integers is a binary operation on $\ZZ$,
sending each pair $\tup{a, b} \in \ZZ \times \ZZ$ to $a-b \in \ZZ$.
Other binary operations on $\ZZ$ are addition and multiplication,
but not division\footnote{Division is not a binary operation on $\ZZ$,
because $1 / 2 \notin \ZZ$ (and also because $1 / 0$ is not
defined).}.)

Fix a binary operation $*$ on $S$.
In the following, we will write this operation $*$ in
\textit{infix notation}. This means that if $a, b \in S$, then
we write $a * b$ (rather than $* \tup{a, b}$) for
the image of $\tup{a, b}$ under $*$.
(This is how binary operations are commonly written: For example,
addition, subtraction and multiplication are all written
this way.
For instance, you write $a + b$ for the sum of two numbers
$a$ and $b$, not $+ \tup{a, b}$.)

Now, assume that we have
\begin{equation}
a * \tup{b * c} = \tup{a * b} * c
\qquad \text{for all $a, b, c \in S$ .}
\label{eq.exe.gen-ass.ass}
\end{equation}
(This is often called the \textit{associativity law} for $*$;
a binary operation $*$ satisfying this law is called
\textit{associative}.\footnote{For
example, the operation $+$ on integers is associative, since
every three integers $a, b, c$ satisfy
$a + \tup{b + c} = \tup{a + b} + c$.
Similarly, the operation $\cdot$ (multiplication) on integers
is associative.
But the operation $-$ on integers is not associative, since
not every three integers $a, b, c$ satisfy
$a - \tup{b - c} = \tup{a - b} - c$
(in fact, a specific counterexample is $a = 0$, $b = 0$ and
$c = 1$).

Here are five more examples of associative operations:

\begin{itemize}

\item The binary operation $\gcd$ on positive integers
      (sending each $\tup{a, b} \in \set{1,2,3,\ldots}^2$
      to the greatest common divisor $\gcd\tup{a, b}$
      of $a$ and $b$) is associative.
      (This will be proven later in class.)
      Note that this operation is usually \textbf{not}
      written infix: We write $\gcd\tup{a, b}$, not
      $a \gcd b$.

\item The binary operation $\min$ on integers
      (sending each $\tup{a, b} \in \ZZ^2$ to
      $\min\set{a, b}$, which is the smaller of the two
      numbers $a$ and $b$) is associative.
      (This is easy to check: If $a, b, c \in \ZZ$,
      then both $\min\set{a, \min\set{b, c}}$ and
      $\min\set{\min\set{a, b}, c}$ equal the smallest
      of the three numbers $a, b, c$.)

\item If $n \in \NN$, then
      multiplication of $n \times n$-matrices
      (say, with real entries)
      is associative.
      (We will elaborate on this later in class.)

\item The binary operation $\#$ on the open interval
      $\tup{-1, 1} \subseteq \RR$ defined by
      \[
      a \# b = \dfrac{a + b}{1 + ab}
      \]
      is associative (check this!).
      This operation $\#$ is sometimes known as
      \textit{relativistic addition of velocities} (renormalized
      so that the speed of light is $1$);
      see
      \href{https://kconrad.math.uconn.edu/blurbs/grouptheory/relativity.pdf}{Keith Conrad, \textit{Relativistic addition and group theory}}
      for more about it.

\item If $A$ is any set, and $A^A$ is the set of all
      maps from $A$ to $A$, then the composition of
      maps (i.e., the binary operation that sends
      each $\tup{f, g} \in \tup{A^A}^2$ to
      $f \circ g$) is associative.
\end{itemize}
})

The equality \eqref{eq.exe.gen-ass.ass} entails that if
$a, b, c \in S$ are three elements, then the ``triple product''%
\footnote{The word ``product'' is meant in the wider sense.
Of course, $*$ does not have to be multiplication of numbers.
When it is, our ``products'' are products in the usual sense.}
expression $a * b * c$ makes sense; indeed, the two reasonable
ways to interpret this expression are $a * \tup{b * c}$ and
$\tup{a * b} * c$ (corresponding to the two possible orders in
which the $*$ operations can be performed), and the associativity
law \eqref{eq.exe.gen-ass.ass} says precisely that these two
ways lead to the same result.
This result can therefore be called
$a * b * c$ without risking ambiguity.

Less obvious is the case of a ``quadruple product'' expression
$a * b * c * d$ when $a, b, c, d \in S$ are four elements.
There are not $2$ but $5$ different ways of interpreting this
expression:
\begin{align*}
&
a * \tup{b * \tup{c * d}}, \qquad
a * \tup{\tup{b * c} * d}, \qquad
\tup{a * b} * \tup{c * d}, \\
&
\tup{a * \tup{b * c}} * d, \qquad
\tup{\tup{a * b} * c} * d.
\end{align*}
It can again be shown using \eqref{eq.exe.gen-ass.ass} that
these $5$ ways produce one and the same result.
(For example, the second and the fourth of these $5$ ways
produce the same result, because applying
\eqref{eq.exe.gen-ass.ass} to $a$, $b * c$ and $d$ instead
of $a$, $b$ and $c$ yields
$a * \tup{\tup{b * c} * d} = \tup{a * \tup{b * c}} * d$.)
Thus, the ``quadruple product'' $a * b * c * d$ can, too,
be given a non-ambiguous meaning:
Just evaluate any of its $5$ possible interpretations;
the result doesn't depend on which one you chose.

In this exercise, we will generalize this to arbitrary
``$k$-tuple product'' expressions $a_1 * a_2 * \cdots * a_k$
(with $a_1, a_2, \ldots, a_k \in S$).
The main claim is that all possible ways of interpreting
such an expression yield the same result.
Even formulating this claim rigorously is not easy!

We will circumnavigate this difficulty as follows:
Rather than try to explain what ``interpreting this
expression'' means, we will first \textbf{define} the value
of $a_1 * a_2 * \cdots * a_k$ in a specific way -- namely,
by performing the $*$ operations ``from left to right''
(i.e., we will define it to be
$\tup{ \cdots \tup{\tup{a_1 * a_2} * a_3} * \cdots } * a_k$);
we will actually denote this value by
$P \tup{a_1, a_2, \ldots, a_k}$ (in order to avoid being
tempted by the overly suggestive notation
$a_1 * a_2 * \cdots * a_k$
into believing something that needs to proven first!),
and we will define it recursively (in order to avoid having
``$\cdots$'' in our definition).
Once this $P \tup{a_1, a_2, \ldots, a_k}$ is defined,
we will prove\footnote{This is part \textbf{(a)} of the
exercise.} that
every positive integer $k$, every $a_1, a_2, \ldots, a_k \in S$
and every $i \in \set{1, 2, \ldots, k-1}$ satisfy
\[
P \tup{a_1, a_2, \ldots, a_k}
= \tup{P \tup{a_1, a_2, \ldots, a_i}}
     * \tup{P \tup{a_{i+1}, a_{i+2}, \ldots, a_k}} ,
\]
and this will show that the value
$P \tup{a_1, a_2, \ldots, a_k}$
is also obtained if we interpret the expression
$a_1 * a_2 * \cdots * a_k$ starting with any of the $*$
signs.
(By induction, this freedom to start with any of the $*$
signs means that we can also continue with any of the
remaining $*$ signs, and so on.)

Here is the definition we promised:

\begin{statement}
\textbf{Definition.}

For every positive integer $k$ and any $k$ elements
$a_1, a_2, \ldots, a_k \in S$, we define an element
$P \tup{a_1, a_2, \ldots, a_k} \in S$ by recursion on $k$,
as follows:

\begin{itemize}

\item For $k = 1$, we simply set
\begin{align}
P \tup{a_1} = a_1 .
\label{eq.exe.gen-ass.Pa1}
\end{align}

\item If $k > 1$, then we set
\begin{align}
P \tup{a_1, a_2, \ldots, a_k}
= \tup{P \tup{a_1, a_2, \ldots, a_{k-1}}} * a_k .
\label{eq.exe.gen-ass.Pa2}
\end{align}

\end{itemize}
\end{statement}

By unrolling this recursive definition, you can see what it
means for each specific value of $k$: Namely,
\begin{align*}
P \tup{a_1} &= a_1 ; \\
P \tup{a_1, a_2} &= a_1 * a_2 ; \\
P \tup{a_1, a_2, a_3} &= \tup{a_1 * a_2} * a_3 ; \\
P \tup{a_1, a_2, a_3, a_4} &= \tup{\tup{a_1 * a_2} * a_3} * a_4 ; \\
\cdots \\
P \tup{a_1, a_2, \ldots, a_k} &= \tup{ \cdots \tup{\tup{a_1 * a_2} * a_3} * \cdots } * a_k .
\end{align*}
So, as you see, $P \tup{a_1, a_2, \ldots, a_k}$ is just
(a formal way to say) ``the expression
$a_1 * a_2 * \cdots * a_k$ interpreted by performing
the $*$ operations from left to right''.

Now comes the actual exercise:

\begin{enumerate}

\item[\textbf{(a)}]
Prove that
every positive integer $k$, every elements
$a_1, a_2, \ldots, a_k \in S$
and every $i \in \set{1, 2, \ldots, k-1}$ satisfy
\begin{equation}
P \tup{a_1, a_2, \ldots, a_k}
= \tup{P \tup{a_1, a_2, \ldots, a_i}}
     * \tup{P \tup{a_{i+1}, a_{i+2}, \ldots, a_k}} .
\label{eq.exe.gen-ass.a}
\end{equation}

\end{enumerate}

Now, we define the value
of the ``$k$-tuple product'' expression
$a_1 * a_2 * \cdots * a_k$ (where $k$ is a positive
integer and $a_1, a_2, \ldots, a_k \in S$ are $k$
elements) to be $P \tup{a_1, a_2, \ldots, a_k}$.
Then, the equality \eqref{eq.exe.gen-ass.a} rewrites as
\[
a_1 * a_2 * \cdots * a_k
= \tup{a_1 * a_2 * \cdots * a_i}
    * \tup{a_{i+1} * a_{i+2} * \cdots * a_k} ,
\]
which means precisely that you can start evaluating
the expression $a_1 * a_2 * \cdots * a_k$ with any
of the $*$ signs and you still get the same result.
(Of course, the two smaller sub-expressions
$a_1 * a_2 * \cdots * a_i$ and
$a_{i+1} * a_{i+2} * \cdots * a_k$ can also be
evaluated by starting with any of the $*$ signs,
and so on.
Thus, by induction, you can perform the $*$ operations
in any order and still get the same result.)

Note that this notation $a_1 * a_2 * \cdots * a_k$
generalizes the sum $a_1 + a_2 + \cdots + a_k$ and the
product $a_1 \cdot a_2 \cdot \cdots \cdot a_k$ of $k$
numbers.

So far we have only defined the value of ``$k$-tuple
products'' $a_1 * a_2 * \cdots * a_k$ when $k > 0$;
our next goal is to also give them a meaning in the
case when $k = 0$.
While this is a degenerate border case (we are defining
a ``product'' with no factors!), it tends to be rather
useful.

Let $e$ be an element of $S$ such that
\begin{align}
a * e = e * a = a \qquad \text{for all $a \in S$.}
\label{eq.exe.gen-ass.neu}
\end{align}
(Such an element $e$ is called \textit{neutral} for the
operation $*$. For example, $0 \in \ZZ$ is neutral for
the operation $+$, while $1 \in \ZZ$ is neutral for
the operation $\cdot$. Not every binary operation has
a neutral element.\footnote{However, it is easy to show
that any binary operation has \textbf{at most one}
neutral element. In other words, if $e_1$ and $e_2$
are two elements of $S$ that are both neutral for $*$,
then $e_1 = e_2$.})

Now, using $e$, let us extend our definition of
$P \tup{a_1, a_2, \ldots, a_k}$ (which, so far, only
covered the case $k > 0$) to the case when $k = 0$.
This is a very degenerate case: In this case,
$\tup{a_1, a_2, \ldots, a_k}$ is the empty list $\tup{}$,
so we just need to define $P \tup{}$.
We define it by setting
\[
P \tup{} = e .
\]

Now we can extend the result of part \textbf{(a)}
of the exercise somewhat, by allowing $k$ to be $0$
and allowing $i$ to be $0$ or $k$:

\begin{enumerate}

\item[\textbf{(b)}]
Prove that
every nonnegative integer $k$, every elements
$a_1, a_2, \ldots, a_k \in S$
and every $i \in \set{0, 1, \ldots, k}$ satisfy
\[
P \tup{a_1, a_2, \ldots, a_k}
= \tup{P \tup{a_1, a_2, \ldots, a_i}}
     * \tup{P \tup{a_{i+1}, a_{i+2}, \ldots, a_k}} .
\]

\end{enumerate}

\subsection{Remark}

Part \textbf{(a)} of this exercise (and, occasionally,
part \textbf{(b)} as well) is known as the
\textit{general associativity law}.
Notice the power of this law:
Once you check the associativity law
\eqref{eq.exe.gen-ass.ass} for ``$*$-products'' of $3$ elements,
it allows you to define
``$k$-tuple products'' $a_1 * a_2 * \cdots * a_k$
and gives you an associativity law for them
for free.

This is used tacitly in many places.
For example, in linear algebra, one commonly defines
the product $AB$ of two matrices $A$ and $B$, and then
shows that this product satisfies the associativity law
(that is, $A \tup{BC} = \tup{AB} C$).
The general associativity law then shows that a product
$A_1 A_2 \cdots A_k$ of $k$ matrices is well-defined
(i.e., its value does not depend on the order in which
you perform the multiplications).\footnote{Strictly
speaking, this argument works only for square matrices,
because multiplication of non-square matrices is not
a binary operation.
But a straightforward generalization of the general
associativity law can be used to adapt this argument
to the case of arbitrary rectangular matrices.}
Chances are, you have been using this fact long before
you realized it needs to be proven.

\subsection{Solution}

\textbf{(a)}
We will solve part \textbf{(a)} of the exercise by
induction on $k$.

\textit{Induction base:}
Part \textbf{(a)} of the exercise holds for $k = 1$,
for fairly stupid reasons\footnote{\textit{Proof.}
If $k = 1$, then
$\set{1, 2, \ldots, k-1} = \set{1, 2, \ldots, 1-1}
= \set{1, 2, \ldots, 0} = \varnothing$.
Hence, if $k = 1$, then there exists no
$i \in \set{1, 2, \ldots, k-1}$.
Thus, if $k = 1$, then part \textbf{(a)} of the
exercise is
\href{https://en.wikipedia.org/wiki/Vacuous_truth}{vacuously true}
(because it makes a statement about ``every
$i \in \set{1, 2, \ldots, k-1}$'', but no such $i$
exists).
And a vacuously true statement is true.}.
This concludes the induction base.

\textit{Induction step:} Fix a positive integer $n > 1$.
Assume that part \textbf{(a)} of the exercise holds
for $k = n-1$.
We must now prove that part \textbf{(a)} of the exercise
holds for $k = n$.

We have assumed that part \textbf{(a)} of the exercise
holds for $k = n-1$.
In other words, the following claim holds:

\begin{statement}
\textit{Claim 1:}
Every elements $a_1, a_2, \ldots, a_{n-1} \in S$
and every $i \in \set{1, 2, \ldots, n-2}$ satisfy
\[
P \tup{a_1, a_2, \ldots, a_{n-1}}
= \tup{P \tup{a_1, a_2, \ldots, a_i}}
     * \tup{P \tup{a_{i+1}, a_{i+2}, \ldots, a_{n-1}}} .
\]
\end{statement}

We must prove that part \textbf{(a)} of the exercise
holds for $k = n$.
In other words, we must prove the following claim:

\begin{statement}
\textit{Claim 2:}
Every elements $a_1, a_2, \ldots, a_n \in S$
and every $i \in \set{1, 2, \ldots, n-1}$ satisfy
\begin{equation}
P \tup{a_1, a_2, \ldots, a_n}
= \tup{P \tup{a_1, a_2, \ldots, a_i}}
     * \tup{P \tup{a_{i+1}, a_{i+2}, \ldots, a_n}} .
\label{sol.gen-ass.a.IG}
\end{equation}
\end{statement}

[\textit{Proof of Claim 2:}
Let $a_1, a_2, \ldots, a_n \in S$ and
$i \in \set{1, 2, \ldots, n-1}$.
We must prove the equality \eqref{sol.gen-ass.a.IG}.

From $i \in \set{1, 2, \ldots, n-1}$, we obtain
$1 \leq i \leq n-1$. Hence, $n-1 \geq 1$, so that
$n \geq 2$.

We are in one of the following two cases:

\textit{Case 1:} We have $i = n-1$.

\textit{Case 2:} We have $i \neq n-1$.

Let us first consider Case 1.
In this case, we have $i = n-1$.
Thus, $n-i = 1$;
hence, the $\tup{n-i}$-tuple
$\tup{a_{i+1}, a_{i+2}, \ldots, a_n}$
is simply the $1$-tuple $\tup{a_n}$.
Thus,
\begin{align}
P \tup{a_{i+1}, a_{i+2}, \ldots, a_n}
= P \tup{a_n} = a_n
\label{sol.gen-ass.a.case1.1}
\end{align}
(by \eqref{eq.exe.gen-ass.Pa1}, applied to $a_n$ instead
of $a_1$).

But $n \geq 2 > 1$.
Thus, \eqref{eq.exe.gen-ass.Pa2} (applied to $k = n$)
yields
\begin{align*}
P \tup{a_1, a_2, \ldots, a_n}
&= \tup{P \tup{a_1, a_2, \ldots, a_{n-1}}} * a_n \\
&= \tup{P \tup{a_1, a_2, \ldots, a_i}}
     * \underbrack{a_n}{= P \tup{a_{i+1}, a_{i+2}, \ldots, a_n} \\
                        \tup{\text{by \eqref{sol.gen-ass.a.case1.1}}}}
   \qquad \tup{\text{since $n-1 = i$}} \\
&= \tup{P \tup{a_1, a_2, \ldots, a_i}}
     * \tup{P \tup{a_{i+1}, a_{i+2}, \ldots, a_n}} .
\end{align*}
Thus, \eqref{sol.gen-ass.a.IG} is proven in Case 1.

Let us now consider Case 2.
In this case, we have $i \neq n-1$.
Thus, $i < n-1$ (since $i \leq n-1$).
Hence, $n-i > 1$.
Thus, \eqref{eq.exe.gen-ass.Pa2} (applied to $n-i$
and $a_{i+1}, a_{i+2}, \ldots, a_n$ instead of $k$
and $a_1, a_2, \ldots, a_k$)
yields
\begin{align*}
P \tup{a_{i+1}, a_{i+2}, \ldots, a_n}
&= \tup{P \tup{a_{i+1}, a_{i+2}, \ldots, a_{n-1}}} * a_n  .
\end{align*}
Hence,
\begin{align}
& \tup{P \tup{a_1, a_2, \ldots, a_i}}
     * \underbrace{\tup{P \tup{a_{i+1}, a_{i+2}, \ldots, a_n}}}_{
                    = \tup{P \tup{a_{i+1}, a_{i+2}, \ldots, a_{n-1}}} * a_n} \nnn
& = \tup{P \tup{a_1, a_2, \ldots, a_i}}
     * \tup{\tup{P \tup{a_{i+1}, a_{i+2}, \ldots, a_{n-1}}} * a_n} \nnn
& = \tup{\tup{P \tup{a_1, a_2, \ldots, a_i}}
     * \tup{P \tup{a_{i+1}, a_{i+2}, \ldots, a_{n-1}}}}
    * a_n
\label{sol.gen-ass.a.c2.pf.2}
\end{align}
(by \eqref{eq.exe.gen-ass.ass}, applied to
$a = P \tup{a_1, a_2, \ldots, a_i}$,
$b = P \tup{a_{i+1}, a_{i+2}, \ldots, a_{n-1}}$
and $c = a_n$).

Furthermore, $i < n-1$.
Since $i$ and $n-1$ are integers, this entails
$i \leq \tup{n-1} - 1 = n-2$.
Thus, $i \in \set{1, 2, \ldots, n-2}$ (since $i \geq 1$).
Hence, Claim 1 yields
\begin{align}
P \tup{a_1, a_2, \ldots, a_{n-1}}
= \tup{P \tup{a_1, a_2, \ldots, a_i}}
     * \tup{P \tup{a_{i+1}, a_{i+2}, \ldots, a_{n-1}}} .
\label{sol.gen-ass.a.c2.pf.3}
\end{align}

On the other hand, $n \geq 2 > 1$.
Thus, \eqref{eq.exe.gen-ass.Pa2} (applied to $k = n$)
yields
\begin{align*}
P \tup{a_1, a_2, \ldots, a_n}
&= \tup{P \tup{a_1, a_2, \ldots, a_{n-1}}} * a_n \\
&= \tup{\tup{P \tup{a_1, a_2, \ldots, a_i}}
     * \tup{P \tup{a_{i+1}, a_{i+2}, \ldots, a_{n-1}}}}
    * a_n
    \qquad
    \tup{\text{by \eqref{sol.gen-ass.a.c2.pf.3}}} \\
&= \tup{P \tup{a_1, a_2, \ldots, a_i}}
     * \tup{P \tup{a_{i+1}, a_{i+2}, \ldots, a_n}}
     \qquad \tup{\text{by \eqref{sol.gen-ass.a.c2.pf.2}}} .
\end{align*}
Thus, \eqref{sol.gen-ass.a.IG} is proven in Case 2.

We have now proven \eqref{sol.gen-ass.a.IG} in both Cases
1 and 2.
Since these two Cases cover all possibilities, we thus
conclude that \eqref{sol.gen-ass.a.IG} always holds.
Thus, Claim 2 is proven.]

By proving Claim 2, we have shown that
part \textbf{(a)} of the exercise
holds for $k = n$.
This completes the induction step.
Thus, part \textbf{(a)} of the exercise
is proven by induction.

\vspace{0.8pc}

\textbf{(b)}
Let $k$ be a nonnegative integer.
Let $a_1, a_2, \ldots, a_k \in S$
and $i \in \set{0, 1, \ldots, k}$.
We must prove the equality
\begin{align}
P \tup{a_1, a_2, \ldots, a_k}
= \tup{P \tup{a_1, a_2, \ldots, a_i}}
     * \tup{P \tup{a_{i+1}, a_{i+2}, \ldots, a_k}} .
\label{sol.exe.gen-ass.b.goal}
\end{align}

We are in one of the following three cases:

\textit{Case 1:} We have $i = 0$.

\textit{Case 2:} We have $i = k$.

\textit{Case 3:} We have $i \neq 0$ and $i \neq k$.

Let us first consider Case 1.
In this case, we have $i = 0$.
Hence, the $i$-tuple $\tup{a_1, a_2, \ldots, a_i}$
is actually the $0$-tuple $\tup{}$.
Therefore, $P \tup{a_1, a_2, \ldots, a_i} = P \tup{} = e$
(by our definition of $P \tup{}$).
But the equality \eqref{eq.exe.gen-ass.neu} yields that
$e * a = a$ for each $a \in S$.
Applying this to $a = P \tup{a_{i+1}, a_{i+2}, \ldots, a_k}$,
we obtain
\begin{align*}
e * P \tup{a_{i+1}, a_{i+2}, \ldots, a_k}
&= P \tup{a_{i+1}, a_{i+2}, \ldots, a_k}
 = P \tup{a_1, a_2, \ldots, a_k}
\end{align*}
(since $i = 0$).
Hence,
\begin{align*}
 \underbrace{\tup{P \tup{a_1, a_2, \ldots, a_i}}}_{= e}
     * \tup{P \tup{a_{i+1}, a_{i+2}, \ldots, a_k}}
 = e * P \tup{a_{i+1}, a_{i+2}, \ldots, a_k}
 = P \tup{a_1, a_2, \ldots, a_k} .
\end{align*}
Thus, \eqref{sol.exe.gen-ass.b.goal} is proven in Case 1.

Let us next consider Case 2.
In this case, we have $i = k$.
Hence, the $\tup{k-i}$-tuple $\tup{a_{i+1}, a_{i+2}, \ldots, a_k}$
is actually the $0$-tuple $\tup{}$.
Therefore, $P \tup{a_{i+1}, a_{i+2}, \ldots, a_k} = P \tup{} = e$
(by our definition of $P \tup{}$).
But the equality \eqref{eq.exe.gen-ass.neu} yields that
$a * e = a$ for each $a \in S$.
Applying this to $a = P \tup{a_1, a_2, \ldots, a_i}$,
we obtain
\begin{align*}
P \tup{a_1, a_2, \ldots, a_i} * e
&= P \tup{a_1, a_2, \ldots, a_i}
 = P \tup{a_1, a_2, \ldots, a_k}
\end{align*}
(since $i = k$).
Hence,
\begin{align*}
 \tup{P \tup{a_1, a_2, \ldots, a_i}}
     * \underbrace{\tup{P \tup{a_{i+1}, a_{i+2}, \ldots, a_k}}}_{= e}
 = P \tup{a_1, a_2, \ldots, a_i} * e
 = P \tup{a_1, a_2, \ldots, a_k} .
\end{align*}
Thus, \eqref{sol.exe.gen-ass.b.goal} is proven in Case 2.

Finally, let us consider Case 3.
In this case, we have $i \neq 0$ and $i \neq k$.
Hence, $i \notin \set{0, k}$.
Combining $i \in \set{0, 1, \ldots, k}$ with
$i \notin \set{0, k}$, we obtain
$i \in \set{0, 1, \ldots, k} \setminus \set{0, k}
= \set{1, 2, \ldots, k-1}$.
Thus, $1 \leq i \leq k-1$, so that $k \geq 2$,
and therefore $k$ is a positive integer.
Hence, part \textbf{(a)} of this exercise yields
\[
P \tup{a_1, a_2, \ldots, a_k}
= \tup{P \tup{a_1, a_2, \ldots, a_i}}
     * \tup{P \tup{a_{i+1}, a_{i+2}, \ldots, a_k}} .
\]
Thus, \eqref{sol.exe.gen-ass.b.goal} is proven in Case 3.

We have now proven \eqref{sol.exe.gen-ass.b.goal} in each
of the three Cases 1, 2 and 3.
Since these three Cases cover all possibilities, we thus
conclude that \eqref{sol.exe.gen-ass.b.goal} always holds.
This solves part \textbf{(b)} of the exercise.

\subsection{Remark}

\textbf{1.}
Assume that there exists an element $e \in S$
that is neutral for the operation $*$ (that is,
satisfies \eqref{eq.exe.gen-ass.neu}).
Our definition of $P \tup{a_1, a_2, \ldots, a_k}$
in the exercise treats the cases $k > 0$ and
$k = 0$ separately: Namely, in the case $k > 0$,
it proceeds recursively (starting with $k = 1$ as
a base of the recursion), whereas in the case
$k = 0$, it simply defines $P \tup{}$ to be $e$.
There is an alternative definition of
$P \tup{a_1, a_2, \ldots, a_k}$, which handles
all nonnegative integers $k$ at the same time.
Namely, we can define
$P \tup{a_1, a_2, \ldots, a_k}$ recursively
by starting with $k = 0$ as a base (which is
handled by setting $P \tup{} = e$, as before),
and then using \eqref{eq.exe.gen-ass.Pa2} as a
recursion for all $k > 0$ (not only for $k > 1$).
It is easy to see that this alternative definition
is equivalent to the definition that we gave in
the exercise\footnote{The proof is simple:
You just need to show that the two definitions
agree for $k = 0$ and for $k = 1$; then, an induction
on $k$ will reveal that they also agree in all
remaining cases.}.
This definition has the advantage of needing fewer
cases; but it has the disadvantage that it relies
on the existence of a neutral element $e$ more
heavily than the definition given in the
exercise\footnote{Namely, the definition given in
the exercise uses the neutral element $e$ only in
the case $k = 0$; but the alternative definition
depends on it entirely (if $e$ was not there, then
the recursion would not have a base!).}.
This is why we started with the definition given
in the exercise.

\vspace{1pc}

\textbf{2.}
The claim of this exercise is a cornerstone of abstract
algebra, often used without mention (and, most likely,
without awareness).
Here is one obvious-sounding fact that actually relies on
this claim:
Consider a set $A$, and $n$ arbitrary maps
$f_1, f_2, \ldots, f_n$ from $A$ to $A$.
Then, the composition $f_1 \circ f_2 \circ \cdots \circ f_n$
of all these $n$ maps is well-defined
(i.e., it does not matter in which order you perform the
$\circ$ operations; the result will always be the same map).
This may look completely evident (isn't
$f_1 \circ f_2 \circ \cdots \circ f_n$ simply the map
that applies $f_n$ first, then $f_{n-1}$, then $f_{n-2}$,
and so on, until all the $n$ maps have been
applied?\footnote{Yes, it is, but the concept of
applying several maps in order needs to be formally
defined, too, if you want to be rigorous about it.}),
but the rigorous proof proceeds by applying the exercise
to $S = \set{\text{all maps from $A$ to $A$}}$ and to the
binary operation $\circ$ on $S$.
More generally, the same holds if
$f_1, f_2, \ldots, f_n$ are maps between different sets
(not just maps from $A$ to $A$), as long as they can be
composed (i.e., the codomain of $f_{i+1}$ is the domain
of $f_i$).
The proof proceeds in the exact same way as the solution
to the exercise above, with the only difference that there
is no single $S$ any more in which all our maps lie
(but rather different sets, depending on
which of our maps we are composing).
See also \cite[\S 2.13]{detnotes} for this proof, done
in greater detail.

\begin{thebibliography}{99999999}                                                                                %

% This is the bibliography: The list of papers/books/articles/blogs/...
% cited. The syntax is: "\bibitem[name]{tag}Reference",
% where "name" is the name that will appear in the compiled
% bibliography, and "tag" is the tag by which you will refer to
% the source in the TeX file. For example, one of the following
% sources has name "GrKnPa94" (so you will see it referenced as
% "[GrKnPa94]" in the compiled PDF) and tag "GKP" (so you
% can cite it by writing "\cite{GKP}" in this TeX file).

\bibitem[18f-hw0s]{18f-hw0s}
Darij Grinberg,
\textit{Math 5705: Enumerative Combinatorics,
Fall 2018: Homework 0},
\url{http://www.cip.ifi.lmu.de/~grinberg/t/18f/hw-template.pdf} .

\bibitem[GrKnPa94]{GKP}Ronald L. Graham, Donald E. Knuth, Oren Patashnik,
\textit{Concrete Mathematics, Second Edition}, Addison-Wesley 1994.\\
See \url{https://www-cs-faculty.stanford.edu/~knuth/gkp.html} for errata.

\bibitem[Grinbe19]{detnotes}Darij Grinberg,
\textit{Notes on the combinatorial fundamentals of algebra},
10 January 2019. \\
\url{http://www.cip.ifi.lmu.de/~grinberg/primes2015/sols.pdf}
\\
The numbering of theorems and formulas in this link might shift
when the project gets updated; for a ``frozen'' version whose
numbering is guaranteed to match that in the citations above, see
\url{https://github.com/darijgr/detnotes/releases/tag/2019-01-10} .

\end{thebibliography}

\end{document}

% You can use the space after "\end{document}" as scratch paper --
% LaTeX stops compiling after it sees the "\end{document}"
% instruction, so everything that comes after it is ignored.
% For example, the following nonsense doesn't appear anywhere
% in the PDF file:

$aaaaaaaa$


\documentclass[10pt,conference,compsocconf]{IEEEtran}

\usepackage{hyperref}
\usepackage{graphicx}	% For figure environment

\begin{document}
\title{Higgs Boson Challenge}

\author{
  Ignacio Aleman, Thierry Bossy, Raphael Strebel\\
  \textit{EPFL, Lausanne}
}

\maketitle

\begin{abstract}
The Higgs Boson challenge is one of the most popular Machine Learning competitions. Based on simulations done in the ATLAS Experiments, the goal is to find out whether or not key signatures of the Higgs Boson are present. In this paper, we tackle this binary classification task by preprocessing the data and applying basic ML methods such as regression. The best solution we find consists of partitioning the input data according to one specific experiment measure and training independent models for each partition. From the results we conclude that this method performs fairly well. Indeed, we classify correctly around 83\% of the test data.

\end{abstract}

\section{Introduction}

In 1964, Peter Higgs -- amongst others -- theorized the existence of a mechanism that gave mass to matter, the Higgs mechanism. In turn, this mechanism implied the presence of the Higgs Boson. To confirm this -- as well as other fundamental theories -- CERN was established, and in 2012 the ATLAS and CMS both independently managed to show the presence of the Higgs Boson.

The idea was simple, to collide particles at high speeds and to capture key signatures during the collision. Then the question to be answered was, given the observed signatures, can we conclude the presence of the Higgs Boson?

The Higgs Boson Machine Learning Challenge was designed to classify the characterizing events in order to deretmine the presence of the tau decay of a Higgs Boson.

To get a better picture of the data, we went over the official review of the challenge \cite{higgsPaper} which gives useful information on the acquisition of the data. For example it explains why certain values are missing, which gives an idea as to how it might be worth to split the data. In the following we describe our approach to this challenge, starting with the preprocessing of the data. We then explain which models we choose and conclude by analysing the results we obtain. Finally we give an brief overview of other methods that could be tried to improve the performance of the model.

\section{preprocessing}

\label{sec:preprocessing}
Preprocessing is an essential step that allows us to considerably improve the result given by our model. This is even more the case as we only used basic techniques in this project, as opposed to neural networks. By inspecting the shape of the data and the role of certain features, some steps can be applied before feeding our model with the data.

\subsection{Jet number}

From \cite{higgsPaper} we found out that the \textit{jet\_number}, a feature of the data, directly implies values of certain features of our data to be undefined, in particular the following are undefined for each jet num.

\begin{itemize}
  \item If jet num = 0: PRI jet leading pt, PRI jet leading eta, PRI jet leading phi are undefined
  \item If jet num $\leq$ 1: DER deltaeta jet jet, DER mass jet jet, DER prodeta jet jet, DER lep eta centrality, PRI jet subleading pt, PRI jet subleading eta, PRI jet subleading phi are undefined.
\end{itemize}

This means that by splitting the input $X$ based on the jet number, we can remove certain feature columns the data in each subset. As the jet number can only take values in the set $\{0,1,2,3\}$, and as a value of 2 or 3 makes no difference on the implications of other features, we divide $X$ into $\{X_0,X_1,X_{2,3}\}$. We then remove the features of those subsets accordingly, as well as the column that contains the jet number in all subsets of $X$ since we no longer need it. See Figure~\ref{fig:jet-split} for a more visual explanation.

\begin{figure}[h]
  \centering
  \includegraphics[width=\columnwidth]{jets.png}
  \caption{Splitting the data samples according to jet number}
  \vspace{-3mm}
  \label{fig:jet-split}
\end{figure}

\subsection{Undefined values}

Probably because of erroneous measurements, the input still contains undefined values even after the previous simplification. To deal with this issue, we replace undefined values of a feature by the mean of the feature. (We also tried the mode and median, but found the mean to give the best results).

\subsection{Standardisation}

To standardise the features of the data, we determine the mean and the variance of every column, and normalize each column of the input by subtracting its mean and dividing by its standard deviation.

\subsection{Feature augmentation}

After cleaning the data we get a good boost in accuracy (we go from .62 to .78). In order to go beyond that, we tried feature augmentation. The idea is, of course, that if we choose a rich enough representation, we are able to find some higher dimensional space where the data is linear.

First of all, we add a bias $1$ column to our input based on our intuition for simple linear models. Next, we tried to compute polynomials of our data and consider them as new features. We continue the process by computing all cross-products of the columns of $X$ and, as before, consider them as new features. This roughly squares the dimension of each subset $X_i$, which is already much better. Next, we apply a hyperbolic tangent function to our initial features so that the result is normalized in the domain $]-1, 1[$ and does not penalize outliers too greatly as explained in \cite{normTechniques}. The final data augmentation we do is to give the option of combining the previously described functions. Indeed, instead of computing only functions of the initial features, we can get a much richer model if we choose to compute functions of the previously determined features. For example, we could compute the polynomials of degrees 2 and 3 of an input $X$, then we can compute the $tanh$ of each column and append the result to the data. If we wanted to go even further, we could also compute the cross-product of all previously determined columns and consider them as part of the augmented data.

We found one of the biggest boost in accuracy by not only considering the cross terms of the data, but also by looking at the cross terms of polynomials. (Indeed this allows to represent a richer function).

\section{Models}

We first tried both standard regression as well as logistic regression, and we found that using standard regression far outperformed logistic regression. We thus decided to go for standard regression, and to try and control over-fitting we choose to go for ridge regression (though we found that $\lambda$, the $L_2$ penalty, had little influence).

Thus, in essence our model selection process consisted in finding the right combination of feature augmentation. Recall that we split out data -- based on the jet number -- into 3 sets ($X_0$, $X_1$ and $X_{2,3}$).

For each subset of the data, we tried to find the right combination of feature augmentation (see \ref{table:1}) to maximise the predictive accuracy.

\begin{table}[h!]
\centering
\begin{tabular}{||c c c c c c||}
 \hline
 Data & Degree & Bias & Cross & Tanh & Cumulative\\ [0.5ex]
 \hline\hline
 $X_0$ & [2, 3] & yes & yes & yes & no \\
 $X_1$ & [2] & yes & yes & yes & yes \\
 $X_2,_3$ & [2] & yes & yes & yes & yes \\

 \hline
\end{tabular}
\caption{Table of chosen data augmentation per data split}
\label{table:1}
\end{table}

\section{Results}

With the aforementioned model we found an accuracy of \textbf{0.829} on the test set via the \textbf{AI crowd portal}. Before evaluating on the challenge test set, we split our own train data into a resp. test/split set to check the accuracy. We performed 10 random splits to get an idea of the variance of our accuracy. We describe the result -- also per jet num -- in Table \ref{table:2}. We see that our model performs quite well for jet num 0 and 2, 3, but not so well for jet num 1.

\begin{table}[h!]
\centering
\begin{tabular}{||c c||}
 \hline
 Dataset & Accuracy \\ [0.5ex]
 \hline\hline
 $X_0$ & 0.841 +- 0.004  \\ [0.5ex]
 $X_1$ & 0.819 +- 0.005 \\[0.5ex]
 $X_2,_3$ & 0.850 +- 0.002 \\[0.5ex]
 \hline\hline
 $X$ & 0.837 +- 0.002 \\

 \hline
\end{tabular}
\caption{Model accuracy per data split}
\label{table:2}
\end{table}
\section{Discussion}

Surprisingly a linear model worked better than a fancier logistic regression. However, we did not try to optimise the data augmentation for the logistic model, so the aforementioned claim should be taken with a grain of salt.

Apart from feature augmentation, we also tried to perform
PCA on the data, however we did not find any sort of gain and therefore did not follow this direction further.

Clearly finding the right and large enough feature augmentation technique gave the largest improvement in accuracy.

\section{Future work}

In line with the previous discussion, the authors believe that a more through search of feature augmentation should further allow to increase the accuracy. (e.g. Kernel methods)

\bibliographystyle{IEEEtran}
\bibliography{literature}

\end{document}