Showing posts with label Grecian Urn. Show all posts
Showing posts with label Grecian Urn. Show all posts

Thursday, August 27, 2015

The Grecian Urn Problem

   The following problem is one of three problems A. K. Dewdney discussed in his Mathematical Recreations column appearing in the March 1991 issue of Scientific American. The three problems originated with mathematics professor Ross Honsberger, University of Waterloo, Canada.
   A Grecian urn contains 75 white beans and 150 black beans. Next to the urn is pile of 200 black beans.  
   Pick two beans at random from the urn.
   If both beans are black (A), place one on the pile and return the other to the urn.
   If one of the beans is black and the other bean white (B), place the black bean on the pile and drop the white bean, back into the urn.
   If both beans are white (C), discard both white beans, pick a black bean from the pile and drop it into the urn.
   No matter the color of the two beans, every time two beans are picked at random, the number of black and white beans in the urn will decrease by one.
   Question: Will there ever be just one bean in the urn and if, so, what will be its color?
   Not having a Grecian urn and a supply of black and white beans handy, I decided to write a Scratch simulation of the problem. You can view and download the Scratch program by clicking on this link.
   You can click on the green flag to run the program to find the answer to the problem. If you don't believe the result, run it again. If you still don't believe it, check my code and determine if there is a mistake in my logic.