Professional Documents
Culture Documents
4 Functions
• Floor function
– associates with each real number x the greatest integer
less than or equal to x
– E.g., 2.8 = ?, - 2.8 = ?
• Ceiling function
– associates with each real number x the smallest integer
greater than or equal to x
– E.g, 2.8 = ?, -2.8 = ?
• A function f: S T is an one-to-one or
injective, if no member of T is the image
under f of two distinct elements of S
– To prove a function is injective: we assume that
there are elements s1 and s2 of S with f(s1) = f(s2)
and then show that s1 = s2
– To disprove it: counterexample, where an element in
the range has two preimages in the domain
but 1-to-1
Proof that f is one-to-one.
Let f(s1) = f(s2) for s1, s2 .
Then
s1 + 1 = s2 + 1 definition of f
s1 = s2 algebra
CS 130 – Discrete Structures f is one-to-one 51
Proofs
Term Meaning
function A function f from set S to set T is a relationship between elements of S
and elements of T where each element of S is related to a unique
element of T. It is denoted by f: S T.
domain Starting set for a function
codomain Ending set for a function
image Point that results from a mapping
preimage Starting point for a mapping
range Collection of all images of a domain
onto (surjective) Range is the whole codomain; every codomain element has a preimage
one-to-one (injective) No two elements in a domain map to the same place
bijection One-to-one and onto
identity function Maps each element of set to itself
inverse function For a bijection, a new function that maps each codomain element back
where it came from