\documentclass{article}
\usepackage{fullpage,amsmath}
\usepackage{hyperref}
\usepackage{amssymb}
\usepackage{listings}




\title{CSC165, Summer 2014\\
Assignment 2\\
Weight: 5\% \\
Due Jun 6th, 2:00 p.m.}
\renewcommand{\today}{~}
\hypersetup{pdfpagemode=Fullscreen,
  colorlinks=true,
  linkfileprefix={}}
\begin{document}
\maketitle

The goal of this assignment is to make sure that you understand how to relate language and logic, and how to transform statements to get their negation, converse, and contrapositive.

You may work in groups of no more than two students, and \textbf{you should submit a TEX file named \texttt{a2.tex} and a PDF file named \texttt{a2.pdf} that was produced by compiling your  \texttt{a2.tex}} and that contains the answers to the questions below. These files should be submitted using
\href{https://markus.cdf.toronto.edu/csc165-2014-05/main?locale=en}{MarkUs}. \textbf{Please make sure that your files are named \texttt{a2.tex} and \texttt{a2.pdf}. You will lose marks for not submitting correctly-named files.}

You will receive 20\% of the marks for any question you either leave blank, or write ``I cannot answer this.''


\begin{enumerate}
\item For this question, consider Table~\ref{tab:gpa}. For the purposes of this question, assume that Table~\ref{tab:gpa} contains data on \textbf{all Waterloo students}. 
\begin{table}[h]
\begin{center}
\begin{tabular}{|c|c|c|} 		
									\hline

	Student			& 	Major			&	GPA		\\		\hline
  	Al	 			& 	Math			&	2.3		\\ 		\hline
  	Betty		 		& 	Physics		&	2.7		\\ 		\hline
	Carlos				&	Math			&	3.0		\\		\hline
	Doug				&	Physics		&	2.0		\\		\hline
	Ellen				&	Math			&	4.0		\\		\hline
	Flo				&	Math			&	2.5		\\		\hline
	David				&	Art			&	4.0		\\		\hline
\end{tabular}
\caption{The complete list of students at Waterloo.\label{tab:gpa}}
\end{center}
\end{table}

\begin{enumerate}
\item (5 pts.) Define the sets and/or predicates to be used in answering questions \ref{item_second}-\ref{item_last}. For example, you might define $P$ to be the set of Physics majors; you can use any reasonable notation. \label{item_defns}
\end{enumerate}

For questions \ref{item_second}-\ref{item_last}, express the given statement in symbolic form, using the definitions from your answer to~\ref{item_defns}. State whether the statement is true or false (assuming Table~\ref{tab:gpa} contains data on all Waterloo students) and briefly state why your conclusion is correct.   

\begin{enumerate}
\addtocounter{enumii}{1}

\item (5 pts.) All Physics majors at Waterloo have GPA that is smaller than $3.0$.   \label{item_second}

\item (5 pts.) Some Math majors at Waterloo have GPA that is larger than $1.0$.

\item (5 pts.) Not all Math majors at Waterloo have GPA that is larger than $1.0$.

\item (5 pts.) Not all Forestry majors at Waterloo have GPA that is larger than $1.0$.

\item (5 pts.) All Forestry majors at Waterloo have GPA that is larger than $1.0$.

\item (5 pts.) There is a Physics major at Waterloo whose GPA is between $1.0$ and $3.0$ and whose name is Al.

\item (5 pts.) If all Math majors at Waterloo have GPA larger than $1.0$, then there is a Physics major at Waterloo whose GPA is larger than $3.0$.


\item (5 pts.) It is not the case that if all Math majors at Waterloo have GPA larger than $1.0$, then there is a Physics major at Waterloo whose GPA larger than $3.0$.

\item (5 pts.) David majors in Art.

\item (5 pts.) David majors in Art if and only if Al's GPA is larger than $1.0$.  \label{item_last}.

\end{enumerate}



\item   Let $C$ be the set of cats. $G(c)$ means the cat $c$ is grinning, and $H(c)$ means the cat $c$ is happy. 
\begin{enumerate}
\item (5 pts.) Express the statement ``All happy cats are grinning" as an implication (i.e., as $A \implies B$, where $A$ and $B$ are logical expressions) using the predicates and sets defined above. \label{cats_grin}.
	
\item (5 pts.) State  (as a symbolic expression) the contrapositive of the statement in your answer to question~\ref{cats_grin}.


	
\item (5 pts.) Express the statement ``Some cats may be grinning, but only if they are not happy"  as an implication (i.e., as $A \implies B$, where $A$ and $B$ are logical expressions), using the predicates defined above. \label{cats_but}.
	
	
\item (5 pts.) State  (as a symbolic expression) the contrapositive of the statement in your answer to question~\ref{cats_but}.

\end{enumerate}


\item   Let $C$ be the set of cats. $G(c)$ means the cat $c$ is grinning, and $H(c)$ means the cat $c$ is happy. 
For questions \ref{item3_first}-\ref{item3_last}, give a \textbf{natural} English sentence that captures the meaning of the symbolic sentence.

\begin{enumerate}
\item (5 pts.) $\forall c \in C, H(c) \implies G(c)$ \label{item3_first}
\item (5 pts.) $\forall c \in C, G(c) \implies H(c)$
\item (5 pts.) $\forall c \in C, \lnot G(c) \implies H(c)$
\item (5 pts.) $\forall c \in C, \lnot G(c) \implies \lnot H(c)$
\item (5 pts.) $\exists c \in C, H(c) \implies G(c)$
\item (5 pts.) $\not \exists c \in C, G(c) \lor  H(c)$ 


\label{item3_last}

\end{enumerate}









\end{enumerate}





\end{document}


