s09_t07 - Inductive case : Prove p ( k ) p ( k + 1) for...

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

View Full Document Right Arrow Icon
UNIVERSITY OF WATERLOO School of Computer Science CS245 Logic and Computation Spring 2009 TUTORIAL 7 1. For each of the following p ( n ), prove n : N p ( n ) using mathematical induction. (a) Let p ( n ) be y 7 n - 2 n = 5 y , for n 0 Base case : Prove p (0) y 7 0 - 2 0 = 5 y WV y 1 - 1 = 5 y WV y 0 = 5 y WV true Inductive case : Prove p ( k ) p ( k + 1) for arbitrary k , k 0 I.e., prove ( y 7 k - 2 k = 5 y ) ( y 7 k +1 - 2 k +1 = 5 y ) 1. y 7 k - 2 k = 5 y assumption (induction hypothesis) 2. y u 7 k - 2 k = 5 y u assumption , using 1 3. 2 k = 7 k - 5 y u 2 , algebra 4. 7 k +1 - 2 k +1 = 7 k +1 - 2 k +1 = I 5. 7 k +1 - 2 k +1 = 7(7 k ) - 2(2 k ) 4 , algebra 6. 7 k +1 - 2 k +1 = 7(7 k ) - 2(7 k - 5 y u ) 3 , 5 , = E 7. 7 k +1 - 2 k +1 = 7(7 k ) - 2(7 k ) + 5(2 y u ) 6 , algebra 8. 7 k +1 - 2 k +1 = 5(7 k ) + 5(2 y u ) 7 , algebra 9. 7 k +1 - 2 k +1 = 5(7 k + 2 y u ) 8 , algebra 10. y 7 k +1 - 2 k +1 = 5 y 9 , I 11. y 7 k +1 - 2 k +1 = 5 y 2 - 10 , E 12. p ( k ) p ( k + 1) 1 - 11 , I 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
(b) Let p ( n ) be y T ( n ) y · n , for n 2, where T( n ) = 3 if n = 1 T( n ) = T( n - 1) + 3 if n > 1 Base case : Prove p (2) y T (2) y · 2 WV y T (1) + 3 y · 2 WV y 3 + 3 y · 2 WV y 3 · 2 y · 2 WV true
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Inductive case : Prove p ( k ) p ( k + 1) for arbitrary k , k 2 I.e., prove ( y T ( k ) y k ) ( y T ( k + 1) y ( k + 1)) 1. y T ( k ) y k assumption (induction hypothesis) 2. y u T ( k ) y u k assumption , using 1 3. T ( k + 1) = T ( k + 1) = I 4. T ( k + 1) = T ( k ) + 3 denition 5. T ( k + 1) y u k + 3 2 , 4 , = E 6. T ( k + 1) ( y u k + 3)( k + 1) 5 , algebra 7. y T ( k + 1) y ( k + 1) 6 , I 8. y T ( k + 1) y ( k + 1) 2-7 , E 9. p ( k ) p ( k + 1) 1-8 , I 2...
View Full Document

This note was uploaded on 01/19/2010 for the course CS 246 taught by Professor Wormer during the Spring '08 term at Waterloo.

Page1 / 2

s09_t07 - Inductive case : Prove p ( k ) p ( k + 1) for...

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

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