1
Based on slides by Patrice Belleville and Steve Wolfman
CPSC 121: Models of Computation
Unit 12: Functions
PART 1
REVIEW OF TEXT READING
These pages correspond to text reading and are not covered in the lectures.
Unit 12: Functions 2
What is a Function?
Mostly, a function is what you learned it was all through K-12 mathematics, with strange vocabulary to make it more interesting… A function f:A B maps values from its domain A to its co-domain B. Domain Co-domain
f(x) = x3 f(x) = x mod 4 f(x) = x
Unit 12: Functions 3
Plotting Functions
f(x) = x3 f(x) = x mod 4 f(x) = x
Not every function is easy to plot!
Unit 12: Functions 5