Robert Batzinger
12 Jan 18
Index to Activities
\[ \]
Textbook
Oscar Levin 2016. Discrete Mathematics:
an open introduction, 2nd Ed
Thai supplement: ภินทนคณิตศาสตร์
Development systems | Documentation systems |
---|---|
Software Development
Documentation systems
git config --global user.name "Ajarn Bob"
git config --global user.email "robert_b@payap.ac.th"
git clone git@gitlab.com:rbatzing/mytest.git
cd mytest
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master
README.md
on your computergit add -A
git commit -am "ReadMe file"
git push origin master
DiscreteMath
rbatzing
as a member of your class projectStuID: '209154'
FullName: Dr. R Batz...
NickName: Ajarn Bob
Email: robert_b@payap...
GitLab: rbatzing
Reason: Make this...
Goal: Use Ruby to...
Math: Enjoy the insights
Gitexp: 'yes'
Rubyexp: 'yes'
LabPartner: Ajarn Geng
Computer: i5 230GHz 8GB RAM
Interpreted scripting language:
Quick and easy:
Object oriented programming:
Advanced features:
When you finish the tutorial, answer the following questions:
What is the class defined in this program?
What is the meaning of the attributes of this class?
What do the various methods do?
Which lines invoke and use an object of this class?
How were the global data for the survey stored?
How were the results stored? And in what format?
\[ \]
If this chest is empty,
then the other chest's
message is true.
This chest is filled
with treasure or the
other chest contains
deadly scorpions
Rules
Example
1 | 2 | 3 | 4 |
3 | 4 | 2 | 1 |
4 | 3 | 1 | 2 |
2 | 1 | 4 | 3 |
Sample Problem
3 | 1 | ||
4 | |||
1 | 3 |
List all Possibilities
(2,4) | 3 | (2,4) | 1 |
(2,4) | (1) | (2,4) | (3) |
(3) | 4 | (1) | (2) |
1 | (2) | 3 | (4) |
Anchor Determined Values
(2,4) | 3 | (2,4) | 1 |
(2,4) | 1 | (2,4) | 3 |
3 | 4 | 1 | 2 |
1 | 2 | 3 | 4 |
2 Solutions
\[ \begin{array}{|c|c|c|c|} \hline 2 & \bf 3& 4 & \bf 1 \\ \hline 4 & 1 & 2 & 3 \\ \hline 3 & \bf 4 & 1 & 2 \\ \hline \bf 1 & 2 & \bf 3 & 4 \\ \hline \end{array}\qquad\begin{array}{|c|c|c|c|} \hline 4 & \bf 3 & 2 & \bf 1 \\ \hline 2 & 1 & 4 & 3 \\ \hline 3 & \bf 4 & 1 & 2 \\ \hline \bf 1 & 2 & \bf 3 & 4 \\ \hline \end{array} \]
How would you connect the villages with these constraints?
Too many students were having serious accidents at intersections. So five small towns decided they wanted to build roads directly connecting each pair of towns without any intersection. While the towns had plenty of money to build roads as long and as winding as they wished, but there is no money for tunnels or bridges.
How many combinations will be permitted for this set of 5 friends?
Eddy E never allows a photographer to take a picture with any woman on his left.
\[ \]
any declarative sentence which is either TRUE or FALSE.
Statements
Non-Statements
Atomic
cannot be divided into smaller statements
Molecular
can be divided into smaller statements
It is enough to assume P, and from it, deduce Q
Negation:
\[ \begin{array}{r|c|} \neg P& Outcome\\ \hline P=T & F \\ P=F & T \\ \hline \end{array} \]
Conjunction:
\[ \begin{array}{r|c|c} P\land Q& Q=T & Q = F \\ \hline P=T & T & F \\ P=F & F & F \\ \hline \end{array} \]
Disjunction:
\[ \begin{array}{r|c|c} P\lor Q& Q=T & Q = F \\ \hline P=T & T & T \\ P=F & T & F \\ \hline \end{array} \]
Implication or Conditional:
\[ \begin{array}{r|c|c} P\rightarrow Q& Q=T & Q = F \\ \hline P=T & T & F \\ P=F & T & T \\ \hline \end{array} \]
Biconditional:
\[ \begin{array}{r|c|c} P\leftrightarrow Q& Q=T & Q = F \\ \hline P=T & T & F \\ P=F & F & T \\ \hline \end{array} \]
Given the implication \( P \rightarrow Q \) :
\( Q \rightarrow P \) (can be false)
For \( numbers > 2 \) :
\( Prime \rightarrow Odd\ number \) (True)
\( Odd\ number \rightarrow Prime\ \) (Often False)
Given the implication \( P\rightarrow Q \) :
\( \neg Q \rightarrow \neg P \) (always True)
For \( numbers > 2 \) :
\( Prime \rightarrow Odd\ number \) (True)
\( \neg Odd\ number \rightarrow \neg Prime\ \) (True)
Existential quantifier means “there exists” or “there is.”
\[ \exists x (x < 0) \]
There exists at least one number < 0
Universal quantifier means “for all” or “every.”“
\[ \forall x (x > 0) \]
Asserts that every number > 0
\[ \forall x \exists y ( y < x) \]
\[ \exists x \forall y (y < x) \]
Assuming \( P(x) \) means x is a prime number
\[ \neg \forall x P(x) \equiv \exists x \neg P(x) \]
\[ \neg\exists x P(x) \equiv \forall x \neg P(x) \]
Given:
What is the meaning of these terms?
Index to Activities