22 - Recursive Definitions and Introduction Counting Discrete Mathematics Andrei Bulatov Discrete Mathematics Recursive Definitions and Counting

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Introduction Recursive Definitions and Counting Discrete Mathematics Andrei Bulatov
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Discrete Mathematics - Recursive Definitions and Counting 22-2 Previous Lecture Strong induction Induction and well ordering Recursively defined functions
Background image of page 2
Discrete Mathematics – Recursive Definitions and Counting 22-3 Recursively Defined Functions Induction mechanism can be used to define things. To define a function f: N R we complete two steps: Basis step: define f(1) Inductive step: For all k define f(k + 1) as a function of f(k), or, more general, as a function of f(1), f(2), … , f(k). Give a recursive definition of f(n) = Basis step: f(0) = 1 Inductive step: f(k + 1) = 2 f(k). n 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Discrete Mathematics – Recursive Definitions and Counting 22-4 Factorial Another useful recursively defined function is factorial f(n) = n! Basis step: 0! = 1 Inductive step: (k + 1)! = k! (k + 1) n n! 0 1 2 3 4 1 1 2 6 24 n n! 5 6 7 8 9 120 720 5040 40320 362880
Background image of page 4
Discrete Mathematics – Recursive Definitions and Counting 22-5 Fibonacci Numbers Usually, Fibonacci numbers are thought of as a sequence of natural numbers, but as we know such a sequence can also be viewed as a function from N . F(n) Basis step: F(1) = F(2) = 1 Inductive step: F(k + 1) = F(k) + F(k – 1) n 1 2 3 4 5 6 7 8 9 10 11 12 13 F(n) 1 1 2 3 5 8 13 21 34 55 89 144 233 Binet’s formula 5 ) 1 ( ) ( n n n F ϕ - - = where ϕ is the golden ratio 49 6180339887 . 1 2 5 1 + =
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Discrete Mathematics - Recursive Definitions and Counting 22-6 Recursively Defined Sets and Structures Induction can be used to define structures We need to complete the same two steps: Basis step: Define the simplest structure possible Inductive step: A rule, how to build a bigger structure from smaller ones.
Background image of page 6
Discrete Mathematics - Recursive Definitions and Counting 22-7 Well Formed Propositional Statements What is a well formed statement? (p
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/14/2011 for the course MACM 101 taught by Professor Pearce during the Spring '08 term at Simon Fraser.

Page1 / 16

22 - Recursive Definitions and Introduction Counting Discrete Mathematics Andrei Bulatov Discrete Mathematics Recursive Definitions and Counting

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online