You are on page 1of 5

Log ic&P=fs

fundamental of
logic is in
many aspects
CS :

circuits, database queries


, prog
.

long .

,
ai , _ . .

proposition 1 building blocks of false


urn

atomic prop -
logic) : a statement that is true or -

exmp : Windsor is
capital of Canada ✓
1+0=1 ✓
0+0 = I ✓
sit down ! ✗

what time is it? ✗

Ntl = 6 ✗

true ( T), Taketa


usually represent propositions by )
We variables ( p, g , ri .
_ .

tnthtobe : breadckdan of a
proposition

÷
by listing all possible values .

truth table of proposition P :

confound preposition obtained by connecting atomic


: prop using
.

lggica-operal-o.rs .


negation T


conjuration a


disjunction ✓

implication →

• bi conditional

negation of p is denoted by T
p
-
p : the earth is round

|-,& -
p : It is not true that

→ earth is
theerth#mnd
not round


conjunction land) :
pay is true when both p and y are true

:I ÷::÷÷:* q : you have snacks \

P ᵗ"↳
here snacks

" "" " " "" " "



" " "
" "

are true .

*
" • more # none
it is
q raining
:

at home it is
pvg you
: are or

raining

pvq :
you here drink or snacks

• exclusive -
or (✗on ) :
p ⊕ of is true when one of p and or

is true but not both .

Ptg :
you hone drink or snacks ,

but not both -


?⃝
" "

( conditional statement ) if p is true then


Implication :
p →
of g is true
↓ ↓
hypothesis conclusion
• :/ am athene
it is
q :
raining
p→q : -
If I am at hare than it is raining -

÷::÷÷÷i
"

equivalent to

" "
p →
q pros
>

>
pug : I am not home it is
or
raining
th 2 statements are equivalent
• bi conditional pq p is true if and only if y is tree

( p →q a q→p)

P9 I :
am hone it and only if it is raining .
exmp
: draw a truth table for the
following proposition
lpvq ) →
71
Note : need a row } every possible combination of atomic prop .

ʰ%%F"""
"

-¥¥:x¥É¥É¥I
:¥¥=¥=
Two propositions are equivalent if their truth rakes are the same

in each row .

If we have n variables we need 2h rows in truth table .

pqr.fm#bees
2 ✗ 2 ✗ 2✗ 2 = 2M
Precedence of operators
priority

or

higher 7

priority
^
LP v91 →
4
( tr) I
^ s
)
3 2
,

if )

you want p v1 g. → Hr) as
↳ 4 2 2 3

exc : draw truth table for 1Pa > g) → Ip ✓ F)

exc : use truth table to show


-
if lpv g) → ar is equivalent to
17pA > g) V7 r
convert English statements into propositional logic
-

identify atomic proposition


-
determine appropriate connectors

exmp : If I go to school or to Tim Hortons ,


then I will not go shopping
.

p : I go to school
2 to Tim Hortons → Tr
q :
go Ipv g)
r : I go
shopping

You might also like