First, let me say that I was really excited about the title I gave to this post. It hit me while mowing my lawn and made me stop and laugh - thankfully the neighbors were not watching (as far as I know). Anyway, I did a quick Google search on the title
Grapes of Math to see how original it was. While I had not heard of the title, it has many hits on the Web. Oh well, so much for absolute originality.
Tom Kyte has a really good
puzzle on his blog. I enjoy a good puzzle and submitted my response, which I believe is the solution to the puzzle. But, for my personal satisfaction and to address Mr. Ed's concerns, I wanted to prove that my response was the only possible correct answer, given some conditions I have derived from Tom's post, the problem (picture) itself and intuition. If you are interested in the puzzle, please visit Tom's blog and try to solve it for yourself and skip the remainder of this post.
You mathematicians will please forgive any seemingly barbaric notations or proof layout :) Cary, Jonathan, Tom or any other mathematician lurking about, please feel free to critique the proof if it is incorrect.
Grapes of Math equation generated from picture:
(10(banana)+apple)/pear = 10(grapes)+peach+(strawberry/pear)
Prove the only solution set (banana, apple, pear, grapes, peach, lemon, strawberry) for the
Grapes of Math is (9,3,2,4,6,8,1) given the following conditions:
Conditions
0) each fruit represents a distinct integer that must be in [0-9]. Negative integers don't really make much sense in this case - how do you ascribe a negative integer to any fruit but the pear?
1) the numerator concat(banana,apple) is in [00-99].
2) pear cannot be 1 because grapes * pear would equal grapes and it does not. grapes * pear = lemon.
3) pear cannot be 0 because x/0 is undefined for all integers x.
4) from 2) and 3) 9 >= pear > 1.
5) grapes cannot be 1 because grapes * pear would equal pear and it does not. grapes * pear = lemon.
6) grapes cannot be greater than 4 because that would yield a concat(banana,apple) that is > two digits, which cannot be (condition 1). For example, the integer portion of the quotient concat(grapes,peach) must be less than 50, based on 4).
7) from 5) and 6), 4 >= grapes > 1.
8) from 7) banana is in [4-9]. If the integer portion of the quotient (grapes) is 2, 3 or 4, then given 4) the numerator, concat(banana,apple), must be in [40-99] . The least the numerator could be is 40 given 4) and 7). The highest would be 99 by definition.
9) all fruits taste really yummy (This is for Mr. Ed)
Proof by Exhaustion (brute force method): Grapes of Math Puzzle
Case 1: grapes = 4
If grapes = 4 then banana can only be 8 or 9 because of 4).
Case 1.1: banana = 8
If grapes = 4 and banana = 8 then pear = 2 and lemon = 8. Lemon cannot equal banana by condition 0) and, thusly, banana != 8. Therefore, concat(banana,apple) is not in [80-89].
Case 1.2: banana = 9
If grapes = 4 and banana = 9 then pear = 2 and lemon = 8. Then by subtraction (banana - lemon ) = (9-8) = 1 = strawberry.
Case 1.2.1: apple = 0
If apple = 0 then peach = 5 and concat(grapes,peach) = 45 with no remainder. We know that there must be a remainder because strawberry is 1 in this case. Therefore, apple != 0 and concat(banana,apple) is not 90.
Case 1.2.2: apple = 1
If apple = 1 then apple = strawberry = 1. Therefore, apple != 1 and concat(banana,apple) is not 91.
Case 1.2.3: apple = 2
If apple = 2 then apple = pear = 2. Therefore apple != 2 and concat(banana,apple) is not 92.
Case 1.2.4: apple = 3
If apple = 3 then peach = 6 and concat(strawberry,apple) - concat(strawberry,pear) = strawberry = 1. Therefore, grapes = 4, banana = 9, pear = 2, lemon = 8, strawberry = 1 and apple = 3.
Therefore, concat(banana,apple) = 93 is a numerator solution.
Case 1.2.5: apple = 4
If apple = 4 then apple = grape = 4. Therefore, apple != 4 and concat(banana,apple) != 94.
Case 1.2.6: apple = 5
If apple = 5 then peach = 7 and pear = 4. But, pear is assumed to be 2 and cannot 2 != 4. Therefore, apple != 5 and concat(banana,apple) != 95.
Case 1.2.7: apple = 6
If apple = 6 then peach = lemon = 8. Therefore, apple != 6 and concat(banana,apple) != 96.
Case 1.2.8: apple = 7
If apple = 7 then peach = lemon = 8. Therefore, apple != 7 and concat(banana,apple) != 97.
Case 1.2.9: apple = 8
If apple = 8 then apple = lemon = 8. Therefore, apple != 8 and concat(banana,apple) != 98.
Case 1.2.10: apple = 9
If apple = 9 then apple = banana = 9. Therefore, apple != 9 and concat(banana,apple) != 99.
Therefore, for grapes = 4, the only solution for numerator concat(banana,apple) in [80-99] is 93.
Case 2: grapes = 3
If grapes = 3 then banana can only be 6 or 7 because pear > 1 from condition 4).
Case 2.1: banana = 6
If grapes = 3 and banana = 6 then pear = 2 and lemon = 6, and lemon = banana = 6. Therefore, banana != 6 and concat(banana,apple) is not in [60-69].
Case 2.2: banana = 7
If grapes = 3 and banana = 7 then pear = 2 and lemon = 6. This means apple can only be in [4-5] (cannot be 6 because lemon = apple = 6 violates condition 0).
Case 2.2.1: apple = 4
If apple = 4 then peach = 3, and peach = grapes = 3. Therefore, apple !=4.
Case 2.2.2: apple = 5
If apple = 5 then peach = 5. Therefore, apple != 5.
Therefore, concat(banana,apple) is not in [70-79].
Case 3: grapes = 2
If grapes = 2 then banana must be in [4-5] because of condition 4).
Case 3.1: banana = 4
If banana = 4 then lemon = banana. Therefore, banana != 4 and concat(banana,apple) is not in [40-49].
Case 3.2: banana = 5
If grapes = 2 and banana = 5 then pear = grapes = 2. Therefore, banana != 5 and concat(banana,apple) is not in [50-59].
Therefore, concat(apple,banana) is not in [40 - 59].
From grapes in [2-4], we have proved that only one solution (93) exists for the numerator concat(banana,apple) between 40 and 99. By condition 7), concat(banana,apple) is not in [00-39].
ConclusionTherefore, 93 is the only solution for concat(banana,apple) in [00-99]. After exhausting all possible two digit values for concat(banana,apple) only one solution set (banana, apple, pear, grapes, peach, lemon, strawberry) was found:
(9,3,2,4,6,8,1)
and for Mr. Ed...
(9,3,-2,4,6,8,1) iff concat(grapes,peach) = -46
Solution set applied to equation of
Grapes of Math:
(10(9)+3)/2=93/2=46 ½=10(4)+6+(1/2)
quod erat demonstrandumNote: lemon is absorbed in the equation, given the correctness of strawberry = 1.