1 Mathematical Induction An inductive proof has three parts: –Basis case –Inductive hypothesis –Inductive step Related to recursive programming.

Slides:



Advertisements
Similar presentations
Chapter 2 Revision of Mathematical Notations and Techniques
Advertisements

Mathematical Induction
Trees Chapter 11.
WSPD Applications.
22C:19 Discrete Structures Induction and Recursion Spring 2014 Sukumar Ghosh.
22C:19 Discrete Structures Induction and Recursion Fall 2014 Sukumar Ghosh.
Recursive Definitions and Structural Induction
Copyright © Cengage Learning. All rights reserved. CHAPTER 5 SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION.
Induction and Recursion. Odd Powers Are Odd Fact: If m is odd and n is odd, then nm is odd. Proposition: for an odd number m, m k is odd for all non-negative.
CSE115/ENGR160 Discrete Mathematics 04/03/12 Ming-Hsuan Yang UC Merced 1.
Discussion #131/18 Discussion #13 Induction (the process of deriving generalities from particulars) Mathematical Induction (deductive reasoning over the.
Recursive Definitions Rosen, 3.4. Recursive (or inductive) Definitions Sometimes easier to define an object in terms of itself. This process is called.
Rooted Trees. More definitions parent of d child of c sibling of d ancestor of d descendants of g leaf internal vertex subtree root.
CSE115/ENGR160 Discrete Mathematics 03/31/11
1 Background Information for the Pumping Lemma for Context-Free Languages Definition: Let G = (V, T, P, S) be a CFL. If every production in P is of the.
1 A Single Final State for Finite Accepters. 2 Observation Any Finite Accepter (NFA or DFA) can be converted to an equivalent NFA with a single final.
Fall 2004COMP 3351 Regular Expressions. Fall 2004COMP 3352 Regular Expressions Regular expressions describe regular languages Example: describes the language.
Induction and recursion
Recursive Definitions and Structural Induction
Discrete Mathematics CS 2610 March 26, 2009 Skip: structural induction generalized induction Skip section 4.5.
Induction and recursion
Chapter 6 Mathematical Induction
Inductive Proof (the process of deriving generalities from particulars) Mathematical Induction (reasoning over the natural numbers)
Chapter 4: Induction and Recursion
Section 5.3. Section Summary Recursively Defined Functions Recursively Defined Sets and Structures Structural Induction.
Multiway Trees. Trees with possibly more than two branches at each node are know as Multiway trees. 1. Orchards, Trees, and Binary Trees 2. Lexicographic.
Tree A connected graph that contains no simple circuits is called a tree. Because a tree cannot have a simple circuit, a tree cannot contain multiple.
Analysis techniques Pasi Fränti Ordo O(g) – Upper Bound f(n) ≤ c∙g(n) Omega  (g)– Lower Bound f(n) ≥ c∙g(n) Theta Θ(g)– Exact limit: c 1 ∙g(n)
Fall 2005Costas Busch - RPI1 Mathematical Preliminaries.
Prof. Busch - LSU1 Mathematical Preliminaries. Prof. Busch - LSU2 Mathematical Preliminaries Sets Functions Relations Graphs Proof Techniques.
 Rooted tree and binary tree  Theorem 5.19: A full binary tree with t leaves contains i=t-1 internal vertices.
5.5.2 M inimum spanning trees  Definition 24: A minimum spanning tree in a connected weighted graph is a spanning tree that has the smallest possible.
5.2 Trees  A tree is a connected graph without any cycles.
5.5.3 Rooted tree and binary tree  Definition 25: A directed graph is a directed tree if the graph is a tree in the underlying undirected graph.  Definition.
Mathematical Induction
4.3 Recursive Definitions and Structural Induction Sometimes it is difficult to define an object explicitly. However, it may be easy to define this object.
Induction Proof. Well-ordering A set S is well ordered if every subset has a least element. [0, 1] is not well ordered since (0,1] has no least element.
5.5.2 M inimum spanning trees  Definition 24: A minimum spanning tree in a connected weighted graph is a spanning tree that has the smallest possible.
ICS 253: Discrete Structures I Induction and Recursion King Fahd University of Petroleum & Minerals Information & Computer Science Department.
CS 103 Discrete Structures Lecture 13 Induction and Recursion (1)
1 Recursive Definitions and Structural Induction CS 202 Epp section ??? Aaron Bloomfield.
Inductive Proofs and Inductive Definitions Jim Skon.
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.
Classifications LanguageGrammarAutomaton Regular, right- linear Right-linear, left-linear DFA, NFA Context-free PDA Context- sensitive LBA Recursively.
1 Mathematical Preliminaries. 2 Sets Functions Relations Graphs Proof Techniques.
CS104:Discrete Structures Chapter 2: Proof Techniques.
CompSci 102 Discrete Math for Computer Science March 13, 2012 Prof. Rodger Slides modified from Rosen.
Chapter 5 With Question/Answer Animations 1. Chapter Summary Mathematical Induction - Sec 5.1 Strong Induction and Well-Ordering - Sec 5.2 Lecture 18.
Section Recursion 2  Recursion – defining an object (or function, algorithm, etc.) in terms of itself.  Recursion can be used to define sequences.
Advanced Algorithms Analysis and Design By Dr. Nazir Ahmad Zafar Dr Nazir A. Zafar Advanced Algorithms Analysis and Design.
Background Material Reading: Sections 1.1 – 1.4
CS2210:0001Discrete Structures Induction and Recursion
Set Topology MTH 251 Lecture # 8.
CS 214: Data Structures Search and Analysis of Algorithms
Introduction to Trees Section 11.1.
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 10 Trees Slides are adopted from “Discrete.
CMSC 341 Introduction to Trees.
Definition: Let G = (V, T, P, S) be a CFL
Properties of Context-Free Languages
CSE322 Regular Expressions and their Identities
Theorem 5.13: For vT‘, l’(v)= min{l(v), l(vk)+w(vk, v)}
and Structural Induction
Trees 11.1 Introduction to Trees Dr. Halimah Alshehri.
Copyright © Cengage Learning. All rights reserved.
Mathematical Induction
Depth of an AVL tree Theorem: Any AVL tree with n nodes has height less than log n. Proof: Given an n-node AVL tree, we want to find an upper bound.
Copyright © Cengage Learning. All rights reserved.
Chapter 4 (Part 2): Mathematical Reasoning, Induction & Recursion
Mathematical Induction II
Presentation transcript:

1 Mathematical Induction An inductive proof has three parts: –Basis case –Inductive hypothesis –Inductive step Related to recursive programming.

2 Theorem: For all n>=1. Proof #1: (by induction on n) Basis: n = 1 1 = 1

3 Inductive hypothesis: Suppose that for some k>=1. Inductive step: We will show that by the inductive hypothesis It follows that for all n>=1.

4 Theorem: For all n>=1. Proof #2: (by induction on n) Basis: n = 1 1 = 1

5 Inductive hypothesis: Suppose there exists a k>=1 such that that for all m, where 1 <= m <= k. Inductive step: We will show that by the inductive hypothesis It follows that for all n>=1.

6 What is the difference between proof #1 and proof #2? –The inductive hypothesis for proof #2 assumes more than that for proof #1. –Proof #1 is sometimes called weak induction –Proof #2 is sometimes called strong induction Many times weak induction is sufficient, but other times strong induction is more convenient.

7 Definition #1: Let T=(V,E) be a tree with |V|>=1. Then T is a strict binary tree if and only if each vertex in T is either a leaf or has exactly two children. Definition #2: (recursive) 1.A single vertex is a strict binary tree. 2.Let T1=(V1,E1) and T2=(V2,E2) be strict binary trees with roots r1 and r2, respectively, where V1 and V2 do not intersect. In addition, let r be a new vertex that is not in V1 or V2. Finally, let: Then T3=(V3,E3) is a strict binary tree. 3.Nothing else is a strict binary tree. Strict Binary Trees

8 Theorem: Let L(T) denote the number of leaves in a strict binary tree T=(V,E). Then 2*L(T) – 2 = |E| Proof: (by induction on L(T)) Basis: L(T) = 1 Observation: The only strict binary tree with L(T) = 1 has a single vertex and 0 edges, i.e., |E| = 0. Lets evaluate 2*L(T)-2 and see if we can show it is equal to |E|. 2*L(T) – 2= 2 *1 – 2Since L(T) = 1 = 0 = |E|Since the observation tell us that |E| = 0

9 Inductive hypothesis: Suppose there exists a k>=1 such that for every strict binary tree where 1<=L(T)<=k that 2*L(T) – 2 = |E|. Inductive step: Let T=(V,E) be a strict binary tree where L(T)=k+1. We must show that 2*L(T) – 2 = |E|. Notes about T: 1.Since k>=1 and L(T)=k+1, it follows that L(T)>1. Therefore T consists of a root r and two strict binary trees T1=(V1,E1) and T2=(V2,E2), where 1<=L(T1)<=k and 1<=L(T2)<=k. 2.L(T) = L(T1) + L(T2)by definition of T 3.|E| = |E1| + |E2| + 2also by definition of T Lets start with 2*L(T) - 2 and, using 1-3, see if we can show that it is equal to |E|.

10 2 * L(T) – 2= 2 * (L(T1) + L(T2)) – 2by (2) = 2 * L(T1) + 2 * L(T2) – 2 = (2 * L(T1) – 2) + (2 * L(T2) – 2) + 2 Since 1<=L(T1)<=k and 1<=L(T2)<=k from (1), it follows from the inductive hypothesis that: 2 * L(T1) – 2 = |E1|and 2 * L(T2) – 2 = |E2| Substituting these in the preceding equation gives: = |E1| + |E2| + 2 = |E|by (3) Hence, for all strict binary trees, 2 * L(T) – 2 = |E|. Finally, note the use of strong induction in the above proof.