Download presentation
Presentation is loading. Please wait.
Published byDorcas Jennings Modified over 8 years ago
1
chapter 2 Mathematical preliminaries 2.1 Set, Relation and Functions 2.2 Proof Methods 2.3 Logarithms 2.4 Floor and Ceiling Functions 2.5 Factorial and Binomial Coefficients 2.6 The Pigeonhole Principle 2.7 Summations 2.8 Recurrence Relations
2
Set: Any collection of objects, which are called members or elements of the set. Set can be finite or infinite. Operation of Set: –Union: –Intersection: –Difference: –Complement: 2.1 Concept of Set
3
2.1 Concepts of Relations Relation: An ordered n-tuple (a 1, a 2, …, a n ) is an ordered collection that has a 1 as its first element, a 2 as its second element, …, and a n as its nth element. Binary Relation: Let A and B be two nonempty sets, R from A to B is a set of ordered pairs (a, b) where and, that is. Equivalence Relations: A relations R on a set A is called an equivalence relations if it is reflexive, symmetric and transitive.
4
Concepts of Functions Function: a function f is a (binary) relation such that for every element there is exactly one element with Dom(f) : the domain of f, is the set: Dom(f) = {a | for some Ran(f) : the range of R, is the set Ran(f) = {b | for some 2.1
5
2.2 Proof Methods Direct proof Indirect proof Proof by contradiction Proof by counterexample Mathematical induction
6
Direct Proof Method: To prove that “P->Q”, a direct proof works by assuming that P is true and then deducing the truth of Q from the truth of P. E.g. : To prove the assertion: If n is an even integer, then n 2 is an even integer. 2.2
7
Indirect proof Method: the implication “P->Q” is logically equivalent to the contrapositive implication E.g. Consider the assertion: if n 2 is an even integer, then n is an even integer. 2.2
8
Proof by Contradiction Method: to prove the statement “P->Q” is true, we start by assuming that P is true but Q is false. If this assumption leads to a contradiction, it means that our assumption that “Q is false” must be wrong, and hence Q must follow from P. E.g. to prove the assertion: there are infinitely many primes. 2.2
9
Proof by counterexample Method: to provide quick evidence that a postulated statement is false. When we are faced with a problem that requires proving or disproving a given assertion, we may start by trying to disprove the assertion with a counterexample. E.g. Let f(n)=n 2 +n+41 be a function defined on the set of nonnegative integers. Consider the assertion that f(n) is always a prime number. 2.2
10
Mathematical induction Method: to prove that a property holds for a sequence of natural numbers n0,n0+1,n0+2,…, where n0 can be 0 or 1 or any natural number. Suppose we want to prove a property P(n) for n=n0,n0+1,n0+2,…, whose truth follows from the truth of property P(n-1) for all n>n0. First, we prove that the property holds for n0. This is called the basic step. Then, we prove that whenever the property is true for n0,n0+1,…,n-1, then it must follow that the property is true for n.This is called the induction step. We then conclude that the property holds for all values of n>=n0. 2.2
11
Logarithms Let b be a positive real number greater than 1, x a real number, and suppose that for some positive real number y we have y=b x. Then, x is called the logarithm of y to the base b, and we write this as x=log b y 2.3
12
Logarithm_some formula log b xy=log b x+log b y Log b (c y )=ylog b c, x,y>0 2.3
13
Floor and Ceiling Functions 2.4 Let x be a real number. The floor of x, denoted by,is defined as the greatest integer less than or equal to x. The ceiling of x, denoted as, is defined as the least integer greater than or equal to x.
14
Floor and Ceiling Functions Theorem 2.1 Let f(x) be a monotonically increasing function such that if f(x) is integer, then x is integer. Then, 2.4
15
Factorial and Binomial Coefficients _factorial Permutation: A permutation of n distinct objects is defined to be an arrangement of the objects in a row. is called the number of permutations of n objects taken k at a time. is called the number of permutations of n objects. 2.5
16
Factorial and Binomial Coefficients _ Binomial Coefficients is called the combinations of n objects taken k at a time, which is choose k objects out of n objects, disregarding order. This quantity is denoted by, read “n choose k”, which is called the binomial coefficient. 2.5
17
Factorial and Binomial Coefficients _ Binomial Coefficients Some equations: in particular 2.5
18
Factorial and Binomial Coefficients _ Binomial Coefficients Theorem2.2: Let n be a positive integer, Then If let x=1, then If let x=-1, then 2.5
19
The Pigeonhole Principle Theorem 2.3 If n balls are distributed into m boxes, then (1) one box must contain at least balls, and (2) one box must contain at most balls. E.g. Let G=(V,E) be a connected undirected graph with m vertices. Let p be a path in G that visits n>m vertices. We show that p must contain a cycle. Since >=2, there is at least one vertex to be visited by p more than once. 2.6
20
Summation A sequence a 1,a 2,…, is defined formally as a function whose domain is the set of natural numbers. Let S=a 1,a 2,…,a n be any sequence of numbers. The sum a 1 +a 2 +…+a n can be expressed compactly using the notation: Where f(j) is a function that defines a permutation of the elements 1,2,…,n. 2.7
21
Summation-some formulae If c=2, then 2.7
22
Summation-some formulae If c = ½, then If |c|<1, and the sum is infinite, then 2.7
23
Approximation of summation by integration Let f(x) be a continuous function that is monotonically decreasing or increasing, and suppose we want to evaluate the summation We can obtain upper and lower bounds by approximating the summation by integration as follows if f(x) is decreasing, then if f(x) is increasing, then 2.7
24
Approximation of summation by integration E.g.1: derive an upper and lower bounds for the summation E.g. 2: derive upper and lower bounds for the harmonic series E.g. 3: derive upper and lower bounds for the series 2.7
25
2.8 Recurrence Relation Solution of linear homogeneous recurrence Solution of inhomogeneous recurrence Solution of divide-and -conquer recurrence Definition: A recurrence relation is called linear homogeneous with constant coefficients if it is of the form In this case, f(n) is said to be of degree k. When an additional term involving a constant or a function of n appears in the recurrence, then it is called inhomogeneous.
26
Linear homogeneous recurrences Form: Characteristic equation: First linear homogeneous recurrence The solution is: Second linear homogeneous recurrence The characteristic equation: The solution is: 2.8
27
Inhomogeneous recurrences Form: Solution: Form: Solution: 2.8
28
Solution of divide-and-conquer recurrence Form: Some technique: –Substitution –Iteration –Master theory 2.8
29
Substitution Method: To guess a solution and try to prove it by appealing to mathematical induction. Guess method 1: using the similar known function. E.g. To solve the function: Note: try to guess: 2.8.1
30
Substitution (cont.) Guess method 2: guess the loose upper and lower bounds, then make the bounds accurate. E.g. To solve the function: 2.8.1
31
Substitution (cont.) Change of variables: By changing the variable to make the recurrence equation to be simple one. E.g. To solve the function: 2.8.1
32
Iteration Method: Expanding the recurrence, change the equation to be summation, then using the solving technique of summation. E.g. To solve the function: 2.8.2
33
Master Theorem Let a>=1 and b>1 to be constants, f(n) is a function, T(n) is a function which defined in nonnegative integer set, and with the form: T(n) can be solved as follows, (1) if is a constant, then (2) if (3) if is a constant, and for all n, is a constant, then 2.8.3
34
Master Theorem (cont.) Intuitively, Master Theorem can be understood as follows, Just compare the functions T(n) can be solved as follows, (1) if bigger, then (2) if (3) If with same order, then 2.8.3
35
Master Theorem (cont.) e.g.1: To solve the function: e.g. 2: To solve the function: e.g. 3: To solve the function: e.g. 4: To solve the function: 2.8.3
36
Master Theorem (cont.) Theorem: Let b and d be nonnegative constants, and let n be a power of 2, then, the solution to the recurrence: f(n)=2f(n/2)+bnlogn n>=2; f(1)=d is f(n)=θ(nlog 2 n)
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.