Presentation is loading. Please wait.

Presentation is loading. Please wait.

Functions Defined on General Sets Lecture 35 Section 7.1 Fri, Mar 30, 2007.

Similar presentations


Presentation on theme: "Functions Defined on General Sets Lecture 35 Section 7.1 Fri, Mar 30, 2007."— Presentation transcript:

1 Functions Defined on General Sets Lecture 35 Section 7.1 Fri, Mar 30, 2007

2 Relations A relation R from a set A to a set B is a subset of A  B. If x  A and y  B, then x has the relation R to y if (x, y)  R.

3 Examples: Relations Let A = B = R and let x, y  R. Define R on A  B to mean that y = x 2. Describe the elements of R. Define R on A  B to mean that y < x 2. Describe the elements of R.

4 Functions Let A and B be sets. A function from A to B is a relation from A to B with the property that for every x  A, there exists exactly one y  B such that (x, y)  f. Write f : A  B and f(x) = y. A is the domain of f. B is the co-domain (or range) of f.

5 Functions Note that functions and algebraic expressions are two different things. For example, do not confuse the algebraic expression (x + 1) 2 with the function f : R  R defined by f(x) = (x + 1) 2.

6 Examples: Functions f : R  R by f(x) = x 2. g : R  R  R by g(x, y) = 1 – x – y. h : R  R  R  R by h(x, y) = (-x, -y). For any set A, k :  (A)   (A)   (A) by k(X, Y) = X  Y. For any sets A and B, m :  (A)   (B) by m(X) = X  B.

7 Inverse Images If f(x) = y, we say that y is the image of x and that x is an inverse image of y. The inverse image of y is the set f -1 (y) = {x  X | f(x) = y}.

8 Inverse Images In the previous examples, find f -1 (4). g -1 (0). m -1 ({a}), where A = {a, b, c}, B = {a, b}.

9 Equality of Functions Let f : X  Y and g : X  Y be two functions. Then f = g if f(x) = g(x) for all x  X.

10 Equality of Functions Are f(x) = |x| and g(x) =  x 2 equal? Are f(x) = 1 and g(x) = sec 2 x – tan 2 x equal? Are f(x) = log x 2 and g(x) = 2 log x equal?

11 Another Example Earlier we saw that a subset of a universal set could be represented as a binary string. For example, U = {a, b, c, d}  1111 A = {a, b}  1100  = {}  0000 Describe this as a function.

12 Well Defined A function is well defined if for every x in the domain of the function, there is exactly one y in the codomain that is related to it.

13 Well Defined Why are the following “functions” not well defined? f : Q  Z, f(a/b) = a. g : Z  Z  Q, g(a, b) = a/b. h : Q  Z  Z, h(a/b) = (a, b). k : Q  Q, k(a/b) = b/a. Can they be “repaired?”

14 Boolean Functions A Boolean function is a function whose domain is {0, 1}  …  {0, 1} (or {0, 1} n ) and codomain is {0, 1}. Example: Let p, q be Boolean variables and define f(p, q) = p  q. pqf(p, q) 111 100 010 000

15 The Number of Boolean Functions How many Boolean functions are there in 2 variables? What are they? How many Boolean functions are there in 3 variables? How many Boolean functions are there in n variables?

16 Boolean Functions What Boolean function is defined by f(x, y) = xy? What Boolean function is defined by f(x, y) = x + y – xy? What Boolean function is defined by f(x) = 1 – x? What Boolean function is defined by f(x, y, z) = 1 – xy – z + xyz?


Download ppt "Functions Defined on General Sets Lecture 35 Section 7.1 Fri, Mar 30, 2007."

Similar presentations


Ads by Google