This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Structural induction Counting I Margaret M. Fleck 5 April 2010 This lecture finishes structural induction (in section 4.3 in Rosen) and starts the topic of counting, covering sections 5.1 and 5.3. 1 Announcements Midterm coming up on Wednesday. If you have a conflict, you should have received email from me with the details of the conflict exam. If not, please contact me right away. 2 Structural induction with 2D points Last class, we saw examples of structural induction proofs using trees. Structural induction is used to prove a claim about a set T of objects which is defined recursively. Instead of having an explicit induction variable n , our proof follows the structure of the recursive definition. Show the claim holds for the base case(s) of the definition of T For the recursive cases of T s definition, show that if the claim holds for the smaller/input objects, then it holds for the larger/output objects. 1 To see how this works on a set of things that arent trees, consider the following recursive definition of a set S of 2D points: 1. (3 , 5) S 2. If ( x,y ) S, then ( x + 2 ,y ) S 3. If ( x,y ) S, then (- x,y ) S 4. If ( x,y ) S, then ( y,x ) S Whats in S ? Starting with the pair specified in the base case (3 , 5), we use rule 3 to add (- 3 , 5). Rule 2 then allows us to add (- 1 , 5) and then (1 , 5). If we apply rule 2 repeatedly, we see that S contains all pairs of the form (2 n + 1 , 5) where x is a natural number. By rule 4, (5 , 2 n + 1) must also be in S for every natural number n . We then apply rules 2 and 3 in the same way, to show that (2 m +1 , 2 n +1) is in S for every natural numbers m and n ....
View Full Document
This note was uploaded on 12/24/2010 for the course CS CS 173 taught by Professor Fleck during the Spring '10 term at University of Illinois, Urbana Champaign.
- Spring '10