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.

Slides:



Advertisements
Similar presentations
Lecture 3 – February 17, 2003.
Advertisements

Sequences and Mathematical Induction
Elementary Number Theory and Methods of Proof
Divide-and-Conquer Recursive in structure –Divide the problem into several smaller sub-problems that are similar to the original but smaller in size –Conquer.
April 9, 2015Applied Discrete Mathematics Week 9: Relations 1 Solving Recurrence Relations Another Example: Give an explicit formula for the Fibonacci.
Algorithms Recurrences. Definition – a recurrence is an equation or inequality that describes a function in terms of its value on smaller inputs Example.
Recurrence Relations Reading Material –Chapter 2 as a whole, but in particular Section 2.8 –Chapter 4 from Cormen’s Book.
CSE115/ENGR160 Discrete Mathematics 04/19/12 Ming-Hsuan Yang UC Merced 1.
Discrete Mathematics Lecture 4 Harper Langston New York University.
CS5371 Theory of Computation
Recursive Definitions Rosen, 3.4. Recursive (or inductive) Definitions Sometimes easier to define an object in terms of itself. This process is called.
Recurrence Relations Reading Material –Chapter 2 as a whole, but in particular Section 2.8 –Chapter 4 from Cormen’s Book.
Recursive Definitions Rosen, 3.4 Recursive (or inductive) Definitions Sometimes easier to define an object in terms of itself. This process is called.
Recurrence Relations Connection to recursive algorithms Techniques for solving them.
1 Section 3.3 Mathematical Induction. 2 Technique used extensively to prove results about large variety of discrete objects Can only be used to prove.
Properties of the Integers: Mathematical Induction
Induction and recursion
Copyright © Cengage Learning. All rights reserved. CHAPTER 11 ANALYSIS OF ALGORITHM EFFICIENCY ANALYSIS OF ALGORITHM EFFICIENCY.
Advanced Counting Techniques
1 © 2010 Pearson Education, Inc. All rights reserved 10.1 DEFINITION OF A SEQUENCE An infinite sequence is a function whose domain is the set of positive.
Rev.S08 MAC 1140 Module 12 Introduction to Sequences, Counting, The Binomial Theorem, and Mathematical Induction.
Induction and recursion
Chapter 6 Mathematical Induction
Discrete Mathematics, 1st Edition Kevin Ferland
Chapter 8. Section 8. 1 Section Summary Introduction Modeling with Recurrence Relations Fibonacci Numbers The Tower of Hanoi Counting Problems Algorithms.
Analysis of Algorithms
1 Introduction to Abstract Mathematics Chapter 4: Sequences and Mathematical Induction Instructor: Hayk Melikya 4.1- Sequences. 4.2,
The importance of sequences and infinite series in calculus stems from Newton’s idea of representing functions as sums of infinite series.  For instance,
Mathematical Preliminaries Strings and Languages Preliminaries 1.
Week 15 - Wednesday.  What did we talk about last time?  Review first third of course.
Foundations of Discrete Mathematics Chapters 5 By Dr. Dalia M. Gil, Ph.D.
Barnett/Ziegler/Byleen Finite Mathematics 11e1 Chapter 7 Review Important Terms, Symbols, Concepts 7.1. Logic A proposition is a statement (not a question.
Chapter 8 With Question/Answer Animations. Chapter Summary Applications of Recurrence Relations Solving Linear Recurrence Relations Homogeneous Recurrence.
ICS 253: Discrete Structures I Induction and Recursion King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Mathematical Preliminaries
(CSC 102) Lecture 23 Discrete Structures. Previous Lecture Summery  Sequences  Alternating Sequence  Summation Notation  Product Notation  Properties.
CS 103 Discrete Structures Lecture 13 Induction and Recursion (1)
Foundations of Discrete Mathematics Chapters 5 By Dr. Dalia M. Gil, Ph.D.
Asymptotics and Recurrence Equations Prepared by John Reif, Ph.D. Analysis of Algorithms.
Review 2 Basic Definitions Set - Collection of objects, usually denoted by capital letter Member, element - Object in a set, usually denoted by lower.
ADVANCED ALGORITHMS REVIEW OF ANALYSIS TECHNIQUES (UNIT-1)
 Quotient graph  Definition 13: Suppose G(V,E) is a graph and R is a equivalence relation on the set V. We construct the quotient graph G R in the follow.
Method of proofs.  Consider the statements: “Humans have two eyes”  It implies the “universal quantification”  If a is a Human then a has two eyes.
Mathematical Induction Section 5.1. Climbing an Infinite Ladder Suppose we have an infinite ladder: 1.We can reach the first rung of the ladder. 2.If.
Mathematical Induction
Divide and Conquer Faculty Name: Ruhi Fatima Topics Covered Divide and Conquer Matrix multiplication Recurrence.
CS104:Discrete Structures Chapter 2: Proof Techniques.
CompSci 102 Discrete Math for Computer Science March 13, 2012 Prof. Rodger Slides modified from Rosen.
Models of Computation: Automata and Formal Languages Sam M. Kim.
Chapter 5. Section 5.1 Climbing an Infinite Ladder Suppose we have an infinite ladder: 1.We can reach the first rung of the ladder. 2.If we can reach.
1 Review for Quiz 1. 2 Summations 3 Binomial expansion.
Week 15 - Wednesday.  What did we talk about last time?  Review first third of course.
Advanced Algorithms Analysis and Design
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
Chapter 2 1. Chapter Summary Sets The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions and sequences.
Week 8 - Wednesday.  What did we talk about last time?  Relations  Properties of relations  Reflexive  Symmetric  Transitive.
Advanced Algorithms Analysis and Design By Dr. Nazir Ahmad Zafar Dr Nazir A. Zafar Advanced Algorithms Analysis and Design.
Chapter 1 Logic and Proof.
Modeling with Recurrence Relations
Mathematical Preliminaries
Advanced Algorithms Analysis and Design
Chapter 3 The Real Numbers.
Lecture 7 Functions.
Section 2.1 Proof Techniques Introduce proof techniques:   o        Exhaustive Proof: to prove all possible cases, Only if it is about a.
Elementary Number Theory & Proofs
Advanced Analysis of Algorithms
Copyright © Cengage Learning. All rights reserved.
Mathematical Induction
Copyright © Cengage Learning. All rights reserved.
Agenda Proofs (Konsep Pembuktian) Direct Proofs & Counterexamples
Presentation transcript:

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

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

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.

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

2.2 Proof Methods Direct proof Indirect proof Proof by contradiction Proof by counterexample Mathematical induction

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

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

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

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

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

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

Logarithm_some formula log b xy=log b x+log b y Log b (c y )=ylog b c, x,y>0 2.3

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.

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

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

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

Factorial and Binomial Coefficients _ Binomial Coefficients Some equations: in particular 2.5

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

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

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

Summation-some formulae If c=2, then 2.7

Summation-some formulae If c = ½, then If |c|<1, and the sum is infinite, then 2.7

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

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

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.

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

Inhomogeneous recurrences Form: Solution: Form: Solution: 2.8

Solution of divide-and-conquer recurrence Form: Some technique: –Substitution –Iteration –Master theory 2.8

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

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

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

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

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

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

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

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)