Discrete Mathematics

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 27

DISCRETE

MATHEMATICS

Prepared by: Mahidlayon, Marlene C.


DISCRETE MATHEMATICS
• Is the study of mathematical structures that are
fundamentally discrete rather than continuous. ...
• It has been characterized as the branch
of mathematics dealing with countable sets (finite
sets or sets with the same cardinality as the natural
numbers).

Prepared by: Mahidlayon, Marlene C.


LOGIC AND PROOFS

Prepared by: Mahidlayon, Marlene C.


LOGIC
• A study of reasoning;
•specifically concerned with whether
reasoning is correct.
• focuses on the relationship among
students as opposed to the content of
any particular statement
Prepared by: Mahidlayon, Marlene C.
Examples

• All mathematicians wear sandals.


• Anyone who wears sandals is an
algebraist.
• Therefore, all mathematicians are
algebraists.

Prepared by: Mahidlayon, Marlene C.


PROPOSITIONS
• a sentence that is either true or false, but not
both.
• basic building blocks of any theory or logic.

It is raining.
I will take my umbrella.
It is raining and I will take my umbrella.

Prepared by: Mahidlayon, Marlene C.


PROPOSITIONS
lowercase p, q and r - represent propositions

p : 1+1 = 3

Prepared by: Mahidlayon, Marlene C.


PROPOSITIONS
CONJUNCTION DISJUNCTION
Proposition of Proposition of
p ^ q p and q p v q p or q
COMPOUND PROPOSITION

p ^ q and p v q
Prepared by: Mahidlayon, Marlene C.
Examples
p : 1+1 = 3
q : A decade is 10 years.
p ^ q : 1+1=3 and a decade is 10 years
p v q : 1+1=3 or a decade is 10 years

Prepared by: Mahidlayon, Marlene C.


p q p^q
TRUTH TABLE
T T T

T F F

F T F

F F F

Prepared by: Mahidlayon, Marlene C.


p q pvq
TRUTH TABLE
T T T

T F T

F T T

F F F

Prepared by: Mahidlayon, Marlene C.


negation of p p p
p
T F

F T

Prepared by: Mahidlayon, Marlene C.


Examples
(p ^ q ) v r
Either Blaise Pascal invented several
calculating machines and = (Tit ^isT)not
v F the case
= (T digital
that the first all electronic ^ F) v Fcomputer
was constructed in the =20 Fthv century
F or was
calculated to 1,000,000 = Fdecimal digits in
1954.

Prepared by: Mahidlayon, Marlene C.


I. Determine whether each sentence is a
proposition. If the sentence is a proposition, write
its negation, if not, write ! .
1.] 2+5 = 19
2.] Waiter, will you serve the nuts – I mean, would
you serve the guests the nuts?
3.] Today is Friday.
4.] 0 is not less than 1.
5.] 9 is a prime number.
Prepared by: Mahidlayon, Marlene C.
II. Evaluate each proposition for the truth
values where p=F, q=T, r=F
1. pvq
2. pvq
3. pvq
4. p v (q ^ r)
5. (p v r) ^ (q v r) v (r v p)
Prepared by: Mahidlayon, Marlene C.
CONDITIONAL PROPOSOTIONS AND
LOGICAL EQUIVALENCE

Prepared by: Mahidlayon, Marlene C.


•Conditional proposition/implication
is denoted by
p  q.
• p is called the hypothesis (antecedent)
and the proposition q is called the
conclusion(consequent).

Prepared by: Mahidlayon, Marlene C.


•Example

* Mary will be a good student if she


studies hard.

Prepared by: Mahidlayon, Marlene C.


p q pq
Truth Table
T T T
T F F
F T T
F F T

Prepared by: Mahidlayon, Marlene C.


Prepared by: Mahidlayon, Marlene C.
Write the conditions for the ff. propositions:
Use Java or C Programming Language
Note: Write True or False as statements
1.9 is a prime number
2.1000 Gb is 1 Terabyte
3.0<1 and 2 <= -1
4.1000ml is 2 Liters
5. 2 == 0 or 0!=2
Prepared by: Mahidlayon, Marlene C.
Biconditional proposition
• Compound proposition of p if and only if q
• Denoted by p q

Prepared by: Mahidlayon, Marlene C.


Biconditional proposition
p q p q
Truth table:
T T T

T F F

F T F

F F T

Prepared by: Mahidlayon, Marlene C.


contrapositive
• Logically equivalent to conditional
proposition

Prepared by: Mahidlayon, Marlene C.


contrapositive
p q pq qp
Truth table:
T T T T

T F F F

F T T T

F F T T

Prepared by: Mahidlayon, Marlene C.


contrapositive
Example: If 5>8, then 1<4

If 5 is not greater than 8, then 1 is not


less than 4.

T  F = F, qp=F

Prepared by: Mahidlayon, Marlene C.


EXERCISE
I. Complete the truth table below.
p q p q p q q  p (pq) ^ (qp) qp p^q qvp

T T T T T T F T T

T F F F T F F F T

F T F T F F T F T

F F T T T T F F F

Prepared by: Mahidlayon, Marlene C.

You might also like