You are on page 1of 24

LOGIC

&
SET THEORY
AMIN WITNO
..
www. wi t n o . c o m
Logic & Set Theory
Revision Notes and Problems
Amin Witno <www.witno.com>
Pre!ce
These notes are for students of Math 25 as a revision wor!boo! and are not meant to
substitute the in"class notes. No student is e#$ected to reall% benefit from these notes
unless the% have re&ularl% attended the lectures.
'ha$ter ( Pre"imin!rie#
The Real Numbers and )ts *ubsets+ )nterval Notations+ Absolute ,alues+ Modulo
-$erations+ *e.uences+ *i&ma Notations
'ha$ter Logic
Pro$ositions+ /o&ic -$erators+ Truth Tables+ 0.uivalence+ 'ontra$ositive+ Predicates
and 1uantifiers
'ha$ter 2 Proo#
Provin& 'onditional *tatements+ Proof b% 'ontra$ositive+ Provin& 0.uivalence
*tatements+ Proof b% 'ases+ Proof b% 'ontradiction+ Provin& 0#istence+ Provin&
2ni.ueness+ Provin& Not"All *tatements+ The Princi$les of Mathematical )nduction
'ha$ter 3 Set#
*et -$erations+ ,enn 4ia&rams+ *et )dentities+ *ubsets+ Power *et+ 'ardinalit%+ 'ross
Product+ 5enerali6ed 2nions and )ntersections
'ha$ter 7 Re"!tion#
Relations on a *et+ )nverse and 'om$ositions+ 4i&ra$hs+ 0.uivalence Relations and
0.uivalence 'lasses+ Partial -rder Relations+ 8asse 4ia&rams+ Total -rderin&+ Well
-rderin&+ The Well -rderin& Princi$le+ 9ero"-ne Matrices+ Transitive 'losures
'ha$ter 5 $%nction#
-ne"to"one :unctions+ -nto :unctions+ )nverse and 'om$ositions+ ;i<ections
'ha$ter = C!r&in!"ity
'ountable *ets+ 'antor"*chroeder";ernstein Theorem+ 2ncountable *ets
Reerence#
. *mith+ 0&&en+ and *t. Andre+ A Transition to Advanced Mathematics+ >
th
edition
2(+ ;roo!s 'ole.
2. 4. *olow+ 8ow to Read and 4o Proofs? An )ntroduction to Mathematical Thou&ht
Processes+ 5
th
edition 2((@+ Wile%.
3. Michael /. -A/ear%+ The *tructure of Proof with /o&ic and *et Theor%+ 2((2+
Prentice 8all.
7. A. Witno+ 4iscrete *tructures in :ive 'ha$ters+ 2((+ 'reate*$ace.
Co'yright#
'o$%ri&hted under a 'reative 'ommons /icense.
B 2((=C2(( Amin Witno /ast 0dited? @C2C2((

'ha$ter (
Pre"imin!rie#
)n mathematics ver% often we stud% sets whose elements are the real numbers. *ome
s$ecial number sets which are fre.uentl% encountered are defined as follow.
The set of natural numbers contains the elements + 2+ 3+ ...
The set of inte&ers contains all the natural numbers to&ether with their
ne&atives and 6ero? ... + C3+ C2+ C+ (+ + 2+ 3+ ...
The set of rational numbers consists of numbers of the form a/b where a and
b are inte&ers with b D (+ for e#am$les E2+ 5 F 5E+ C22E>+ (E@+ etc. 8ence all
inte&ers are rational numbers+ but some rational numbers are not inte&ers.
The set of all real numbers is denoted b% .
The set of irrational numbers consists of all real numbers which are not
rational+ such as G2+ H+ etc.
The set of even numbers contains the elements (+ I2+ I7+ I=+ ... which are
those of the form 2n for some inte&er n.
The set of odd numbers is the set of inte&ers which are not even. 8ence odd
numbers are I+ I3+ I5+ ... which can be written as 2n J for some inte&er n.
(. Prove that the number G2 is not rational.
A set of real numbers x in the ran&e a < x < b can also be written usin& the inter(!"
not!tion Ka, bL. The round brac!et at either end can be re$laced b% a s.uare brac!et to
indicate inclusion. :or e#am$le Ka, bM means the set a < x b. Moreover we use the
infinit% s%mbol to indicate unboundedness+ such as Na+ OL for the set x a.
(.2 Write the interval notation for each set.
aL a x < b
bL a x b
cL x < b
dL x b
:or real numbers x we define the !)#o"%te (!"%e of x to be |x| = x if x ( and |x| = x
if x < (. :or e#am$le PC2P F 2+ PG2P F G2+ and P(P F (. A useful fact is that GKx
2
L F |x|.
(.3 :ind all real number solutions of these e.uations.
aL PxP F 3
bL Px J P F 3
cL Px J P > 3
dL P2x J P > 3
:or real numbers x, the gre!te#t integer %nction NxM &ives the &reatest inte&er not
&reater than x. :or e#am$le N3.7M F 3.
(.7 0valuate NxM for these values of x.
aL 5
bL .@@@
2
cL 237E5
dL C2.3
eL G(
:or two inte&ers m and n > ( define the mo&%"o o'er!tion m mod n = m C Nm/nM n.
:or e#am$le 2>E5 F 73.7 hence 2> mod 5 F 2> C K73 Q 5L F 2. 0.uivalentl% 2> F
K73L Q 5 J K2L hence 2> mod 5 F 2+ which is the remainder when 2> is divided b% 5.
(.5 0valuate the followin&.
aL 23 mod 3
bL 2((( mod >
cL 25 mod 5
dL 25 mod
eL mod 25
Note that m mod n is the remainder when m is divided b% n. )n $articular m mod n F (
when m is a m%"ti'"e of n, or we sa% that n &i(i&e# m. :or e#am$le 2 mod 3 F (
because 2 F 3 Q 7+ so we sa% 3 divides 2. Also m mod 2 F ( whenever m is an even
number+ so all even numbers are multi$les of 2.
A #e*%ence is a function f KnL defined over the natural numbers+ hence it can be
ordered as f KL+ f K2L+ f K3L+ ...
0#am$les? L f KnL F n
2
is the se.uence + 7+ @+ =+ 25+ 3=+ 7@+ ...
2L f KnL F 2n C is the se.uence + 3+ 5+ >+ @+ + 3+ ...
(.= Write out the followin& se.uences.
aL f KnL F 2n J
bL nKn J L
cL n mod 5
dL NnE2M
(.> :ind a formula f KnL for each se.uence.
aL + 2+ 7+ R+ =+ 32+ =7+ ...
bL 3+ =+ @+ 2+ 5+ R+ 2+ ...
cL >+ + 5+ @+ 23+ 2>+ 3+ ...
dL + 2+ 3+ + 2+ 3+ + 2+ 3+ ...
*ummations over some or all terms in a se.uence can be re$resented usin& #igm!
not!tion. :or e#am$le

n=
5
n
2
=7@=25 .
(.R Write the followin& summations usin& si&ma notations.
aL = J 32 J =7 J 2R
bL 2 J 7 J = J R J ( J ...
cL 3 J = J @ J 2 J ... J 3((
dL J 3 J 5 J > J @ J ...
3
'ha$ter
Logic
A 'ro'o#ition is a statement which has a truth value either true or false. :or
e#am$les+ S2 is evenT+ S2 J 2 F 7T+ S2 J 2 F 5T.
The neg!tion of a $ro$osition p is also called not p, and is denoted b% Up.
0#am$le? L )f p? S2 is evenT then Up? S2 is not evenT.
2L )f p? S2 J 2 F 5T then Up? S2 J 2 D 5T.
)f p and q are two $ro$ositions then their con+%nction is the $ro$osition whose value
is true onl% when both are true. A con<unction can also be written p q which is read
p !n& q.
. /et p? S2 is evenT and q? S2 J 2 F 5T. *tate these $ro$ositions and find their value.
aL p q
bL p Uq
cL Up q
dL Up Uq
*imilarl% the &i#+%nction of p and q has value false onl% when both are false. )t is
denoted b% p q and read p or q.
.2 Re$eat Problem . with re$laced b% .
The im'"ic!tion of p and q has value false onl% when p is true and q is false. )t is
denoted b% p V q and read i p then q. A statement in the form p V q is also called a
con&ition!" #t!tement, in which p is a #%icient condition for q and q is a nece##!ry
condition for p.
.3 Re$eat Problem . with re$laced b% V.
The e*%i(!"ence #t!tement p W q is true onl% when p and q have the same value. )t
is read p i !n& on"y i q and is also called a )icon&ition!" #t!tement+ in which p is a
necessar% and sufficient condition for q, and vice versa.
.7 Re$eat Problem . with re$laced b% W.
.5 /et p? SToda% is coldT+ q? SToda% is hotT+ and r? SToda% is wind%T. Write the
followin& $ro$ositions usin& p, q, r.
aL Toda% is hot if and onl% if not wind%.
bL 0ither toda% is cold or not cold.
cL )f toda% is not wind% then it is not hot.
dL Toda% is neither cold nor wind%.
eL )f toda% is wind% then either it is hot or cold.
7
/o&ic o$erators can be $resented in their tr%th t!)"e#?
p q p q p q p - q p . q
T T T T T T
T $ $ T $ $
$ T $ T T $
$ $ $ $ T T
.= 4raw the truth table for each of the followin& $ro$ositions.
aL Up Uq
bL UKp qL V p
cL Kp UqL W KUp qL
dL Kp V qL V r
eL NKp qL V rM W NUp Kq W UrLM
Two $ro$ositions are e*%i(!"ent if their truth tables are identical. We write p q
when the two are e.uivalent. :or e#am$le we can show that Up Uq UKp qL.
.> Prove the followin& e.uivalences b% drawin& the truth tables.
aL Up Uq UKp qL
bL p V q p q
cL p W q Kp V qL Kq V pL
dL p V Kq V rL q V Kp V rL
The contr!'o#iti(e of p V q is the $ro$osition Uq V Up. )t can be shown that these
two are e.uivalent? p V q Uq V Up.
.R Write an e.uivalent statement usin& contra$ositive.
aL )f ) stud% hard then ) &et &ood mar!.
bL )f it rains then it is not hot.
cL )f toda% is not *unda% then tomorrow is not Monda%.
dL )f ) am not la6% then ) come to the lecture.
The con(er#e of p V q is the $ro$osition q V p.
.@ Write the converse of the $ro$ositions in Problem .R. )s p V q q V pX
Theorem? The followin& is a list of some common lo&ical e.uivalence rules?
L p q q p
p q q p
2L p Kq rL Kp qL r
p Kq rL Kp qL r
3L p Kq rL Kp qL Kp rL
p Kq rL Kp qL Kp rL
7L UKUpL p
(p q) p q
UKp qL Up Uq
5L p V q p q
p W q Kp V qL Kq V pL
5
.( Prove b% a$$l%in& the above rules.
aL Kp V qL p q
bL p V q q V p
cL p V Kq V rL q V Kp V rL
dL p V Kq rL Kp V qL Kp V rL
eL Kp

qL V r Kp V rL Kq V rL
. True or :alse. Prove b% an% method %ou li!e.
aL p V Kq V rL Kp V qL V r
bL p V Kq rL Kp V qL Kp V rL
cL p Kq V rL Kp qL V Kp rL
dL p Kq V rL Kp qL V Kp rL
A 're&ic!te is a $ro$ositional function such as PKxL? x J 2 F 5. The statement Sx J 2 F
5T b% itself is not a $ro$osition because it does not have a truth value. ;ut for each
value of x, PKxL becomes a $ro$osition+ for instance+ PK3L? 3 J 2 F 5 is true and PK2L?
2 J 2 F 5 is false.
.2 /et PKxL? x
2
< x.
aL What is the value of PKLX
bL What is the value of PK2LX
cL :or which x is the value of PKxL trueX
.3 /et PKx,yL? x
2
J y
2
F Kx J yL
2
. :ind the values of the followin& $ro$ositions.
aL PK(+L
bL PK(+(L
cL PK+L
dL :or which Kx,yL is the value of PKx,yL trueX
A $redicate can also be made a $ro$osition b% addin& a *%!ntiier. There are three
.uantifiers?
L ? for all E for an% E for each E for ever%
2L ? for some E there is E there e#ists E there is at least one
3L Y ? there is a uni.ue E there is e#actl% one E there e#ists onl% one
0#am$le? /et PKxL? x J 2 F 5 .
L x PKxL? Sfor all real numbers x, x J 2 F 5T+ which is false.
2L x PKxL? Sthere is a real number x such that x J 2 F 5T+ which is true.
3L Y x PKxL? Sthere is a uni.ue real number x such that x J 2 F 5T+ which
is true.
.7 /et PKxL? x < 2x.
aL What is the value of x PKxLX
bL What is the value of x PKxLX
cL What is the value of Y x PKxLX
=
.5 /et PKx, yL? x
2
J y
2
F Kx J yL
2
. :ind the values of the followin& $ro$ositions.
aL x y PKx, yL
bL x y PKx, yL
cL x y PKx, yL
dL y x PKx, yL
eL y x PKx, yL
.= Re$eat Problem .5+ em$lo%in& Y instead of .
.> Re$eat Problem .5 usin& the followin& $redicates.
aL PKx, yL? x
2
J y
2
> (
bL PKx, yL? x
2
J y
2
Z
cL PKx, yL? x
2
C y
2
Z (
dL PKx, yL? x
2
C y > (
We observe+ at least intuitivel%+ that the ne&ations of and are correlated in the
followin& manner.
Ux PKxL y PKxL
Ux PKxL y PKxL
0#am$le? /et PKxL? x J 2 F 5 .
L x PKxL? Sthere is a real number x such that x J 2 F 5T.
Ux PKxL? Sthere is no real number x such that x J 2 F 5T which is
e.uivalent to y PKxL? Sfor all real numbers x, x J 2 D 5T.
2L x PKxL? Sfor all real numbers x, x J 2 F 5T.
Ux PKxL? Snot all real numbers x satisfies x J 2 F 5T which is
e.uivalent to y PKxL? Sthere is a real number x such that x J 2 D 5T.
.R Write the ne&ations b% interchan&in& and .
aL There is a real number x such that x
2
< (.
bL 0ver% inte&er is even.
cL All trian&les have an&le sum e.ual R( de&rees.
dL There is an inte&er x such that x
2
J 2x J 3 F (.
.@ What is the ne&ation of Y x PKxLX 2se %our answer to write the ne&ation of the
statement SThere is a uni.ue real number x such that Ax
2
J Bx J C F (T.
>
'ha$ter 2
Proo#
Pro(ing Con&ition!" St!tement#?
To $rove a $ro$osition in the form p V q, we be&in b% assumin& that p is
true and then show that q must be true.
0#am$le? Prove that if x is an odd inte&er then x
2
is also odd.
*olution? /et p? x is odd+ and q? x
2
is odd. We want to $rove p V q.
*tart? p? x is odd
V x F 2n J for some inte&er n
V x
2
F K2n J L
2
V x
2
F 7n
2
J 7n J
V x
2
F 2K2n
2
J 2nL J
V x
2
F 2m J + where m F K2n
2
J 2nL is an inte&er
V x
2
is odd
V q
2. Prove the followin& $ro$ositions.
aL )f x is an even number then x
3
is also even.
bL )f x is odd then x
2
C 3x is even.
cL )f x and y are odd then x J y is even.
dL )f x and y are even then 7 divides xy.
eL )f x is odd then x
2
C is a multi$le of R.
Proo )y Contr!'o#iti(e?
To $rove a $ro$osition in the form p V q we ma% instead $rove its
contra$ositive? q V p. This wor!s because p V q q V p.
0#am$le? Prove that if x
2
is odd then x must be odd.
*olution? /et p? x
2
is odd+ and q? x is odd. We $rove p V q b% $rovin& q V p.
*tart? q? x is even
V x F 2n for some inte&er n
V x
2
F K2nL
2
V x
2
F 7n
2
V x
2
F 2K2n
2
L
V x
2
F 2m, where m F 2n
2
is an inte&er
V x
2
is even
V p
2.2 Prove the followin& $ro$ositions.
aL )f x
2
is even then x must be even.
bL )f x
3
is even then x must be even.
R
cL )f x
2
C 2x is even then x is even.
dL )f x
3
C 7x J 2 is odd then x is odd.
Pro(ing E*%i(!"ent St!tement#?
To $rove a $ro$osition in the form p W q we must $rove both p V q and
its converse q V p. This is so because p W q Kp V qL Kq V pL.
0#am$le? Prove that x is odd if and onl% if x
2
is odd.
*olution? /et p? x is odd+ and q? x
2
is odd. We must $rove p V q as well as q V p.
;oth of these have been shown in the $revious two e#am$les.
2.3 Prove the followin& $ro$ositions.
aL x is even if and onl% if x
2
is even.
bL x
3
is even if and onl% if x

is even.
cL xy is odd if and onl% if both x and y are odd.
dL x
3
J x
2
J x J is even if and onl% if x is odd.
2.7 Prove that a mod n F b mod n if and onl% if n divides Ka bL.
Proo )y C!#e#?
To $rove a $ro$osition in the form p V q where p a

b we ma% instead
$rove both a V q and b V q.
2.5 Prove the e.uivalence Ka

bL V q Ka V qL Kb V qL.
0#am$le? Prove that if x is an inte&er then x
2
J x is even.
*olution? /et p: x is inte&er+ and q? x
2
J x is even. We must $rove p V q.
/et a? x is even+ and b? x is odd. Then p a

b because an% inte&er is
either even or odd. We will now $rove the two cases a V q and b V q...
2.= Prove the followin& $ro$ositions.
aL )f x

is an inte&er then x
2
C x is even.
bL )f x or y is even then xy is even.
cL )f x

is an inte&er then x
2
J 2 is not a multi$le of 7.
dL )f # is a real number then CPxP [ x [ PxP.
Proof b% cases can be &enerali6ed to three Kor moreL ste$s. *u$$ose we want to $rove
p V q where p a

b c. Then we must $rove the three cases a V q and b V q
and c V q.
2.> Prove that if x

is an inte&er then x
3
C x is a multi$le of 3. 2se the fact that ever%
inte&er comes in the form 3n J k+ where k F ( or or 2.
2.R Prove that if x

and y are real numbers then |x y| = |x| |y| b% considerin& the cases
where x, y < ( and x, y Z ( se$aratel%.
@
Proo )y Contr!&iction?
To $rove that a $ro$osition p is true we ma% assume that p is true and
then show that it would lead to a contradiction or a false statement.
0#am$le? Prove that G2 is irrational.
*olution? /et p? G2 is irrational. Now assumep is true+ that is+ G2 is rational. Then
G2 F a/b which has been reduced+ that is for some inte&ers a and b with no
common factors. 8ence a
2
F 2b
2
which means that a
2
is even and so is a,
sa% a F 2c with inte&er c. *ubstitutin& %ields 7c
2
F 2b
2
or 2c
2
F b
2
hence
b is also even. This means that a and b have a common factor 2 which is a
contradiction+ and so p must be false and p is true.
2.@ Prove the followin& $ro$ositions.
aL The number
3
2 is irrational.
bL The number G2 J G2 is irrational.
cL The number 3 J G2 is irrational.
dL There is no lar&est natural number.
Pro(ing E/i#tence St!tement#?
To $rove a $ro$osition in the form x PKxL+ it suffices+ when $ossible+ to
find one value of x for which PKxL is true.
0#am$le? Prove that there e#ists an irrational number.
*olution? /et PKxL? x is irrational. We will $rove x PKxL b% showin& that PKG2L is
true. This was done is Problem ..
2.( Prove the followin& $ro$ositions.
aL There is a $ositive inte&er n such that n
2
C 2n R F (.
bL There is a real number x such that x
2
C x F 5.
cL There is an inte&er n such that Gn is also an inte&er.
dL There are two real numbers x and y such that x
2
J y
2
F Kx J yL
2
.
eL There is an inte&er n such that n mod 5 F 2 and n mod = F 7.
2. Prove that there are irrational numbers a and b such that a
b
is rational.
Pro(ing 0ni*%ene##?
To $rove a $ro$osition in the form Y x PKxL we first $rove x PKxL and
then $rove the $ro$osition PKx

L PKx
2
L V x

F x
2
.
0#am$le? Prove that there is a uni.ue inte&er x such that 2x J @ F 3.
*olution? /et PKxL? 2x J @ F 3. :irst PKC3L is true K'hec!YL so we $roved x PKxL.
Ne#t su$$ose PKx

L and PKx
2
L are both true. Then 2x

J @ F 3 F 2x
2
J @ V
2x

J @ F 2x
2
J @ V 2x

F 2x
2
V x

F x
2
. 8ence we $roved Y x PKxL.
2.2 Prove the followin& $ro$ositions.
aL There is a uni.ue real number x such that a J x F a for an% number a.
bL There is a uni.ue real number x such that ax F a for all real numbers a.
(
cL /et a be an% inte&er. There is a uni.ue inte&er x such that a J x F (.
dL /et a be an% non"6ero rational number. There is a uni.ue rational
number x such that ax F .
Pro(ing Not1A"" St!tement#?
To $rove the $ro$osition x PKxL it suffices+ when $ossible+ to show that
x PKxL is true. At least intuitivel%+ we ma% see that x PKxL is the
ne&ation of the $ro$osition x PKxL.
2.3 Prove the followin& $ro$ositions.
aL Not all real numbers satisf% x x
2
[ (.
bL Not all real numbers have Kx J yL
2
F x
2
J y
2
.
cL Not for all real numbers+ we have |x J y| = |x| |y|.
dL Not for all natural numbers+ 2
n
> nY
eL Not for all natural numbers+ 3
n
> nY
2.7 Prove that the followin& $ro$osition is false b% showin& that its ne&ation is true?
There is a uni.ue real number x such that 2x
2
C 3x F 2.
Proo )y M!them!tic!" In&%ction?
To $rove a $ro$osition in the form n PKnL where n is a natural number+
it suffices to $rove PKL and PKnL V PKnJL.
0#am$le? Prove the followin& formula for all natural numbers n.
J 3 J 5 J > J @ J ... J K2n C L F n
2
*olution? /et PKnL? J 3 J 5 J > J @ J ... J K2n C L F n
2
We shall $rove n PKnL in two ste$s?
L PKL? F
2
so this $ro$osition is true.
2L PKnL? J 3 J 5 J > J @ J ... J K2n C L F n
2
V J 3 J 5 J > J @ J ... J K2n C L J K2n J L F n
2
J K2n J L
V J 3 J 5 J > J @ J ... J K2n C L J K2n J L F Kn J L
2
V PKnJL
2.5 Prove the followin& formulas for all natural numbers n.
aL J 2 J 3 J 7 J 5 J ... J n F \ n Kn J L
bL 2 J 7 J = J R J ( J ... J 2n F n
2
J n
cL J 2 J 7 J R J = J ... J 2
n
C
F 2
n
C
dL J 3 J @ J 2> J R J ... J 3
n
C
F \ K3
n
C L
eL J 7 J @ J = J 25 J ... J n
2
F nKn J LK2n J L E =
2.= Prove b% induction for all natural numbers n.
aL K2
2n
C L mod 3 F (
bL > divides K2
3n
C L
cL Kn
3
J 2nL mod 3 F (

dL Kn
5
C nL is a multi$le of 5.
eL > divides K2
nJ
J 3
2nC
L
The Princi'"e o M!them!tic!" In&%ction used in the last method of $roof can be
stated b% the $ro$osition PKL ]PKnL V PKnJL^ V n Z PKnL. -ther variations
of this $rinci$le can sometimes be a$$lied. The followin& are some of them.
L In&%ction with )!#e k?
PKkL ]PKnL V PKnJL^ V n Z k PKnL
2L C%m%"!ti(e In&%ction?
PKL ]PKL PK2L ... PKnL V PKnJL^ V n Z PKnL
3L 2o%)"e In&%ction?
m Z PKm+L ]PKm, nL V PKm, nJL^ V m Z n Z PKm, nL
2.> Prove b% induction for the &iven base.
aL n < 2
n
for all n Z
bL 2
n
< nY for all n Z 7
cL 3
n
< nY for all n Z >
dL 2
n
> n
2
for all n Z 5
eL nY < n
n
for all n Z 2
2
'ha$ter 3
Set#
A #et is a collection of ob<ects called the e"ement# of the set. The orderin& of the
elements is not im$ortant and re$etition of elements is i&nored+ for e#am$le ]+ 3+ +
2+ 2+ ^ F ]+ 2+ 3^. A set ma% also be em$t% and it is denoted b% _ or ] ^. )f x is an
element of the set A then we write x A, while the ne&ation is written x A.
*et notations can be ver% convenient. :or e#am$les we ma% redefine the number sets
&iven in 'ha$ter ( as follow. 8ere the notation A F ]x P PKxL^ means that the set A
consists of the elements x for which PKxL is true.
F ](+ I+ I2+ I3+ ...^
F ]x P x > (^
F ]2n P n ^
F ]x P x ^
F ]a/b P a b ^
F ]x P x ^
:or an% two sets A and B, define the followin& set o$erations.
L The %nion A B F ]x P x A x B^
2L The inter#ection A ` B F ]x P x A x B^
3L The &ierence A C B F ]x P x A # B^
7L The #ymmetric &ierence A B F ]x P x A W x B^
:or e#am$les if A F ]+ 2+ 3+ 7+ 5^ and B F ](+ 2+ 7+ =^ then A B F ](+ + 2+ 3+ 7+ 5+
=^+ A ` B F ]2+ 7^+ A C B F ]+ 3+ 5^+ B C A F ](+ =^+ and A B F ](+ + 3+ 5+ =^. Also
we can see that F + F + ` F _+ C F + etc.
3. /et A F ]+ 2+ 3+ 7+ 5^+ B F ](+ 2+ 7+ =^ and C F ]+ 3+ 5^. :ind the followin& sets.
aL KA CL KA ` CL
bL A KB CL
cL KA BL C KA CL
dL KA C BL KA C CL
These set o$erations can be illustrated usin& 3enn &i!gr!m#+
or truth tables+ in which the value is true if x is an element of the set and false if not.
A B A 4 B A B A 5 B A B
T T T T $ $
T $ $ T T T
$ T $ T $ T
$ $ $ $ $ $
3
3.2 True or :alseX 2se ,enn dia&rams or truth tables to verif%.
aL KA BL KA ` BL F A B
bL KA BL KB AL F A B
cL KA BL B F A
dL KA BL B F A
eL A A F A A
4efine the com'"ement of a set A to be A F ]x P x A^. :or e#am$le F .
Theorem? The followin& set identities are the analo& of lo&ical e.uivalences.
L A B F B A
A ` B F B ` A
2L A KB CL F KA BL C
A ` KB ` CL F KA ` BL ` C
3L A KB ` CL F KA BL ` KA CL
A ` KB CL F KA ` BL KA ` CL
7L KAL F A
KA BL F A ` B
KA ` BL F A B
5L A B F A ` B
A B F KA BL KB AL
Two sets are &i#+oint if their intersection is em$t%? A ` B F _. :or e#am$le and
are dis<oint+ and so are and .
3.3 Prove that if A and B are dis<oint then A C B F A and A B F A B.
A set ! is a #%)#et of a set A if x ! V x A. This relation can be written ! A or
sometimes A !. :or e#am$le ]+ 3^ ]+ 2+ 3+ 7^+ + + etc.
3.7 Prove the followin& statements.
aL _ A
bL A A
cL A ` B A
dL A A B
eL A B B C V A C
3.5 Prove that if A B then
aL A B F B
bL A ` B F A
cL A C B F _
dL A B F B A
Theorem? A F B W A B B A
3.= 2se the above theorem to $rove the followin& identities.
aL KA BL = A ` B
bL A B = A ` B
7
The 'ower #et of a set A is defined b% PKAL F ]! P ! A^. 8ence PKAL is the set
consistin& of all the subsets of A.
0#am$le? :ind PKAL for A F ]+ 2^.
*olution? A has a total of four subsets namel% ]^+ ]2^+ _+ and A itself.
8ence PKAL F ]_+ ]^+ ]2^+ A^.
3.> :ind PKAL for each set A.
aL A F ]+ 2+ 3^
bL AF ]+ 2+ 3+ 7^
cL A F _
dL A F PK_L
eL A F PKPK_LL
3.R Prove the followin& statements.
aL PKA ` BL F PKAL ` PKBL
bL PKA BL PKAL PKBL
cL A B W PKAL PKBL
The c!r&in!"ity of a set A is the number of elements in A, denoted b% |A|. :or
e#am$le P]+ 3+ 5+ >^P F 7+ P_P F (+ and PP F O.
Theorem? )f |A| = n then PPKALP F 2
n
K0ver% set with n elements has 2
n
subsets.L
3.@ Prove the above theorem b% cumulative induction.
The cro## 'ro&%ct of A and B is the set A Q B F ]Ka, bL P a A b B^.
0#am$le? )f A F ]+ 2+ 3^ and B F ]x, y^ then
A Q B F ]K+ xL+ K+ yL+ K2+ xL+ K2+ yL+ K3+ xL+ K3+ yL^
B Q A F ]Kx, L+ Kx, 2L+ Kx, 3L+ Ky, L+ Ky, 2L+ Ky, 3L^
Theorem? )f |A| = m and |B| = n then |A"B| = mn.
3.( Prove the followin& statements.
aL A Q B F B Q A W A = B
bL A Q KB Q CL D KA Q BL Q C
cL A " KB ` CL F KA " BL ` KA " CL
dL A " KB CL F KA " BL KA " CL
/et ! be an% set of sets. The gener!"i6e& %nion and gener!"i6e& inter#ection over !
are defined as follow.
L
A!
A = ] x PA! , xA^
2L
A!
A =] xP A! , xA^
:or e#am$le let A
n
be the interval N(+ EnM and ! F ]A
n
P n ^. Then the &enerali6ed
union and intersection over ! are A
n
F N(+ M and `A
n
F ](^.
5
'ha$ter 7
Re"!tion#
A re"!tion on a set A means a subset of A Q A. :or e#am$le if A F]+ 2+ 3^ then the
followin& are some+ but not all+ $ossible relations on A.
L # F ]K+L+ K+2L+ K+3L^
2L # F ]K2+3L^
3L # F ]K+L+ K+2L+ K+3L+ K2+2L+ K2+3L+ K3+3L^
7L # F _
7. )f PAP F n then how man% different relations on A are $ossibleX
)f # is a relation on A then the in(er#e of # is the relation #
C
F ]Kb, aL P Ka, bL #^.
:urthermore if ! is another relation on A then the com'o#ition of # with ! is the
relation ! a # F ]Ka, cL P Ka, bL # K b, cL !^. )n $articular we define #
2
F # a #+
#
3
F #
2
a #+ etc.
0#am$le? /et A F ]+ 2+ 3+ 7^ and # F ]K+2L+ K2+3L+ K2+7L+ K3+3L+ K7+L^ and
! F ]K+3L+ K2+2L+ K3+L+ K3+3L^. Then
#
C
F ]K2+L+ K3+2L+ K7+2L+ K3+3L+ K+7L^
! a # F ]K+2L+ K2+L+ K2+3L+ K3+L+ K3+3L+ K7+3L^
# a ! F ]K+3L+K2+3L+ K2+7L+ K3+2L+ K3+3L^
#
2
F # a # F ]K+3L+ K2+3L+ K2+L+ K3+3L+ K7+2L^
7.2 /et A F ]+ 2+ 3+ 7^ and # F ]K+2L+ K2+L+ K2+7L+ K3+3L+ K7+L+ K7+3L^ A Q A.
aL :ind #
C
and K#
C
L
C
bL :ind #
2
and #
3
cL :ind # a #
C
and #
C
a #
dL :ind K#
C
L
2
and K#
2
L
C
7.3 Prove that # a K# a #L F K# a #L a #. 8ence we ma% write #
3
F # a # a #.
Pro$erties of a relation # A Q A.
L re"e/i(e if a A Ka, aL #
2L #ymmetric if a A b A+ Ka, bL # V Kb, aL #
3L !nti1#ymmetric if a A b A+ Ka, bL # K b, aL # V a = b
7L tr!n#iti(e if a, b, c A+ Ka, bL # K b, cL # V Ka, cL #
0#am$le? /et A F ]+ 2+ 3^ and consider three relations on A?
# F ]K+L+ K+2L+ K2+L+ K2+2L+ K3+3L^
! F ]K+L+ K+3L+ K2+2L+ K3+2L^
$ F ]K+2L+ K+3L+ K2+3L^
# is refle#ive+ s%mmetric+ and transitive+ but not anti"s%mmetric.
! is anti"s%mmetric+ but not refle#ive+ not s%mmetric+ and not transitive.
$ is anti"s%mmetric and transitive+ but not refle#ive and not s%mmetric.
=
7.7 /et A F ]+ 2+ 3+ 7^. Which $ro$erties above are true for each relation # on AX
aL # F ]Ka, bL A Q A P a [ b^
bL # F ]K+L+ K+2L+ K+3L+ K+7L+ K2+2L+ K2+7L+ K3+3L+ K7+7L^
cL # F ]K+L+ K+3L+ K2+L+ K2+2L+ K2+7L^
dL # F ]Ka, bL A Q A P a b > 5^
7.5 /et A F ]+ 2+ 3+ 7^. 5ive an% e#am$le of a relation # on A which is
aL refle#ive+ not anti"s%mmetric+ not transitive.
bL not refle#ive+ not s%mmetric+ not transitive.
cL s%mmetric and transitive.
dL neither s%mmetric nor anti"s%mmetric.
eL both s%mmetric and anti"s%mmetric.
7.= /et # be a relation on A. Prove the followin& $ro$ositions.
aL # is s%mmetric if and onl% if #
C
F #.
bL # is anti"s%mmetric if and onl% if # ` #
C
]K a, aL P a A ^.
cL # is transitive if and onl% if #
2
#.
A relation # A Q A can be re$resented b% a &igr!'h in which each element of A is
re$resented b% a (erte/ and each element Ka, bL # is re$resented b% an e&ge with
direction from a to b. )n the case a = b the ed&e is called a "oo'.
0#am$le? A F ]+ 2+ 3+ 7^ and # F ]K+ 7L+ K2+ L+ K2+ 2L+ K7+ L+ K7+ 2L+ K7+ 3L^.
7.> 4raw the di&ra$h for each of the relations in Problem 7.7.
7.R 8ow can %ou tell from the di&ra$h if # is
aL refle#ive
bL !nti1re"e/i(e Nmeanin& that a A % Ka, aL #M
cL s%mmetric
dL anti"s%mmetric
eL transitive
# A Q A is called an e*%i(!"ence re"!tion if it is refle#ive+ s%mmetric+ and
transitive.
7.@ Prove that the followin& relations are e.uivalence relations.
aL # F ]Ka, bL Q P NaM F NbM^
bL # F ]Ka, bL A Q A P a mod 3 F b mod 3^ where A F ](+ + 2+ ...+ @^
cL # F ]Ka, bL Q P a mod 5 F b mod 5^
dL # F ]Ka, bL A Q A P a = b^ where A F ]+ 2+ 3+ 7^
eL # F ]Ka, bL Q P a b is even^
>
)f # is an e.uivalence relation on A then A is $artitioned into subsets or classes of the
forms Ax F ]a A P Ka, xL #^ for ever% x A. These subsets of A are called the
e*%i(!"ence c"!##e# of A under # and the% satisf% the followin& $ro$erties.
L Kx, yL # V Ax F Ay
2L Kx, yL # V Ax ` Ay F _
3L Ka, bL # W x A, a Ax b Ax
0#am$le? The followin& di&ra$h shows that # is an e.uivalence relation. KWh%XL
There are three e.uivalence classes namel%
A F ]+ 7^ F A7
A2 F ]2^
A3 F ]3+ 5+ =^ F A5 F A=
7.( :ind the e.uivalence classes for each relation in Problem 7.@.
7. 4efine the congr%ence relation on b% a b if and onl% if a mod n F b mod n.
/et # F ]Ka, bL Q P a b^. Prove that # is an e.uivalence relation on and
find the e.uivalence classes.
# A Q A is called a '!rti!" or&er relation if it is refle#ive+ anti"s%mmetric+ and
transitive.
7.2 Prove that the followin& relations are $artial orderin&.
aL A F ]5(+ 22+ 35+ 7^ and # F ]Ka, bL A Q A P a b^
bL A F ]+ 2+ =+ 2+ 27^ and # F ]Ka, bL A Q A P a divides b^
cL A F ]2+ 3+ =+ (+ 2(+ 3(^ and # F ]Ka, bL A Q A P a divides b^
dL # F ]Ka, bL Q P a divides b^
)f # is a $artial order relation then its di&ra$h can be sim$lified into a H!##e &i!gr!m
after these four ste$s?
L 4o not draw loo$s.
2L 4o not draw Ka, cL whenever there are Ka, bL and Kb, cL.
3L Redraw the remainin& &ra$h so that all ed&es $oint u$ward.
7L 4o not draw the directions.
0#am$le? The followin& di&ra$h shows that # is a $artial order relation. KWh%XL
The four ste$s above lead to the 8asse dia&ram of #.
7.3 4raw the 8asse dia&ram for each $artial order relation in Problem 7.2.
A $artial order relation # on A is called a tot!" or&ering if it satisfies one additional
$ro$osition? a A b A+ Ka, bL # Kb, aL #.
R
7.7 Which of the relations &iven in Problem 7.2 are total orderin&X *how that the
8asse dia&ram of a total orderin& can alwa%s be drawn as a strai&ht line.
7.5 Prove that the relation a b &ives a total orderin& on .
*u$$ose # is a $artial order relation on the set A. An element & A is called a "e!#t
e"ement under # if a A+ K&, aL #. Now # is called a we"" or&ering on A if ever%
non"em$t% subset of A has a least element.
7.= Which ones of the sets A &iven in Problem 7.2 have a least element under #X
Which relations are well order relationsX
7.> Prove that a well orderin& is a total orderin& but not conversel%.
7.R 5ive an e#am$le of a total orderin& on a set which is not a well orderin&.
The We"" Or&ering Princi'"e sa%s that is well ordered under the b[b relation.
Theorem? The Well -rderin& Princi$le is e.uivalent to the Princi$le of
Mathematical )nduction.
)f A F ]+ 2+ 3+ ...+ n^ then a relation # A Q A can be re$resented b% a 6ero1one
m!tri/ ' of si6e n " n where K'L
()
F if K(, )L # and K'L
()
F ( if K(, )L #.
0#am$le? *u$$ose A F ]+ 2+ 3^ and # F ]K+L+ K+3L+ K2+L+ K3+2L+ K3+3L^. Then the
6ero"one matri# of # is ' F

(
( (
(
7.@ Re$resent the relations &iven in Problem 7.7 usin& 6ero"one matrices.
7.2( 'onvert these 6ero"one matrices to di&ra$hs.
aL

( (
( (
(
bL

( (
(
( ( (
cL

( ( ( (
( ( (
( ( (
( (
dL

( ( (
( ( (
( ( (
( ( (
The tr!n#iti(e c"o#%re of # A Q A is the smallest transitive relation containin& #.
Theorem? The transitive closure of # is &iven b% # #
2
... #
n
where n F PAP.
7.2 /et A F ]+ 2+ 3+ 7^. 2se this theorem to find the transitive closure of # A Q A.
aL # F ]K+ 2L+ K2+ L+ K2+ 3L+ K3+ 7L^
bL # F ]K+ L+ K+ 2L+ K2+ L+ K7+ 3L^
cL # F ]K+ L+ K+ 7L+ K2+ L+ K2+ 2L+ K3+ 3L+ K7+ 7L^
dL # F ]K+ 7L+ K2+ L+ K2+ 7L+ K3+ 2L+ K3+ 7L+ K7+ 3L^
7.22 :ind the 6ero"one matri# of the transitive closure for each # in Problem 7.2(.
@
'ha$ter 5
$%nction#
A relation from a set A to another set B means a subset of A Q B. A %nction f from A
to B+ denoted b% f ? A V B+ is a relation such that a A YK a, bL f.
0#am$le? /et # ]+ 2+ 3+ 7^ Q ]x, y, *^ defined b%
L # F ]K+xL+ K2+yL+ K3+*L+ K7+xL^
2L # F ]K+xL+ K2+xL+ K3+xL+ K7+yL^
3L # F ]K+*L+ K2+yL+ K3+xL^
7L # F ]K+yL+ K2+xL+ K3+yL+ K3+*L+ K7+xL^
The first two relations are functions but not the last two.
5. *u$$ose # A Q A. 8ow can we tell from the di&ra$h+ or the 6ero"one matri#+
whether or not # is a function from A to AX
5.2 Which ones of the 6ero"one matrices in Problem 7.2( re$resent a functionX
5.3 Which relations are functionsX
aL # F ]Ka, bL Q P b = a J ^
bL # F ]Ka, bL Q P b F NaM^
cL # F ]Ka, bL Q P b
2
F a^
dL # F ]Ka, bL Q P b F Ga^
)f f ? A V B is a function then the statement Ka, bL f can also be written f KaL F b.
The set A in this relation is called the &om!in of f while B the co&om!in of f . The
r!nge of f is the subset of B &iven b% f KAL F ]f KaL B P a A^. )n 'alculus a
function is sometimes &iven in the form y F f KxL whereas its domain and ran&e ma% be
im$licit. :or e#am$le f KxL F x
2
is reall% the function f F ]Kx, x
2
L P x ^ with domain
and ran&e N(+ OL.
5.7 :ind the lar&est $ossible domain and ran&e of each function.
aL f KxL F PxP
bL f KxL F Gx
cL f KxL F Ex
dL f KxL F EGx
eL f KxL F NxM
5.5 /et f ? A V B be a function and let ! and $ be subsets of A. Prove the followin&.
aL f K! $L F f K!L f K$L
bL f K! ` $L f K!L ` f K$L
Pro$erties of a function f ? A V B.
L f is one1to1one or an in+ection if f KaL F f KaAL V a F aA.
2L f is onto or a #%r+ection if f KAL F B.
3L f is a )i+ection if both one"to"one and onto.
0#am$le? All the followin& are functions f ? A V B.
2(
L A F ]+ 2+ 3^+ B F]x, y, *, +^+ f F ]K+yL+ K2+*L+ K3++L^
2L A F ]+ 2+ 3^+ B F]x, y, *, +^+ f F ]K+yL+ K2++L+ K3++L^
3L A F ]+ 2+ 3^+ B F]x, y, *^+ f F ]K+yL+ K2+*L+ K3+xL^
7L A F ]+ 2+ 3+ 7^+ B F]x, y, *^+ f F ]K+yL+ K2+*L+ K3+yL+ K7+xL^
The first is one"to"one but not onto.
The second is neither one"to"one nor onto.
The third is both one"to"one and onto.
The fourth is onto but not one"to"one.
5.= )s f one"to"oneX ontoX bothX
aL f F ]Ka, bL Q P b F a J ^
bL f F ]Ka, bL Q P b F NaM^
cL f F ]Ka, bL Q P b F Ca^
dL f F ]Ka, bL Q P b F 2a^
The in(er#e of a function f ? A V B is the relation f
C
B Q A &iven b% f
C
KbL F a W
f KaL F b. Note that f
C
ma% or ma% not be a function. Moreover if ! B then the
in(er#e im!ge of ! is the subset of A &iven b% f
C
K!L F ]a A P f KaL !^.
5.> :ind f
C
for each function &iven in Problem 5.7. )s f
C
a functionX
5.R Re$eat the .uestion usin& Problem 5.5.
5.@ /et f ? A V B be a function and let ! and $ be subsets of B. Prove the followin&.
aL f
C
K! $L F f
C
K!L f
C
K$L
bL f
C
K! ` $L F f
C
K!L ` f
C
K$L
*u$$ose there are two functions f ? A V B and , ? B V C. The com'o#ition function
,af ? A V C is defined b% ,af KaL F c W f KaL F b ,KbL F c. )n $articular when A F B
F C this definition coincides with that of arbitrar% relations on A.
5.( :ind ,af. Assume %ou !now the a$$ro$riate domain and ran&e for each.
aL f KxL F x+ ,KxL F x
2
bL f KxL F x J + ,KxL F x C
cL f KxL F 2x J + ,KxL F x
2
C 2
dL f KxL F Ex+ ,KxL F Ex
5. *u$$ose f
C
? B V A is a&ain a function. Prove that f
C
af KaL F a a A and
that f af
C
KbL F b b B. ,erif% these facts usin& each function &iven in Problem 5.5
when a$$licable.
Theorem? The inverse of f ? A V B is a&ain a function if and onl% if f is a bi<ection+
in which case f
C
? B V A is also a bi<ection.
2
'ha$ter =
C!r&in!"ity
A set is called inite or ininite de$endin& whether its number of elements is finite or
infinite+ res$ectivel%.
=. *u$$ose both A and B are finite sets. Prove the followin& statements.
aL in<ection f ? A V B W PAP [ PBP
bL sur<ection f ? A V B W PAP Z PBP
cL bi<ection f ? A V B W PAP F PBP
dL )f PAP F PBP then an% function f ? A V B is one"to"one if and onl% if onto.
We now &enerali6ed the definition of cardinalit% to infinite sets. :or arbitrar% set A we
associate to it a c!r&in!" n%m)er PAP satisf%in& the followin& $ro$erties.
L PAP F PBP if bi<ection f ? A V B
2L PAP [ PBP if in<ection f ? A V B
3L PAP < PBP if PAP [ PBP P AP D PBP
Note that the above definitions coincide with the $ro$erties of cardinalit% for finite
sets.
Theorem? PAP [ PBP P BP [ PAP V PAP F PBP K'antor"*chroeder";ernsteinL
4efine PP F o and call a set A co%nt!)"e if PAP [ o or %nco%nt!)"e if PAP > o .
:or e#am$le is itself countable under the bi<ection f KnL F n n .
=.2 Prove that the followin& sets are countable.
aL ` N+(((M
bL `
cL
dL
Theorem? :or an% set A+ e#actl% one of the followin& statements must be true?
L PAP < o
2L PAP F o
3L PAP > o
=.3 Prove that A is finite if and onl% if PAP < o .
The above $roblem sa%s that all finite sets are countable+ but not conversel% since
there e#ist countable sets which are infinite such as . )n some Mathematics boo!s+
an infinite set which is countable is called &en%mer!)"e while in other boo!s the
definition of countable sets does not include finite sets.
=.7 Prove the followin& statements.
aL A subset of a countable set is countable.
bL The union of two countable sets is countable.
22
cL The cross $roduct of two countable sets is countable.
dL The countable union of countable sets is countable.
=.5 Prove that and are both countable. )n $articular PP F PP F o .
Theorem? is uncountable. K'antorL
We define PP F c, the c!r&in!"ity o the contin%%m.
=.= Prove that PAP < PPKALP for an% set A.
Problem =.= im$lies that o F PP < PPKLP and so PKL is also uncountable. )n
$articular it can be shown that PPKLP F c. C!ntor7# Contin%%m Hy'othe#i# asserts
that there is no cardinal number strictl% between o and c. There are however
cardinal numbers lar&er than c+ for instance PPKLP+ PPKPKLLP+ etc.
23

You might also like