% AUTOGENERATED FILE; you probably want to edit the .tex.in file, not this.
\documentclass[letter,12pt]{article}
\usepackage[margin=0.5in,hmargin=4cm]{geometry}
\pagestyle{headings}
\usepackage{amssymb,amsmath,hyperref,enumerate}
\usepackage{parskip}
\usepackage[all,cmtip]{xy}
\parindent=0pt
\newcommand{\defn}{\underline}
\newcommand{\qed}{\hfill\ensuremath{\Box}}
\begin{document}
\section*{Heterosexuality, and Hall's Marriage Theorem}

\subsection*{Basic "marriage" problem}

A set $A$ of men;
\\a set $B$ of women;
\\certain pairings $(a,b)$ are "compatible".

A {\bf matching} is a choice of some compatible pairings ("marriages"),
\\such that no man is paired to multiple women and no woman to multiple men.

Can we find a matching in which every woman is paired with some man?


\subsection*{Graphical formulation}

(You can skip this if you don't know what a graph is.)

Bipartite graph: two collections of $A$ and $B$ of vertices; all edges have
one vertex in $A$ and the other in $B$.

A matching is a set of edges such that no vertex is incident to more than one
of the edges.

Can we find a matching such that every $b \in B$ is incident to one of the
edges?


\subsection*{SDR formulation}

Given a family of subsets $(A_i)_{i\in B}$ of a set $A$,
\\can we find elements $a_i \in A_i$
which are distinct, i.e. $a_i \neq  a_j$ when $i \neq  j$?

Such a selection of $a_i \in A_i$ for $i\in B$ is called a
\underline{system of distinct representatives} (SDR).


\subsection*{Other instances}

\paragraph{Example:}
\mbox{}\\    Given an $m\times n$ board with certain squares missing,
\\    can we place a rook on each row such that no row or column contains two
    rooks?

    Here we marry rows and columns, consecrating the marriage with the
    symbolic placing of a rook.

\paragraph{Example:}
\mbox{}\\    Certain jobs are to performed by certain people, one job by each;
\\    not all people are suitable for all jobs.
\\    Can we assign each job to some person?

\paragraph{Example:}
\mbox{}\\    Various classes are to be scheduled at various times in various rooms;
\\    some classes require certain rooms,
\\    and some times are unsuitable for some classes.

    Suppose all classes are to start on the hour.

    Can all classes be scheduled?

    Here, we marry classes and hour-room pairs.

\subsection*{Hall's Marriage Theorem}

\paragraph{Definition:}
\mbox{}\\    A family $(A_i)_{i\in B}$ of sets satisfies the \underline{marriage condition}
    if for any $k$, the union of any $k$ of the sets in the family has size at
    least $k$;
\\    i.e. for every $B' \subseteq  B$,
\\    \[ \left|{\bigcup_{i\in B'} A_i}\right| \geq  |B'| .\]

\paragraph{Theorem [Philip Hall, 1935]:}
\mbox{}\\    A family $(A_i)_{i\in B}$ of finite sets has a system of distinct representatives
    iff it satisfies the marriage condition.
\paragraph{Proof:}
\mbox{}\\    The marriage condition is necessary, since if $a_i \in A_i$ is an SDR and
    $B' \subseteq  B$
\mbox{}\\ \mbox{\hspace{2em}}$\bigcup_{j\in B'} A_j \supseteq  \{a_j \;|\; j \in B'\}$
\\    so, by distinctness,
\mbox{}\\ \mbox{\hspace{2em}}$\left|{\bigcup_{j\in B'} A_j}\right| \geq  |\{a_j \;|\; j \in B'\}| = |B'|$.

    Now suppose the marriage condition holds, and suppose inductively that the
    theorem holds when $B$ is smaller.

    Suppose first that for all $B' \subsetneq  B$,
\\    \[ \left|{\bigcup_{i\in B'} A_i}\right| \geq  |B'| + 1 .\]

    Let $i_0 \in B$,
\\    and let $a_0 \in A_{i_0}$. We proceed by deleting $i_0$ and $a$.
\\    Let $A_i' := A_i \setminus \{a_0\}$;
\\    then $(A_i')_{i\in B \setminus \{i_0\} }$ also satisfies the marriage condition.
\\    Indeed, for any $B' \subseteq  B \setminus \{i_0\}$,
\mbox{}\\ \mbox{\hspace{2em}}$|\bigcup_{j\in B'} A_i'| \geq  |\bigcup_{j\in B'} A_i| - 1$
\mbox{}\\ \mbox{\hspace{4em}}$\geq  (|B'|+1) - 1$
\mbox{}\\ \mbox{\hspace{4em}}$= |B'|$.
\\    So by the inductive hypothesis, this family has an SDR,
\\    adjoining $a_0$ to which yields an SDR for $(A_i)_{i\in B}$.

    Otherwise, say $B^0 \subsetneq  B$ with
    \[ \left|{\bigcup_{i\in B^0} A_i}\right| = |B^0| .\]

    Let $A^0 := \bigcup_{i\in B^0} A_i$.
\\    We proceed by deleting $B^0$ and $A^0$.
\\    Let $A_i' := A_i \setminus A^0$, and
    consider $(A_i')_{i \in (B \setminus B^0)}$.
\\    Then for $B' \subseteq  B \setminus B^0$,
\mbox{}\\ \mbox{\hspace{2em}}$|\bigcup_{j\in B'} A_i'| \geq  |\bigcup_{j\in B'\cup B^0} A_i| - |B^0|$
\mbox{}\\ \mbox{\hspace{4em}}$\geq  |B'\cup B^0| - |B^0|$
\mbox{}\\ \mbox{\hspace{4em}}$= |B'|$
\\    So by the inductive hypothesis, this family has an SDR.

    Now $(A_i)_{i\in B^0}$ also satisfies MC,
\\    and $B^0 \subsetneq  B$,
\\    so by the inductive hypothesis,
\\    this family also has an SDR.

    Since $A_i' \cap A_j = \emptyset $ for $j\in B^0$,
\\    the union of these two SDRs is an SDR for $(A_i)_{i\in B}$.
\\    \qed

\subsection*{Dominoes on a chessboard}

\providecommand{\by}{\times}

Consider an $m\by n$ chequered board,
\\meaning that each square is either white or black, and no two neighbouring
squares are of the same colour,
\\and suppose we delete some squares.

e.g.
\\\begin{verbatim}
      , . ,   ,
    , .   . , .
    .     , .  
    ,     . , .
\end{verbatim}
(here I use dots for white squares, commas for black squares, and spaces for
deleted squares.).

Can we put $2\by 1$ dominoes on the non-deleted squares of the board, such
that the dominoes don't overlap and every non-deleted square is covered?

e.g. here's a solution in the case of the above example, using 8 dominoes
denoted by the corresponding numbers:\
\\\begin{verbatim}
      3 3 4   5
    2 2   4 6 5
    1     7 6  
    1     7 8 8
\end{verbatim}.

We can view this as a marriage problem: we want to marry white squares to
black squares, and only adjacent squares are compatible.

So we can solve the problem iff there are as many white squares as black
squares and the family of sets of (say) black squares adjacent to the white
squares satisfies MC.

\paragraph{Exercise:}
\mbox{}\\    Draw the corresponding bipartite graph for the example board above.

    Find some boards which don't satisfy the marriage condition,
\\    then try (and fail) to cover them with dominoes.

\subsection*{Latin squares}

\paragraph{Definition:}
\mbox{}\\    A \underline{Latin rectangle} is an $m\by c$ array with each entry an element of
    $\{1,...,n\}$,
\\    such that no number appears twice in any row or column.

\paragraph{Theorem:}
\mbox{}\\    Any $m\by n$ Latin rectangle with $m<n$ can be completed by adding rows
    to form an $n\by n$ Latin square.
\paragraph{Proof:}
\mbox{}\\    By induction, it suffices to show that we can add a row to form an
    $m\by n+1$ Latin rectangle.

    Let $A_i$, for $i=1,...,n$, be the set of numbers in $\{1,...,n\}$ {\bf not}
    appearing in the $i$th column.

    Then $(A_i)_{i\in\{1,...,n\}}$ satisfies the marriage condition.
\\    Indeed suppose $I \subseteq  \{1,...,n\}$.
\\    Each number in $\{1,...,n\}$ occurs in each of the $m$ rows,
\\    and so occurs in at most $n-m$ of the $A_i$.
\\    Each $A_i$ has size $n-m$.
\\    So
\mbox{}\\ \mbox{\hspace{2em}}$|I|(n-m) = \sum_{i\in I} |A_i| \leq  (n-m) |\bigcup_{i\in I} A_i|$,
\\    so
\mbox{}\\ \mbox{\hspace{2em}}$|\bigcup_{i\in I} A_i| \geq  |I|$.

    So by Hall's Marriage Theorem, an SDR $(a_i\in A_i)_{i\in\{1,...,n\}}$
    exists;
\\    by distinctness and the definition of $A_i$, adding this as a row
    yields an $m\times n+1$ Latin rectangle. \qed
\end{document}
