Problem #3
Mercury Vapors
It is the early 18th century and you work in the Tower of London as an employee of the Royal Mint. Sir Isaac Newton, inventor of “the calculus”, definer of gravity and surveyor of the heavens, is your boss. Sir Isaac has been instrumental in converting the currency of the United Kingdom from an economy based on the weight of gold in individual guineas (the principle coin of the era) to the concept of all guineas being equal. He has done this by re-minting the coins of the realm so that the size and weight of a genuine guinea is within certain tolerances so that it can be said that all guineas are the same. (This will help the concept of money to become divorced – in a few hundred years - from the value of a specific amount of precious metal.) The new coins make coining (or quoining, counterfeiting as we would say today) easier and more dignified to spot than the traditional methods, such as biting the coin, not to mention it is easier on the teeth.
Any coin not of the right size (25-26 millimeters in diameter, .95 to 1.05 flans thick) is a fake. Also, since gold is the heaviest element known at this time, a guinea of the right size that weighs less than a true guinea (8.3 to 8.4 grains) has had its gold co-mingled with copper or tin and is a fake.
All this is well and good, but since you are in the confidence of Sir Isaac, you have found out an additional motive for this re-coinage unknown to any member of the government (or, needless to say, to historians since). Sir Isaac believes that there is a substance heavier than gold, an alchemical substance of amazing reputed properties known as philosophic mercury that, legend has it, was discovered by King Solomon himself. Sir Isaac is very interested in finding this philosophic mercury, which he believes has been co-mingled with gold over the centuries. Since philosophic mercury is heavier than gold, a guinea of the right size that weighs more than a true guinea must be made up of gold that is co-mingled with philosophic mercury.
As the Mint's chief programmer, you are tasked with writing a program that when given the dimensions and weight of a guinea, can identify it as being a true coin of the realm, a fake or - most precious of all - made up of gold that contains philosophic mercury.