snick snack CPSC 121 Models of Computation 20089

  • Slides: 14
Download presentation
snick snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Introduction to Induction

snick snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Introduction to Induction Steve Wolfman

Lecture Prerequisites Read Section 4. 1. Note: 4. 1 is background information. We don’t

Lecture Prerequisites Read Section 4. 1. Note: 4. 1 is background information. We don’t intend to directly assess this material, but assignment and exam questions may require skills and knowledge from 4. 1 to answer. Solve problems like Exercise Set 4. 1, #1 -8, 1214, 18 -31, 37 -44, 52 -60. Complete the open-book, untimed quiz on Vista that’s due before the next class.

Learning Goals: Pre-Class By the start of class, you should be able to: –

Learning Goals: Pre-Class By the start of class, you should be able to: – Convert sequences to and from explicit formulas that describe the sequence. – Convert sums to and from summation/”sigma” notation. – Convert products to and from product/”pi” notation. – Manipulate formulas in summation/product notation by adjusting their bounds, merging or splitting summations/products, and factoring out values.

Learning Goals: In-Class By the end of this unit, you should be able to:

Learning Goals: In-Class By the end of this unit, you should be able to: – Establish properties of self-referential structures using inductive proofs that naturally build on those self-references.

Problem: Single-Elimination Tournaments In a single-elimination tournament, during each round pairs of teams play

Problem: Single-Elimination Tournaments In a single-elimination tournament, during each round pairs of teams play each other, with the losing team eliminated from the tournament. The tournament ends when only one team remains. Problem 1: Determine the maximum number of teams in an n-round singleelimination tournament. Problem 2: Prove your result.

Problem: Number of Nodes in a Binary Tree A “binary tree” is a root

Problem: Number of Nodes in a Binary Tree A “binary tree” is a root “node” and a collection of “child nodes” beneath the root. Each node is an object that has up to two children—a left child and a right child—each of which are themselves binary trees. A binary tree’s “height” is the maximum number of steps it takes to get from the root down to a node with no children. Problem 1: What’s the maximum number of nodes in a binary tree of height n? Problem 2: Prove your result.

Problem: Binary Trees, Take Two Problem 1: Give an algorithm to determine the height

Problem: Binary Trees, Take Two Problem 1: Give an algorithm to determine the height of a binary tree. Problem 2: Prove that your algorithm is correct.

An Induction Proof Pattern Type of Problem: Prove some property of a structure that

An Induction Proof Pattern Type of Problem: Prove some property of a structure that is naturally defined in terms of itself. Part 1: Insight. Induction doesn’t help you with this part. It is not a technique to figure out patterns, only to prove them. Part 2: Proof. Establish that the property holds for simple structures. Establish that it holds at each step of construction of a more complex structure.

Natural Numbers and Induction Can we prove things about the natural numbers using induction?

Natural Numbers and Induction Can we prove things about the natural numbers using induction? Are they “selfreferential”? Let’s try one. . . Problem: What is the sum of the natural numbers 0. . n?

Partly Worked Problem: Sum of 0. . n Partly Worked Problem: What is the

Partly Worked Problem: Sum of 0. . n Partly Worked Problem: What is the sum of the natural numbers 0. . n? Insight: It’s n(n+1)/2. Now, how do we prove it?

Partly Worked Problem: Sum of 0. . n Partly Worked Problem: Prove that the

Partly Worked Problem: Sum of 0. . n Partly Worked Problem: Prove that the sum of the natural numbers 0. . n is n(n+1)/2. Is this self-referential? If we knew the sum of the numbers 0. . (n-1), would it tell us anything about the sum of the numbers 0. . n?

Learning Goals: In-Class By the end of this unit, you should be able to:

Learning Goals: In-Class By the end of this unit, you should be able to: – Establish properties of self-referential structures using inductive proofs that naturally build on those self-references. Note: this learning goal is not yet looking formal inductive proofs. Instead, we’re just exploring how we work with things that are defined in terms of themselves.

Next Lecture Learning Goals: Pre-Class By the start of class, you should be able

Next Lecture Learning Goals: Pre-Class By the start of class, you should be able to: – Given a theorem to prove stated in terms of its induction variable (i. e. , usually, in terms of n), write out the skeleton of an inductive proof including: the base case(s) that need to be proven, the induction hypothesis, and the inductive step that needs to be proven. In other words, take what we did in this lecture and use the textbook readings to formalize your understanding. We will have much more practice on inductive proofs.

Next Lecture Prerequisites Read Section 4. 2 -4. 4. Solve (or at least “set

Next Lecture Prerequisites Read Section 4. 2 -4. 4. Solve (or at least “set up”, by writing the base case(s) that need to be proved, the induction hypothesis, and the inductive step that needs to be proved) problems like Exercise Set 4. 2 #1 -2, 5 -17, and 31; 4. 3 #1, 8 -27, 29, and 3031, and 4. 4 #1 -7, 9 -10, and 24. Solve problems like Exercise Set 4. 2 #3 -4 and 32, 4. 3 #6 -7 and 30 -31, and 4. 4 #17. Complete the open-book, untimed quiz on Web. CT that’s due before the next class.