1550.22 – In A Dream


In a dream, a genie explains that she cares for a certain number of ducks and dogs, and that if you can correctly tell her how many of each she has, she will grant your greatest wish. The genie also tells you that the total number of animals she cares for is 3030, and these animals have 100100 feet total. (No, you can't use your wish to ask for more wishes. And nobody can get hurt.)

How many of each animal does the genie have?


Solution

If all 3030 animals were ducks, there would be 6060 feet. But there are 100100. Each dog replacing a duck adds two feet to the total. Adding 40 feet means adding 20 dogs, leaving 10 ducks. Check: 20×4+10×2=100.20 \times 4 + 10 \times 2 = 100.

Or, you can set up and solve a system of equations. Let uu be the number of ducks be and dd be the number of dogs.

Then, the equation u+d=30u + d = 30 counts the number of heads (in two ways), and the equation 2u+4d=1002u + 4d = 100 does the same for the number of feet. Solving the system gives d=20d = 20 and u=10u = 10.