This preview shows pages 1–2. 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: Prof. Bjorn Poonen (solutions by J. Steever) December 6, 2001 MATH 55 PRACTICE FINAL SOLUTIONS (1) For each of (a)(d) below: If the statement is true (always), write TRUE. Otherwise write FALSE. (Please do not use the abbreviations T and F, since in handwriting they are sometimes indistiguishable.) No explanations are required in this problem. (a) If f : S → T is a function and A ⊆ B ⊆ S , then f ( B A ) = f ( B ) f ( A ). FALSE. Consider the constant function f : { 1 , 2 } → { 1 } (i.e. f (1) = f (2) = 1). If B = { 1 , 2 } and A = { 1 } then f ( B A ) = f ( { 2 } ) = 1, however f ( B ) f ( A ) = { 1 }  { 1 } = ∅ . (b) If f and g are independent random variables defined on the same sample space, then the standard deviation σ ( f + g ) of f + g equals p ( σ ( f )) 2 + ( σ ( g )) 2 . TRUE. σ ( f + g ) = p V ( f + g ) = p V ( f ) + V ( g ) = p ( σ ( f )) 2 + ( σ ( g )) 2 (c) There exists an injection from the set of rational numbers to the set of integers. TRUE. The set of rationals is countable, therefore there is a bijection, and hence an injection, from the set of rationals into the set of integers. (d) The program procedure fibonacci(n : nonnegative integer) if n = 0 then fibonacci (0) := 0 else if n = 1 then fibonacci (1) := 1 else fibonacci ( n ) := fibonacci ( n 1) + fibonacci ( n 2) performs a total of Θ( n ) additions to compute the n th Fibonacci number. FALSE. Let a n denote the number of additions required by the algorithm to produce the n th Fibonacci number. Then a simple analysis of the algorithm yield the relation a n = a n 1 + a n 2 + 1, with initial conditions a = 0 ,a 1 = 0. Solving this relation, we get the formula a n = 5 √ 5 10 · ( 1 + √ 5 2 ) n + 5 + √ 5 10 · ( 1 √ 5 2 ) n 1 which is not Θ( n ). (2) How many elements of { 1 , 2 ,..., 10 } × { 1 , 2 ,..., 10 } must be taken in order to guarantee that there are two elements, say ( i,j ) and ( i ,j ), such that i + j = i + j ?...
View
Full
Document
This note was uploaded on 03/08/2010 for the course MATH 55 taught by Professor Strain during the Spring '08 term at Berkeley.
 Spring '08
 STRAIN
 Math

Click to edit the document details