Functions (Rosen, Section 2.3) TOPICS Definition of Function - - PowerPoint PPT Presentation

functions rosen section 2 3
SMART_READER_LITE
LIVE PREVIEW

Functions (Rosen, Section 2.3) TOPICS Definition of Function - - PowerPoint PPT Presentation

Functions (Rosen, Section 2.3) TOPICS Definition of Function Domain, Codomain, Range One-to-One Functions Increasing Functions A B B A Whats the 1 difference between 2.4 2 codomain


slide-1
SLIDE 1

Functions (Rosen, Section 2.3)

TOPICS

  • Definition of Function
  • Domain, Codomain,

Range

  • One-to-One Functions
  • Increasing Functions
  • A

B B A

  • Range: {1,2,4,5}

2.4 1.6 5.0 4.8 2.3 1 2 3 4 5 6 Domain Codomain

A B

What’s the difference between codomain and range?

Range contains the codomain values that A maps to

  • R

Z

slide-2
SLIDE 2
  • ƒ

A ƒ A

Only works on set Z

Successor function, ƒsucc(x) = x+1, on Z, maps a number into the number following it.

f(1) = 2

f(-17) = -16

f(a) Does NOT map to b

Predecessor function, ƒpred(x) = x-1, on Z, maps a number into the number before it.

f(1) = 0

f(-17) = -18

  • ƒ

R ( Z

  • ƒ

Need smallest integer that is at least as large as 100/8

100/8 = 12.5 But we don’t work with ½ a byte. So we need 13 bytes

  • ƒ

Z R

  • ƒ

±

  • ƒ

Z R

No Way!

Say it ain’t so!!

√ ƒ ±√

slide-3
SLIDE 3
  • f

f(a) = f(b) a = b a b f

  • Z

Z

1 2 3 4 1 2 3 4 … 9 … 16

  • Z

Z – – ƒ ƒ

  • How dare they

have the same codomain!

INCONCEIVABLE!! Unique at last!!

  • f

f(x) <= f(y) f(x) < f(y),

– x < y – x y f

  • 1.5 < 1.7 and floor(1.5) = 1 = floor(1.7)

1.2 < 2.2 and floor(1.2) = 1 < 2 = floor(2.2),

BUT it is NOT STRICTLY increasing. So YES floor is an increasing function

When mapping Z to Z or R to R: square(-2) = 4 > 1 = square (1) yet -2 < 1

NO square is NOT an increasing function UNLESS…. Domain is restricted to positive #’s

slide-4
SLIDE 4
  • – Math.min

– Math.abs

Finds the minimum value between two integers Finds the absolute value of a number