Chapter 4

FUNCTIONS AND RECURSION

4.1 FUNCTIONS

4.1.1 Terminology

Let X and Y be two sets. A partial function from X to Y is a mapping of elements of X into elements of Y such that every element of X is mapped onto at the most one element of Y. A total function from X to Y is a mapping from X to Y in which every element of X is mapped onto exactly one element of Y. X is the domain of f and Y is its range. We shall use the notation

f : XY

to mean that f is a function (either partial or total) from X to Y. If X is the Cartesian product X1 × X2 × …. × Xn, then we shall often write

f : X1 × X2 × …. × XnY

instead of

f : XY

Similarly, if xi. = T, 1 ≤ in, we shall write

f : T″ → Y

In either case, f is an n variable function. For ...

Get Discrete Mathematics by Pearson now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.