\documentclass[12pt]{article}
\usepackage{amsmath}  % this adds some math 
\usepackage{fullpage}
\usepackage{tikz}            % if you delete this, you will have trouble with the included picture. You can delete the picture.
\usepackage{chessboard}


% If you have a problem, please let me know sooner than later

\newcommand\name{Chuck Norris} %%%%%%%%%%%%%%  WRITE YOUR NAME HERE



\newcounter{excounter}
\setcounter{excounter}{1}
\newcommand\question[2]{\vskip 1em  \noindent\textbf{\arabic{excounter}\addtocounter{excounter}{1}:} \emph{#1} \noindent#2}


% You can also erase this if you do not have package hancyhdr
% Fancy footnote......... 
\usepackage{fancyhdr}  %% If it does not work with your latex installation, you may just delete this...
\pagestyle{fancy}
\usepackage{lastpage}
\rfoot{\name, page \thepage/\pageref{LastPage}}
\cfoot{}
\rhead{}
\lhead{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}



%%% Note that you do not have to use this template. You can use your own writeup or make any adjustment to this one you like.
%%% This is provided only for your convenience. 


\begin{document}


{\bf MATH304  \hspace{1cm} HW 9\hfill \name}
\vskip 1em

% left column
\begin{minipage}[t]{0.75\textwidth}
Due \textbf{Oct 29} before class, \textbf{answer without justification will receive 0 points}.
The typing the HW in \LaTeX{} is optional. 
\end{minipage}
% right box for score column
\begin{minipage}[t]{0.25\textwidth}
\hfill \begin{tabular}{|r|}
\hline
\hskip 3em Score \hskip 3em \\
\hline \\ \\
\hskip 3em /60 \\
\hline
\end{tabular}
\end{minipage}





\question{}{
Let there be $n$ seats around a round table. How many ways can you seat $k$ people such that no two people sit next to each other. Seats are distinguishable, the circular shape is for defining neighboring seats. Assume $1 \leq k \leq \frac{n}{2}$, that is, the seating is indeed possible. \\
Your answer should be general for all $n$ and $k$. Doing one concrete example is not a solution. 
}

\textbf{Solution:}



\question{}{
Let $n$ be odd and $(x_1,x_2,\ldots,x_n)$ be a permutation of $[n]$.
Show that $(x_1-1)\cdot(x_2-2)\cdots(x_n-n)$ is even.
}

\textbf{Solution:}



\question{}{
Show that the numbers $Q_n$ of Section 6.5 can be rewritten in the form
\[Q_n = (n-1)!\left(n - \frac{n-1}{1!} + \frac{n-2}{2!} -\frac{n-3}{3!} + \cdots + \frac{(-1)^{n-1}}{(n-1)!}   \right) \]
}

\textbf{Solution:}


\question{}{
Use the identity
\[ (-1)^k\frac{n-k}{k!} = (-1)^k\frac{n}{k!} + (-1)^{k-1}\frac{1}{(k-1)!} \]
to prove that $Q_n=D_n+D_{n-1}, (n=2,3,\ldots)$.
}

\textbf{Solution:}

\question{}{
What is the number of ways to place six nonattacking rooks on the 6-by-6
boards without forbidden positions as shown?
\begin{center}
\begin{tikzpicture}[scale=0.8]
\draw (0,0) grid (6,6)
\foreach \x/\y in {0/5, 1/5, 2/4, 3/4, 4/3, 5/3}{ 
(\x+0.5,\y+0.5) node {$\times$} }
(3,-0.7) node{(a)} ;
\end{tikzpicture}
\begin{tikzpicture}[scale=0.8]
\draw (0,0) grid (6,6)
\foreach \x/\y in {0/5, 1/5, 0/4, 1/4, 2/3, 3/3, 2/2, 3/2, 4/1, 5/1, 4/0, 5/0}{ 
(\x+0.5,\y+0.5) node {$\times$} }
(3,-0.7) node{(b)} ;
\end{tikzpicture}
\begin{tikzpicture}[scale=0.8]
\draw (0,0) grid (6,6)
\foreach \x/\y in {0/5, 1/5,  1/4, 2/3,  2/4,  4/2, 5/1,  5/2}{ 
(\x+0.5,\y+0.5) node {$\times$} }
(3,-0.7) node{(c)} ;
\end{tikzpicture}
\end{center}
}

\textbf{Solution:}


\question{}{
A carousel has eight seats, each representing a different animal. Eight boys are seated on the carousel but facing inward, so that each boy faces another (each boy looks at another boy's front). In how many ways can be the boys change seats so that each faces a different boy? How does the problem change if all seats are identical?
}

\textbf{Solution:}



\end{document}














