Cats cost $1, dogs cost $15, and mice cost only $0.25. I want a herd of 100 animals, and I have $100, so being a cat lover, it's tempting to get only cats and mice. But I also want a dog, and my cat(s) want mice to "play" with, so the numbers of dogs, cats and mice are each positive. And no cash left over. What's the solution?

C = cats

D = dogs
M = mice

1(C) + 15D + .25M = 100 or
4C + 60D + M = 400 (1)

Also, C + D + M = 100 (2)

Subtracting (1) from (2) yields 3C + 59D = 300

Dividing through by the lowest coefficient yields
C + 19D + 2D/3 = 100

Let 2D/3 = an integer "k" making D = 3k/2

Substituting, 3C + 88.5k = 300 yielding C = 100 - 29.5k

"k" must be even and can only be 2 making C = 100 - 59 = 41 from which D = 3 and m = 56.

41 + 45 + 14 = 100 animals
41(1) + 45(15) + 56/4 = $100

Another way:

Will use the same notations, C,D and M for cats, dogs and mice, and with the same constraints where C,D and M must be integers.

From the cost,
C+15D+M/4=100....(1)
from the number of animals,
C+D+M = 100......(2)

(1)-(2)
14D=(3/4)M, or
56D=3M
Since 56 and 3 are coprime, we can only have 3 dogs, 56 mice, or any multiple thereof.
However, 6 dogs and 112 mice would exceed the budget, so we go with
3 dogs, 56 mice, and are left with 41 cats.
Check:
3+56+41=100
3*15+56/4+41=100
So the solution is correct.

Thank you, that was the answer I got too, but in a slightly different method, but I want to learn for how you figure this out, with this problem. I feel like you just you the same method but I am having a little problem with this one:

"Suppose you want to make $5 using exactly 100 common US coins.Easy, you say: just use nickels (5 cents each). But I say, no - we have NO nickels, only pennies (1 cent), dimes (10 cents) and quarters (25 cents) - is it possible to make $5 now with exactly 100 of these coins? Why or why not?"

These problems belong to a class called diophantine equations. If these are what you are doing in class, they will be solved in a different way.

For linear algebra, I will solve it similar to the previous problem, as follows.

Let integers
p=number of pennies
d=number of dimes
q=number of quarters
then again,
p+10d+25q=500...(1) (number of cents)
p+d+q=100 ....(2) (number of coins)
Subtract (2) from (1),
9d+24q=400 or
3d+8q = 400/3 ...(3)
It is evident that (3) has no solution in integers because we cannot have the sum of two integers to be a mixed fraction.

To find a solution to this problem, we need to determine the number of dogs, cats, and mice that can be purchased while respecting the given conditions. Let's break it down step by step:

1. Let's assume the number of dogs is "d," the number of cats is "c," and the number of mice is "m".
2. The cost of each dog is $15, and the cost of each cat is $1, so the cost of purchasing "d" dogs and "c" cats would be 15d + c dollars.
3. Since you want a herd of 100 animals, the sum of the number of dogs, cats, and mice should equal 100:
d + c + m = 100

Based on the problem requirements, we can set up the following equations:

Equation 1: 15d + c + 0.25m = 100 (Total cost equation)
Equation 2: d + c + m = 100 (Total number of animals equation)

Using these equations, we can solve for the values of d, c, and m. Here's how:

1. Multiply Equation 2 by 15 to eliminate decimals:
15d + 15c + 15m = 1500

2. Subtract Equation 1 from the equation above:
15d + 15c + 15m - 15d - c - 0.25m = 1500 - 100
14d + 14c + 14.75m = 1400

3. Since we want positive values for d, c, and m, we can start by checking various values starting from a small number of dogs.

Let's start with d = 1:
14 + 14c + 14.75m = 1400
14c + 14.75m = 1386 (Subtracting 14 from both sides)

Now, we can substitute various values for "c" and solve for "m" using this equation.
For example, when c = 1:
14 + 14.75m = 1386
14.75m = 1372 (Subtracting 14 from both sides)
m ≈ 92.98

Here, we encounter a problem because m should be a positive whole number, not a fraction. So, let's try another value of c.

When c = 2:
28 + 14.75m = 1386
14.75m = 1358 (Subtracting 28 from both sides)
m ≈ 92

This time, we find a solution where m is a whole positive number. Now, we can calculate d using Equation 2:

d + c + m = 100
d + 2 + 92 = 100
d = 100 - 94
d = 6

So, we have found a solution where the number of dogs is 6, the number of cats is 2, and the number of mice is 92. We can verify this solution by plugging these values back into Equation 1:

15d + c + 0.25m = 100
15(6) + 2 + 0.25(92) = 100
90 + 2 + 23 = 100
115 = 100

Since this equation holds true, we can conclude that the solution to the problem is to purchase 6 dogs, 2 cats, and 92 mice.