0% found this document useful (0 votes)
9 views6 pages

SYDE 113 Lecture 4

Uploaded by

bobpatel1379
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views6 pages

SYDE 113 Lecture 4

Uploaded by

bobpatel1379
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

SYDE Lecture 4 Proofs 4

113
Logic
:

4.1 Mathematical Induction .

holds for each#


prove that the infinite set N

used to an assertion in

Example ① Example ②

Let Pcn) be the sum of the first n


positive integers .
Prove that sum of the first n odd integers is n
-

prove Pcn) :
j=§J=^% Un -7 Pen ) :¥E ,
(21--1-1) =
n
-
f n =\

BaseCase_ Hypothesis/P# Base case Hypothesis / Proof


n , , show Pcktl ) is true . n= I show Pcntl) holds

1 = n% PCKH) =
J¥j Ga ) -

1) = 12 (2k -
1) =
Cntll
'

I = \% PCKH) FÉ j 1) =
,
+ +
1=1 ¥¥( 2kt ) =
¥-16k 1)- +
(26+1) -

1)

1--1 pfktl) k(k (


= ) + KH
.
.

.
Base cage hold, EÉ ! (2k 1)
-
= n 't 2h t 1

- :
Base case holds Patti)=k(kt1)t,2C 7¥ ,
(2k 1)
- =
( na )
2

PCKH )=
k¥3kt2 Pln) pcnti )
• :

PCKH ) =
(k+D{k#
Pckxl ) = (kH)§kt
. :
PCK) P(let 1)

Fundamental of Arithmetic
:
1 the product of
Theorem Every positive integer n
primes unique
-

way
,
is in a
, .

4. 2 Propositional Logic :

Digital Logic For Natural


Language Computers ,
& circuits

Mathematical proposition (sentence) must be either True false



or


T :
True


F :
False

like denotes

Assertions seas are NOT propositions until we
say what


Example of function its Truth value function of
proposition
a as -
is a
x

" "
↳ sacs is a function from # s to truth values

Logical Negation
-

by
7
function denoted Returns opposite truth value

:
is the NOT . P TP

7
:{ T ,
F } →
{if } T F
F T
Ex . 77 PEP

AND P&g
^

:
logical function denoted by : Returns True if I
only if
both are true .

p q p^q AND 0 I

T T T
↳ CONJUNCTION n :{ T ,
F } ✗ {T ,
F } →
{IF } o o o
T F F

I 0 1
F T F
Multiplication

in modulo 2 .

F F F
(

OR logical function denoted


by V. Returns true if &
only if atleast of
Iq true PVE

p is
: one .

↳ DISJUNCTION V :
{5-5}×{5-5} →
{ IF } T T T

T F
T

T
F T

T T F

For AND & OR


,
order doesn't matter symmetrical Factions

Implies pis true then qistrve too)


• →
q
:
p

p q p→q
TT T
① Implies does NOT " "

TF F
mean
suggests
T
FT ② Implies does NOT mean
"
causes
"

FF T
③ statements with implies must ALWAYS have a truth valve

Essentially :
if the antecedent is true & the consequent is false then the statement is false
,

in ALL OTHER SITUATIONS


,
the statement is true .

Examptes
① (54--2 ^ 95--4) →
530=5
-
FALSE .
: statement false ( we don't even need to look at the consequent)

✗ OR exclusive
dengbeyd ④ 1-+09
:

Returns if & EXACTLY


only if
ONE
operation input O '
True ✗ OR

.
True is p q
T T F 0
↳ Addition in modulo 2 o 1
T
TF
1 I O
F T T

FF F

→ NOTE :
AND I ✗ OR are ISOMORPHIC to
using
modulo 2 arithmetic on the two classes ⇐
z={G3[o) } under

mod 2 multiplication I addition


ISOMORPHIC same thing disguise
:
in

TRUTH TABLES

}
PÉ£
F T T
T T Gp)vq =p →
E
T F F F F ÷. Gp)vq →
(p→q)
FT T T T
Gp)vqÉÉp→q
FF T T T

Example of
tautology something that always true for choice of values for
pdq

, is
any
Cp E) (q→p ) } function from {IF } {T }
'
NOTE :
- = → ^ same →
F
p q ,

→É→p→zq-p
T T T T T T

T F F F T F

F T F T F
F

FF T T T T

NANI
↳ NOT AND : 7 (Png) p q 7 (png )
↳ can be used to build any logical function (building block of boolean functions ) T T F
T F T
F T T
↳ You can build ORs ✗ OR 7 Ntn D Fl F l T
,
using
↳ Ex
. TP
=p NAND p É TP
T T F F

F T T
F

4.5 Inductive construction of well -


Formed Formulas

consider set V={p , 9, r S
, . . .
} as the set of propositional variables

the set of WFF of well -

formed formulas in propositional logic is the smallest set closed under operations

Note :
WFF is the set of all propositional formulas that can be built from propositional variables (piers . . .
T
,
F
. .
)
.
&

logical operations (7 ,
n v,
,

,
<→
)
syntax : WFF are
syntactic objects of symbols constructed by iterative application of the formal rites
strings

Example :
The expression
7
Cpvq)Ar is a WFF

Proof :
since p, q , r
E V
,
then : (pvq) is a WFF

n (pug) is a WFF

7
Cpvq)^r is a WFF
4. 6 Iteration of well Formed Formulas Via Recursion

Interpretation of WFF

is a
recursive
:
process
I :
WFF →
{IF }


Interpretation I :
V= {p.gr .
. . .
} →
{IF }

Éfcpvqjrr) G)

Example: Find given Icp )=T ,
I E) = F
,
I =
T

É C- ( pvq) nr ) = It, cpvg)) ^ Icr)


=
> (Icpvq)) n I G)
=
-
(Icp)v=ic&) n Icr)

(Icp) V IG)) lr)


=
- n I

=
→ (TV F) ^ T

= 7
(T) ^ T

=
FAT

=
F

semantics well formed


of tooth valve to syntactic object
:

process assigning a -

a .

4. 7 Predicate Logic

If ✗ EU , Atx) means ✗ c- A →
AGC) is a
predicate meaning x has

U the property of
being a member of the subset A .

A B


Given x EU if ✗ c- A then Abc) is true else AGT is false
, ,

→ If I -4A :
x € A = 7A Gc) = RE A-

summary

{
Acx) AGO KEA

see a
AGO is true →
AH ←→x¢p
A
✗ has
property -

AGO ⇐ ✗ c- A- = UIA

:
formulas elements & make
First order logic
-

Allows us to work with where we can


quantify over of a universe

assumptions about functions properties (predicates) & relations on them


,
Example : Tx , 3g ( PGC) n >
Qcy))

}
Given: U =
At
" "
PGD for all there exists such that even & multiple of 3
even
y is not a
✗ is x xis
a
,
y
① (g) is a multipleof 3 whish is FALSE since ✗ =3 is not even

P = all evens

Q all multiples of 3
-
-

{ Gay) y} L
Example Lac , ← C- U ✗ 0
Given
g)
: : x
=
,

Find ltx Fy 7L ( x y) ,

= Vx 3- 7 (x Eg )
y
=
x
3g Cx >
g)
T
=

4- 8 Proof
By Contradiction

contradiction is absurd impossible statement
any or


that proposition & its must hold
both a
negation
Ex .
assertion

Theorem
infinitely many
:
there
prime # s
are
.

Proof [ contradiction )
by
suppose NOT then :
Primes =
{P ,
,
Pz , Pz . . .
PN )
,
/ Primes / =
N
,
CN is finde)
,

Consider M= (P ,
a Pz ✗
Ps .
. . .
✗ PN ) +1 .
Obviously ,
M >
Pj ,
It Pj E Primes

}
And also -

.
M = I Cmod P, )
M= 1 ( mod Pz ) M NOT divisible by any Mis !
Mears is
prime → .
:
prime
:

pn.me#M--1CmodPn
This is a contradiction since the assumption that
) infinite finite is is 1 Primes 1 is
wrong
are .
4.9 Different Infinities :
Countable & Uncountable

set of
countably infinite correspondence

primes
is since we can putit in 1 -
to -
1 with N

infinite than infinite sets let INI / Rt )


strictly larger

countably
a
some sets are .

↳ we call these infinite sets uncountable or


uncountable infinite


Schroeder Borstein Theorem : For set A &B
any
-

1131£ / Al 11-1--1131
1A I a- IBI and if and
only if

4.10 Disjunctive Normal Form of a


logical Function

{IF}
"

we can write any logical function of n
propositional variables B :
{IF } →
in a
simple way

For example ,
consider this function of 3 forth valves

B Cr p g)

/
r p q , ,

T T T F

T T F T

T F T F

T F F F

e , , ,

F T F F

F F T T

F F F T

B Cr g) only true if :

p , ,

① r= T , P =
-1 , q=F → ( rn p n -

g)
② r=F F- F T

( -

rn -

png )
,
g
=
,

③ r=F F- F F →
C- rn pl g)
q
- -
-

, ,

☐ 3 Bcr p , , g) (rnp 1- g) ✓ C- rn pn g) vfrn p n


= -
- -

g)

This is called the disjunctive normal form (DNF) of the logical function B

literals (variables

DNF : OR of Amps of or their
negation)
B (OR) of liberals
→ DNF of written as disjunction conjunctions LANDS ) of

"

we can do this for
any logical function B :
{IF} →
{IF }

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy