You are on page 1of 4

(Note: Examples were taken from the book “ Discrete Mathematics with Applications”

by Kenneth Rosen and Discrete Mathematics: A Mathematical Reasoning by Susanna


Epp)
Review:
Simple sentences which are true or false are basic propositions. Larger and more complex
sentences are constructed from basic propositions by combining them with connectives.
Thus propositions and connectives are the basic elements of propositional logic. Though
there are many connectives, we are going to use the following six basic connectives here:

Definitions: Let p and q be propositions:


Symbol Read as Truth Value of the proposition
p “not  p”  or  “  it  is  not  the  case   the truth value is opposite the statement
p that  p”
p q “p  and  q  “  or  “  the  conjunction   a proposition that is true when both p and q
of  p  and  q” are true and is false otherwise
p q “p  or  q”  or  disjunction  of  p  and   a proposition that is false when both p and q
q are both false and is true otherwise
p q “p  exclusive  or” a proposition that is true when exactly one of
p and q is true and is false otherwise
p q “if  p  then  q” a proposition that is false when p is true and

hypothesised “if  p,q” q is false and true otherwise

↓ “p  is  sufficient  for  q”


“q  if  p”
“q  when  p”
'

conclusion A  necessary  condition  for  p  is  q”


“  p  implies  q”
“p  only  if  q”
“a  sufficient  condition  for  q  is  p
“  q  whenever  p”
”q  is  necessary  for  p”
“  q  follows  from  p”
p q “p  if  and  only  if  q” a proposition that is true when p and q have
“p  is  necessary  and  sufficient   the same truth value and false otherwise
for  q”
“if  p  then  q,  and  conversely”
“p  iff  q.”

New conditional statements starting with a conditional statement p → q.


p = It is raining
Example consider the statement wet
“If it is raining, then the ground is wet.” q
= the ground is
.

What is the converse, contrapositive, and inverse of the conditional statement?


wet it is raining
CONVERSE : q → p. IF the ground is
,
then .

I
&

CONTRAPOSITIVE - ¬q → ¬p (Always have the same value with the conditional


statement )
it is not wet
If the raining is not
,
then ground .
* it is not raining ,
then the ground
INVERSE - ¬p → ¬q
is not wet .

Example:

What are the contrapositve, converse and inverse of the implication? _

In rpm
“The home team wins whenever it is raining”
" "" " " "" "
"" " ""
"

" "" "

[
"
"" " "
"

" " " "" ""


p→q it
conclusion then is raining
the home team wins ,
.

:
q :
If
Converse
then it
q→p did not win
team
,

the home

contrapositive If not raining


: .

is

p home team
g →
the
-
-

then
it is not raining ,
Inverse : If not win
did
.

p→ q
-

Truth Tables of Compound Propositions:

Precedence of Logical Operators


We can construct compound propositions using the negation operator and the logical operators
TABLE 8 defined so far. We will generally use parentheses to specify the order in which logical operators
Precedence of
Logical Operators. in a compound proposition are to be applied. For instance,
of
Operator Precedence operator is applied before all other logical operators. This means that
of
¬ 1

∧ 2 the disjunction operator, so that


∨ 3 this rule may be difficult to remember, we will continue to use parentheses so that the order of
→ 4
the disjunction and conjunction operators is clear.
↔ 5
have lower precedence than the conjunction and disjunction operators,

Ex. Construct the truth table of the compound proposition


(p ∨ ¬q) → (p ∧ q).

OR AND

p q ¬q (p ∨ ¬q) (p ∧ q). (p ∨ ¬q) → (p ∧ q)

T T F T → T T
T F T T → F F
F T F F → f- T
F F T T -3 F F
Example: Construct the truth table for the statement form (p ∨ q) ∧ ∼(p ∧ q). Note that
-

when or is used in its exclusive sense, the statement “p or q” means “p or q but not both”
s -

or “p or q and not both p and q,” which translates into symbols as (p ∨ q) ∧ ∼(p ∧ q).
This is sometimes abbreviated p ⊕ q or p XOR q.

Solution:
8 Prg (Pag)
Evan
p 7^9 -
( png)
t T T T F F
T F T F T T
F T T F T T
F F F F T F

Example: Construct a truth table for the statement form ( p ∧ q ) ∨ ∼r .

Solution:

P 8
r
pig ir (prq)v -

T T T T F T
T T F T T T
T F T F F F
T F F F T T
F T T F F F
F T F F T T
F F T F F F
F F F F T T

Logic and Bit Operations


Truth Value Bit

T 1
F 0

A bit is a symbol with two possible values, 0 (zero) and 1 (one) A bit can be used to
represent a truth value, because there are two truth values, namely, true and false. The
well-known statistician John Tukey introduced this terminology in 1946.

TABLE 9 Table for the Bit Operators OR,


AND, and XOR.
x y x∨y x∧y x⊕y

0 0 0 0 0
0 1 1 0 1
1 0 1 0 1
1 1 1 1 0
A bit string is a sequence of zero or more bits. The length of this string is the number of
bits in the string.

nine
Ex. 101010011 is a bit string of length __________.
• .
-
. _

Ex. Find the bitwise OR, bitwise AND, and bitwise XOR of the bit strings 0110110110
and 11 0001 1101. 0 1 01 10
I 0 1 I

Solution: 0 I 1 I 0 I
1 1 00
0 I 10 1 10
0 1 I

O 1 1 10 I
O O
I 1
↳ bitwise AND
¥7T
bitwise OR I I 1 01 10
0 1 0

::,:::i ✗ OR
↳ bitwise

Complete the membership table


p q ¬p p∧q p∨q pÄq p→q p↔q

1 I 0 1 I 0 I 1

I O O O I I 0 O
O I I 0 I 1 I 0

00 O O O
I I I

Construct the membership table of the compound proposition (p ∨¬q) → (p ∧ q).

p q ¬q p ∨¬q - p∧q (p ∨¬q) → (p ∧ q).

1 I 0 I → 1 1

10 I 1 → to 0
0 I 0 0 → 0 I
00 I 1 → 0 0

You might also like