Escolar Documentos
Profissional Documentos
Cultura Documentos
Cardinality of a set
Sets: S = {a, b}, T = {a, b, c}
|S| = 2, |T| = 3
Counting the elements in a set one establishes a bijection (1 1 and onto mapping)
from that set into N here N N (the natural numbers! i"e" #! 1! 2! $! %)"
Definition: & function f from a set ' (the domain to a set C ( codomain )!
ritten f: D C is a relation such that:
i.
f(d
i
) = c
j
and f(d
i
) = c
k
c
j
= c
k
alternately! one may rite
(d
i,
c
j
) f and (d
i,
c
k
) f c
j =
c
k
d
i
D
ii.
d
i
D! c
j
C : f(d
i
) = c
j
i"e" e(ery element in the domain has an image
)n the definition for a function! if only property (i) is satisfied then e ha(e a partial
function as opposed to a (total) function"
f
1
' C
This arrow diagram depicts a relation that is not a function. Explain why not. Is f
1
a
partial function?
f
2
' C
Is this relation a function? Why or why not? Is f
2
a partial function?
1
d
1
d
2
c
1
c
2
c
$
d
1
d
2
c
1
c
2
Definition: & function f is said to be injective ( or ! " if f(d
i
) * c
k
and f(d
j
) *
c
k
implies that d
i
* d
j
" c
k
is said to be the image of d
i
under f! and d
i
is
called the pre#image of c
k
! ritten f
-1
(c
k
) = d
i
" So! e may say that a
function f is injective if pre-images (where they exist!) are unique.
f
3
f
4
' C ' C
Diagrams of f
3
and f
4
$re %oth of these relations e&les of functions? % Are you sure?
Is either (or %oth?" an e&le of an injective function?
Definition: & function is said to be surjective (onto) if
c
j
C, d
i
D! : f
-1
(c
j
) = d
i
i"e" Every element in the coomain has a (not necessarily unique) pre-
image.
Is either f
3
or f
4
an e&le of a surjective (onto" function?
Definition: +he range of a function! R is that subset of the coomain for which pre-
images exist.
i"e" R = {c
j
C | d
i
D ith f(d
i
) = c
j
}subset o
What is the range of f
3
? $nd that of f
4
?
'ive an alternative definition for a surjective function"
2
d
1
d
2
c
1
d
1
d
2
c
1
c
2
c
$
Definition: & function f is said to be %ijective if it is !oth injective an surjective! ie"
+here is a 1 1 correspondence beteen the elements in D and C"
f
5
' C
$ %ijection from D to C
,unctions -ractice -roblems
if: (i) 33133 @ 33y33 or (ii) 33133 * 33y33 and 1 precedes y in the le1icographical
ordering of
"
,&les:
(i) +he set
) is uncountably infinite"
(Jecall that a language L
! hence (
! i"e" (
) * L * 0Li 3 Li
4)"
+roof: Start by letting < #! 1! 2! %> be an enumeration of
"
O
Pne must sho that there is a language o(er