A mad veterinarian has created three animal transmogrifying machines.
arithmetic/mad.veterinarian New
New entry, edited from material collected for the archive and not yet in a released version.
Problem
A mad veterinarian has created three animal transmogrifying machines. Place a cat in the input bin of the first machine, press the button, and ... whirrr ... bing! Open the output bins to find two dogs and five mice. The second machine can convert a dog into three cats and three mice, and the third machine can convert a mouse into a cat and a dog. Each machine can also operate in reverse (e.g. if you've got three cats and three mice, you can convert them into a dog). You have one cat. 1) Can you convert it into seven mice? 2) Can you convert it into a pack of dogs, with no mice or cats left over? [ Editor: posted by Bob Harris <nitlion@mindspring.com>. ]
Show solution
First, let's associate the process of the three machines with the triplets (-1, 2, 5) (3, -1, 3) and (1, 1, -1) that gives the change in cats, dogs, and mice respectively. (We'll allow for "negative" animals here, which could represent animals that we started with at the beginning of the process that were not replaced.) So, we can say that if we use the first machine A times, the second machine B times, and the third machine C times (where we understand negative values to mean that we run the machine "in reverse"), the net change is (-A+3B+C, 2A-B+C, 5A+3B-C). The first question asks if there are integral values for A, B, and C such that the above triplet is (-1, 0, 7). -A + 3B + C = -1 2A - B + C = 0 5A + 3B - C = 7 Multiply the middle equation by 3 and add it to each of the other equations to get 5A + 4C = -1 11A + 2C = 7 Multiplying the second equation by -2 and adding it to the other yields -17A = -15, so A must be a non-integer. Since there is no Diophantine solution for this system of equations, there is no way to turn a cat into seven mice. (Of course, it's easy to turn a cat into seven mice if you allow the possibility of leftover animals, but I presume that's not what we're supposed to be looking for.) The second question asks if there are integral values for A, B, C, and N such that the triplet is (-1, N, 0). In other words: -A + 3B + C = -1 2A - B + C = N 5A + 3B - C = 0 Adding the first and third equations gives 4A + 6B = -1. No matter what integral values we give to A and B, the expression on the left is even, so there is no solution to this problem either. ObPuzzle: You can turn a cat into just mice, though. Determine for a given N if a cat can be turned into N mice. -- Matthew Daly <mwdaly@pobox.com> [ Editor: no answer to the ObPuzzle was found in the collected postings. ]