Back to Discrete Mathematics: An Open Introduction

Functions

Domain, codomain and image, and the injective/surjective/bijective distinctions later chapters lean on for counting arguments.

Discrete Mathematics: An Open Introduction, Functions

Status
FlagsLoading your progress…

11 exercises

Exercise 7

Consider the function f:{1,2,3,4,5}→{1,2,3,4}f:\{1,2,3,4,5\} \to \{1,2,3,4\} given by the table below:

  1. Is ff injective? Explain.

  2. Is ff surjective? Explain.

  3. Write the function using two-line notation.

2.5

Exercise 12

For each function given below, determine whether or not the function is injective and whether or not the function is surjective.

  1. f:N→Nf:\N \to \N given by f(n)=n+4f(n) = n+4.
  2. f:Z→Zf:\Z \to \Z given by f(n)=n+4f(n) = n+4.
  3. f:Z→Zf:\Z \to \Z given by f(n)=5n−8f(n) = 5n - 8.
  4. f:Z→Zf:\Z \to \Z given by f(n)={n/2 if n is even(n+1)/2 if n is odd.f(n) = \begin{cases}n/2 & \text{ if } n \text{ is even} \\ (n+1)/2 & \text{ if } n \text{ is odd} . \end{cases}
2.5

Exercise 13

Let A={1,2,3,…,10}A = \{1,2,3,\ldots,10\}. Consider the function f:P(A)→Nf:\pow(A) \to \N given by f(B)=∣B∣f(B) = |B|. That is, ff takes a subset of AA as an input and outputs the cardinality of that set.

  1. Is ff injective? Prove your answer.

  2. Is ff surjective? Prove your answer.

  3. Find f−1(1)f\inv(1).

  4. Find f−1(0)f\inv(0) .

  5. Find f−1(12)f\inv(12).

2.5

Exercise 16

Let f:X→Yf:X \to Y be some function. Suppose 3∈Y3 \in Y. What can you say about f−1(3)f\inv(3) if you know,

  1. ff is injective? Explain.

  2. ff is surjective? Explain.

  3. ff is bijective? Explain.

2.5

Exercise 17

Find a set XX and a function f:X→Nf:X \to \N so that f−1(0)∪f−1(1)=Xf\inv(0) \cup f\inv(1) = X.

2.5

Exercise 21

Consider the function f:Z→Zf:\Z \to \Z given by f(n)={n+1 if n is evenn−3 if n is odd.f(n) = \begin{cases}n+1 & \text{ if }n\text{ is even} \\ n-3 & \text{ if }n\text{ is odd} . \end{cases}

  1. Is ff injective? Prove your answer.

  2. Is ff surjective? Prove your answer.

2.5

Exercise 22

At the end of the semester a teacher assigns letter grades to each of her students. Is this a function? If so, what sets make up the domain and codomain, and is the function injective, surjective, bijective, or neither?

2.5

Exercise 24

Seven players are playing 5-card stud. Each player initially receives 5 cards from a deck of 52. Is this a function? If so, what sets make up the domain and codomain, and is the function injective, surjective, bijective, or neither?

2.5

Exercise 25

Consider the function f:N→Nf:\N \to \N that gives the number of handshakes that take place in a room of nn people assuming everyone shakes hands with everyone else. Give a recursive definition for this function.

2.5

Exercise 26

Let f:X→Yf:X \to Y be a function and A⊆XA \subseteq X be a finite subset of the domain. What can you say about the relationship between ∣A∣\card{A} and ∣f(A)∣\card{f(A)}? Consider both the general case and what happens when you know ff is injective, surjective, or bijective.

2.5

Exercise 27

Let f:X→Yf:X \to Y be a function and B⊆YB \subseteq Y be a finite subset of the codomain. What can you say about the relationship between ∣B∣\card{B} and ∣f−1(B)∣\card{f\inv(B)}? Consider both the general case and what happens when you know ff is injective, surjective, or bijective.

2.5

Adapted from Discrete Mathematics: An Open Introduction © 2013–2019 Oscar Levin. Licensed under CC BY-SA 4.0. Source: Discrete Mathematics: An Open Introduction. Imported at revision 1e2e26b.