Presentation is loading. Please wait.

Presentation is loading. Please wait.

Discrete Mathematics Math Review. Math Review: Exponents, logarithms, polynomials, limits, floors and ceilings* * This background review is useful for.

Similar presentations


Presentation on theme: "Discrete Mathematics Math Review. Math Review: Exponents, logarithms, polynomials, limits, floors and ceilings* * This background review is useful for."— Presentation transcript:

1 Discrete Mathematics Math Review

2 Math Review: Exponents, logarithms, polynomials, limits, floors and ceilings* * This background review is useful for learning how to analyze the time complexity of computer algorithms.

3 Exponents Let n be a positive integer, and b be a fixed positive real number. Then the function f b (n) = b n = b * b * b … * b is an exponential function. The base is b. (n times)

4 y = 5 x y = 2 x Exponentials with different bases

5 Rules for exponents b x b y = b x+y (not b xy !!) b 0 = 1 b x / b y = b x-y (b x ) y = b xy b x + b x = 2b x For example, 2 x + 2 x = 2 x+1 If b x = b y then x = y. (a, b, x, and y assumed to be real numbers)

6 Rules for exponents, continued (ab) x = a x b x (a/b) x = a x /b x If b is not equal to 0, then b –x = 1 / b x If x is a positive integer, then b 1/x = b For example, 9 1/2 = 9 = 3 (a, b, x, and y assumed to be real numbers) x

7 Logarithms Suppose b is a real number, with b >1, and x is positive. Then f b (x) = b x is a strictly increasing function of x, and it is a 1-1 correspondence. Therefore it has an inverse, called the logarithmic function to the base b (log b x). This means: b log x = x This is the logarithm of x to the base b. Therefore we can conclude that log b b x = x. b

8 Logarithms Definition: b x = y if and only if log b y = x Example: 10 2 = 100 means log 10 100 = 2

9 Rules for logarithms (b a real number greater than 1, and x and y positive real numbers) log b (xy) = log b x + log b y log b (x/y) = log b x – log b y log b (x y )= y log b x

10 y = log 2 x Logarithmic function

11 Relationship between logarithms with different bases Theorem: log a x = log b x / log b a Proof: Let X = log b x, Y = log b a, and Z = log a x. By the definition of logarithm: b X = x, b Y = a, and a Z = x. Thus b X = x = a Z = (b Y ) Z = b YZ and therefore X = YZ and therefore we conclude Z = X/Y.

12 Note on textbooks When the textbooks refer to log x without specifying a base, the base is assumed to be 2.

13 Factorial n! = n (n-1)(n-2)(n-3)…1 Example: 5! = 5*4*3*2*1

14 Polynomials A polynomial is an expression of the form: a n x n + a n-1 x n-1 +… + a 2 x 2 + a 1 x + a 0 The a i are real numbers called coefficients, and variable x is called an indeterminate. The largest exponent of the indeterminate in the polynomial determines its order. The order of the polynomial above is x n. A polynomial is typically written in decreasing size of exponents. Examples: 3x 4 + 6x 2 + x + 9 23x 7 + 4x 3 + 2

15 Rules for polynomials Rule for addition of two polynomials: (a n x n + … + a 2 x 2 + a 1 x + a 0 ) + (b n x n + … + b 2 x 2 + b 1 x + b 0 ) = (a n +b n )x n + … + (a 2 +b 2 )x 2 + (a 1 +b 1 )x + (a 0 +b 0 ) Rule for multiplication of two polynomials: (a n x n + … + a 2 x 2 + a 1 x + a 0 ) * (b m x m + … + b 2 x 2 + b 1 x + b 0 ) = (a n b m )x n+m + … + (a 0 b 2 + a 1 b 1 + a 2 b 0 )x 2 + (a 0 b 1 + a 1 b 0 )x + (a 0 b 0 ) In general, for each k >= 0, the coefficient of x k in the product is: a i b k-i, where a i = 0 if i > n and b j = 0 if j > m. i = 0 k

16 Intervals An open interval (a,b) consists of all real numbers between two fixed numbers a and b: I = {x | a < x < b} A closed interval [a,b] contains both endpoints: I = {x | a <= x <= b} A half-open interval (a,b] or [a,b) contains one endpoint: I = {x | a < x <= b} or I = {x | a <= x < b}

17 Neighborhoods The set of numbers that are close to a fixed number c is a neighborhood of c. This implies that |x – c| is small. A deleted neighborhood of c excludes c. In this case, |x – c| > 0. A symmetric neighborhood of c can be described by |x – c| < h for some small positive number h. A deleted symmetric neighborhood of c is described by 0 < |x – c| < h. An open interval containing c is a neighborhood of c. For example the open interval (c – h, c + h) is a symmetric neighborhood of c.

18 Limits Definition: Suppose f is a function defined for values of x near a. The domain of f need not include a, though it may. We say that: L is the limit of f(x) as x approaches a, and write: L = lim f(x) provided that, for every real number h > 0 there is a deleted neighborhood N of a such that: L – h < f(x) < L + h whenever x is in N and in the domain of f. x a

19 Limits Alternative definition: L is the limit of f(x) as x approaches a, and write: L = lim f(x) provided that, for every real number h > 0 there exists a real number d > 0 such that: |f(x) – L| < h whenever 0 < |x – a| < d. Translated to predicate logic: h d x ((0 < |x – a| < d) (|f(x) – L| < h)) when the universe of discourse for h and d is the set of positive real numbers and for x is the set of real numbers. x a

20 Floors and Ceilings For all real x and integer n:  x  = the greatest integer less than or equal to x  x  = the least integer less than or equal to x  n  =  n  = n  x  = n  n  x  n+1  x  = n  x-1  n  x  x  = n  n  x  n+1  x  = n  x  n  x+1  x + n  =  x  + n  n/2  +  n/2  = n  x  =   x   x  =   x  Examples:  3.9  = 4  3.9  = 3  3.9  =  3 =   3.9   3.9  =  4 =   3.9 


Download ppt "Discrete Mathematics Math Review. Math Review: Exponents, logarithms, polynomials, limits, floors and ceilings* * This background review is useful for."

Similar presentations


Ads by Google