Lecture 2 Based on Chapter 1, Weiss. Mathematical Foundation Series and summation: 1 + 2 + 3 + ……. N = N(N+1)/2 (arithmetic series) 1 + r+ r 2 + r 3 +………r.

Slides:



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

Lecture 11 Mathematical Induction CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Copyright © Cengage Learning. All rights reserved. CHAPTER 5 SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION.
Sets, Combinatorics, Probability, and Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS Slides.
Week 5 - Friday.  What did we talk about last time?  Sequences  Summation and production notation  Proof by induction.
Basic properties of the integers
Induction and recursion
Recursion COMP171 Fall Recursion / Slide 2 Recursion * In some problems, it may be natural to define the problem in terms of the problem itself.
Discrete Structures Chapter 5: Sequences, Mathematical Induction, and Recursion 5.2 Mathematical Induction I [Mathematical induction is] the standard proof.
Chapter 10 Sequences, Induction, and Probability Copyright © 2014, 2010, 2007 Pearson Education, Inc Mathematical Induction.
CSE 220 (Data Structures and Analysis of Algorithms) Instructor: Saswati Sarkar T.A. Dimosthenes Anthomelidis
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.
Methods of Proof Lecture 4: Sep 16 (chapter 3 of the book)
1 Strong Mathematical Induction. Principle of Strong Mathematical Induction Let P(n) be a predicate defined for integers n; a and b be fixed integers.
Mathematical Induction
Properties of the Integers: Mathematical Induction
Copyright © 2007 Pearson Education, Inc. Slide 8-1.
Sequences and Series (T) Students will know the form of an Arithmetic sequence.  Arithmetic Sequence: There exists a common difference (d) between each.
MATH 224 – Discrete Mathematics
Arithmetic Sequences and Series
Sequences and Series By: Olivia, Jon, Jordan, and Jaymie.
Lecture 9. Arithmetic and geometric series and mathematical induction
Discrete Mathematics, 1st Edition Kevin Ferland
Introduction to Proofs
Mathematics Review Exponents Logarithms Series Modular arithmetic Proofs.
Chapter 2 - Mathematical Review Functions
Mathematical Induction. F(1) = 1; F(n+1) = F(n) + (2n+1) for n≥ F(n) n F(n) =n 2 for all n ≥ 1 Prove it!
1 Introduction to Abstract Mathematics Chapter 4: Sequences and Mathematical Induction Instructor: Hayk Melikya 4.1- Sequences. 4.2,
1 CE 221 Data Structures & Algorithms Chapter 1 Introduction Text: Read Weiss, §1.1 – 1.3 Izmir University of Economics.
Advance Data Structure and Algorithm COSC600 Dr. Yanggon Kim Chapter 1.
Chapter 1 Introduction. Goals Why the choice of algorithms is so critical when dealing with large inputs Basic mathematical background Review of Recursion.
Chapter 5 Existence and Proof by contradiction
Methods of Proof Lecture 3: Sep 9. This Lecture Now we have learnt the basics in logic. We are going to apply the logical rules in proving mathematical.
Section 12-1 Sequence and Series
Basic Mathematics Chapter 1 (1.2 and 1.3) Weiss. Recursion / Slide 2 Logarithms * Definition: if and only if * Theorem 1.1: n Proof: apply the definition.
Math & Recursion COMP171 Fall Recursion / Slide 2 Logarithms * Definition: if and only if * Theorem 1.1: n Proof: apply the definition * Theorem.
Data Structures and Algorithm Analysis Introduction Lecturer: Ligang Dong, egan Tel: , Office: SIEE Building.
Section 3.3: Mathematical Induction Mathematical induction is a proof technique that can be used to prove theorems of the form:  n  Z +,P(n) We have.
CompSci 102 Discrete Math for Computer Science March 1, 2012 Prof. Rodger Slides modified from Rosen.
Chapter 1: Introduction
(CSC 102) Lecture 23 Discrete Structures. Previous Lecture Summery  Sequences  Alternating Sequence  Summation Notation  Product Notation  Properties.
Foundations of Discrete Mathematics Chapters 5 By Dr. Dalia M. Gil, Ph.D.
Mathematical Induction
1 CMSC 341 Math Review. 2 Exponents Identities (X A ) B = X AB X A * X B = X A+B X A / X B = X A-B X A + X B  X A+B.
Based on Lecture Slides from Steven Rudich, CMU 15 a.
1 2/21/2016 MATH 224 – Discrete Mathematics Sequences and Sums A sequence of the form ar 0, ar 1, ar 2, ar 3, ar 4, …, ar n, is called a geometric sequence.
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.
Section 1.7. Definitions A theorem is a statement that can be shown to be true using: definitions other theorems axioms (statements which are given as.
Section 8.4 Mathematical Induction. Mathematical Induction In this section we are going to perform a type of mathematical proof called 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 we can reach a particular.
13.3 Arithmetic and Geometric Series and Their Sums Finite Series.
9.3 Geometric Sequences and Series. Common Ratio In the sequence 2, 10, 50, 250, 1250, ….. Find the common ratio.
Methods of Proof Lecture 4: Sep 20 (chapter 3 of the book, except 3.5 and 3.8)
1 Discrete Mathematical Mathematical Induction ( الاستقراء الرياضي )
Analysis of Algorithms CS 477/677 Instructor: Monica Nicolescu Lecture 2.
1 Proofs by Counterexample & Contradiction There are several ways to prove a theorem:  Counterexample: By providing an example of in which the theorem.
MATH 224 – Discrete Mathematics
Use mathematical induction to prove that the formula is true for all natural numbers m. {image} Choose the first step of the proof from the following:
Mathematical Induction Recursion
BaSIC Math Reviews.
Induction and recursion
PROOF BY CONTRADICTION
Elementary Number Theory & Proofs
Induction Chapter
Chapter 11: Further Topics in Algebra
Mathematical Induction
Examples of Mathematical Proof
Geometric Sequences and Series
11.4 Mathematical Induction
Arithmetic and geometric sequences and series
Presentation transcript:

Lecture 2 Based on Chapter 1, Weiss

Mathematical Foundation Series and summation: ……. N = N(N+1)/2 (arithmetic series) 1 + r+ r 2 + r 3 +………r N-1 = (1- r N )/(1-r), (geometric series)  1/(1-r), r < 1, large N Sum of squares: ………N 2 = N(N + 1)(2N + 1)/6

Properties of a log Function log x a = b if x b = a (we will use base 2 mostly, but may use other bases occasionally) Will encounter log functions again and again! log n bits needed to encode n messages. log (ab ) = log a + log b log (a/b ) = log a - log b log a b = b log a log b a = log c a/ log c b a log n = n log a

a mn = (a m ) n = (a n ) m a m+n = a m a n (2  n) 0.5 (n/e) n  n   (2  n) 0.5 (n/e) n + (1/12n)

Proof By Induction Prove that a property holds for input size 1 (base case) Assume that the property holds for input size 1,…n. Show that the property holds for input size n+1. Then, the property holds for all input sizes, n.

Prove that the sum of 1+2+…..+n = n(n+1)/2 1(1+1)/2 = 1 Thus the property holds for n = 1 (base case) Assume that the property holds for n=1,…,m, Thus …..+m = m(m+1)/2 We will show that the property holds for n = m + 1, that is ….. + m + m + 1 = (m+1)(m+2)/2 This means that the property holds for n=2 since we have shown it for n=1 Again this means that the property holds for n=3 and then for n=4 and so on.

Now we show that the property holds for n = m + 1, that is ….. + m + m + 1 = (m+1)(m+2)/2 assuming that …..+m = m(m+1)/ …..+m + (m+1) = m(m+1)/2 + (m+1) = (m+1)(m/2 + 1) = (m+1)(m+2)/2

Sum of Squares Now we show that ………n 2 = n(n + 1)(2n + 1)/6 1(1+1)(2+1)/6 = 1 Thus the property holds for n = 1 (base case) Assume that the property holds for n=1,..m, Thus ………m 2 = m(m + 1)(2m + 1)/6 and show the property for m + 1, that is show that ………m 2 +(m+1) 2 = (m+1)(m + 2)(2m + 3)/6

………m 2 + (m+1) 2 = m(m + 1)(2m + 1)/6 + (m+1) 2 =(m+1)[m(2m+1)/6 +m+1] = (m+1)[2m 2 + m + 6m +6]/6 = (m+1)(m + 2)(2m + 3)/6

Fibonacci Numbers Sequence of numbers, F 0 F 1, F 2, F 3,……. F 0 = 1, F 1 = 1, F i = F i-1 + F i-2, F 2 = 2, F 3 = 3, F 4 = 5, F 5 = 8

Will prove that F n+1 < (5/3) n+1, F 2 < (5/3 ) 2 Let the property hold for 1,…k Thus F k+1 < (5/3) k+1, F k < (5/3) k F k+2 = F k + F k+1, < (5/3) k + (5/3) k+1 = (5/3) k (5/3 + 1) < (5/3) k (5/3) 2

Proof By Counter Example Want to prove something is not true! Give an example to show that it does not hold! Is F N  N 2 ? No, F 11 = 144 However, if you were to show that F N  N 2 then you need to show for all N, and not just one number.

Proof By Contradiction Suppose, you want to prove something. Assume that what you want to prove does not hold. Then show that you arrive at an impossibility. Example: The number of prime numbers is not finite!

Suppose the number of primes is finite, k. The primes are P 1, P 2….. P k The largest prime is P k Consider the number N = 1 + P 1, P 2….. P k N is larger than P k Thus N is not prime. So N must be product of some primes. However, none of the primes P 1, P 2….. P k divide N exactly. So N is not a product of primes. (contradiction)

Reading Assignment Chapter 1, Weiss, Sections 1.1, 1.2 Proof for Fibonacci numbers somewhat easier in class notes.