quiz4_solutions

quiz4_solutions - i =0 f i = f n +2-1. Add f n +1 to both...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
University of California, Santa Barbara CMPSC 40 SUMMER 2009 QUIZ IV N A M E : 1. Suppose b is a positive integer. What is a pseudoprime to the base b ? DeFnition 1, page 240 of the text. 2. Let f n be the n -th ±ibonacci number. Show by induction on n that for n 0, n s i =0 f i = f n +2 - 1 . Basis: ±or n = 0, the LHS is f 0 = 0 and the RHS is f 2 - 1 = 1 - 1 = 0. The inductive step: Assume n
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: i =0 f i = f n +2-1. Add f n +1 to both sides. Then n +1 s i =0 f i = f n +2-1 + f n +1 = ( f n +1 + f n +2 )-1 = f n +3-1 = f ( n +1)+2-1 . 3. Give a recursive deFnition of the set of even integers. Call this set E . Basis step: 0 E , Recursive step: If n E then n + 2 E and n-2 E ....
View Full Document

Ask a homework question - tutors are online