CSE 321 Discrete Structures

Slides:



Advertisements
Similar presentations
22C:19 Discrete Structures Induction and Recursion Spring 2014 Sukumar Ghosh.
Advertisements

Discrete Mathematics Math 6A Homework 9 Solution.
Recursive Definitions and Structural Induction
CSE 20 DISCRETE MATH Prof. Shachar Lovett Clicker frequency: CA.
Induction and recursion
CSE115/ENGR160 Discrete Mathematics 04/03/12 Ming-Hsuan Yang UC Merced 1.
CSE 321 Discrete Structures Winter 2008 Lecture 12 Induction.
CSE115/ENGR160 Discrete Mathematics 03/31/11
Lecture Recursive Definitions. Fractals fractals are examples of images where the same elements is being recursively.
Module #1 - Logic 1 Based on Rosen, Discrete Mathematics & Its Applications. Prepared by (c) , Michael P. Frank. Modified By Mingwu Chen Induction.
1 Section 3.4 Recursive Definitions. 2 Recursion Recursion is the process of defining an object in terms of itself Technique can be used to define sequences,
CSE115/ENGR160 Discrete Mathematics 03/29/11 Ming-Hsuan Yang UC Merced 1.
Induction and recursion
Chapter 6 Mathematical Induction
Discrete Mathematics, 1st Edition Kevin Ferland
CSE 20 Lecture 12 Induction CK Cheng 1. Induction Outlines Introduction Theorem Examples: The complexity calculation – Tower of Hanoi – Merge Sort – Fibonacci.
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!
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Chapter 4 Induction and Recursion 歐亞書局.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
CSE 311 Foundations of Computing I Lecture 15 Recursive Definitions and Structural Induction Autumn 2011 CSE 3111.
CSE 311 Foundations of Computing I Lecture 16 Recursively Defined Sets and Structural Induction Spring
Section 5.3. Section Summary Recursively Defined Functions Recursively Defined Sets and Structures Structural Induction.
INDUCTION AND RECURSION. PRINCIPLE OF MATHEMATICAL INDUCTION To prove that P(n) is true for all positive integers n, where P(n) is a propositional function,
CS Discrete Mathematical Structures Mehdi Ghayoumi MSB rm 132 Ofc hr: Thur, 9:30-11:30a.
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.
CSE 311 Foundations of Computing I Lecture 17 Structural Induction Spring
Chapter Mathematical Induction 4.2 Strong Induction and Well-Ordering 4.3 Recursive Definitions and Structural Induction 4.4 Recursive Algorithms.
ICS 253: Discrete Structures I Induction and Recursion King Fahd University of Petroleum & Minerals Information & Computer Science Department.
CompSci 102 Discrete Math for Computer Science March 1, 2012 Prof. Rodger Slides modified from Rosen.
CS 103 Discrete Structures Lecture 13 Induction and Recursion (1)
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.
CompSci 102 Discrete Math for Computer Science March 13, 2012 Prof. Rodger Slides modified from Rosen.
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 Discrete Mathematical Mathematical Induction ( الاستقراء الرياضي )
6/12/2016 Prepared by Dr.Saad Alabbad1 CS100 : Discrete Structures Proof Techniques(2) Mathematical Induction & Recursion Dr.Saad Alabbad Department of.
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.
1 Recursive Definitions and Structural Induction CS/APMA 202 Rosen section 3.4 Aaron Bloomfield.
CSE 311 Foundations of Computing I Lecture 15 Strong Induction and Recursive Definitions Spring
9/27/2011 Lecture Mathematical Induction1 Lecture 3.1: Mathematical Induction* CS 250, Discrete Structures, Fall 2011 Nitesh Saxena *Adopted from.
Chapter 5 1. Chapter Summary  Mathematical Induction  Strong Induction  Recursive Definitions  Structural Induction  Recursive Algorithms.
CSE15 Discrete Mathematics 03/22/17
CS2210:0001Discrete Structures Induction and Recursion
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett
Induction and recursion
CSE 311 Foundations of Computing I
Lecture 3.2: Induction and Strong Induction (contd.)
Discrete Structures for Computer Science
CSE 311: Foundations of Computing
Induction and recursion
CSE 311 Foundations of Computing I
Lecture 3.2: Induction, and Strong Induction
Lecture 3.2: Induction and Strong Induction (contd.)
CSE 321 Discrete Structures
CSE 321 Discrete Structures
Lecture 3.2: Induction, and Strong Induction
CSE 321 Discrete Structures
Mathematical Induction
Discrete Mathematics and its Applications
CSE 321 Discrete Structures
CSE 321 Discrete Structures
Chapter 4 (Part 2): Mathematical Reasoning, Induction & Recursion
CSE 321 Discrete Structures
CSE 311 Foundations of Computing I
CSE 311 Foundations of Computing I
CSE 311 Foundations of Computing I
CS 250, Discrete Structures, Fall 2015 Nitesh Saxena
Discrete Mathematics and its Applications
Recursion.
Presentation transcript:

CSE 321 Discrete Structures Winter 2008 Lecture 13 Induction and Recursion

Announcements Readings Midterm: Extra Office Hour Monday Recursion 4.3 (5th Edition: 3.4) Midterm: Friday, February 8 In class, closed book Estimated grading weight: MT 12.5%, HW 50%, Final 37.5% Extra Office Hour Thursday, 5:30-6:20 pm, CSE 582 Homework 5 is available

Highlights from Lecture 12 Mathematical Induction P(0)  k (P(k)  P(k+1))   n P(n) Strong Induction  k ((P(0)  P(1)  …  P(k))  P(k+1))

Induction Example A set of S integers is non-divisible if there is no pair of integers a, b in S where a divides b. If there is a pair of integers a, b in S, where a divides b, then S is divisible. Given a set S of n+1 positive integers, none exceeding 2n, show that S is divisible. What is the largest subset non-divisible subset of {1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }.

If S is a set of n+1 positive integers, none exceeding 2n, then S is divisible Base case: n =1 Suppose the result holds for n If S is a set of n+1 positive integers, none exceeding 2n, then S is divisible Let T be a set of n+2 positive integers, none exceeding 2n+2. Suppose T is non-divisible.

Proof by contradiction Claim: 2n+1  T and 2n + 2  T Claim: n+1  T Let T* = T – {2n+1, 2n+2}  {n+1} If T is non-divisible, T* is also non-divisible /

Recursive Definitions F(0) = 0; F(n + 1) = F(n) + 1; F(0) = 1; F(n + 1) = 2  F(n); F(0) = 1; F(n + 1) = 2F(n)

Fibonacci Numbers f0 = 0; f1 = 1; fn = fn-1 + fn-2

Bounding the Fibonacci Numbers Theorem: 2n/2  fn  2n for n  6

Recursive Definitions of Sets Basis step: 0  S Recursive step: if x  S, then x + 2  S Exclusion rule: Every element in S follows from basis steps and a finite number of recursive steps

Recursive definitions of sets Basis: 6  S; 15  S; Recursive: if x, y  S, then x + y  S; Basis: [1, 1, 0]  S, [0, 1, 1]  S; Recursive: if [x, y, z]  S,  in R, then [ x,  y,  z]  S if [x1, y1, z1], [x2, y2, z2]  S then [x1 + x2, y1 + y2, z1 + z2] Powers of 3

Strings The set * of strings over the alphabet  is defined Basis:   S ( is the empty string) Recursive: if w  *, x  , then wx  *

Function definitions Len() = 0; Len(wx) = 1 + Len(w); for w  *, x   Concat(w, ) = w for w  * Concat(w1,w2x) = Concat(w1,w2)x for w1, w2 in *, x  