This is a famous problem from 1882, to which a prize of $1000 was awarded for the best solution.
The task is to arrange the seven numbers 4, 5, 6, 7, 8, 9, and 0, and eight dots, in such a way that an addition of two or more numbers approximates 82 as closely as possible.
Each of the numbers can be used only once.
The dots can be used in two ways: as decimal point and as symbol for a recurring decimal.
For example, the fraction 1/3 can be written as:
.
. 3
The dot on top of the three denotes that this digit is repeated infinitely. If a group of numbers needs to be repeated, two dots are used: one to denote the beginning of the recurring part and one to denote the end of it. For example, the fraction 1/7 can be written as:
. .
. 1 4 2 8 5 7
(Note that '0.5' is written as '.5'.)
How close can you get to the number 82?
. .. ..
80.5+.64+.79=82
I got zero difference by brute force after several attempts. But, to further describe my methods, I first made a few assumptions. I decided that if you started with 79 or lower, then you would not have enough. If you started with two numbers to add up to around 80, then you would be forced to use 4 numbers with only 2 dots. Therefore, I decided that starting with 80 would most likely have a solution. There had to be three other numbers using 3, 3, and 2 dots each. Brute force took me the rest of the way, and of course, I just put one of the decimals into the 80 to make the solution simpler.
BTW, besides trivial permutations, you can also switch around the digits in the last two decimals for another solution.
Edited on December 24, 2003, 6:03 pm
|
Posted by Tristan
on 2003-12-24 17:55:21 |