• Nie Znaleziono Wyników

"Functions"

N/A
N/A
Protected

Academic year: 2021

Share ""Functions""

Copied!
64
0
0

Pełen tekst

(1)

Discrete Mathematics (c) Marcin Sydow

Discrete Mathematics

Functions (c) Marcin Sydow

(2)

Discrete Mathematics (c) Marcin Sydow

Contents

Function

Injection, surjection and bijection Inverse and composition

(3)

Discrete Mathematics

(c) Marcin Sydow

Denition of a function

Denition: A relation f ⊆ X × Y is called a function if and only if for each element of x ∈ X there exists exactly one y ∈ Y so that (x, y) ∈ f .

Function is denoted as follows: f : X → Y

(4)

Discrete Mathematics

(c) Marcin Sydow

Functions, cont.

Elements of X (domain) are called arguments and elements of Y (co-domain) are called values of the function.

Since there is exactly one value ofor each argument, it is possible to write:

f (x) = y for particular x ∈ X and y ∈ Y .

(5)

Discrete Mathematics

(c) Marcin Sydow

Set of all functions

Set of all possible functions that have domain X and co-domain Y is denoted as:

(6)

Discrete Mathematics

(c) Marcin Sydow

Detion of function written with mathematical

symbols

Denition (in natural language): A relation f ⊆ X × Y is called a function if and only if for each element of x ∈ X there exists exactly one y ∈ Y so that (x, y) ∈ f .

Let's translate this to mathematical symbols:

for each element of x ∈ X there exists y ∈ Y so that (x, y) ∈ f : ∀x∈X[∃y∈Y(x, y) ∈ f ]

But how to express that there exists exactly one such y (not more)?: ∧[∀y,y0Y((x, y) ∈ f ∧ (x, y0) ∈f ) ⇒ y = y0]

The resulting expression:

(7)

Discrete Mathematics

(c) Marcin Sydow

Detion of function written with mathematical

symbols

Denition (in natural language): A relation f ⊆ X × Y is called a function if and only if for each element of x ∈ X there exists exactly one y ∈ Y so that (x, y) ∈ f .

Let's translate this to mathematical symbols:

for each element of x ∈ X there exists y ∈ Y so that (x, y) ∈ f :

x∈X[∃y∈Y(x, y) ∈ f ]

But how to express that there exists exactly one such y (not more)?: ∧[∀y,y0Y((x, y) ∈ f ∧ (x, y0) ∈f ) ⇒ y = y0]

The resulting expression:

(8)

Discrete Mathematics

(c) Marcin Sydow

Detion of function written with mathematical

symbols

Denition (in natural language): A relation f ⊆ X × Y is called a function if and only if for each element of x ∈ X there exists exactly one y ∈ Y so that (x, y) ∈ f .

Let's translate this to mathematical symbols:

for each element of x ∈ X there exists y ∈ Y so that (x, y) ∈ f : ∀x∈X[∃y∈Y(x, y) ∈ f ]

But how to express that there exists exactly one such y (not more)?: ∧[∀y,y0Y((x, y) ∈ f ∧ (x, y0) ∈f ) ⇒ y = y0]

The resulting expression:

(9)

Discrete Mathematics

(c) Marcin Sydow

Detion of function written with mathematical

symbols

Denition (in natural language): A relation f ⊆ X × Y is called a function if and only if for each element of x ∈ X there exists exactly one y ∈ Y so that (x, y) ∈ f .

Let's translate this to mathematical symbols:

for each element of x ∈ X there exists y ∈ Y so that (x, y) ∈ f : ∀x∈X[∃y∈Y(x, y) ∈ f ]

But how to express that there exists exactly one such y (not more)?:

∧[∀y,y0Y((x, y) ∈ f ∧ (x, y0) ∈f ) ⇒ y = y0]

The resulting expression:

(10)

Discrete Mathematics

(c) Marcin Sydow

Detion of function written with mathematical

symbols

Denition (in natural language): A relation f ⊆ X × Y is called a function if and only if for each element of x ∈ X there exists exactly one y ∈ Y so that (x, y) ∈ f .

Let's translate this to mathematical symbols:

for each element of x ∈ X there exists y ∈ Y so that (x, y) ∈ f : ∀x∈X[∃y∈Y(x, y) ∈ f ]

But how to express that there exists exactly one such y (not more)?: ∧[∀y,y0Y((x, y) ∈ f ∧ (x, y0) ∈f ) ⇒ y = y0]

The resulting expression:

(11)

Discrete Mathematics

(c) Marcin Sydow

Detion of function written with mathematical

symbols

Denition (in natural language): A relation f ⊆ X × Y is called a function if and only if for each element of x ∈ X there exists exactly one y ∈ Y so that (x, y) ∈ f .

Let's translate this to mathematical symbols:

for each element of x ∈ X there exists y ∈ Y so that (x, y) ∈ f : ∀x∈X[∃y∈Y(x, y) ∈ f ]

But how to express that there exists exactly one such y (not more)?: ∧[∀y,y0Y((x, y) ∈ f ∧ (x, y0) ∈f ) ⇒ y = y0]

The resulting expression:

(12)

Discrete Mathematics (c) Marcin Sydow

Example

X = {x ∈ N : x < 5} Is the following a function?

{(0, 1), (1, 2), (2, 3), (3, 4)} {(0, 1), (1, 2), (2, 3), (3, 4), (4, 0)} {(0, 1), (1, 2), (2, 3), (3, 4), (4, 0), (0, 2)}

(13)

Discrete Mathematics (c) Marcin Sydow

Example

X = {x ∈ N : x < 5} Is the following a function? {(0, 1), (1, 2), (2, 3), (3, 4)}

{(0, 1), (1, 2), (2, 3), (3, 4), (4, 0)} {(0, 1), (1, 2), (2, 3), (3, 4), (4, 0), (0, 2)}

(14)

Discrete Mathematics (c) Marcin Sydow

Example

X = {x ∈ N : x < 5} Is the following a function? {(0, 1), (1, 2), (2, 3), (3, 4)} {(0, 1), (1, 2), (2, 3), (3, 4), (4, 0)}

(15)

Discrete Mathematics (c) Marcin Sydow

Example

X = {x ∈ N : x < 5} Is the following a function? {(0, 1), (1, 2), (2, 3), (3, 4)} {(0, 1), (1, 2), (2, 3), (3, 4), (4, 0)} {(0, 1), (1, 2), (2, 3), (3, 4), (4, 0), (0, 2)}

(16)

Discrete Mathematics

(c) Marcin Sydow

Equality of functions

Two functions f : X → Y and g : A → B are equal i the following conditions hold:

X = A (equality of domains), Y = B (equality of co-domains)

(17)

Discrete Mathematics

(c) Marcin Sydow

Restriction and extension of a function

Let f : X → Y and f0 :X0 Y and X ⊆ X0

If f(x)=f'(x) for all x ∈ X we say that f' is an extension of f and f is a restriction of f'

(18)

Discrete Mathematics

(c) Marcin Sydow

Graph of a function

Given a function f : X → Y if the set of pairs

f = {(x, y) ∈ X × Y : y = f (x)} can be naturally mapped to points in the plane with Cartesian coordinates (e.g. when X=Y=R), we can view the f as its graph.

(19)

Discrete Mathematics

(c) Marcin Sydow

Injection

A function f : X → Y is injection i the following holds: ∀x,x0X x 6= x0⇒f (x) 6= f (x0)

(20)

Discrete Mathematics

(c) Marcin Sydow

Example

Is the following an injection?

f : Z → Z, f (x) = x2

(21)

Discrete Mathematics

(c) Marcin Sydow

Example

Is the following an injection? f : Z → Z, f (x) = x2

(22)

Discrete Mathematics

(c) Marcin Sydow

Example

Is the following an injection? f : Z → Z, f (x) = x2

(23)

Discrete Mathematics

(c) Marcin Sydow

Surjection

A function f : X → Y is surjection i the following holds: ∀y∈Yx∈Xy = f (x)

A surjection is also called onto mapping (or f maps X onto Y)

(24)

Discrete Mathematics

(c) Marcin Sydow

Example

Is the following a surjection?

f : R → Z f (x) = oor(x) f : R → R, f (x) = 1/(1 + e−x)

f : R → [0, 1], f (x) = 1/(1 + e−x)

(25)

Discrete Mathematics

(c) Marcin Sydow

Example

Is the following a surjection? f : R → Z f (x) = oor(x)

f : R → R, f (x) = 1/(1 + e−x)

f : R → [0, 1], f (x) = 1/(1 + e−x)

(26)

Discrete Mathematics

(c) Marcin Sydow

Example

Is the following a surjection? f : R → Z f (x) = oor(x) f : R → R, f (x) = 1/(1 + e−x)

f : R → [0, 1], f (x) = 1/(1 + e−x)

(27)

Discrete Mathematics

(c) Marcin Sydow

Example

Is the following a surjection? f : R → Z f (x) = oor(x) f : R → R, f (x) = 1/(1 + e−x)

f : R → [0, 1], f (x) = 1/(1 + e−x)

(28)

Discrete Mathematics

(c) Marcin Sydow

Example

Is the following a surjection? f : R → Z f (x) = oor(x) f : R → R, f (x) = 1/(1 + e−x)

f : R → [0, 1], f (x) = 1/(1 + e−x)

(29)

Discrete Mathematics

(c) Marcin Sydow

Bijection

A function f : X → Y is bijection i it is injection and surjection.

(30)

Discrete Mathematics

(c) Marcin Sydow

Example

Is the following a bijection?

f : R → Z f (x) = oor(x) f : R → R, f (x) = 1/(1 + e−x)

f : R → [0, 1], f (x) = 1/(1 + e−x)

(31)

Discrete Mathematics

(c) Marcin Sydow

Example

Is the following a bijection? f : R → Z f (x) = oor(x)

f : R → R, f (x) = 1/(1 + e−x)

f : R → [0, 1], f (x) = 1/(1 + e−x)

(32)

Discrete Mathematics

(c) Marcin Sydow

Example

Is the following a bijection? f : R → Z f (x) = oor(x) f : R → R, f (x) = 1/(1 + e−x)

f : R → [0, 1], f (x) = 1/(1 + e−x)

(33)

Discrete Mathematics

(c) Marcin Sydow

Example

Is the following a bijection? f : R → Z f (x) = oor(x) f : R → R, f (x) = 1/(1 + e−x)

f : R → [0, 1], f (x) = 1/(1 + e−x)

(34)

Discrete Mathematics

(c) Marcin Sydow

Example

Is the following a bijection? f : R → Z f (x) = oor(x) f : R → R, f (x) = 1/(1 + e−x)

f : R → [0, 1], f (x) = 1/(1 + e−x)

(35)

Discrete Mathematics

(c) Marcin Sydow

Inverse of a function

If f : X → Y is an injection, then the inverse of this function is the (unique) function f−1 :Y → X dened as follows:

f−1(y) = x ⇔ f (x) = y

questions:

is inverse of injection an injection? (yes) is inverse of bijecion a bijection? (yes)

(36)

Discrete Mathematics

(c) Marcin Sydow

Inverse of a function

If f : X → Y is an injection, then the inverse of this function is the (unique) function f−1 :Y → X dened as follows:

f−1(y) = x ⇔ f (x) = y

questions:

is inverse of injection an injection?

(yes) is inverse of bijecion a bijection? (yes)

(37)

Discrete Mathematics

(c) Marcin Sydow

Inverse of a function

If f : X → Y is an injection, then the inverse of this function is the (unique) function f−1 :Y → X dened as follows:

f−1(y) = x ⇔ f (x) = y

questions:

is inverse of injection an injection? (yes)

(38)

Discrete Mathematics

(c) Marcin Sydow

Inverse of a function

If f : X → Y is an injection, then the inverse of this function is the (unique) function f−1 :Y → X dened as follows:

f−1(y) = x ⇔ f (x) = y

questions:

is inverse of injection an injection? (yes) is inverse of bijecion a bijection?

(39)

Discrete Mathematics

(c) Marcin Sydow

Inverse of a function

If f : X → Y is an injection, then the inverse of this function is the (unique) function f−1 :Y → X dened as follows:

f−1(y) = x ⇔ f (x) = y

questions:

is inverse of injection an injection? (yes) is inverse of bijecion a bijection? (yes)

(40)

Discrete Mathematics (c) Marcin Sydow

Example of inverse

f : R → (0, 1), f (x) = 1/(1 + e−x)

f (x) = x2 for non-negative reals

(41)

Discrete Mathematics

(c) Marcin Sydow

Composition of two functions

For two functions f : X → Y and g : Y → Z their

composition is the function g ◦ f : X → Z dened as follows for any x ∈ X :

(g ◦ f )(x) = g(f (x))

(Notice the order of the functions in the denotation g ◦ f )

is composition commutative? (i.e. is g ◦ f = f ◦ g?)(no) is compostion associative? (i.e. is h ◦ (g ◦ f ) = (h ◦ g) ◦ f ?)(yes) Notice: non-commutativitiy and associativity of compositon

(42)

Discrete Mathematics

(c) Marcin Sydow

Composition of two functions

For two functions f : X → Y and g : Y → Z their

composition is the function g ◦ f : X → Z dened as follows for any x ∈ X :

(g ◦ f )(x) = g(f (x))

(Notice the order of the functions in the denotation g ◦ f ) is composition commutative? (i.e. is g ◦ f = f ◦ g?)

(no) is compostion associative? (i.e. is h ◦ (g ◦ f ) = (h ◦ g) ◦ f ?)(yes) Notice: non-commutativitiy and associativity of compositon

(43)

Discrete Mathematics

(c) Marcin Sydow

Composition of two functions

For two functions f : X → Y and g : Y → Z their

composition is the function g ◦ f : X → Z dened as follows for any x ∈ X :

(g ◦ f )(x) = g(f (x))

(Notice the order of the functions in the denotation g ◦ f ) is composition commutative? (i.e. is g ◦ f = f ◦ g?)(no)

is compostion associative? (i.e. is h ◦ (g ◦ f ) = (h ◦ g) ◦ f ?)(yes) Notice: non-commutativitiy and associativity of compositon

(44)

Discrete Mathematics

(c) Marcin Sydow

Composition of two functions

For two functions f : X → Y and g : Y → Z their

composition is the function g ◦ f : X → Z dened as follows for any x ∈ X :

(g ◦ f )(x) = g(f (x))

(Notice the order of the functions in the denotation g ◦ f ) is composition commutative? (i.e. is g ◦ f = f ◦ g?)(no) is compostion associative? (i.e. is h ◦ (g ◦ f ) = (h ◦ g) ◦ f ?)

(yes) Notice: non-commutativitiy and associativity of compositon

(45)

Discrete Mathematics

(c) Marcin Sydow

Composition of two functions

For two functions f : X → Y and g : Y → Z their

composition is the function g ◦ f : X → Z dened as follows for any x ∈ X :

(g ◦ f )(x) = g(f (x))

(Notice the order of the functions in the denotation g ◦ f ) is composition commutative? (i.e. is g ◦ f = f ◦ g?)(no) is compostion associative? (i.e. is h ◦ (g ◦ f ) = (h ◦ g) ◦ f ?)(yes)

(46)

Discrete Mathematics

(c) Marcin Sydow

Composition of two functions

For two functions f : X → Y and g : Y → Z their

composition is the function g ◦ f : X → Z dened as follows for any x ∈ X :

(g ◦ f )(x) = g(f (x))

(Notice the order of the functions in the denotation g ◦ f ) is composition commutative? (i.e. is g ◦ f = f ◦ g?)(no) is compostion associative? (i.e. is h ◦ (g ◦ f ) = (h ◦ g) ◦ f ?)(yes) Notice: non-commutativitiy and associativity of compositon

(47)

Discrete Mathematics

(c) Marcin Sydow

Denition of (innite) sequence

A sequence a0,a1,a2,a3, . . . is a function whose domain is the set of natural numbers N a : N → X , where X is some set. For any number i ∈ N a(i) is usually denoted as ai.

In particular, if X is a number set, the sequence is numeric (e.g. for X = R it is a real sequence.

(48)

Discrete Mathematics

(c) Marcin Sydow

Image of a set

For a function f : X → Y and a set A ⊆ X the image of A is the set f (A) ⊆ Y dened as follows:

f (A) = {y ∈ Y : ∃x∈Ay = f (x)}

(to avoid misunderstanding of the denotation f (A) we assume that A /∈ X )

(49)

Discrete Mathematics

(c) Marcin Sydow

Inverse image of a set

For a function f : X → Y and a set B ⊆ Y the inverse image of B is the set f−1(B) ⊆ X dened as follows:

f−1(B) = {x ∈ X : f (x) ∈ B}

(to avoid misunderstanding of the denotation f−1(B) we

(50)

Discrete Mathematics (c) Marcin Sydow

Image of union

Assume that f : X → Y .

For any sets A, A0 X the following holds:

f (A ∪ A0

(51)

Discrete Mathematics (c) Marcin Sydow

Image of intersection

Assume that f : X → Y .

For any sets A, A0 X the following holds:

f (A ∩ A0) ⊆f (A) ∩ f (A0)

(52)

Discrete Mathematics (c) Marcin Sydow

Example

f : Z → N, f (x) = x2

A is the set of negative integers, A0 is the set of positive

integers. What is A ∩ A0? What is f (A ∩ A0)? What is f (A)? What is f (A0)? What is f (A) ∩ f (A0)?

(53)

Discrete Mathematics

(c) Marcin Sydow

Image of intersection cont.

What property of the function f would suce for the equality: f (A ∩ A0) =f (A) ∩ f (A0)

?

(54)

Discrete Mathematics

(c) Marcin Sydow

Image of intersection cont.

What property of the function f would suce for the equality: f (A ∩ A0) =f (A) ∩ f (A0)

?

(55)

Discrete Mathematics (c) Marcin Sydow

Image of dierence

Assume that f : X → Y .

For any sets A, A0 X the following holds:

f (A \ A0) ⊆f (A) \ f (A0)

(56)

Discrete Mathematics

(c) Marcin Sydow

Inverse image of union

Assume that f : X → Y .

For any two sets B, B0 Y the following holds:

f−1(B ∪ B0) =f1(B) ∪ f1(B0)

(57)

Discrete Mathematics

(c) Marcin Sydow

Inverse image of intersection

Assume that f : X → Y .

For any two sets B, B0 Y the following holds:

f−1(B ∩ B0) =f1(B) ∩ f1(B0)

(58)

Discrete Mathematics

(c) Marcin Sydow

Inverse image of dierence

Assume that f : X → Y .

For any two sets B, B0 Y the following holds:

f−1(B \ B0) =f1(B) \ f1(B0)

(59)

Discrete Mathematics

(c) Marcin Sydow

Composition of image and inverse image

Assume that f : X → Y .

For any A ⊆ X the following holds: A ⊆ f−1(f (A))

For what conditions the equality holds? (for f being an injection)

(60)

Discrete Mathematics

(c) Marcin Sydow

Composition of image and inverse image

Assume that f : X → Y .

For any A ⊆ X the following holds: A ⊆ f−1(f (A))

For what conditions the equality holds?

(for f being an injection)

(61)

Discrete Mathematics

(c) Marcin Sydow

Composition of image and inverse image

Assume that f : X → Y .

For any A ⊆ X the following holds: A ⊆ f−1(f (A))

For what conditions the equality holds? (for f being an injection)

(62)

Discrete Mathematics

(c) Marcin Sydow

Composition of image and inverse image, cont.

For any B ⊆ f (X ) the following holds: f (f−1(B)) = B

Why the assumption B ⊆ f (X ) above is important? (give an example)

(63)

Discrete Mathematics

(c) Marcin Sydow

Composition of image and inverse image, cont.

For any B ⊆ f (X ) the following holds: f (f−1(B)) = B

Why the assumption B ⊆ f (X ) above is important? (give an example)

(64)

Discrete Mathematics

(c) Marcin Sydow

Cytaty

Powiązane dokumenty

[r]

Random walk, discrete harmonic measure, discrete Green’s function, Steiner symmetrization, circular symmetrization, non-increasing rearrange- ment, Baernstein ∗-functions,

Biswas: Relative Order and Relative Type Oriented Growth Properties.. of Generalized Iterated

Taoudi: Fixed Point Theorems for Monotone Mappings in Ordered Banach Spaces Under Weak Topology Features.. Mishra: On Some Fixed

Darwish: Some New Existence Results and Stability Concepts for Fractional Partial Random..

defined by a Musielak-Orlicz function over n-normed spaces. Thirunavukkarasu:

Aouf: On differential sandwich theorems of analytic functions defined by certain generalized linear operator.. Maurya: Certain subordination results on the convolution of

Sharma: Some new generalized classes of difference sequences of fuzzy numbers defined by a sequence of Orlicz functions .... Misra: On a study of double Gai