0% found this document useful (0 votes)
19 views

CS311 DMath Lesson1 Introduction

This document introduces discrete mathematics and its key concepts. It defines discrete mathematics as the study of discrete objects and discusses how it is used when objects are counted or finite sets are studied. Some important problems solved with discrete mathematics include valid password selection and network link detection. The document also defines propositions, logical operators like negation and conjunction, and conditional statements. It provides examples and exercises to illustrate these concepts.

Uploaded by

Sok Leang Siv
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

CS311 DMath Lesson1 Introduction

This document introduces discrete mathematics and its key concepts. It defines discrete mathematics as the study of discrete objects and discusses how it is used when objects are counted or finite sets are studied. Some important problems solved with discrete mathematics include valid password selection and network link detection. The document also defines propositions, logical operators like negation and conjunction, and conditional statements. It provides examples and exercises to illustrate these concepts.

Uploaded by

Sok Leang Siv
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 30

INTRODUCTION

TO DISCRETE
MATHEMATICS
OBJECTIVES:
• To be able to define what is discrete
mathematics.
• To be able to know what are propositions.
• To be able to identify the different logical
operators/connectives.
DISCRETE

• Consisting of distinct or unconnected or non-


continuous elements or structures.
DISCRETE
MATHEMATICS
• A part of mathematics devoted to the study
of discrete objects.
• Used whenever objects are counted,
relationships of finite sets are studied.
PROBLEMS SOLVED
USING DISCRETE
MATHEMATICS:
• How many ways are there to choose a
valid password on a computer system?
• Is there a link between two computers in a
network?
• How many steps are required to do such
sorting?
IMPORTANCE OF DMATH

• Information is stored and manipulated by


computers in a discrete fashion.
• Applications in many different areas.
• DMath is a gateway to more advanced
courses
PROPOSITIONS
• Basic building blocks of logic.
• A declarative sentence that is either true or
false, but not both.
EXAMPLES:
• Cambodian Jasmine Rice was the world’s
best rice in 2012, 2013, and 2014.
•1 + 1 = 0
• Read this carefully.
• What time is it?
LOGICAL
OPERATORS
1. NEGATION
Let p be the proposition. The
negation of p, is denoted by ¬p.
Example:
p : (Your Turn!)
¬p : “It is not the case that p”
LOGICAL
OPERATORS
2. CONJUNCTION
Let p and q be propositions. The
conjunction of p and q, denoted by p^q .
The conjunction of p^q is true when
both p AND q are true, and false otherwise.
LOGICAL
OPERATORS
3. DISJUNCTION
Let p and q be propositions. The
disjunction of p or q, denoted by p v q.
The disjunction of p v q is false
when both p and q are false and true
otherwise.
LOGICAL
OPERATORS
4. EXCLUSIVE OR
Let p and q be propositions. The
exclusive or of p and q, denoted by p q,
is the proposition that is true when exactly
one of p and q is true, and is false
otherwise.
(eXclusive OR) A Boolean logic operation
that is widely used in cryptography as well
as in generating parity bits for error
checking and fault tolerance. XOR
compares two input bits and generates one
output bit. If the bits are the same, the result
is 0.
~pcmag.com
LOGICAL
OPERATORS
5. CONDITIONAL STATEMENT /
IMPLICATION
Let p and q be propositions. The
conditional statement p→q is false, when p is
true and q is false, and true otherwise.
LOGICAL
OPERATORS
In the conditional statement p →q, p is
called the hypothesis(or antecedent or
premise) and q is called the conclusion
(or consequence).
A conditional statement is also called
implication.
LOGICAL
OPERATORS
Special names for a conditional statement:
• Contrapositive:
The contrapositive of p→q is the
proposition ¬q→¬p.
• Converse:
The proposition q→p is called the
converse of p→q.
• Inverse:
The proposition ¬p→¬q is called the
inverse of p→q.
LOGICAL
OPERATORS
Example: What are the contrapositive, the
converse, and the inverse of the conditional
statement.

“If it is raining, then the home team wins.”


LOGICAL
OPERATORS
Contrapositive:
“If the home team does not win, then it is not raining”
Converse:
“If the home team wins, then it is raining.”
Inverse:
“If it is not raining, then the home team does not win.”
LOGICAL
OPERATORS
6. BICONDITIONAL STATEMENT
The biconditional statement p↔q is the
proposition “p if and only if q.”
The biconditional statement p↔q is true
when p and q have the same truth values, and
is false otherwise.
Also called bi-implications.
LOGICAL
OPERATORS
Other common ways to express:
“p is necessary and sufficient for q”
“p iff q.”
LOGICAL
OPERATORS
Precedence:
EXERCISES:
Construct the truth table of the compound
proposition
a. (p ∨ ¬q)→(p ∧ q).
b. (p ∧ q) ∨ (¬q ∧ r)
EXERCISES:
Let p and q be the propositions.
p: I bought a lottery ticket this week.
q: I won the million dollar jackpot.
Express each of these propositions as an
English sentence.
a) p↔q b) ¬p→¬q c)¬p∨(p∧q)
EXERCISES:
Let p, q, and r be the propositions.
p: You get an AA on the final exam.
q: You do every exercises in CS311 .
r: You get an AA in this class.
Write these propositions using p, q, and r and logical
operators/connectives (including negations).
a)
SW: 1 A4

Let p and q be the propositions “Swimming at the Mekong


River is allowed” and “Sharks have been spotted along
the river”, respectively.

A. Express each of these compound propositions as an


English sentence.
a) ¬p ∨ q b)p→¬q c) p↔¬q
B. Write these propositions using p, q, and logical
operators/connectives .

1. It is not the case that sharks have been spotted along the
river whenever swimming at the Mekong River is
allowed.

2. Swimming at the Mekong River is not allowed, but sharks


have been spotted along the river.
What are the contrapositive, the converse, and the inverse of the
conditional statement:

1. Sharks have been spotted along the river, unless swimming


at the Mekong River is not allowed.

• Contra::
• Converse::
• Inverse::

You might also like