Chapter 1: Introduction

Slides:



Advertisements
Similar presentations
With examples from Number Theory
Advertisements

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.
Mathematical induction Isaac Fung. Announcement ► Homework 1 released ► Due on 6 Oct 2008 (in class)
Proofs, Recursion and Analysis of Algorithms Mathematical Structures for Computer Science Chapter 2 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProofs,
Copyright © Cengage Learning. All rights reserved. CHAPTER 5 SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION.
Induction Lecture 5: Sep 21 (chapter of the book and chapter of the notes)
Logic and Proof. Argument An argument is a sequence of statements. All statements but the first one are called assumptions or hypothesis. The final statement.
Recursive Definitions Rosen, 3.4. Recursive (or inductive) Definitions Sometimes easier to define an object in terms of itself. This process is called.
1 Intro to Induction Supplementary Notes Prepared by Raymond Wong Presented by Raymond Wong.
Proof by Induction and contradiction Leo Cheung. The TAs Our office is in SHB117, feel free to come if you get problems about the course Or ask your questions.
Copyright © Zeph Grunschlag,
Methods of Proof Leo Cheung. A Quick Review Direct proof Proof by contrapositive Proof by contradiction Proof by induction.
Introduction to Proofs Goals 1.Introduce notion of proof & basic proof methods. 2.Distinguish between correct & incorrect arguments 3.Understand & construct.
Chapter 10 Sequences, Induction, and Probability Copyright © 2014, 2010, 2007 Pearson Education, Inc Mathematical Induction.
Methods of Proof Lecture 4: Sep 16 (chapter 3 of the book)
Properties of the Integers: Mathematical Induction
Methods of Proof & Proof Strategies
Induction and recursion
Introduction to Proofs
Mathematics Review Exponents Logarithms Series Modular arithmetic Proofs.
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,
Advance Data Structure and Algorithm COSC600 Dr. Yanggon Kim Chapter 1.
Methods of Proof. This Lecture Now we have learnt the basics in logic. We are going to apply the logical rules in proving mathematical theorems. Direct.
Chapter 1 Introduction. Goals Why the choice of algorithms is so critical when dealing with large inputs Basic mathematical background Review of Recursion.
CS 173, Lecture B August 27, 2015 Tandy Warnow. Proofs You want to prove that some statement A is true. You can try to prove it directly, or you can prove.
March 3, 2015Applied Discrete Mathematics Week 5: Mathematical Reasoning 1Arguments Just like a rule of inference, an argument consists of one or more.
Methods of Proofs PREDICATE LOGIC The “Quantifiers” and are known as predicate quantifiers. " means for all and means there exists. Example 1: If we.
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.
9.4 Mathematical Induction
Mathematical Background and Linked Lists. 2 Iterative Algorithm for Sum Find the sum of the first n integers stored in an array v : sum (v[], n) temp_sum.
P. 270 #47-49.
Methods of Proof Dr. Yasir Ali. Proof A (logical) proof of a statement is a finite sequence of statements (called the steps of the proof) leading from.
October 3, 2001CSE 373, Autumn Mathematical Background Exponents X A X B = X A+B X A / X B = X A-B (X A ) B = X AB X N +X N = 2X N 2 N +2 N = 2 N+1.
Nirmalya Roy School of Electrical Engineering and Computer Science Washington State University Cpt S 223 – Advanced Data Structures Math Review 1.
Copyright © Zeph Grunschlag, Induction Zeph Grunschlag.
CS104:Discrete Structures Chapter 2: Proof Techniques.
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.
Introduction to Proofs
Mathematical Induction I Lecture 5: Sep 20 (chapter of the textbook and chapter of the course notes)
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.
Methods of Proof Lecture 4: Sep 20 (chapter 3 of the book, except 3.5 and 3.8)
CS 173, Lecture B August 27, 2015 Tandy Warnow. Proofs You want to prove that some statement A is true. You can try to prove it directly, or you can prove.
Chapter 5 1. Chapter Summary  Mathematical Induction  Strong Induction  Recursive Definitions  Structural Induction  Recursive Algorithms.
CS151: Mathematical Foundations of Computing Mathematical Induction.
1 Proofs by Counterexample & Contradiction There are several ways to prove a theorem:  Counterexample: By providing an example of in which the theorem.
Induction (chapter of the book and chapter of the notes)
Chapter 1 Logic and Proof.
Hubert Chan (Chapters 1.6, 1.7, 4.1)
Methods of Proof A mathematical theorem is usually of the form pq
Hubert Chan (Chapters 1.6, 1.7, 4.1)
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:
Chapter 5 Induction and Recursion
Mathematical Induction
The Foundations: Logic and Proofs
CS201: Data Structures and Discrete Mathematics I
BaSIC Math Reviews.
Induction: One Step At A Time
Induction: One Step At A Time
Section 2.1 Proof Techniques Introduce proof techniques:   o        Exhaustive Proof: to prove all possible cases, Only if it is about a.
Applied Discrete Mathematics Week 9: Integer Properties
CMSC 341 Math Review.
Mathematical Induction
Chapter 11: Further Topics in Algebra
Mathematical Induction
Induction: One Step At A Time
Agenda Proofs (Konsep Pembuktian) Direct Proofs & Counterexamples
Introduction to Proofs
11.4 Mathematical Induction
Recursion.
Presentation transcript:

Chapter 1: Introduction Mark Allen Weiss: Data Structures and Algorithm Analysis in Java Chapter 1: Introduction Mathematical Review Lydia Sinapova, Simpson College

Mathematical Review Exponents Logarithms Recursive Definitions Function Growth Proofs

Exponents X0 = 1 by definition XaXb = X (a+b) Xa / Xb = X (a-b) Show that: X-n = 1 / Xn (Xa )b = Xab

Logarithms logaX = Y  aY = X , a > 0, X > 0 E.G: log28 = 3; 23 = 8 loga1 = 0 because a0 = 1 logX means log2X lgX means log10X lnX means logeX, where ‘e’ is the natural number

Logarithms loga(XY) = logaX + logaY loga(X/Y) = logaX – logaY loga(Xn) = nlogaX loga b = (log2 b)/ (log2a) a loga x = x

Recursive Definitions Basic idea: To define objects, processes and properties in terms of simpler objects, simpler processes or properties of simpler objects/processes.

Recursive Definitions Terminating rule - defining the object explicitly. Recursive rules - defining the object in terms of a simpler object.

Examples Factorials N! f(n) = n! f(0) = 1 i.e. 0! = 1 f(n) = n * f(n-1) i.e. n! = n * (n-1)!

Examples Fibonacci numbers F(0) = 1 F(1) = 1 F(k+1) = F(k) + F(k-1) 1, 1, 2, 3, 5, 8, ….

Function Growth lim ( n ) = ∞, n → ∞ lim ( na ) = ∞, n → ∞, a > 0 lim ( log( n )) = ∞, n → ∞ lim ( an ) = ∞, n → ∞, a > 0

Function Growth lim (f(x) + g(x)) = lim (f(x)) + lim (g(x)) lim (f(x) / g(x)) = lim (f '(x) / g '(x))

Examples lim (n/ n2 ) = 0, n → ∞ lim (n2 / n) = ∞, n → ∞

Some Derivatives (logan)' = (1/n) logae (an)' = (an) ln(a)

Proofs Direct proof Proof by induction Proof by counterexample Proof by contradiction Proof by contraposition

Direct Proof Based on the definition of the object / property Example: Prove that if a number is divisible by 6 then it is divisible by 2 Proof: Let m divisible by 6. Therefore, there exists q such that m = 6q 6 = 2 . 3 m = 6q = 2.3.q = 2r, where r = 3q Therefore m is divisible by 2

Proof by Induction We use proof by induction when our claim concerns a sequence of cases, which can be numbered Inductive base: Show that the claim is true for the smallest case, usually k = 0 or k = 1. Inductive hypothesis: Assume that the claim is true for some k Prove that the claim is true for k+1

Example of Proof by Induction Prove by induction that S(N) = Σ 2i = 2 (N+1) - 1, for any integer N ≥ 0    i=0 to N Inductive base Let n = 0. S(0) = 20 = 1 On the other hand, by the formula S(0) = 2 (0+1) – 1 = 1. Therefore the formula is true for n = 0 2. Inductive hypothesis Assume that S(k) = 2 (k+1) – 1 We have to show that S(k+1) = 2(k + 2) -1 By the definition of S(n): S(k+1) = S(k) + 2(k+1) = 2 (k+1) – 1 + 2(k+1) = 2. 2(k+1) – 1 = 2(k+2) – 1

Proof by Counterexample Used when we want to prove that a statement is false. Types of statements: a claim that refers to all members of a class. EXAMPLE: The statement "all odd numbers are prime" is false. A counterexample is the number 9: it is odd and it is not prime.

Proof by Contradiction Assume that the statement is false, i.e. its negation is true. Show that the assumption implies that some known property is false - this would be the contradiction Example: Prove that there is no largest prime number

Proof by Contraposition Used when we have to prove a statement of the form P  Q. Instead of proving P  Q, we prove its equivalent ~Q  ~P Example: Prove that if the square of an integer is odd then the integer is odd We can prove using direct proof the statement: If an integer is even then its square is even.