\documentclass[12pt]{article}

\usepackage[margin=0.5in,top=0.7in,dvips]{geometry}
\usepackage{fancyhdr,lastpage}
\usepackage{amsmath,amsthm,amssymb}
\usepackage{tikz}
\usepackage{multirow}
\usepackage{substr}
\usepackage{pgfplots}

\makeatletter
\renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]{%
  \hskip -\arraycolsep
  \let\@ifnextchar\new@ifnextchar
  \array{#1}}
\makeatother


% This redefines "\neg" -- the logical negation -- to be a tilde
% rather than an angular negation sign.
\renewcommand*{\neg}{\mathord{\sim}}

% Include "solution" in your filename to make sure the right mode is
% used below.

\IfSubStringInString{\detokenize{solution}}{\jobname}{%
  % Solutions
  \newcommand\qfill{}
  \newcommand\qpage{}
  \newcommand\qonly[1]{}
  \newcommand\answer[1]{#1}
  \newcommand\question[1]{{\em #1}}
}
{%
  % Problems
  \newcommand\qfill{\vfill}
  \newcommand\qpage{\newpage}
  \newcommand\qonly[1]{#1}
  \newcommand\answer[1]{}
  \newcommand\question[1]{#1}
}

\newtheorem{prop}{Proposition}
\newtheorem{thm}{Theorem}
\newtheorem{lem}{Lemma}
\newtheorem{conj}{Conjecture}
\newtheorem{cor}{Corollary}
\theoremstyle{definition}
\newtheorem{defn}{Definition}

\pagestyle{fancy}
\lhead{MATH 311--02}
\chead{Problem of the Day\answer{ solution}}
\rhead{}
\lfoot{}
\cfoot{\answer{Page \thepage\ of \pageref{LastPage}}}
\rfoot{due Tuesday, October 28, 2014}

\begin{document}
\question{Let $S=\{1,2,3,4\}$. Find eight different relations on $S$
  possessing each of the eight different combinations of the three
  fundamental relation properties (a relation can be reflexive or
  nonreflexive, symmetric or nonsymmetric, and transitive or
  nontransitive). Indicate which of the eight relations you present
  falls into each of the eight categories.}

\answer{
}

\end{document}