Showing posts with label puzzle. Show all posts
Showing posts with label puzzle. Show all posts

Monday, August 8, 2011

Six Colored Balls

Source

Puzzle: We have two red, two green and two yellow balls. For each color, one ball is heavy and the other is light. All heavy balls weigh the same. All light balls weigh the same. How many weighings on a beam balance are necessary to identify the three heavy balls?

Source: Mathematical Circus (1979, 272 pages) by Martin Gardner.

Solution: Two weighings suffice. Weigh one red and one green ball against one yellow and the other green ball. If the weights are equal, then the red and the yellow differ in weight. A weighing between these two balls allows us to deduce the weights of all other balls. If the red-green combination was heavier than the yellow-green combination in the first weighing, then the green ball in the red-green combination is certainly heavy and the other green is light. Now take the red from the red-green combination and the yellow from the yellow-green combination. Weigh these together against the remaining red and the remaining yellow. The only interesting case is when this weighing is “equal”. Then, the red from the red-green combination must be heavy and the yellow from the yellow-green combination must be light.


Sunday, August 7, 2011

Ant Collision

Source

Puzzle: Peter and Cynthia stand at each end of a straight line segment. Peter sends 50 ants towards Cynthia, one after another. Cynthia sends 20 ants towards Peter. All ants travel along the straight line segment. Whenever two ants collide, they simply bounce back and start traveling in the opposite direction. How many ants reach Peter and how many reach Cynthia? How many ant collisions take place?

Source: Variation of ants puzzles found in Peter Winkler’s puzzle book.

Solution: Imagine that when two ants meet, they switch identities. So even after a collision, two ants are traveling in two opposite directions. It follows that 20 ants return to Peter while 50 ants reach Cynthia.

To calculate the number of ant collisions, imagine that each ant carries a message. So Peter has sent 50 messages to Cynthia, one message per ant. Similarly, Cynthia has sent 20 messages to Peter, one message per ant. Further, imagine that the two ants swap messages when they collide. Then a message always makes forward progress. Each of Cynthia’s messages goes through 50 ant collisions. Each of Peter’s messages goes through 50 ant collisions. The total number of collisions is 50 times 20, which is 1000.