<<

DISCRETE MATH: LECTURE 18

DR. DANIEL FREEMAN

1. Chapter 6.1 again!

Definition (ordered n-tuple). Let n be a positive and let x1, x2, ..., xn be n ele- ments. (x1, x2) is called an ,(x1, x2, x3) is called an ordered triple, and (x1, x2, ..., xn) is called an ordered n-tuple. Two n-tuples (x1, x2, ..., xn) and (y1, y2, ..., yn) are equal if and only if x1 = y1, x2 = y2, ..., xn = yn. That is:

(x1, x2, ..., xn) = (y1, y2, ..., yn) ⇔ x1 = y1, x2 = y2, ..., xn = yn

Examples: • Is (1, 2, 3) = (1, 2, 3, 4)?

• Is {1, 2, 3} = (1, 2, 3)?

• Is (1, 2, 3) = (1, 3, 2)?

1 2 DR. DANIEL FREEMAN

1.1. Cartesian Products.

Definition. Given sets A1,A2,A3, .., An, the of A1,A2, ..., An de- noted A1 × A2 × ... × An is the of all ordered n-tuples (a1, a2, ..., an) where a1 ∈ A1, a2 ∈ A2, ..., an ∈ An. Symbolically, that is:

A1 × A2 × ... × An = {(a1, a2, ..., an) k a1 ∈ A1, a2 ∈ A2, ..., an ∈ An}. In particular,

A1 × A2 = {(a1, a2) k a1 ∈ A1, a2 ∈ A2}.

Example: A = x, y, B = 1, 2, 3, and C = a, b • A × B =

• (A × B) × C =

• A × B × C = DISCRETE MATH: LECTURE 18 3

2. 7.1 Functions Definition. A f from a set X to a set Y , denoted f : X → Y , is a with domain X and co-domain Y that satisfies the two properties: (1) every in X is related to an element in Y . (2) no element in X is related to more than one element in Y .

For each x ∈ X, we denote f(x) to be the element related to x by f. We call the set of values in Y which f maps an element in X to the range of f, or the image of X under f. That is, range of f = {y ∈ Y | ∃x ∈ X, such that f(x) = y}. Given an element y ∈ Y , we call all the points which get mapped to y the preimage of y or inverse image of y. That is, preimage of y = {x ∈ X | f(x) = y}.

Example: Arrow diagrams for X = {0, 1, 2, 3, 4, 5}, Y = {0, 1, 2} • f : X → Y , f(x) = x mod 2

• g : X → Y , f(x) = x mod 3

• h : X → Y , f(x) = 2x mod 6

Two functions f : X → Y and g : X → Y are equal if ∀x ∈ X, f(x) = g(x). 4 DR. DANIEL FREEMAN

2.1. Examples of functions.

(1) The identity function: IX : X → IX is the function:

IX (x) = x ∀x ∈ X.

(2) : Let A be a set, and let a1, a2, a3, ... be a in A define a function f : N → A by f(n) = an ∀n ∈ N. Then f(1), f(2), f(3), ... is the sequence a1, a2, a3, ...

Let g : N → A be a function. Then g(1), g(2), g(3), ... is a sequence in A.

Thus sequences are equivalent to functions with domain N.

(3) Cartesian product: Let f : X → Y be a function. Then {(x, f(x)) | x ∈ X} ⊆ X × Y.

Let A ⊆ X × Y . What properties must A posses for there to exist a function f : X → Y such that A = {(x, f(x)) | x ∈ X} ? DISCRETE MATH: LECTURE 18 5

Definition. If f : X → Y is a function and A ⊆ X and C ⊆ Y , then we denote

• f(A) = {y ∈ Y | y = f(x) for some x ∈ A}

• f −1(C) = {x ∈ X | f(x) ∈ C} f(A) is called the image of A, and f −1(C) is called the inverse image of C.

Example: Let f : X → Y be a function and A, B ⊆ X. Prove that: f(A ∩ B) ⊂ f(A) ∩ f(B)

Give an example of a function f : X → Y and sets A, B ⊆ X such that f(A ∩ B) 6= f(A) ∩ f(B). 6 DR. DANIEL FREEMAN

In work: (1) Let f : X → Y be a function and A, B ⊆ X. Prove that: f(A ∪ B) = f(A) ∪ f(B) DISCRETE MATH: LECTURE 18 7

(2) Let f : X → Y be a function and A ⊆ X. Prove that: A ⊆ f −1(f(A)).

(3) Give an example of a function f : X → Y and a set A ⊆ X such that: A 6= f −1(f(A)) 8 DR. DANIEL FREEMAN

(4) Let f : X → Y be a function and C,D ⊆ Y . Prove that: f −1(C ∩ D) = f −1(C) ∩ f −1(D)