Discrete Mathematics and Its Application: Lamya A. Omer
Discrete Mathematics and Its Application: Lamya A. Omer
application
Lamya A. Omer
Lecture1
2nd Stage
[email protected] 2021-2022
Course Objectives
You learn continuous math. It deals with continuous functions, differential and integral
.calculus
In contrast, discrete math deals with mathematical topics in a sense that it analyzes data
whose values are separated (such as integers: integer number line has gaps) Here is a very
rough comparison between continuous math and
discrete math: consider an analog clock (one with hands that continuously rotate, which
.shows time in continuous fashion) vs. a digital clock (which shows time in discrete fashion)
Discrete Data & Continuous Data
Discrete Data
• Data that can only take certain values.
Continuous Data
Data that can take any value (within a range)
Discrete Mathematics
• Discrete Mathematics is a branch of modern
mathematics which is deals with discrete objects.
Discrete objects are those which are separated from
(not connected to / distinct واضحة المعالمfrom) each
other.
• Discrete mathematics, or finite mathematics,
involves breaking up sets of elements into separate
or discontinuous parts.
Why Care about Discrete Math?
14
Logic
• In logic we are interested in true or false of statements, and
how the truth/falsehood of a statement can be determined
from other statements.
• However, instead of dealing with individual specific
statements, we are going to use symbols to represent
arbitrary statements so that the results can be used in
many similar but different cases. The formalization also
promotes the clarity of thought and eliminates mistakes.
Types of logic
• A proposition is a declarative sentence that is either true or false. but not both.
• Propositional Logic is the logic of compound statements built from simpler statements using
so-called Boolean connectives.
• Some applications in computer science:
• Design of digital electronic circuits.
• Expressing conditions in programs.
• Queries to databases , search engines & knowledge base.
17
Outline of logic topic
• “y > 5”
Is this a statement? no
It’s a request.
Is this a proposition? no
28
Decide which of the following are propositions
• 1- “ It is raining”
• 2- “1 + 2 = 3”
• 3- “Who ís there?
• 4- “La la la la la.”
• 5- “Just do it!”
• 6- “1 + 2”
• 7- Washington D.C. is the capital of China.î
Combining Propositions
•As we have seen in the previous examples, one or more propositions can be
combined to form a single compound proposition.
•We formalize this by denoting propositions with letters such as p, q, r, s, and
introducing several logical operators.
Negation (NOT)
P ~P
A truth table displays
the relationships
true false
between the truth
values of
false true
propositions.
Conjunction (AND)
• Binary Operator, Symbol:
• DEFINITION 2
• Let p and q be propositions. The proposition "p and q," denoted p ˄q. is
the proposition that is true when both p and q are true and is false
otherwise. The proposition p q is called the conjunction of p and q
EXAMPLE
Find the conjunction of the propositions p
P Q PQ and q where p is the proposition "Today is
Friday" and q is the proposition "It is raining
true true true today."
true false false
Solution:
false true false The conjunction of these propositions, p q,
is the proposition
false false false "Today is Friday and it is raining today"
Disjunction (OR)
• Binary Operator, Symbol:
DEFINITION 3
Let p and q be propositions. The proposition "p or q," denoted p v q , is the proposition that
is false when p and q are both false and true otherwise. The proposition p \/ q is called the
disjunction ot p and q.
Compare these two sentences
"Students who have taken calculus or computer
P Q PQ science can take this class.“
DEFINITION 4
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.
P Q PQ
true true false
true false true
false true true
false false false
Implication (if - then)
• Binary Operator, Symbol:
DEFINITION 5 Let p and q be propositions. The implication p q is the
proposition that is false when p is true and q is false, and true otherwise.
p is called the hypothesis and q is called the conclusion (or consequence).
"p only if q" expresses the same thing as
"if p then q.“ To remember this, note that
P Q PQ
"p only if q" says that p cannot be true true true true
when q is not true.
That is, the statement is false if p is true, true false false
but q is false. When p is false, q may
be either true or false, because the false true true
statement says nothing about the truth
value of q. false false true
If it is sunny today, then we will go to the beach.“
“if today is Friday, then 2 + 3 = 5.“
"If today is Friday, then 2 + 3 =6.“
WAYS to express implies proposition
"if p then q" "p implies q“, or "p only if q“ "q when p" "q is necessary
for p" or "a necessary condition for p is q" "q follows from p"
Biconditional (if and only if)
• You can access the internet form your collage only if you are a computer science major or not a
freshman .
• first only if is implication statement
• Second Suppose c is” you are a computer science major ”
• f is “you are freshman ”
• a is “You can access the internet form your collage ” so we can write
• Answer :
• (r˄~ s)→~ q How and explain ?
• CONVERSE, CONTRAPOSITIVE, AND INVERSE
p˄ p ≡p
Absorption Laws
Applied Discrete Mathematics
p˅ p ≡p Week 1: 46
Logic and Sets
Applied Discrete Mathematics
Week 1: Logic and Sets
47