final_soln of 6.042

final_soln of 6.042 - 6.042/18.062J Mathematics for...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 6.042/18.062J Mathematics for Computer Science May 16, 2005 Srini Devadas and Eric Lehman Final Exam YOUR NAME: This is an open-notes exam. However, calculators are not allowed. You may assume all results from lecture, the notes, problem sets, and recitation. Write your solutions in the space provided. If you need more space, write on the back of the sheet containing the problem. Be neat and write legibly. You will be graded not only on the correctness of your answers, but also on the clarity with which you express them. GOOD LUCK! Problem Points Grade Grader 1 15 2 10 3 10 4 10 5 10 6 15 7 10 8 10 9 10 Total 100 Final Exam 2 Problem 1. [15 points] Consider the following sequence of predicates: Q 1 ( x 1 ) = x 1 Q 2 ( x 1 ,x 2 ) = x 1 x 2 Q 3 ( x 1 ,x 2 ,x 3 ) = ( x 1 x 2 ) x 3 Q 4 ( x 1 ,x 2 ,x 3 ,x 4 ) = (( x 1 x 2 ) x 3 ) x 4 Q 5 ( x 1 ,x 2 ,x 3 ,x 4 ,x 5 ) = ((( x 1 x 2 ) x 3 ) x 4 ) x 5 ... ... Let T n be the number of different true/false settings of the variables x 1 ,x 2 ,...,x n for which Q n ( x 1 ,x 2 ,...,x n ) is true. For example, T 2 = 3 since Q 2 ( x 1 ,x 2 ) is true for 3 different settings of the variables x 1 and x 2 : Q 2 ( x 1 ,x 2 ) T T T F F T F F x 1 x 2 T F T T (a) Express T n +1 in terms of T n , assuming n 1 . Solution. We have: Q n +1 ( x 1 ,x 2 ,...,x n +1 ) = Q n ( x 1 ,x 2 ,...,x n ) x n +1 If x n +1 is true, then Q n +1 is true for all 2 n settings of the variables x 1 ,x 2 ,...,x n . If x n +1 is false, then Q n +1 is true for all settings of x 1 ,x 2 ,...,x n except for the T n settings that make Q n true. Thus, altogether we have: n T n +1 = 2 n + 2 T n = 2 n +1 T n 1 (b) Use induction to prove that T n = 3 (2 n +1 + ( 1) n ) for n 1 . You may assume your answer to the previous part without proof. n +1 + Solution. The proof is by induction. Let P ( n ) be the proposition that T n = (2 ( 1) n ) / 3 . Base case: There is a single setting of x 1 that makes Q 1 ( x 1 ) = x 1 true, and T 1 = (2 1+1 + ( 1) 1 ) / 3 = 1 . Therefore, P (0) is true. Inductive step: For n , we assume P ( n ) and reason as follows: T n +1 = 2 n +1 n T n 2 n +1 + ( 1) = 2 n +1 3 n +1 2 n +2 + ( 1) = 3 The first step uses the result from the previous problem part, the second uses the induction hypothesis P ( n ) , and the third is simplification. This implies that P ( n +1) is true. By the principle of induction, P ( n ) is true for all n 1 . 3 Final Exam Problem 2. [10 points] There is no clock in my kitchen. However: The faucet drips every 54 seconds after I shut off the water....
View Full Document

This note was uploaded on 02/08/2011 for the course ELECTRICAL 6.042 taught by Professor Ericlehman during the Spring '11 term at MIT.

Page1 / 13

final_soln of 6.042 - 6.042/18.062J Mathematics for...

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

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