This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 6.042/18.062J Mathematics for Computer Science February 15, 2005 Srini Devadas and Eric Lehman Problem Set 3 Solutions Due: Tuesday, February 22 at 9 PM Problem 1. An urn contains 75 white balls and 150 black balls. While there are at least 2 balls remaining in the urn, you repeat the following operation. You remove 2 balls selected arbitrarily and then: • If at least one of the two balls is black, then you discard one black ball and put the other ball back in the urn. • If both of the balls are white, then you discard them both and put a new black ball into the urn. Prove that the urn never reaches the state where it is empty except for one black ball. Solution. We use induction. Let P ( n ) be the proposition that the urn always contains an odd number of white balls. Base case. Initially, the urn contains 75 white balls, which is an odd number, so P (0) is true. Inductive step. Suppose that the urn contains an odd number of white balls after n steps. If there are fewer than 2 balls remaining, then the process ends. Otherwise, there are then two cases: 1. You draw at least one black ball. Then the number of black balls decreases by one and the number of white balls is unchanged. Therefore, the number of white balls remains odd. 2. You draw two white balls. Then the number of black balls increases by one, and the number of white balls decreases by two. Again, the number of white balls remains odd. Thus, the urn still contains an odd number of white balls after n + 1 steps. By induction, the urn always contains an odd number of white balls. Therefore, the urn can never hold just one black ball and zero white balls, since zero is even. Problem 2. A puzzle toy contains the numbers 1 , . . . , 35 written on small circular disks. The disks are arranged on an oval track with no gaps so that the whole sequence of disks can slide clockwise or counterclockwise around the track. 2 Problem Set 3 1 2 3 4 5 6 7 Disks slide around track. of four disks. Turning dial reverses the order 35 34 33 In addition, the track runs through a circular dial that is four disks wide. This dial can be rotated 180 degrees, reversing the order of the four disks on that portion of the track. For example, if the dial were turned in the configuration above, then the the order of 34, 35, 1, 2 would become 2, 1, 35, 34....
View
Full Document
 Spring '11
 Dr.EricLehman
 Computer Science, Natural number, Evenness of zero

Click to edit the document details