There are some chickens and some cows. There are 35 heads and 110 feet. How many chickens and cows are there?
Recently I saw a solution that did the following:
110/2 = 55
55 - 35 = 20
Hence there are 20 cows and 15 chickens. But why does the following method work? I can't seem to understand the intuition behind it, how do we prove this method will always work?
It will always work. Let number of cows and chickens $x$ and $y$ respectively.
using legs $4x+2y=110$ (dividing by 2)
$2x +y=55$
using heads $x+y=35$
their difference $x=20$ gives number of cows.
When $110$ is dividing by $2$, it is assuming that each cow as a chicken. But actually the number cows is twice that number since number of cow's leg is twice number of chicken's legs. That's why $55-35=20$ gives number of cows.