\documentclass[12pt]{amsart}
\usepackage{amsmath,amsthm,amsfonts,latexsym,amssymb,amscd,xcolor}
\usepackage{tikz}
\pagestyle{headings}
\setlength{\textwidth}{468true pt}
\setlength{\headheight}{0true pt} % needed for 12pt documents
\setlength{\oddsidemargin}{0 truept}
\setlength{\evensidemargin}{0 truept}
\setlength{\textheight}{580true pt}

\begin{document}


\noindent
{\bf Solutions to HW 10.}

\bigskip
  
\begin{enumerate}
\item[1.]
  How many $5$-card poker hands have cards of every suit? \newline
  (The game of poker uses a deck of $52$ cards.
  Each card has a ``suit'' and a ``number''.
  Their are $4$ suits ($\spadesuit, \heartsuit, \diamondsuit, \clubsuit$)
  and $13$ numbers  $(A, 2, 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K)$,
  and the deck has exactly one card of each suit and number.
  A poker hand is a $5$-card subset of the deck,
  for example $\{A\diamondsuit, 5\clubsuit, 7\spadesuit, 7\clubsuit;, K\heartsuit\}$.)
\end{enumerate}
  
\color{blue}
%The total number of $5$-card hands is $\binom{52}{5}$.
To count the number of hands that have cards of every suit,
we will use inclusion/exclusion.

Let $H$ be the set of all $5$-card hands.
Let $H_{\diamondsuit}$ be the set of $5$-card hands
that have no $\diamondsuit$'s, let $H_{\clubsuit}$ be the set of $5$-card hands
that have no $\clubsuit$'s, 
let $H_{\spadesuit}$ be the set of $5$-card hands
that have no $\spadesuit$'s, and
let $H_{\heartsuit}$ be the set of $5$-card hands
that have no $\heartsuit$'s.
Our goal is to calculate
\[
|H|-|H_{\diamondsuit}
\cup H_{\clubsuit}\cup H_{\spadesuit}\cup H_{\heartsuit}|.
\]
It is easy to see that
\begin{itemize}
\item $|H|=\binom{52}{5}$.
\item $|H_{\diamondsuit}|=\binom{52-13}{5} = \binom{39}{5}$
  (= $|H_{\clubsuit}|=|H_{\spadesuit}|=|H_{\heartsuit}|$).
\item $|H_{\diamondsuit}\cap H_{\clubsuit}|=\binom{52-13-13}{5} =\binom{26}{5}$.
\item $|H_{\diamondsuit}\cap H_{\clubsuit}\cap H_{\spadesuit}|=\binom{52-13-13-13}{5}=\binom{13}{5}$.
\item $|H_{\diamondsuit}\cup H_{\clubsuit}\cap H_{\spadesuit}\cap H_{\heartsuit}|=\binom{0}{5}$.
\end{itemize}
By inclusion/exclusion
\[
|H|-|H_{\diamondsuit}
\cup H_{\clubsuit}\cup H_{\spadesuit}\cup H_{\heartsuit}|
=
\binom{52}{5}
-\left(\binom{4}{1}\binom{39}{5}
-\binom{4}{2}\binom{26}{5}
+\binom{4}{3}\binom{13}{5}
-\binom{4}{4}\binom{0}{5}\right)=685464.
\]

\color{black}
\bigskip

\begin{enumerate}
\item[2.]
\begin{enumerate}
\item[(a)]
  How many binary relations on the set $X=\{x_1,x_2,\ldots,x_n\}$ are there?
\item[(b)]
  How many binary relations on $X$ are reflexive?
\item[(c)]
  How many binary relations on $X$ are reflexive and symmetric?
\item[(d)] Explain why there are $B_n$ binary relations on $X$
  that are reflexive, symmetric, and transitive.
\end{enumerate}  
\end{enumerate}
  
\color{blue}
\begin{enumerate}
\item[(a)]
  A binary relation $R$ on $X$ is a subset $R\subseteq X\times X$.
  There are $|{\mathcal P}(X\times X)|=2^{|X\times X|}=2^{n^2}$ of these
  subsets.
\item[(b)]
  Let $D = \{(x_1,x_1), \ldots,(x_n,x_n)\}$ be the diagonal
    of $X\times X$. A relation $R\subseteq X\times X$ is reflexive
    if and only if it contains $D$. Therefore, a binary
    relation $R$ on $X$ is reflexive exactly when
it has the form $R=D\cup S$
for some subset $S\subseteq ((X\times X) - D)$.
(This says that $R$ must contain the full diagonal $D$
and some part $S$ of the off-diagonal,
$(X\times X) - D$.) To count such relations, we need
to count the number of choices for $S$, which is
$|{\mathcal P}((X\times X) - D)| = 2^{|((X\times X) - D)|}=2^{n^2-n}$.
\item[(c)]
  To count the reflexive, symmetric relations
  we must count the relations of the form $R=D\cup S$
  for some   symmetric subset
$S\subseteq ((X\times X) - D)$.
  Let $U = \{(x_i,x_j)\in X\times X\;|\;i<j\}$ be the ``upper half''
  of the off-diagonal, and let
  $L = \{(x_i,x_j)\in X\times X\;|\;i>j\}$ be the ``lower half''.
  A typical reflexive, symmetric relation has the form
  $R = D\cup U_0\cup L_0$ where $U_0\subseteq U$,
  $L_0\subseteq L$, and $(x_i,x_j)\in U_0\Leftrightarrow (x_j,x_i)\in L_0$.
  To count these, it is enough to count the possibilities
  for $U_0$ (which is the part of $R$ in the upper half of $X\times X$).
  This number is $|{\mathcal P}(U)|=2^{|U|}=2^{\binom{n}{2}}=  2^{(n^2-n)/2}$.  
\item[(d)] Any reflexive, symmetric, transitive
  relation on $X$ is an equivalence relation on $X$.
  There is a bijective correspondence between
  the set of  equivalence relations on $X$ and the set
  of partitions of $X$. The number $B_n$ counts
  the number of partitions of an $n$-element set,
  so must also count the number of equivalence relations
  on any $n$-element set (like $X$).
\end{enumerate}  
\color{black}
\bigskip

  
\begin{enumerate}
\item[3.]  
These problems are about seating people at a round table.
Two seating arrangements are considered the same if
they differ by a rotation. (So, for example, the arrangement
ABCDEF is the same as BCDEFA.)
\begin{enumerate}
\item[(a)] How many ways are there to seat 3 couples at a round table?
\item[(b)] What if couples must sit together?
\item[(c)] What if couples are not allowed to sit together?
\end{enumerate}
\end{enumerate}

\bigskip

\color{blue}
\begin{enumerate}
\item[(a)]
Order the $6$ people in a sequence. (There are $6!$
ways to do this.)
Now choose and fix one chair, and call it the ``head chair''.
Seat the sequence of people around the table by 
having the first person sit
in the head chair, then second person sit to the left of the
first person, the third next to the left, and so on.
Call this seating, where we specify which is the
head chair, a ``sequential seating''.

  Now define an equivalence relation on sequential seatings.
  Call two seatings ``equivalent'' if they differ
  by a rotation.
  That is, any seating ABCDEF is equivalent to
  BCDEFA and 
  CDEFAB and 
  DEFABC and 
  EFABCD and 
  FABCDE.
  This defines an equivalence relation
  on the set of sequential seatings where
  each equivalence class has $6$ elements.
  The number of equivalence classes, which is $6!/6=120$
  counts the number of ``circular seatings''.
\item[(b)] Now we assume that couples must sit together.
  Assume that the couples are
  $\{A, \alpha\}$, 
$\{B, \beta\}$, 
$\{C, \gamma\}$. Consider these $2$-element sets to be
``blocks'' which we wish to arrange around the table
in a circular manner.
There are three blocks to arrange around the table,
so by an argument like that in Part (a) there
are $3!/3 = 2$ ways to arrange these blocks.

Next, within the block $\{A,\alpha\}$ we have to choose whether
to seat the couple as $A\alpha$ or as $\alpha A$.
There are $2$ choices for each block, so the total number
of arrangements is
\[
\begin{array}{rl}
&(\textrm{Arrange the 3 blocks})
(\textrm{order couple }A\alpha)
(\textrm{order couple }B\beta)
  (\textrm{order couple }C\gamma)\\
  &=(2)(2)(2)(2) = 16.
\end{array}  
\]
This is the number of
ways to seat the three couples around the table if the
couples must sit together.

\item[(c)] We use inclusion/exclusion to count
  the number of arrangements where the couples
  are not allowed to sit together.
  That is, let $S$ be the number of all circular
  seatings of the couples   $\{A, \alpha\}$, 
$\{B, \beta\}$, and 
$\{C, \gamma\}$, let
  $S_{A\alpha}$ be the number of seatings
  where $A$ and $\alpha$ sit together, let
$S_{B\beta}$ be the number of seatings
  where $B$ and $\beta$ sit together,  and let
$S_{C\gamma}$ be the number of seatings
  where $C$ and $\gamma$ sit together.
  Our goal is to calculate
  $|S|-|S_{A\alpha}\cup S_{B\beta}\cup S_{C\gamma}|$.

\begin{itemize}
\item  $|S|=6!/6 = 120$.
\item  $|S_{A\alpha}| = (5!/5)\cdot (2)=48$. (Circularly order $5$
  blocks $\{A,\alpha\}, \{B\}, \{\beta\}, 
  \{C\}, \{\gamma\}$, then choose one of the two arrangements
  of the first block as either $A\alpha$ or $\alpha A$.)
\item  $|S_{A\alpha}\cap S_{B,\beta}| = (4!/4)(2)(2)=24$.
  (Circularly order $4$
  blocks $\{A,\alpha\}, \{B,\beta\},   \{C\}$, $\{\gamma\}$,
  then arrange the order of elements in the first two blocks.)
\item  $|S_{A\alpha}\cap S_{B,\beta}\cap S_{C,\gamma}| = (3!/3)(2)(2)(2)=16$. 
\end{itemize}
Hence, there are
\[
|S|-|S_{A\alpha}\cup S_{B\beta}\cup S_{C\gamma}|=120-\binom{3}{1}\cdot 48
+\binom{3}{2}\cdot 24-\binom{3}{3}\cdot 16=32
\]
ways to arrange the six people if couples are not
allowed to sit together.
\end{enumerate}
\color{black}

\end{document}
