## Fall 98, CSE 468: Lecture 2 (Aug 28)

### Preliminary notions (Continued): Basic mathematical objects.

• Set inclusion.
• Other operations on sets: exponentiation (power set) and cartesian product.
• Relations.
• Composition of two relations: Given a relation R between A and B, and a relation S between B and C, the composition of R and S, denoted by (R o S), is defined as:
(R o S) = {(x,z) | exists y s.t. (x,y) is in R and (y,z) is in S}
• Inverse: Given a relation R between A and B, the inverse of R is the relation R-1 between B and A defined by
R-1 = {(x,y) | (y,x) is in R}
• Equivalence relations.
• Equivalence class: Given a set A, an equivalence relation R on A, and an element x of A, the equivalence class of x w.r.t. R is
[x]R = {y in A | x R y}
Quotient set: The quotient set of A w.r.t. is
[A]R = {[x]R | x is in A }
• Partition: Given a set A, a partition P of A is a set of subsets of A such that
1. for every X, Y in P, X and Y are disjoint (i.e. their intersection is empty)
2. the union of al the sets in P is equal to A.
• Theorem (Correspondence between equivalence relations and partitions) Given an equivalence relation R on A, [A]R is a partition of A. Viceversa, if P is a partition of A, then the relation

R = {(x,y) | exists X in P s.t. x, y are in X }
is an equivalence relation on A (and the quotient of A w.r.t. R is exactly P).

• Function: a function f : A -> B is a relation between A and B such that
(1) For every x in A, and y1, y2 in B, if both (x,y1) and (x,y2) are in f, then y1 = y2.
Because of this property, we can use the more conventional notation f(x) = y for (x,y) in f.
If, in addition to (1), f satisfy the property
(2) For every x in A, there exists y in B s.t. f(x) = y
then f is a total function.
Note: There is some confusion about terminology: Mathematicians usually call "functions" the relations which satisfy both (1) and (2), and call "partial functions" the relations which satisfy only (1) (and not (2)). We adopt the convention most used in Computer Science, which is to call "functions" (or "partial functions") the relations which satisfy (1) (regardeless of whether they satisfy (2) or not) and "total functions" the relations which satisfy both (1) and (2). In this convention, clearly, the total functions are a subset of the partial functions.
• Problem: What are the conditions on f for
1. f-1 to be a function
2. f-1 to be a total function