functions and pigeonhole principle

Post on 19-Jul-2016

94 Views

Category:

Documents

10 Downloads

Preview:

Click to see full reader

DESCRIPTION

Ppt on functions(mathematics) and pigeonhole principle

TRANSCRIPT

1

Functions

2FunctionsA function f from a set A to a set B is an assignment of exactly one element of B to each element of A.We write f(a) = b if b is the unique element of B assigned by the function f to the element a of A.

If f is a function from A to B, we write f: AB(note: Here, ““ has nothing to do with if… then)

3

Set A

12345

Set B

2

10

864

Must use all the x’sThe x value can only be assigned to one y

All a’s are

assigned

No a has more than one b

assigned

Thus this is a fuction.

4FunctionsIf f:AB, we say that A is the domain of f and B is the codomain of f.

If f(a) = b, we say that b is the image of a and a is the pre-image of b.

The range of f:AB is the set of all images of elements of A.

We say that f:AB maps A to B.

5

Set A

12345

Set B

2

10

864

Set A is the domain of the function. Set B is the codomain of the function. Set B excluding element 0 is the range of A. F(1)=4 thus, 4 is the image of 1 and 1 is the pre-

image of 4.

6

Is the relation shown above a function? NO

Why not?? 2 is assigned both 4 and 10

Set A

12345

Set B

2

10

864

7A function I : A -> B can also be defined in terms of a relation from A to B. A Relation from A to B that contains one, and only one, ordered pair (a, b) for every element a E A, defines a function I from A to B. This function is defined by the assignment I(a) = b, where (a, b) is the unique ordered pair in the relation that has a as its first element. EXAMPLE 2 Let R be the relation consisting of ordered pairs (Abdul, 22), (Brenda, 24), (Carla, 21), (Desire, 22), (Eddie, 24), and (Felicia, 22), where each pair consists of a graduate student and the age of this student. What is the function that this relation determines? Solution: This relation defines the function I, where with I(Abdul) = 22, I(Brenda) = 24, I(Carla) = 21, I(Desire) = 22, l(Eddie) = 24, and I(Felicia) = 22. Here the domain is the set {Abdul, Brenda, Carla, Desire, Eddie, Felicia}. The codomain contains all possible ages of students. Finally, the range is the set (21,22, 24).

8Let f1 and f2 be functions from A to R.Then the sum and the product of f1 and f2 are also functions from A to R defined by:(f1 + f2)(x) = f1(x) + f2(x)(f1f2)(x) = f1(x) f2(x)Example:f1(x) = 3x, f2(x) = x + 5(f1 + f2)(x) = f1(x) + f2(x) = 3x + x + 5 = 4x + 5(f1f2)(x) = f1(x) f2(x) = 3x (x + 5) = 3x2 + 15x

9

We already know that the range of a function F: AB is the set of all images of elements aA.If we only regard a subset SA, the set of all images of elements sS is called the image of S.We denote the image of S by f(S):f(S) = {f(s) | sS}

10

Let us look at the following well-known function:f(Linda) = Moscowf(Max) = Bostonf(Kathy) = Hong Kongf(Peter) = Boston

What is the image of S = {Linda, Max} ?f(S) = {Moscow, Boston}

What is the image of S = {Max, Peter} ?f(S) = {Boston}

Example

11

Properties of Functions

A function f:AB is said to be one-to-one (or injective), if and only if it does not map two distinct elements of A onto the same element of B.

We can express that f is one-to-one using quantifiers as :-

x, yA (f(x) = f(y) x = y)

one-to-one functions

12

Set A

12345

Set B

2

10

864

For x , y A f(x)=f(y) only when x= y for all x and y in A. Thus this is a one to one function.

13

Properties of Functions

Example:f:RRf(x) = x2

IS the function f(x) one to one??

Ans: f(3) = f(-3), but 3 -3, so f is not one-to-one.

14

A function f:AB with A,B R is called strictly increasing, if

x,yA (x < y f(x) < f(y)),and strictly decreasing, if

x,yA (x < y f(x) > f(y)).

Obviously, a function that is either strictly increasing or strictly decreasing

is one-to-one.

15

A function f:AB is called onto, or surjective, if and only if for every element bB there is an element aA with f(a) = b.In other words, f is onto if and only if its range is its entire codomain.

A function f: AB is a one-to-one correspondence, or a bijection, if and only if it is both one-to-one and onto.Obviously, if f is a bijection and A and B are finite sets, then |A| = |B|.

onto functions

16

Is f injective?No.Is f surjective?No.Is f bijective?No.

Linda

Max

Kathy

Peter

Boston

New York

Hong KongMoscow

17

Is f injective?No.Is f surjective?Yes.Is f bijective?No.

Linda

Max

Kathy

Peter

Boston

New York

Hong KongMoscow

Paul

18

Is f injective?Yes.Is f surjective?No.Is f bijective?No.

Linda

Max

Kathy

Peter

Boston

New York

Hong KongMoscow

Lübeck

19

Is f injective?No! f is not evena function!

Linda

Max

Kathy

Peter

Boston

New York

Hong KongMoscow

Lübeck

20

Is f injective?Yes.Is f surjective?Yes.Is f bijective?Yes.

Linda

Max

Kathy

Peter

Boston

New York

Hong KongMoscow

LübeckHelena

21

InversionAn interesting

property of bijections is that

they have an inverse function.

The inverse function of the bijection f:AB

is the function f-

1:BA with f-1(b) = a

whenever f(a) = b.

22

InversionExample:

f(Linda) = Moscowf(Max) = Bostonf(Kathy) = Hong Kongf(Peter) = Lübeckf(Helena) = New YorkClearly, f is bijective.

The inverse function f-1 is given by:f-1(Moscow) = Lindaf-1(Boston) = Maxf-1(Hong Kong) = Kathyf-1(Lübeck) = Peterf-1(New York) = HelenaInversion is only possible for bijections(= invertible functions)

23

Q-Let I: Z -> Z be such that I(x) = x + 1. Is I invertible, and if it is, what is its inverse? Solution: The function I has an inverse because it is a one-to-one an onto. y is the image of x, so that y = x + 1. Then x = y - 1. This means that y - 1 is the unique element of Z that is sent to y by I. Consequently, I-1(y) = y - 1.

24

CompositionThe composition of two functions g:AB and f:BC, denoted by fg, is defined by

(fg)(a) = f(g(a)). This means that first, function g is applied

to element aA, mapping it onto an element of B, then, function f is applied to

this element of B, mapping it onto an element of C. Therefore, the composite

function maps from A to C.

25Example:

f(x) = 7x – 4, g(x) = 3x,f:RR, g:RR

(fg)(5) = f(g(5)) = f(15) = 105 – 4 = 101

(fg)(x) = f(g(x)) = f(3x) = 21x - 4

Note that composition f o g cannot be defined unless the range of g is a subset of the domain

of f.

26

(f-1f)(x) = f-1(f(x)) = x

The composition of a function and its inverse is the identity function i(x) = x.

Consequently (f-1f)= IA and (ff-1) = IB, where IA and IB are the identity functions on

the sets A and B, respectively. That is, (f -1) -1 = f .

Composition of a function and its inverse:

27

GraphsThe graph of a function f:AB is the set of

ordered pairs {(a, b) | aA and f(a) = b B}.

The graph is a subset of AB that can be used to visualize f in a two-dimensional

coordinate system.

28

Q:- Display the graph of the function I(n) = 2n + I from the set of integers to the set of integers. Solution: The graph of I is the set of ordered pairs of the form (n, 2n + I), where n is an integer.

Example:

29

Floor and Ceiling Functions

The floor and ceiling functions map the real numbers onto the integers (RZ).

The floor function assigns to rR the largest zZ with z r, denoted by r.

Examples: 2.3 = 2, 2 = 2, 0.5 = 0, -3.5 = -4

The ceiling function assigns to rR the smallest zZ with z r, denoted by r.

Examples: 2.3 = 3, 2 = 2, 0.5 = 1, -3.5 = -3

30

Graphs for (a) Floor and (b) Ceiling functions

31

32

Q:-In asynchronous transfer mode (ATM) (a communications protocol used on backbone networks), data are organized into cells of 53 bytes. How many ATM cells can be transmitted in I minute over a connection that transmits data at the rate of 500 kilobits per second? Solution: In I minute, this connection can transmit 500,000·60 = 30,000,000 bits. Each ATM cell is 53 bytes long, which means that it is 53 . 8 = 424 bits long. To determine the number of cells that can be transmitted in 1 minute, we determine the largest integer not exceeding the quotient when 30,000,000 is divided by 424. Consequently, L30,000,000/424J = 70,754 ATM cells can be transmitted in 1 minute over a 500 kilobit per second connection.

Example:

33The Pigeonhole Principle

The pigeonhole principle

Suppose a flock of pigeons fly into a set of pigeonholes to roost

If there are more pigeons than pigeonholes, then there must be at least 1 pigeonhole that has more than one pigeon in it

If k+1 or more objects are placed into k boxes, then there is at least one box containing two or more of the objects This is Theorem 1

34

Pigeonhole principle examples

In a group of 367 people, there must be two people with the same birthday As there are 366 possible birthdays

In a group of 27 English words, at least two words must start with the same letter As there are only 26 letters

35

Generalized pigeonhole principle

If N objects are placed into k boxes, then

there is at least one box containing N/k

objectsThis is Theorem 2

36

Generalized pigeonhole principle examples

Among 100 people, there are at least 100/12 = 9 born on the same month

How many students in a class must there be to ensure that 6 students get the same grade (one of A, B, C, D, or F)? The “boxes” are the grades. Thus, k = 5 Thus, we set N/5 = 6 Lowest possible value for N is 26

37

A bowl contains 10 red and 10 yellow ballsa) How many balls must be selected to ensure 3

balls of the same color? One solution: consider the “worst” case

Consider 2 balls of each color You can’t take another ball without hitting 3 Thus, the answer is 5

Via generalized pigeonhole principle How many balls are required if there are 2 colors, and

one color must have 3 balls? How many pigeons are required if there are 2 pigeon

holes, and one must have 3 pigeons? number of boxes: k = 2 We want N/k = 3 What is the minimum N? N = 5

38

39

Thank

You…..!!!

top related