You are on page 1of 35

Matematika Diskrit

3 SKS

Buku Teks :
Discrete Mathematics and Its Applications,
Kenneth H Rosen, McGraw-Hill, 6th edition

Penilaian :
tugas
tes
ets
eas

:
:
:
:

10
25
25
25

25%
30%
30%
30%

discrete mathematics
The foundations : Logic and Proofs
2. Basic Structures: sets, functions, sequences, sums
3. The Fundamentals: algorithms, the integers, matrices
4. Induction and Recursion
5. Counting
6. Discrete Probability
7. Advanced Counting Techniques
8. Relations
9. Graphs
10. Trees
1.

discrete mathematics
Boolean Algebra
12. Modeling Computation
13. Appendices
11.

Chapter 1
The Foundations: Logic and Proofs
1.1. Propositional Logic
1.2. Propositional Equivalences
1.3. Predicates and Quantifiers
1.4. Nested Quantifiers
1.5. Rules of Inference
1.6. Introduction to Proofs
1.7. Proof Methods and Strategy

Propositional
Logic
Chapter 1.1.

Proposition

A proposition is a declarative sentence

It is either true (1) or false (0), but not both

Propositional variables are denoted by the letters p, q, etc.

Examples :
1+1=2
2+2=3

Not a proposition: what time is it ?


a + b = 10

today is Monday

Compound Propositions
compound statements

Let p, q, r be simple propositions

A compound proposition is obtained by


connecting p, q, r using logical operators

Example: we are studying and it is raining


Surabaya is a city or Malang is an ocean

Logical Operators

NOT (negation)
Symbol
AND (conjunction)
Symbol
Inclusive OR (disjunction) Symbol
EXclusive OR(XOR)
Symbol
Conditional statement
Symbol
(implication)
Biconditional (iff)
Symbol

Compound Propositions
Example: we are studying and it is raining
s = we are studying
r = it is raining
coded sentence : s r
Surabaya is a city or Malang is an ocean
s = Surabaya is a city
m = Malang is an ocean
coded sentence : s v m

Level of Precedence
NEGATION

(NOT)

CONJUNCTION

(AND)

DISJUNCTION

(OR, XOR)

CONDITIONAL

BICONDITIONAL

Example: p q r
(p q) r
(p q) (r)

more examples

consider these compound propositions:

(p q) r

p (q r)

(p) (q)

p (q r)

Truth Table
Negation

example:

p = today is Tuesday
p = today is not Tuesday

(today is Monday)

Truth Table
conjunction

example:

pq
0

p = today is Monday
q = it is raining

p q = today is Monday and it is raining

Truth table
disjunction (inclusive or)
p
0

pvq

example: p = John is a student


q = Mita is a lawyer
p v q = John is a student or Mita is a lawyer

Truth table
exclusive or
p

pq
0

example: p = John is a student


q = Mita is a lawyer
p v q = either John is a student or Mita is a lawyer

Truth Table (p r)q


p

(p r)q

(0 1) 0 = 0

(0 0) 0 = 0

(0 1) 1 = 1

(0 0) 1 = 1

(1 1) 0 = 1

(1 0) 0 = 0

(1 1) 1 = 1

(1 0) 1 = 1

Truth Table p (r q)
p

p (r q)

Truth Table
implication
p

pq

consistency
Statements / specifications are consistent :
one statement should not conflict
another

Example 15 p. 12
b : the diagnostic message is stored in the buffer
t : the diagnostic message is transmitted

Determine whether these system specifications are


consistent:
The diagnostic message is stored in the buffer
or it is transmitted
bt
The diagnostic message is not stored in the buffer
If the diagnostic message is stored in the buffer,
then it is transmitted
bt

Example 15 p. 12
lets say the three specifications are consistent
(all true)
bt
b
b t

since b is true, b must be false (b = 0)


from b t (true) t is true (t = 1)
finally b t (0 1) is true
therefore the system specifications are
consistent

Implication

Notation : p q

Examples :
1. if 2 + 2 = 4 then x := x + 1
2. if m > 0 then y := 2 * y
3. if it is raining then we will not go

Let s denote 2 + 2 = 4 and a denote x := x + 1


The symbolic notation for example 1 : s a

Hypothesis & Conclusion


In the implication p q
p is called the antecedent, hypothesis, premise
q is called the consequence, conclusion

Ways to express p q
jika p maka q
if p then q
jika p, q
if p, q
q jika p
q if p
p hanya jika q
p only if q
p mengimplikasikan q
p implies q
see page 6

Necessary & Sufficient conditions


pq
is necessary for p
is a sufficient condition for q

Conversion & Inversion


The conversion of p q is q p
The inversion of p q is p q
p q is not equivalent to q p
p q is not equivalent to p q

pq

qp

p
q
1

contrapositive
The contrapositive of p q is q p.
p q and q p are equivalent

pq
1

qp
1

Biconditional
p if and only if q
pq
p

pq

(p q) (q p)
1

Propositional
Equivalence

Chapter 1.2.

Tautology
A proposition that is always true
example: p p v q
p

ppvq

Contradiction
a proposition that is always false
example : p ( p )
p

p ( p)

Logical Equivalence
Notation p q ( p and q are compound propositions )
Example : p q is logically equivalent to p q
pq

pq

Logical Equivalence
See pages 24, 25
Table 6
Table 7
Table 8

De Morgans Law

(p q) ( p) ( q)

(p q) ( p) ( q)

pq

(pq)

(p)(q)

Homework

Chapter 1.1. no. 12, 13, 35 38, 49


Chapter 1.2. no. 7, 9, 16, 17, 60

You might also like