Download Notes on Discrete Mathematics

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts

Axiom wikipedia , lookup

Large numbers wikipedia , lookup

List of important publications in mathematics wikipedia , lookup

Theorem wikipedia , lookup

Big O notation wikipedia , lookup

Bra–ket notation wikipedia , lookup

Abuse of notation wikipedia , lookup

History of the function concept wikipedia , lookup

Fundamental theorem of calculus wikipedia , lookup

Mathematical proof wikipedia , lookup

Arithmetic wikipedia , lookup

Peano axioms wikipedia , lookup

Non-standard calculus wikipedia , lookup

Laws of Form wikipedia , lookup

Fundamental theorem of algebra wikipedia , lookup

Addition wikipedia , lookup

Four color theorem wikipedia , lookup

Series (mathematics) wikipedia , lookup

Central limit theorem wikipedia , lookup

Karhunen–Loève theorem wikipedia , lookup

List of first-order theories wikipedia , lookup

Mathematics of radio engineering wikipedia , lookup

Elementary mathematics wikipedia , lookup

Expected value wikipedia , lookup

Naive set theory wikipedia , lookup

Law of large numbers wikipedia , lookup

Order theory wikipedia , lookup

Proofs of Fermat's little theorem wikipedia , lookup

Transcript
CHAPTER 9. RELATIONS
like this:
124


0 1 1 0


A = 2 1 0 0 
1 0 0 −1
The first index of an entry gives the row it appears in and the second one
the column, so in this example A2,1 = 2 and A3,4 = −1. The dimensions
of a matrix are the numbers of rows and columns; in the example, A is a
3 × 4 (pronounced “3 by 4”) matrix.
Note that rows come before columns in both indexing (Aij : i is row, j
is column) and giving dimensions (n × m: n is rows, m is columns). Like
the convention of driving on the right (in many countries), this choice is
arbitrary, but failing to observe it may cause trouble.
Matrices are used heavily in linear algebra (Chapter 13), but for the
moment we will use them to represent relations from {1 . . . n} to {1 . . . m},
by setting Aij = 0 if (i, j) is not in the relation and Aij = 1 if (i, j) is. So
for example, the relation on {1 . . . 3} given by {(i, j) | i < j} would appear
in matrix form as


0 1 1


0 0 1 .
0 0 0
When used to represent the edges in a directed graph, a matrix of this
form is called an adjacency matrix.
9.2
9.2.1
Operations on relations
Composition
Just like functions, relations can be composed: given relations R ⊆ A × B
and S ⊆ B × C we define (S ◦ R) ⊆ A × C by the rule (x, z) ∈ (S ◦ R) if and
only if there exists some y ∈ B such that (x, y) ∈ R and (y, z) ∈ S. (In infix
notation: x(S ◦ R)z ↔ ∃y : xRy ∧ ySz.) It’s not hard to see that ordinary
function composition ((f ◦ g)(x) = f (g(x))) is just a special case of relation
composition.
In matrix terms, composition acts like matrix multiplication, where we
replace scalar multiplication with AND and scalar addition with OR: (S ◦
W
R)ij = k (Rik ∧ Skj ). Note that if we use the convention that Rij = 1 if
iRj the order of the product is reversed from the order of composition.
For relations on a single set, we can iterate composition: Rn is defined
by R0 = (=) and Rn+1 = R ◦ Rn . (This also works for functions, bearing in