4. function
function
A function f from a set X to a set Y(f : X->Y) is a subset of XxY such that for all x∈X, there is exactly one y∈Y with (x, y)∈f.
floor and ceiling
The floor of x, denoted └x┘, is the greatest integer less than or equal to x.
The ceiling of x, denoted ┌x┐, is the least integer greater than or equal to x.
Properties of a function f
- one-to-one for all x1, x2∈X, if(x1) = f(x2), then x1 = x2.
- onto for all y∈Y, there exists x∈X such that y=f(x).
- bijection one-to-one, onto
- Binary operator on a set X a function from X x X to X
- unary operator on X a function from X to X
inverse of f
Let f be a bijection function from X to Y.
the inverse of f, denoted f^-1, is the funtion from Y to X defined by
f^-1 = { (y, x)| (x, y) ∈ f}
composition
Let g be a function from X to Y and f be a funtion from Y to Z.
the composition of f with g, denoted f ∘ g, is the funtion from X to Z defined by
f ∘g(x) = f( g(x) )