Since you've tagged this with linear algebra, I'm going to solve it with matrices (just for fun) -- see if you can figure out how it works:
Let the cost per pigeon be $p$, cost per sparrow be $s$, and the cost chicken be $c$. Then we have $p=1$, $20s=1$, and $c=5$. Then we can immediately see that $p=1$, $s=1/20$, $c=5$. We also have the equations $xp+ys+zc=x+(1/20)y+5z=100$ and $x+y+z=100$, where $x, y, z$ are the number of pigeons, sparrows, and chickens bought, respectively.
So let's stick these two equations into matrix form:
$$\pmatrix{1 & 1/20 & 5 \\ 1 & 1 & 1} \pmatrix{x \\ y \\ z} = \pmatrix{100 \\ 100}$$
Doing Gauss-Jordan on this matrix:
$$\pmatrix{1 & 1/20 & 5 & 100 \\ 1 & 1 & 1 &100} \sim \pmatrix{1 & 1/20 & 5 & 100 \\ 0 & 19/20 & -4 & 0} \sim \pmatrix{1 & 1/20 & 5 & 100 \\ 0 & 1 & -80/19 & 0} \sim \pmatrix{1 & 0 & 99/19 & 100 \\ 0 & 1 & -80/19 & 0}$$
Therefore $y-(80/19)z=0$ and $x+(99/19)z=100$. Let $z=19t$, then the solutions are of the form $\pmatrix{x \\ y \\ z} = \pmatrix{100 - 99t \\ 80t \\ 19t} = \pmatrix{100 \\ 0 \\ 0} + t\pmatrix{-99 \\ 80 \\ 19}$
Now physically, we have a couple more constraints: each component of the solution must be a non-negative integer. You can confirm for yourself that with this constraint, there are exactly two solutions. Maybe you can figure them out.
z = -7y/40– Muhammad Umer Mar 07 '15 at 02:09