\documentclass[11pt]{article}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{multicol}
\usepackage{latexsym}
\usepackage[pdftex]{graphicx}
\usepackage{url}
\usepackage{mathrsfs}
\usepackage{hyperref}
\hypersetup{colorlinks=true}
\setlength{\oddsidemargin}{.25in}
\setlength{\evensidemargin}{.25in}
\setlength{\textwidth}{6in}
\setlength{\topmargin}{-0.4in}
\setlength{\textheight}{8.5in}

\def\zero{\multicolumn{1}{>{\columncolor{white}}c}{0}}
\def\colCell#1#2{\multicolumn{1}{>{\columncolor{#1}}c}{#2}}

\input{preamble.tex}

\begin{document}
\homework{1: Error-Correcting Codes}{Due Friday, Week 1}

Do \textbf{one} of the \textbf{three} problems below!   Prove all of your claims.  
\begin{enumerate}
\item Historically, one of the first codes developed was the Hamming $[7,4]$ code.  It works like this: take any string of four bits (i.e. any string of four 0's and 1's.)  Turn this into a string of seven bits in the following way:
\begin{itemize}
\item Place the bits of the original message, in order, in the slots $3,5,6,7$.
\item In slot 1, put the parity\footnote{The parity of a number $n$ is just $n \mod 2$.  In other words, it is 1 if $n$ is odd, and 0 if $n$ is even.}  of the sum of the bits in slots $3,5,7$.
\item In slot 2, put the parity of the sum of the bits in slots $3,6,7$.
\item In slot 4, put the parity of the sum of the bits in slots $5,6,7$.
\end{itemize}
For example, to encode the message 1010, we would first place
\begin{align*}
\_\_1\_010;
\end{align*}
then, because $1+0+0 = 1, 1+1+0 = 0, 0+1+0 = 1$, we would fill in the remaining slots to get 
\begin{align*}
1011010.
\end{align*}
This is a 2-ary code of length 7.  Find its information rate and its minimum distance.  
\item Create a $4$-ary code of length 4 and distance 3, that contains $16$ elements.  
\item Find the largest 2-ary (i.e.\ binary) code of length 10 and distance 4 that you can come up with.  

Note: your score for problem 3 here is ($\#$ elements in your code)$/$(maximum number of elements in codes discovered by your classmates), provided that you show your work/justify your claims!  I think the maximum is 40, and that we discovered this in 1980.  Coding skills may be useful here.
\end{enumerate}


\end{document}