22
321 Section, Week 3 Natalie Linnell

321 Section, Week 3 Natalie Linnell. Functions A function from A to B is an assignment of exactly one element of B to each element of A. We write f(a)

Embed Size (px)

Citation preview

Page 1: 321 Section, Week 3 Natalie Linnell. Functions A function from A to B is an assignment of exactly one element of B to each element of A. We write f(a)

321 Section, Week 3

Natalie Linnell

Page 2: 321 Section, Week 3 Natalie Linnell. Functions A function from A to B is an assignment of exactly one element of B to each element of A. We write f(a)

Functions• A function from A to 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 f to the element a of A. If f is a function from A to B, we write f: A→B. We say that f maps A to B

• Domain: A• Codomain: B• If f(a) = b, b is the image of a, a is the preimage of b

• Range of f is the set of all images of elements of A

Page 3: 321 Section, Week 3 Natalie Linnell. Functions A function from A to B is an assignment of exactly one element of B to each element of A. We write f(a)

Identify the domain, codomain, range, image of a, preimage of 2

for the following A B

a

b

c

d

e

1

2

3

4

Page 4: 321 Section, Week 3 Natalie Linnell. Functions A function from A to B is an assignment of exactly one element of B to each element of A. We write f(a)

What does it mean for a function to be one-to-one (aka injective)?

• Use a picture

F(a) = f(a’)->a=a’

Page 5: 321 Section, Week 3 Natalie Linnell. Functions A function from A to B is an assignment of exactly one element of B to each element of A. We write f(a)

What does it mean for a function to be onto (aka surjective)?

Every b has an a f(a)=b Mention that a bijection is both

Page 6: 321 Section, Week 3 Natalie Linnell. Functions A function from A to B is an assignment of exactly one element of B to each element of A. We write f(a)

Is this -a function?-one-to-one?-onto?

a

b

c

d

e

1

2

3

4

Page 7: 321 Section, Week 3 Natalie Linnell. Functions A function from A to B is an assignment of exactly one element of B to each element of A. We write f(a)

Is this -a function?-one-to-one?-onto?

a

b

c

d

e

1

2

3

4

5

6

Page 8: 321 Section, Week 3 Natalie Linnell. Functions A function from A to B is an assignment of exactly one element of B to each element of A. We write f(a)

What’s an inverse?

F(a) = b -> f-1(b) = a

Page 9: 321 Section, Week 3 Natalie Linnell. Functions A function from A to B is an assignment of exactly one element of B to each element of A. We write f(a)

What’s the inverse of

• x

• x2

Page 10: 321 Section, Week 3 Natalie Linnell. Functions A function from A to B is an assignment of exactly one element of B to each element of A. We write f(a)

What kinds of functions have inverses?

bijections

Page 11: 321 Section, Week 3 Natalie Linnell. Functions A function from A to B is an assignment of exactly one element of B to each element of A. We write f(a)

What’s the composition of two functions?

• Draw a picture

Fog(a) = f(g(a))

Page 12: 321 Section, Week 3 Natalie Linnell. Functions A function from A to B is an assignment of exactly one element of B to each element of A. We write f(a)

A few more things that you probably already know

• Increasing

• Strictly increasing

• Decreasing

• Strictly decreasing

• Product

• Sum

• Ceiling function

• Floor function

Page 13: 321 Section, Week 3 Natalie Linnell. Functions A function from A to B is an assignment of exactly one element of B to each element of A. We write f(a)

Homework 1

• Associativity (parentheses matter!)

Page 14: 321 Section, Week 3 Natalie Linnell. Functions A function from A to B is an assignment of exactly one element of B to each element of A. We write f(a)

HW1

• Proof style• Only if

Page 15: 321 Section, Week 3 Natalie Linnell. Functions A function from A to B is an assignment of exactly one element of B to each element of A. We write f(a)

Fallacies

• Affirming the conclusion

• Denying the hypothesis

P->q, q, therefore p;;p->q, -p, therefore -q

Page 16: 321 Section, Week 3 Natalie Linnell. Functions A function from A to B is an assignment of exactly one element of B to each element of A. We write f(a)

Machine representation of sets

• Store the set somewhere in a given order

• Represent a subset by a sequence of zeros and ones that express subset membership

• U = {1,2,3,4,5,6,7,8,9,10}

• Subset {1,2,3} = 1110000000

Page 17: 321 Section, Week 3 Natalie Linnell. Functions A function from A to B is an assignment of exactly one element of B to each element of A. We write f(a)

Represent subsets of {1,2,3,4,5,6,7,8,9,10}

• Odd numbers

• Even numbers

• How do you find the complement of a subset given its binary representation?

Page 18: 321 Section, Week 3 Natalie Linnell. Functions A function from A to B is an assignment of exactly one element of B to each element of A. We write f(a)

Union and intersection

• How would you compute the union of

1010101010 and 1111100000?

How would you compute the intersection of

1010101010 and 1111100000

Page 19: 321 Section, Week 3 Natalie Linnell. Functions A function from A to B is an assignment of exactly one element of B to each element of A. We write f(a)

Use a direct proof to prove that the product of two rational numbers is

rational

Page 20: 321 Section, Week 3 Natalie Linnell. Functions A function from A to B is an assignment of exactly one element of B to each element of A. We write f(a)

(AUB) (AUBUC)

Page 21: 321 Section, Week 3 Natalie Linnell. Functions A function from A to B is an assignment of exactly one element of B to each element of A. We write f(a)

(B-A)U(C-A)=(BUC)-A

Page 22: 321 Section, Week 3 Natalie Linnell. Functions A function from A to B is an assignment of exactly one element of B to each element of A. We write f(a)

Use a direct proof to show that every odd integer is the difference

of two squares

K+1, k; 1.6 #7