130 likes | 258 Views
CMSC 203 / 0201 Fall 2002. Week #3 – 9/11/13 September 2002 Prof. Marie desJardins. TOPICS. Functions Sequences and summations Growth of functions; big-O notation. MON 9/9 FUNCTIONS (1.6). CONCEPTS / VOCABULARY. Function/mapping Domain, codomain, image, pre-image
E N D
CMSC 203 / 0201Fall 2002 Week #3 – 9/11/13 September 2002 Prof. Marie desJardins
TOPICS • Functions • Sequences and summations • Growth of functions; big-O notation
CONCEPTS / VOCABULARY • Function/mapping • Domain, codomain, image, pre-image • One-to-one/injective, onto/surjective, one-to-one correspondence/bijective • Inverse/invertible functions, compositions, graphs • Floor, ceiling
Examples • Exercise 1.6.15: Determine whether each of the following functions is a bijection from R to R. • (a) f(x) = 2x + 1 • (b) f(x) = x2 + 1 • (c) f(x) = x3 • (d) f(x) = (x2 + 1) / (x2 + 2) • Exercise 1.6.33: Show that x - ½ is the closest integer to the [real] x, except when x is midway between two integers, when it is the smaller of these two integers.
Examples II • Exercise 1.6.55: Find the inverse function of f(x) = x3 + 1. • Exercise 1.6.58: Suppose that f is a function from A to B, where A and B are finite sets with |A| = |B|. Show that f is one-to-one if and only if it is onto.
WED 9/11SEQUENCES AND SUMMATIONS (1.7) ** Homework #1 due today! ** ** (Ungraded) quiz today! **
CONCEPTS / VOCABULARY • Sequences, terms, strings • Arithmetic progressions, geometric progressions, geometric series • Summation , index of summation, lower and upper limit • Standard summation formulas: Table 1.6.2 • Cardinality, countability
Examples • Exercise 1.7.19: Show that j=1n (aj – aj-1) = an – a0 where a0, a1, …, an is a sequence of real numbers. This type of sum is called telescoping. • Exercise 1.7.25: Find a formula for k=0m k, when m is a positive integer. (Hint: use the formula for k=1n k3.)
Examples II • Exercise 1.7.31: Determine whether each of the following sets is countable or uncountable. For those that are countable, exhibit a one-to-one correspondence between the set of natural numbers and that set. • (a) the negative integers • (b) the even integers • (c) the real numbers between 0 and ½ • (d) integers that are multiples of 7
CONCEPTS / VOCABULARY • Big-O notation (upper bound on growth of f(x)) • f(x) is O(g(x)) if there exist constants C and k such that |f(x)| C |g(x)|whenever x k • Triangle inequality • Growth of (f1 + f2)(x), (f1 f2)(x) • Big-Omega (lower bound on growth of f(x)) • Big-Theta (upper and lower bound)
Examples • Exercise 1.8.7(a): Find the least integer n such that f(x) = 2 x3 + x2 log xis O(xn). • Exercise 1.8.25: Show that f(x) is (g(x)) iff f(x) is O(g(x)) and g(x) is O(f(x)). • Exercise 1.8.39: If f1(x) and f2(x) are functions from the set of positive integers to the set of positive real numbers, and f1(x) and f2(x) are both (g(x)), is (f1- f2)(x) also (g(x))? Either prove that it is or give a counterexample.