% 
% hw1.tex
%
%   This is a LaTeX template to get you started
%   making problem-set solutions
%
 
\documentclass[11pt]{article}
\usepackage{amsmath}
\setlength{\oddsidemargin}{0in}
\setlength{\evensidemargin}{0in}
\setlength{\textheight}{9.0in}
\setlength{\textwidth}{6.5in}
\setlength{\topmargin}{-0.5in}

% *** GRAPHICS RELATED PACKAGES ***
%

\usepackage[pdftex]{graphicx}
 \graphicspath{{./}}
 \DeclareGraphicsExtensions{.pdf,.jpeg,.png}
 
  \newcommand{\centerfig}[2]{%
\centerline{\includegraphics[#2]{#1}}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{\bf Data, Logic, and Computing\\[2ex] 
       \rm\normalsize ECS 17 (Winter 2024)}
\date{\today}
\author{Patrice Koehl\\koehl@cs.ucdavis.edu}

\begin{document}
\maketitle
\section*{\underline{Homework 1 - For 1/17/2024}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Exercise 1 \emph{(10 points)}} 

Seventy biscuits are to be fed to twelve pets; each pet is either a cat or a dog. Each dog is to get seven biscuits, and each cat is
to get five. How many dogs and how many cats are there?

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Exercise 2 \emph{(10 points)}} 

A baseball and a baseball bat cost \$20.10. The bat costs \$20.0 more than the ball. How much does the ball cost?

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Exercise 3 \emph{(10 points)}} 

There are 50 cats living in a barn, all are either brown or orange. There is at least one orange cat. For every two cats, at least one is brown. How many orange cats and how many brown cats are there? 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Exercise 4 \emph{(10 points)}} 

You are on an island inhabited by three types of people: knights (always make true statements), knaves (always make false statements) and spies (sometimes make true statements and sometimes make false statements). You come across 3 people Adam, Ben and Carl. You know that one is a knight, one is a knave and one is a spy. They say the following:
\begin{itemize}
\item Adam: ``I am not a knight"
\item Ben: ``I am not a knave"
\item Carl: ``I am not a spy"
\end{itemize}
Determine which person is what or whether you do not have enough information.
\end{document}

