mirror of
https://github.com/Rushilwiz/math381.git
synced 2025-04-15 16:50:17 -04:00
229 lines
6.7 KiB
TeX
229 lines
6.7 KiB
TeX
\documentclass{article}
|
|
|
|
\usepackage{fancyhdr}
|
|
\usepackage{extramarks}
|
|
\usepackage{amsmath}
|
|
\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}
|
|
\problem{8}
|
|
\textbf{a)}
|
|
\textbf{b)}
|
|
\prob{32}
|
|
|
|
|
|
\pagebreak
|
|
|
|
|
|
\end{document} |