Download as pdf or txt
Download as pdf or txt
You are on page 1of 28

MATH 108

DISCRETE MATHEMATICS
LECTURE 1

DR. ŞENIZ DEMİR



COURSE OUTLINE
Discrete mathematics is devoted to the study of discrete structures used to represent discrete objects.

1. Foundations: Logic
2. Foundations: Quantifiers, Arguments
3. Introduction to proofs
4. Relations and Functions
5. Sequences and Summations
6. Algorithms: Basics
7. Algorithm Analysis
8. Number Theory: Modular Arithmetic, Prime Numbers
9. Number Theory: Fundamental Algorithms
10. Counting and Probability
11. Advanced Counting
12. Recursion and Induction
13. Recurrence Relations
14. Graph Theory and Trees
LOGIC

Specifies the meaning of mathematical statements

Is the basis of all mathematical reasoning and of all automated reasoning

Reasons about the validity of arguments

Has practical applications to the design of computing machines, to the specification of systems, to
programming languages, etc.

PROPOSITIONAL LOGIC

Propositional Calculus/Logic: The area of logic that deals with propositions


Proposition: a declarative sentence (that is, a sentence that declares a fact) that is either true or false,
but not both

Ankara is the capital of Turkey ✓


2+2=3✓
Read this carefully X
x+1=2 X

TRUTH VALUE

Propositional/statement variables: variables that represent propositions (p, q, r, s, . . .)


The truth value of a proposition is
true (T) if it is a true proposition
false (F) if it is a false proposition

The negation of p (a proposition) → ¬p


The statement: “It is not the case that p.” or “not p.”
The result of applying the negation operator on a proposition
A new proposition from a single existing

COMPOUND PROPOSITIONS

One or more existing propositions might be combined via logical operators to build other mathematical
statements → compound propositions
Connectives: The logical operators that are used to form new propositions from two or more existing
propositions

COMPOUND PROPOSITIONS

p: “Rebecca’s PC has more than 16 GB free hard disk space”


q: “The processor in Rebecca’s PC runs faster than 1 GHz”

Conjunction:
“Rebecca’s PC has more than 16 GB free hard disk space, and the processor in Rebecca’s PC runs faster than 1
GHz”
“Rebecca’s PC has more than 16 GB free hard disk space, and its processor runs faster than 1 GHz.”

Disjunction:
“Rebecca’s PC has at least 16 GB free hard disk space, or the processor in Rebecca’s PC runs faster than 1
GHz.”

INCLUSIVE VS EXCLUSIVE OR

Inclusive or: A disjunction is true when at least one of the two propositions is true
“Students who have taken calculus or computer science can take this class.”
Exclusive or: A disjunction is true when only one of the two propositions is true but not both
“Students who have taken calculus or computer science, but not both, can enroll in this class.”

CONDITIONAL STATEMENTS

The statement p → q is called a conditional statement (implication) because p → q asserts that q is true
on the condition that p holds

CONDITIONAL STATEMENTS

“If you get 100% on the final, then you will get an A.”

Interpretations:
If you manage to get a 100% on the final, then you would expect to receive an A.
If you do not get 100% you may or may not receive an A depending on other factors
However, if you do get 100%, but the professor does not give you an A, you will feel cheated.

CONDITIONAL STATEMENTS

p: “Maria learns discrete mathematics”


q: “Maria will find a good job”

Express “p → q”:
“If Maria learns discrete mathematics, then she will find a good job.”
“Maria will find a good job when she learns discrete mathematics.”
“For Maria to get a good job, it is sufficient for her to learn discrete mathematics.”
“Maria will find a good job unless she does not learn discrete mathematics.”

CONVERSE, CONTRAPOSITIVE, INVERSE

The proposition: p → q
Converse: q → p
Contrapositive: ¬q →¬p
Inverse: ¬p →¬q

“The home team wins whenever it is raining?” (“q whenever p”)


“If it is raining, then the home team wins.”
p: “It is raining”
q: “The home team wins

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


Contrapositive: “If the home team does not win, then it is not raining.”
Inverse: “If it is not raining, then the home team does not win.”

BICONDITIONAL STATEMENTS

The statement p ↔ q is called a biconditional statement and expresses that two propositions have the
same truth value
The abbreviation “iff” for “if and only if.”
Has exactly the same truth value as (p → q) ∧ (q → p)

BICONDITIONAL STATEMENTS

P: “You can take the flight”


Q: “You buy a ticket”
Interpretation: (p ↔ q)
“You can take the flight if and only if you buy a ticket.”
True if p and q are either both true or both false:
if you buy a ticket and can take the flight
if you do not buy a ticket and you cannot take the flight
False when p and q have opposite truth values:
if you do not buy a ticket, but you can take the flight (such as when you get a free trip)
if you buy a ticket but you cannot take the flight (such as when the airline bumps you)

TRUTH TABLE

The truth table of a compound proposition



TAUTOLOGY, CONTRADICTION, CONTINGENCY

Tautology: A compound proposition that is always true, no matter what the truth values of the
propositional variables that occur in it
p ∨ ¬p
Contradiction: A compound proposition that is always false
p ∧ ¬p
Contingency: A compound proposition that is neither a tautology nor a contradiction

PRECEDENCE OF LOGICAL OPERATORS

Parentheses are used to specify the order in which logical operators in a compound proposition are to be
applied
(p ∨ q) ∧ (¬r) is the conjunction of p ∨ q and ¬r

¬p ∧ q:
is the conjunction of ¬p and q, namely, (¬p) ∧ q
is not the negation of the conjunction of p and q, namely ¬(p ∧ q)


LOGIC AND BIT OPERATIONS

A bit string is a sequence of zero or more bits

APPLICATIONS

Sentence:
“You can access the Internet from campus only if you are a computer science major or you are not a freshman.”

Logical expression a → (c ∨¬f )


a: “You can access the Internet from campus”
c: “You are a computer science major”
f: “You are a freshman”
.

APPLICATIONS
PROPOSITONAL EQUIVALENCES

Logically equivalent: Compound propositions that have the same truth values in all possible cases
enables the replacement of a statement with another statement with the same truth value

The symbol rather than ≡ for logical equivalences


One way to determine whether two compound propositions are equivalent is to use a truth table

PROPOSITONAL EQUIVALENCES

De Morgan’s Laws

PROPOSITONAL EQUIVALENCES

p→q ¬p ∨ q

PROPOSITONAL EQUIVALENCES
p ∨ (q ∧ r) (p ∨ q) ∧ (p ∨ r)
PROPOSITONAL EQUIVALENCES
PROPOSITONAL EQUIVALENCES
NEW EQUIVALENCES
NEW EQUIVALENCES - TAUTOLOGY

You might also like