You are on page 1of 39

MATH6077 – Discrete

Mathematics
Week 1 - The logic of compound
statements
Statements

Definition
A statement (or proposition) is a sentence that is
true or false but not both.
Propositions Not Propositions
3 + 2 = 32 Bring me coffee!
5–2=3 x+y>0
Every cow has 4 legs. 3+2
There is other life in the Do you like Cake?
universe.

Bina Nusantara University 2


Negation

Definition
If p is a statement variable, the negation of p is
"not p" or "It is not the case that p" and is denoted
~p.
p p

T F
F T

Bina Nusantara University 3


Conjunction

Definition
If p and q are statement variables, the conjunction of p
 p q.
and q is "p and q" denoted
p q pq

It is true when, and only when, T T T


both p and q are true. If either p T F F
or q is false, or if both are false, F T F
p  q is false. F F F

Bina Nusantara University 4


Disjunction

Definition
If p and q are statement variables, the disjunction
of p and q is "p or q," denoted p v q.

p q pq

It is true when either p is true,


T T T
or q is true, or both p and q are T F T
true; it is false only when both p F T T
and q are false. F F F

Bina Nusantara University 5


A Statement Form
(Proposition)
Definition
A statement form (or propositional form) is an
expression made up of statement variables (such as p,
q, and r) and logical connectives (such as ~,  , and v)
that becomes a statement when actual statements are
substituted for the component statement variables.

The truth table for a given statement form displays the


truth values that correspond to all possible
combinations of truth values for its component
statement variables.
Bina Nusantara University 6
Example :Truth Table

Bina Nusantara University 7


Logical Equivalence

Definition

Two statement forms are called


logically equivalent If and only if,
they have identical truth values for
each possible substitution of
statements for their statement
variables. The logical equivalence
of statement forms P and Q is
denoted by writing P  Q.

Bina Nusantara University 8


Example:
Logical Equivalence
Distributivity: p  (q  r)  (p  q)  (p  r)
p q r qr p  (q  r) pq pr (p  q)  (p  r)

T T T T T T T T
T T F F T T T T
T F T F T T T T
T F F F T T T T
F T T T T T T T
F T F F F T F F
F F T F F F T F
F F F F F F F F
Bina Nusantara University 9
Tautology and
Contradiction
Definition

A tautology is a statement
form that is always true.
A statement whose form is
a tautology is a tautological
statement.

A contradiction is a statement form that is always false.


A statement whose form is a contradiction is a
contradictory statement.

Bina Nusantara University 10


Conditional Statements
(Implication)

Definition
p q pq
If p and q are statement
variables, the conditional of q T T T
by p is "If p then q" or "p T F F
implies q" and is denoted p → F T T
q. It is false when p is true and q F F T
is false; otherwise it is true.

Bina Nusantara University 11


The Contrapositive, Converse and
Inverse of a Conditional Statement

Definition
Suppose a conditional statement of the form “If p then
q” is given.
1.The contrapositive is “If ~q then ~p” (~q → ~p)
2.The converse is “If q then p“ (q → p)
3.The inverse is "If ~p then ~q" (~p → ~q)

Bina Nusantara University 12


Biconditional (Biimplication)

Definition
p q p ↔q
Given statement variables p and q,
the biconditional of p and q is "p if
and only if q" and is denoted p ↔ q. T T T
It is true if both p and q have the T F F
same truth values and is false if p F T F
and q have opposite truth values. F F T

The words if and only if are sometimes abbreviated iff.

13
Bina Nusantara University
Valid and Invalid Arguments

Definition

An argument is a sequence of statements (or proposition).


All statements (or proposition) in an argument except for the
final one, are called premises (or assumptions or hypotheses).
The final statement or statement form is called the conclusion.
The symbol , which is read "therefore," is normally placed just
before the conclusion.

To say that an argument is valid means that if the resulting


premises are all true, then the conclusion is also true.

Bina Nusantara University 14


An Invalid Argument Form

Show that the following argument form is invalid.

Bina Nusantara University 15


A Valid Argument Form

Show that the following argument form is valid

Bina Nusantara University 16


Rules of Inference

Bina Nusantara University 17


Proofs - A little proof…

Here’s what you know:


Ellen is a math major or a CS major.
If Ellen does not like discrete math, she is not a CS major.
If Ellen likes discrete math, she is smart.
Ellen is not a math major.

Can you conclude Ellen is smart?


MC
D  C
DS
M
11/30/2019
Proofs - A little proof…

1. MC Given
2. D  C Given
3. DS Given
4. M Given
5. C Elimination (1,4)
6. CD Contrapositive of 2
7. CS Transitivity (6,3)
8. S Modus Ponens (5,7)

Then, we conclude that Ellen is smart.

Bina Nusantara University


Black Boxes and Gates

The operation of a black box is completely


specified by constructing an input/output table
that lists all its possible input signals together
with their corresponding output signals.

Bina Nusantara University 20


“NOT”, “AND”, and “OR” Gates

p p

T F
F T

Bina Nusantara University 21


Multiple Input AND Gate

Each of the circuits in Figures 1.4.4 and 1.4.5 is, therefore,


an implementation of the expression P Q R S T. Such a
circuit is called a multiple-input AND-gate and is
represented by the diagram shown in Figure 1.4.6.
Multiple-input OR-gates are constructed similarly.
Bina Nusantara University 22
The Circuit Corresponding to
a Boolean Expression

The following example shows how to construct a circuit


corresponding to a Boolean expression.

Bina Nusantara University 23


The Circuit Corresponding to
a Boolean Expression

Bina Nusantara University 24


Disjunctive Normal Form
(DNF)
Definition
Disjunctive Normal Form (DNF) is a boolean expression E,
which has no duplication on the multiplication of each
variable

Example
E1 = X Z’ + X’ Y Z’ + X Y’ Z is DNF

E2 = X Z’ + Y’ Z + X Y Z’ is not DNF, since the


multiplication of XYZ’ including XZ’ (XZ’ is the first
fundamental product of E2)

25
Full DNF

Definition
A boolean expression E (X1, X2, ...) is full DNF if each
fundamental product of expression consisting of all the
variables.

Example:
E = X Y 'Z + X' Y Z + X Y Z ‘

A DNF can be converted into full DNF as follows


E1 = X Z’ + X’ Y Z’ + X Y’ Z, then full DNF of E1 is
E1 = X Z’(Y+Y’) + X’ Y Z’ + X Y’ Z
= X Z’Y + XZ’Y’ + X’ Y Z’ + X Y’ Z
Bina Nusantara University 26
Consensus
Definition
Let P1 and P2 are fundamental product. If at least one
variable which has complement on P1 and P2, then
consensus (Q) from P1 and P2 is multiplication of each
variables in P1 and P2 without complement variable.

Example
1.Let P1 = xy’zp and P2 = xyt, then consensus of P1
and P2 is Q = xzpt
2.Let P1 = xy’z and P2 = x’yzp, then P1 and P2 don’t
have consensus because P1 and P2 have two
complement variable, they are x and y
27
Theorem of F
undamental Product
Theorem
If fundamental product P2 including fundamental
product P1, then
P1+P2=P1

Example
xz   xyz   xz 

Bina Nusantara University 28


Karnaugh Map
A Karnaugh Map is a grid-like representation of a truth
table. It is really just another way of presenting a truth
table, but the mode of presentation gives more insight. A
Karnaugh map has zero and one entries at different
positions. Each position in a grid corresponds to a truth
table entry.

Given a Boolean function described by a truth table or


logic function, then:
• Draw the Karnaugh Mapfor the function.
• Use the information from a Karnaugh Map to
determine the smallest sum-of-products function.
29
Karnaugh Map Two Variables

Let (x,y,) be a sum of product Boolean expression such that


minterm consists of three variables x,y. To define the K-map for
(x,y) , we consider the following examples.

Example:
The left picture is the K-map corresponding to the
(x,y) = xy + x’y + x’y’
The left picture is the K-map corresponding to the
(x,y) = x’y + xy’

Bina Nusantara University 30


Karnaugh Map

Let (x,y,z,w) be a sum


of product Boolean
expression such that
minterm consists of
three variables x,y,z,w.
To define the K-map
for (x,y,z,w), we
consider the following
table

Bina Nusantara University 31


Literal Karnaugh Map

1. Pairs

or

Bina Nusantara University 32


Literal Karnaugh Map

2. Horizontal Quads

Karnaugh map above same as following Karnaugh Map

Bina Nusantara University 33


Literal Karnaugh Map

3. Vertical Quads

Karnaugh map above same as following Karnaugh Map

Bina Nusantara University 34


Literal Karnaugh Map

4. Octets (1/2)

Karnaugh map above same as following Karnaugh Map

Bina Nusantara University 35


Literal Karnaugh Map

4. Octets (2/2)
Karnaugh map in slide before same as following Karnaugh Map

Bina Nusantara University 36


Literal Karnaugh Map

5. Overlapping

isolated

Avoid isolated “1”, because it can make logic expression


cannot be simplified
37
Literal Karnaugh Map

6. Redundant

redudant

Redundant should be erase to get simple boolean


expression

Bina Nusantara University 38


Thank You

You might also like