【离散数学】 SEU - Assignment 2 - 2021/03/05

LaTeX \LaTeX LATEX Code

% !TeX spellcheck = en_EN-EnglishUnitedKingdom
\documentclass{article}

\usepackage{amsmath,amssymb,amsthm}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{fancyhdr}
\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage{titlesec}
\usepackage{titletoc}
\usepackage{listings}
\usepackage{appendix}
\usepackage{bm}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{multirow}
\usepackage{hyperref}
\usepackage{subfig}
\usepackage{url}
\usepackage{cite}
\usepackage{array}
\usepackage{booktabs}
\usepackage{pifont}
\usepackage[a4paper, left=2.5cm, right=2.5cm, top=2.65cm, bottom=2.54cm]{geometry}

\newtheorem{definition}{Definition}
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}{Lemma}
\newtheorem{example}{Example}

\newcommand\rem{{\rm rem}}
\newcommand\Ra{\Rightarrow}
\newcommand\ra{\rightarrow}
\newcommand\Solution{\textit{~\\Solution}}

% set the code style
\RequirePackage{listings}
\RequirePackage{xcolor}
\definecolor{dkgreen}{rgb}{0,0.6,0}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{mauve}{rgb}{0.58,0,0.82}
\lstset{
	numbers=left,  
	frame=tb,
	aboveskip=3mm,
	belowskip=3mm,
	showstringspaces=false,
	columns=flexible,
	framerule=1pt,
	rulecolor=\color{gray!35},
	backgroundcolor=\color{gray!5},
	basicstyle={\ttfamily},
	numberstyle=\tiny\color{gray},
	morekeywords={},
	keywordstyle=\color{blue},
	commentstyle=\color{dkgreen},
	stringstyle=\color{mauve},
	breaklines=true,
	breakatwhitespace=true,
	tabsize=4
}

\numberwithin{equation}{subsection}

\title{\huge \bfseries Discrete Mathematics - Assignment 2}

\author{\Large Teddy van Jerry}
\date{\today}

\pagestyle{fancy}
\fancyhf{}
\cfoot{\thepage}
\chead{Discrete Mathematics - Assignment 2}

\begin{document}
	
	\maketitle
	
	{\Large Lecture 1: 2021/03/05
		
		Exercises for Section 1.2 and 1.3}
	
	\section{Section 1.2}
	
	\subsection{Question 3}
	
	You can graduate only if you have completed the requirements
	of your major and you do not owe money to the
	university and you do not have an overdue library book.
	Express your answer in terms of $g$: ``You can graduate,"
	$m$: ``You owe money to the university," $r$: ``You have completed
	the requirements of your major," and $b$: ``You have
	an overdue library book."
	
	\Solution
	
	$$g\ra \neg m \wedge r \wedge \neg b$$
	
	\subsection{Question 9}
	
	Are these system specifications consistent? ``The system
	is in multiuser state if and only if it is operating normally.
	If the system is operating normally, the kernel is functioning.
	The kernel is not functioning or the system is in
	interrupt mode. If the system is not in multiuser state,
	then it is in interrupt mode. The system is not in interrupt
	mode."
	
	\Solution
	
	Let's denote
	$a$ as ``the system is in multiuser state",
	$b$ as ``it is operating normally",
	$c$ as ``the kernel is functioning",
	$d$ as ``the system is in interrupt mode",
	
	We know that
	\begin{equation}
		a\leftrightarrow b
		\label{l1}
	\end{equation}
	\begin{equation}
		b\ra c
		\label{l2}
	\end{equation}
	\begin{equation}
		\neg(\neg c\oplus d)
		\label{l3}
	\end{equation}
	\begin{equation}
		\neg a\ra d
		\label{l4}
	\end{equation}
	\begin{equation}
		\neg d
		\label{l5}
	\end{equation}

	From equation \ref{l5}, we know
	\begin{equation}\label{l6}
		d\equiv \mathrm{\mathbf{F}}
	\end{equation}

	Consider \ref{l4}, we have
	\begin{equation}\label{l7}
		\neg a\equiv \mathrm{\mathbf{F}}
	\end{equation}

	Therefore, 
	\begin{equation}\label{l8}
		a\equiv \mathrm{\mathbf{T}}
	\end{equation}

	and consider \ref{l1}
	\begin{equation}\label{l9}
		b\equiv \mathrm{\mathbf{T}}
	\end{equation}

	Consider \ref{l2},
	\begin{equation}\label{key}
		c\equiv\mathrm{\mathbf{T}}
	\end{equation}

	However, \ref{l3} is false then.
	Thus these system specifications are \textbf{not} consistent.
	
	\subsection{Question 21}
	
	When three professors are seated in a restaurant, the hostess
	asks them: ``Does everyone want coffee?" The first
	professor says ``I do not know." The second professor then
	says ``I do not know." Finally, the third professor says
	``No, not everyone wants coffee." The hostess comes back
	and gives coffee to the professors who want it. How did
	she figure out who wanted coffee?
	
	\Solution
	
	Since the third professor says No, he is sure at least one of them does not need coffee, but the first two professors do not give their choice clearly, we can conclude that the third professor do not need coffee.
	
	Conversely, if the first two professors do not want coffee, they will answer No, so they both want coffee.
	
	\subsection{Question 45}
	
	Find the output of each of these combinatorial circuits.
		
	\begin{figure}[hbtp]
		\centering
		\includegraphics[width = .5\linewidth]{1_2-45(b).jpg}
		\caption{Question 45 (b)}
	\end{figure}

	\Solution
	
	$$(\neg p\wedge\neg q)\vee(p\wedge r)$$
	 
	\section{Section 1.3}
	
	\subsection{Question 5}
	
	Use a truth table to verify the distributive law
	$$p\wedge (q\vee r) \equiv (p \wedge q) \vee (p \wedge r).$$
	
	\begin{proof}
		
		We can construct the truth tables as below:
	
	\begin{table}[htbp]
		\centering
		\caption{Truth Table for $p\wedge (q\vee r)$ and $(p \wedge q) \vee (p \wedge r)$}
		\begin{tabular}{ccccc}
			\toprule
			$p$   & $q$   & $r$ & $q\vee r$ & $p\wedge (q\vee r)$ \\
			\midrule
			T     & T     & T     & T     & T \\
			T     & T     & F     & T     & T \\
			T     & F     & T     & T     & T \\
			T     & F     & F     & F     & F \\
			F     & T     & T     & T     & F \\
			F     & T     & F     & T     & F \\
			F     & F     & T     & T     & F \\
			F     & F     & F     & F     & F \\
			\bottomrule
		\end{tabular}\qquad
		\begin{tabular}{cccccc}
			\toprule
			$p$   & $q$   & $r$ & $q\wedge q$ & $p\wedge r$ & $(p \wedge q) \vee (p \wedge r)$\\
			\midrule
			T     & T     & T     & T     & T    & T \\
			T     & T     & F     & T     & F    & T \\
			T     & F     & T     & F     & T    & T \\
			T     & F     & F     & F     & F    & F \\
			F     & T     & T     & F     & F    & F \\
			F     & T     & F     & F     & F    & F \\
			F     & F     & T     & F     & F    & F \\
			F     & F     & F     & F     & F    & F \\
			\bottomrule
	\end{tabular}%
		\label{Table_11}%
	\end{table}
	
	\end{proof}

	\subsection{Question 7}
	
	Use De Morgan's laws to find the negation of each of the
	following statements.

	d) Ibrahim is smart and hard working.
	
	\Solution
	
	``Ibrahim is not smart or is lazy."
	
	\subsection{Question 9}
	
	For each of these compound propositions, use the
	conditional-disjunction equivalence (Example 3) to find
	an equivalent compound proposition that does not involve
	conditionals.
	
	c) $(\neg q\ra p)\ra(p\ra\neg q)$
	
	\subsection{Question 11}
	
	Show that each of these conditional statements is a tautology
	by using truth tables.
	
	d) $(p\wedge q)\ra(p\ra q)$
	
	f) $\neg(p\ra q)\ra\neg q$
	
		\begin{proof}
		
		We can construct the truth tables as below:
		
		\begin{table}[htbp]
			\centering
			\caption{Truth Table for $(p\wedge q)\ra(p\ra q)$ and $\neg(p\ra q)\ra\neg q$}
			\begin{tabular}{ccccc}
				\toprule
				$p$   & $q$   & $p\wedge q$ & $q\ra q$ & $(p\wedge q)\ra(p\ra q)$ \\
				\midrule
				T     & T     & T     & T     & T \\
				T     & F     & F     & F     & T \\
				F     & T     & F     & T     & T \\
				F     & F     & F     & T     & T \\
				\bottomrule
			\end{tabular}\qquad
			\begin{tabular}{cccccc}
				\toprule
				$p$   & $q$   & $p\ra q$ & $\neg(p\ra q)$ & $\neg q$ & $\neg(p\ra q)\ra\neg q$\\
				\midrule
				T     & T     & T     & F     & F    & T \\
				T     & F     & F     & T     & T    & T \\
				F     & T     & T     & F     & F    & T \\
				F     & F     & T     & F     & T    & T \\
				\bottomrule
			\end{tabular}%
			\label{Table_21}%
		\end{table}
		
	\end{proof}

	\subsection{Question 13}
	
	Show that each conditional statement in Exercise 11 is
	a tautology using the fact that a conditional statement is
	false exactly when the hypothesis is true and the conclusion
	is false. (Do not use truth tables.)
	
	\begin{proof}[Proof for (d)]
		Case $(p\wedge q)$ is false, the proposition is certain to be true.
		
		Case $(p\wedge q)$ is true, $p$ and $q$ are both true, thus $p\ra q$ is true, the proposition is true.
	\end{proof}

	\begin{proof}[Proof for (f)]
		Case $\neg(p\ra q)$ is false, the proposition is certain to be true.
		
		Case $\neg(p\ra q)$ is true, i.e. $(p\ra q)$ is false, thus $p$ is true and $q$ is false. Therefore $\neg q$ is true, the proposition is true.
	\end{proof}

	\subsection{Question 15}
	
	Show that each conditional statement in Exercise 11 is a
	tautology by applying a chain of logical identities as in
	Example 8. (Do not use truth tables.)
	
	\begin{proof}[Proof for (d)]
		$$
		\begin{aligned}
			(p\wedge q)\ra(p\ra q)\equiv & (p\wedge q) \ra (\neg p\vee q) \\
			\equiv & \neg(p\wedge q)\vee(\neg p\vee q) \\
			\equiv & \neg p \vee \neg q \vee \neg p \vee q \\
			\equiv & (q\vee \neg q) \vee \neg p \\
			\equiv & \mathrm{\mathbf{T}} \vee \neg p \\
			\equiv & \mathrm{\mathbf{T}}	
		\end{aligned}
		$$
	\end{proof}
	
	\begin{proof}[Proof for (f)]
		$$
		\begin{aligned}
			\neg(p\ra q)\ra\neg q \equiv & \neg\neg(p\vee q)\vee \neg q \\
			\equiv & (p\vee q)\vee \neg q \\
			\equiv & p\vee (q\vee\neg q) \\
			\equiv & p\vee \mathrm{\mathbf{T}} \\
			\equiv & \mathrm{\mathbf{T}}
		\end{aligned}
		$$
	\end{proof}
	
	\subsection{Question 19}
	
	Determine whether $(\neg q\wedge(p\ra q))\ra\neg p$ is a tautology.
	Each of Exercises 20–32 asks you to show that two compound
	propositions are logically equivalent. To do this, either show
	that both sides are true, or that both sides are false, for exactly
	the same combinations of truth values of the propositional
	variables in these expressions (whichever is easier).
	
	\Solution
	
	$$
	\begin{aligned}
		(\neg q\wedge(p\ra q))\ra\neg p \equiv & \neg(\neg q\wedge(\neg p\vee q))\vee\neg p \\
		\equiv & \neg(\neg p\wedge(\neg p\vee q)\wedge p) \\
		\equiv & \neg((\neg p\wedge p)\wedge(\neg p\vee q)) \\
		\equiv & \neg(\mathrm{\mathbf{F}}\wedge(\neg p\vee q)) \\
		\equiv & \neg\mathrm{\mathbf{F}} \\
		\equiv & \mathrm{\mathbf{T}}
		\end{aligned}
	$$
	
	So it is a tautology.
	
	\subsection{Question 29}
	
	Show that $(p\ra r)\vee(q\ra r)$ and $(p\wedge q)\ra r$ are logically
	equivalent.
	
	\begin{proof}
		On one hand,		
		$$
		\begin{aligned}
			(p\ra r)\vee(q\ra r) \equiv & (\neg p\vee r)\vee(\neg q\vee r) \\
			\equiv & \neg p\vee\neg q\vee r
		\end{aligned}
		$$
		
		On the other hand,
		$$
		\begin{aligned}
			(p\wedge q)\ra r \equiv & \neg(p\wedge q)\vee r \\
			\equiv & \neg p\vee\neg q\vee r
		\end{aligned}
		$$
	\end{proof}

	\subsection{Question 35}
	
	Show that $(p\ra q)\ra r$ and $p\ra(q\ra r)$ are not logically equivalent.
	
	\begin{proof}
		Let $p, q, r$ all be false, then $(p\ra q)\ra r$ is false while $p\ra(q\ra r)$ is true. It is a contradiction.
		
		$\therefore$ $(p\ra q)\ra r$ and $p\ra(q\ra r)$ are not logically equivalent.
	\end{proof}

	\subsection{Question 65}
	
	Determine whether each of these compound propositions
	is satisfiable.
	
	a) $(p\vee\neg q)\wedge(\neg p\vee q)\wedge(\neg p\vee q)$
	
	b) $(p\ra q)\wedge(p\ra\neg q)\wedge(\neg p\ra q)\wedge(\neg p\ra\neg q)$
	
	c) $(p\leftrightarrow q)\wedge(\neg p\leftrightarrow q)$
	
	\Solution
	
	a) is satisfiable.
	
	\begin{proof}
		Let $p, q$ be false, the proposition is true.
	\end{proof}
	
	b) is not satisfiable.
	
	\begin{proof}
		$$
		\begin{aligned}
			(p\ra q)\wedge(p\ra\neg q)\wedge(\neg p\ra q)\wedge(\neg p\ra\neg q) \equiv & (\neg p\vee q)\wedge(p\vee\neg q)\wedge(p\vee q)\wedge(p\wedge\neg q) \\
			\equiv & \neg p\wedge(q\vee \neg q)\wedge p\wedge(q\vee\neg q) \\
			\equiv & \neg p\wedge \mathrm{\mathbf{T}} \wedge p\wedge \mathrm{\mathbf{T}} \\
			\equiv & (\neg p\wedge p)\wedge \mathrm{\mathbf{T}} \\
			\equiv & \mathrm{\mathbf{F}} \wedge \mathrm{\mathbf{T}} \\
			\equiv & \mathrm{\mathbf{F}}
		\end{aligned}
		$$
	\end{proof}

	c) is not satisfiable.
		
	\begin{proof}
		$$
		\begin{aligned}
			(p\leftrightarrow q)\wedge(\neg p\leftrightarrow q) & \equiv (p\vee q)\wedge(\neg p\vee\neg q)\wedge(\neg p\vee q)\wedge(p\wedge\neg q) \\
			\equiv & \mathrm{\mathbf{F}} \text{ (shown in the proof of (b))}
		\end{aligned}
		$$
	\end{proof}

	
	\section*{Appendix}
	
	~
	
	This assignment is written in \LaTeX.
	
	\LaTeX\ code: \url{https://blog.csdn.net/weixin_50012998/article/details/114463071}\\
	
	Lecture Note: \url{https://blog.csdn.net/weixin_50012998/article/details/114383689}
	
\end{document}

% Copyright 2021 Teddy van Jerry

ALL RIGHTS RESERVED © 2021 Teddy van Jerry
This blog is licensed under the CC 4.0 Licence.


See also

Teddy van Jerry’s CSDN Homepage
Teddy van Jerry’s GitHub Homepage

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值