Recitation 6: Functions and Set Operations
Part 1: Functions
- Describing functions as sets of tuples
- domain = D
- target = T
- {(element of D, element of T),(element of T, element of T),...}
- subset of D × T
- Function Validity
- are these functions valid? (diagrams will be drawn on the board)
- what is the vertical line test and how can we use it on these problems?
- Injective functions: how to tell if a function is injective
- Let f : ℝ → ℝ be defined by f(x)=5x + 1. Is f(x) injective?
- Let g : ℝ → ℝ be defined by g(x)=|x|. Is g(x) injective?
- what is the horizontal line test and how can we use it on these problems?
- Surjective functions: how to tell if a function is surjective. All the following functions are ℝ → ℝ. Which are surjective?
- h(x)=5x + 1
- j(x)=sin(x)
- k(x)=2x
Part 2: Set Operations
Let A = {a, b, c} and B = {x, y, z}
- What is A ∪ B?
- What is A ∩ B?
- What is the Cartesian product of A and B?
- Identity Laws
- Set Difference Law: A − B = A ∩ Bc
Part 3: Python
How do the exec
and eval
commands work?
Jupyter notebook used in class