Wednesday, January 14, 2009

Math Puzzler

Here is the problem (from Misha Lemeshko, via Eugene Volokh):
8809 = 6
7111 = 0
2172 = 0
6666 = 4
1111 = 0
3213 = 0
7662 = 2
9312 = 1
0000 = 4
2222 = 0
3333 = 0
5555 = 0
8193 = 3
8096 = 5
7777 = 0
9999 = 4
7756 = 1
6855 = 3
9881 = 5
5531 = 0

2581 = ?
I found the general and specific solutions to the problem after pondering it for about 15 minutes. Can you do it?

If you've given up, or want to check your answers against mine, scroll down.



















Specific solution: 2581 = 2, because...

General solution: The value of a string of numbers comprising the integers 0, 1, 2, 3, 5, 6, 7, 8, 9 is equal to the sum of the values of the integers contained in the string, where the value assigned to each integer is equal to the number of closed curves contained in it. Thus: 0 = 1, 2 = 0, 3 = 0, 5 = 0, 6 = 1, 7 = 0, 8 = 2, and 9 = 1. Therefore, for example, 0000 = 4 because each integer in the string has 1 closed curve; that is, 1 + 1 + 1 + 1 = 4.

Note that the preceding general solution omits the integer 4. Why? There is no way of determining the value of 4 because it doesn't occur in Lemeshko's list of strings. If, however, the value of 4 were known to be 0 (e.g., 8884 = 6, 1114 = 0), the general solution would be as follows: The value of a string of numbers comprising the integers 0 through 9 is equal to the sum of the values of the integers contained in the string, where the value assigned to each integer is equal to the number of closed curves contained in it. Thus: 0 = 1, 2 = 0, 3 = 0, 4 = 0, 5 = 0, 6 = 1, 7 = 0, 8 = 2, and 9 = 1. Therefore, for example, 4444 = 0 (0 + 0 + 0 + 0 = 0) because 4 (in standard typography) contains a closed area but not a closed curve.

If, however, the value of 4 were known to be 1 (e.g., 8884 = 7, or 1114 =1), the general solution would be as follows: The value of a string of numbers comprising the integers 0 through 9 is equal to the sum of the values of the integers contained in the string, where the value assigned to each integer is equal to the number of closed areas contained in it. Thus: 0 = 1, 2 = 0, 3 = 0, 4 = 1, 5 = 0, 6 = 1, 7 = 0, 8 = 2, and 9 = 1. Therefore, for example, 4444 = 4 because each integer in the string has 1 closed area; that is, 1 + 1 + 1 + 1 = 4.