math381/hw/hw1/hw1.tex

265 lines
8.4 KiB
TeX
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

\documentclass{article}
\usepackage{fancyhdr}
\usepackage{extramarks}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{tikz}
\usepackage[plain]{algorithm}
\usepackage{algpseudocode}
\usepackage[shortlabels]{enumitem}
\usepackage{mathtools}
\usetikzlibrary{automata,positioning}
%
% Basic Document Settings
%
\topmargin=-0.45in
\evensidemargin=0in
\oddsidemargin=0in
\textwidth=6.5in
\textheight=9.0in
\headsep=0.25in
\linespread{1.1}
\pagestyle{fancy}
\lhead{\hmwkAuthorName}
\chead{\hmwkClass\ (\hmwkClassInstructor\ \hmwkClassTime): \hmwkTitle}
\rhead{\firstxmark}
\lfoot{\lastxmark}
\cfoot{\thepage}
\renewcommand\headrulewidth{0.4pt}
\renewcommand\footrulewidth{0.4pt}
\setlength\parindent{0pt}
%
% Create Problem Sections
%
\newcommand{\enterProblemHeader}[1]{
\nobreak\extramarks{}{Problem \arabic{#1} continued on next page\ldots}\nobreak{}
\nobreak\extramarks{Problem \arabic{#1} (continued)}{Problem \arabic{#1} continued on next page\ldots}\nobreak{}
}
\newcommand{\exitProblemHeader}[1]{
\nobreak\extramarks{Problem \arabic{#1} (continued)}{Problem \arabic{#1} continued on next page\ldots}\nobreak{}
\stepcounter{#1}
\nobreak\extramarks{Problem \arabic{#1}}{}\nobreak{}
}
\setcounter{secnumdepth}{0}
\newcounter{partCounter}
\newcounter{homeworkProblemCounter}
\setcounter{homeworkProblemCounter}{1}
\nobreak\extramarks{Problem \arabic{homeworkProblemCounter}}{}\nobreak{}
%
% Homework Problem Environment
%
% This environment takes an optional argument. When given, it will adjust the
% problem counter. This is useful for when the problems given for your
% assignment aren't sequential. See the last 3 problems of this template for an
% example.
%
\newenvironment{homeworkProblem}[1][-1]{
\ifnum#1>0
\setcounter{homeworkProblemCounter}{#1}
\fi
\section{Problem \arabic{homeworkProblemCounter}}
\setcounter{partCounter}{1}
\enterProblemHeader{homeworkProblemCounter}
}{
\exitProblemHeader{homeworkProblemCounter}
}
\newcommand{\hmwkTitle}{Homework 1}
\newcommand{\hmwkDueDate}{September 7, 2023}
\newcommand{\hmwkClass}{Discrete Math}
\newcommand{\hmwkClassTime}{Section 003}
\newcommand{\hmwkClassInstructor}{Reese Lance}
\newcommand{\hmwkAuthorName}{\textbf{Rushil Umaretiya}}
%
% Title Page
%
\title{
\vspace{2in}
\textmd{\textbf{\hmwkClass:\ \hmwkTitle}}\\
\normalsize\vspace{0.1in}\small{Tuesday/Thursday 11:00-12:15, Phillips 383}\\
\vspace{0.1in}\large{\textit{\hmwkClassInstructor\ - \hmwkClassTime}}
\vspace{3in}
}
\author{\hmwkAuthorName\\\small{rumareti@unc.edu}}
\date{}
\renewcommand{\part}[1]{\textbf{\large Part \Alph{partCounter}}\stepcounter{partCounter}\\}
%
% Various Helper Commands
%
% Useful for algorithms
\newcommand{\alg}[1]{\textsc{\bfseries \footnotesize #1}}
% For derivatives
\newcommand{\deriv}[1]{\frac{\mathrm{d}}{\mathrm{d}x} (#1)}
% For partial derivatives
\newcommand{\pderiv}[2]{\frac{\partial}{\partial #1} (#2)}
% Integral dx
\newcommand{\dx}{\mathrm{d}x}
% Alias for the Solution section header
\newcommand{\solution}{\textbf{\large Solution}}
\newcommand{\unit}[1]{\section{Unit #1}}
\newcommand{\problem}[1]{\textbf{\##1}}
\newcommand{\prob}[1]{\problem{#1}}
% Probability commands: Expectation, Variance, Covariance, Bias
\newcommand{\E}{\mathrm{E}}
\newcommand{\Var}{\mathrm{Var}}
\newcommand{\Cov}{\mathrm{Cov}}
\newcommand{\Bias}{\mathrm{Bias}}
\begin{document}
\maketitle
\pagebreak
\unit{1.1}
\problem{2}
\begin{enumerate}[a)]
\item Not declarative, a command.
\item Not declarative, a question.
\item Is a proposition, not true: there are black flies in Maine.
\item Not declarative, truth value can change based on \emph{x}.
\item Is a proposition, not true; the moon is not made of cheese.
\item Not declarative, truth value can change based on \emph{n}.
\end{enumerate}
\problem{4}
\begin{enumerate}[a)]
\item Janice does not have more Facebook friends than Juan.
\item Quincy is not smarter than Venkat.
\item Zelda does not drive more miles to school than Paola.
\item Briana does not sleep longer than Gloria.
\end{enumerate}
\problem{10}
\\Let \(p\) and \(q\) be the propositions:
\begin{itemize}
\item[\(p\):]I bought a lottery ticket this week.
\item[\(q\):] I won the million dollar jackpot.
\end{itemize}
Express each of these propositions as an English sentence.
\begin{enumerate}[a)]
\item I did not buy a lottery ticket this week.
\item I bought a lottery ticket this week or I won the million dollar jackpot.
\item If I bought a lottery ticket this week, then I won the million dollar jackpot.
\item I bought a lottery ticket this week and I won the million dollar jackpot.
\item I bought a lottery ticket this week if and only if I won the million dollar jackpot.
\item If I did not buy a lottery ticket this week, then I didn't win the million dollar jackpot.
\item I did not buy a lottery ticket this week and I did not win the million dollar jackpot.
\item I did not buy a lottery ticket this week, or I did buy a lottery ticket this week and won the million dollar jackpot.
\end{enumerate}
\problem{18}
\begin{enumerate}[a)]
\item Both equations are true, therefore True.
\item One equation is false and one is true, therefore False.
\item Both propositions are false, therefore True.
\item One equation is false and one is true, therefore False.
\end{enumerate}
\pagebreak
\problem{20}
\begin{enumerate}[a)]
\item Both conditions are false, therefore the statement is true.
\item Both conditions are false, therefore the statement is true.
\item Since \(p\) is true and \(q\) is false, the statement is false.
\item Both conditions are true, therefore the statement is true.
\end{enumerate}
\problem{22}
\begin{enumerate}[a)]
\item Inclusive or, you need proficiency in either language or both.
\item Exclusive or, you can have either soup or salad, but not both.
\item Inclusive or, you need either form of identification or both.
\item Exclusive or, luckily you cannot both publish and perish.
\end{enumerate}
\pagebreak
\unit{1.3}
\problem{4b}
\begin{displaymath}
\begin{array}{|c c c|c|c|}
p & q & r & (p \wedge q)\wedge r & p \wedge(q \wedge r) \\
\hline
T & T & T & T & T \\
T & T & F & F & F \\
T & F & T & F & F \\
T & F & F & F & F \\
F & T & T & F & F \\
F & T & F & F & F \\
F & F & T & F & F \\
F & F & F & F & F
\end{array}
\end{displaymath}
\\
Since the columns are identical the law is true.
\problem{6}\\
Use a truth table to verify the first De Morgan law
\begin{displaymath}
\neg(p \wedge q) \equiv \neg p \vee \neg q
\end{displaymath}
\begin{displaymath}
\begin{array}{|c c|c|c|c|c|c|}
p & q & \neg p & \neg q & p \wedge q & \neg(p \wedge q) & \neg p \vee \neg q \\
\hline
T & T & F & F & T & F & F \\
T & F & F & T & F & T & T \\
F & T & T & F & F & T & T \\
F & F & T & T & F & T & T \\
\end{array}
\end{displaymath}
\problem{8}\\
Use De Morgans laws to find the negation of each of the
following statements.\\
\textbf{a)}
Kwame will take a job in industry or go to graduate school. \\
Kwame will not take a job in the industry and will not go to graduate school.\\
\textbf{b)}
Yoshiko knows Java and calculus.\\
Yoshiko does not know Joava or does not know calculus.\\
\prob{32}\\
Show that \(p \leftrightarrow q\) and \(\neg p \leftrightarrow \neg q\) are logically equivalent.
\begin{displaymath}
\begin{array}{|c c|c|c|c|c|c|}
p & q & \neg p & \neg q & p \leftrightarrow q & \neg p \leftrightarrow \neg q \\
\hline
T & T & F & F & T & T \\
T & F & F & T & F & F \\
F & T & T & F & F & F \\
F & F & T & T & T & T \\
\end{array}
\end{displaymath}
\begin{align*}
\therefore p \leftrightarrow q \equiv \neg p \leftrightarrow \neg q
\end{align*}
\pagebreak
\end{document}