Title: MiniCourse CMPE16: Discrete Mathematics
1Mini-CourseCMPE16Discrete Mathematics
- Presented by Christopher Boswell
Lecture Material by Prof. Patrick Tantalo, Slides
by Janelle Yong
2Discrete Mathematics
- A systematic approach of solving equations that
can be applied to computer science and
engineering - Helps to mathematically understand the way a
computer thinks
Lecture Material by Prof. Patrick Tantalo, Slides
by Janelle Yong
3Logic
- A proposition is a statement which is (or can be
evaluated as) true or false - Examples
- It is raining today.
- 2 3 5
- 2 3 7
- true T false F
- Proposition Variable can use any variable to
replace the proposition statement (ex. p, q, or
r)
Lecture Material by Prof. Patrick Tantalo, Slides
by Janelle Yong
4Logic
- Propositions can also be represented by a phrase.
Examples - p It is sunny today.
- q I will go to the park.
- r I will stay home.
5Logic
- Use logical operators
- Negation
- Conjunction
- Disjunction v
- Implication ?
- Biconditional ?
Lecture Material by Prof. Patrick Tantalo, Slides
by Janelle Yong
6Negation
- Not p
- Notation p
- Example
- If p It is sunny today.
- Then, p It is not sunny today.
Lecture Material by Prof. Patrick Tantalo, Slides
by Janelle Yong
7Truth Table
- Is used to tell whether a proposition is true or
false based on all the possible input
combinations - For negation
Inputs Outputs
Lecture Material by Prof. Patrick Tantalo, Slides
by Janelle Yong
8Conjunction
- For propositions p and q, the output will be true
if and only if (notation IFF) both p and q are
true - Notation p q
Lecture Material by Prof. Patrick Tantalo, Slides
by Janelle Yong
9Disjunction v
- For propositions p and q, the output will be true
if either or both p or q are true - Notation p v q
Lecture Material by Prof. Patrick Tantalo, Slides
by Janelle Yong
10Implication ?
- If-Then Statement
- p is the premise and q is the conclusion
- Notation p ? q
- Examples
- x 2 implies that x 1 3 OR If x 2,
then x 1 3 - If I score 90 or higher in this class, then I
will get an A.
http//www.math.niu.edu/richard/Math101/implies.p
df
11Implication ?
- In the case where p is true and q is false, the
outcome is false - Innocent until proven guilty stand-point
- A false statement implies ANYTHING
http//www.math.niu.edu/richard/Math101/implies.p
df
12Biconditional ?
- If and Only If IFF
- True if p and q have the same truth value
- Notation p ? q
Lecture Material by Prof. Patrick Tantalo, Slides
by Janelle Yong
13Compound Proposition
- A combination of propositional variables and
logical operations - Examples
- ( p ? q ) v ( q ? r )
- (p q)
Lecture Material by Prof. Patrick Tantalo, Slides
by Janelle Yong
14Logic
- Proposition sentences can then be turned into a
combination of symbols - Take
- p It is sunny today.
- q I will go to the park.
- r I will stay home.
- Example p ? q
- If it is sunny today, I will go to the park.
15Practice Problems
- p It is sunny today.
- q I will go to the park.
- r I will stay home.
- s I will go to the beach.
- Express the following propositions as a sentence
- 1. p ? (q s) 2. p ? r
16Practice Problems
- p It is sunny today.
- q I will go to the park.
- r I will stay home.
- s I will go to the beach.
Express the following sentences as a
proposition 3. If it is sunny today, I will not
stay home. 4. If it is sunny today, I will go the
park or the beach.
17Tautology
- A compound proposition which is true for every
assignment to its variables - In other words
- A proof whose outcome is always true
18Logical Equivalences
- Equal by definition
- An equal sign with three lines
19Logical Properties
- Identity
- Domination
- Idempotent
- Double Negation
- Commutative
- Associative
- Distributive
- DeMorgans
20Identity
- Assumptions that have been proven
- Things that you know are true
- Example
- Trig Identities?
21Domination
- If a statement is dominated by a true statement,
it is logically equivalent to be true - For a false statement, it is logically equivalent
to be false
22Idempotent
- When applied to two equal values, it gives that
value as the result - Example
- The result of p or p is p.
- The result of p and p is also p.
23Double Negation
24Commutative
- The ability to change the order without changing
the outcome - Example
- 3 2 2 3
25Associative
- The order of the operations do not matter as long
as the sequence of the operands are not changed - Usually used with parenthesis
- Example
- ( 2 5 ) 27 2 ( 5 27 )
26Distributive
- Distribute the outside to the inside
- Example
- 2 ( 5x 7 ) 2 ( 5x ) 2 ( 7 ) 10x 14
27DeMorgans Laws
28Practice Problems
29Assignment
- 1. Which of these sentences are propositions?
What are the truth values of those that are
propositions? - a) The California State bird is the road runner
- b) Jump up and down
- c) An ostrichs eyes are larger than its brain
- d) 235
- e) 223
- F) X79
30Assignment Continued
- 2. Let P, Q, and R be the propositions
- P You forget your watch
- Q You miss the bus
- R You get to class on time
- Express each of these propositions as an English
sentence. - a) P ? Q
- b) Q? R
- c) Q? R
- d) (P?Q) V (Q?R)
- e) P V Q V R
31Assignment Continued
- 3. Determine whether each of these conditional
statements is true or false. - a) If 112, then 356
- b) If 224, then 437
- c) If 214, then 339
- d) If monkeys can fly, then 11thrive
32Assignment Continued
- 4. Use truth tables to verify the associative
law. - (p V q) V r p V (q V r)
- 5. Show that this conditional statement is a
tautology with and without truth tables - p ? (p V q) ? q
33Questions?