"There is no simple way to do this."

While listening to this week’s show on iTunes, I found myself unusually intrigued by the previous week’s puzzler. After it was described, I pressed pause and set about to solving the puzzler. A couple of minutes later I was satisfied with my answer, and I resumed listening. And what did I hear but Tom claiming “There is no simple way to do this”. With the gauntlet thrown down, here is how I arrived at the answer.



Here is what we know:

100 = c + 15 d + 1/4 m

100 = c + d + m

d, c, and m are integers greater than or equal to 1.



First, d is less than or equal to 5. If you have more than 6 dogs, this will cost more than a hundred dollars. So no good. If you have exactly 6 dogs, you have only 10 dollars left to spend and can buy at most 40 more animals, well short of the 100 animals required. So no good again.



Second, both equations are given to add up to 100. Ignoring units for now, this means that “c + d + m = c + 15 d + (1/4) m”. This can be algebraically simplified to “m = (56/3) d”. Now 56 = 2 * 2 * 2 * 7 so 3 does not divide 56. m is an integer. We can then conclude that d must be divisible by 3. Now as d is between 1 and 5, d must be 3. This equation then implies that m is 56, and c must then be 41.



I think that is rather simple, and does not involve trial and error. If anyone had another approach, I’d love to hear it.!

Yes, that is the “simple way” that I used also. Tom and Ray need to go back to MIT for remedial algebra if they were up late at night trying to solve this one…

This is essentially the way that I did it too. I did not hear it last week, but still got the answer before he said it. Its just combination of equations. You took advantage of their equivalence, which is what combining equations does, but you don’t need the constants to actually equal one another.

d + c + m = 100
15d + c + 0.25m = 100

Just multiply one of the equations by -1 and you’ll eliminate both the cat and constant terms:

15d + c + 0.25m = 100
-d - c - m = -100

Then combine:

14d - 0.75m = 0

Then rewrite making one variable equivalent to a constant times the other:

(56/3)d = m or (3/56)m=d

At that point you can pretty much visually see the answer, but they could still be plugged back into the original equations to get the formal proof. Now that you can reduce to 2 equations and 2 variables.

This is the method that I normally use for 3 var/ 2eq. problems. Usually they don’t come in such a simple form though, so equivalence isn’t quite as apparent.

As I said though, our methods are pretty much the same.

Here is an alternate method, that is the way I solved it:

  1. Since you are buying 100 animals for $100, you know that the average price per animal must be $1.
  2. Cats are already $1 per animal, so you need to buy the correct number of dogs & mice to average out to $1, and make up the remaining 100 animals with cats
  3. one unit of mice (4 mice), give you +3 animals for your $1. 1 unit of dogs (1 dog) gives you -14 animals for $15.
  4. So, determine the correct number of mice (at +3/unit) to equal the deficit of dogs (-14/unit). Since 14 has no prime factors of 3, you need to have 3 units of dogs for a total deficit of -42, and 14 units of mice (+42)
  5. Now, count the number of animals: 3 dogs + 14*4 mice = 59 animals. The remaining 41 are cats.

A simple solution to the puzzler can be obtained graphically. Use a piece of graph paper with a 100 X 100 grid Make the X-axis the number of animals and the Y-axis the dollar amount. Draw a line from the origin (0,0) passing through x=1, y=15. This line has a slope representing the dog number/cost. From the extreme top right of the grid (100,100) draw a line that passes through x=96 (? 4) and y = 99 (-1). This line has a slope representing the number/cost for mice. The slope of the line for cats will be 45 degrees. To find the solutions to the puzzler simply find the 45-degree line that passes through both a point on the dog line and one on the mouse line. The first is x=3, y=45 and the second (working downward and to the left of 100, 100) is
X= -56, y= -14. The horizontal and vertical distances between these two points both equal 41, thus: 3 dogs, 56 mice, and 41 cats.

drew’s answer is the correct way to solve it algebraically and logically. Ray could have made his answer slightly clearer. Tommy characterized the problem correctly by saying there appear to be three variables and two equations, which seems unsolvable. But really–this is what Ray could have made clearer–there are only two variables, so you can use two equations to solve them. The answer to one of the variables is solved logically.

Just as the number of mice must be a multiple of 4 to lead to a solution with no rounded numbers, so must the number of dogs be a multiple of 3. Don’t believe it? Look at drew’s correct equation (56/3)d = m. If d is any non-multiple of 3, you end up with a non-integer number of dogs, just as you do with mice if the number of mice is not divisble by 4. So d has to be a multiple of 3. And that means d must in fact BE 3, because if d is 6 or any higher multiple of 3, there is no solution which wouldn’t cost more than $100. So once you know d IS 3, you’re down to two equations and two variables and can arrive at the correct answer as shown.