# The Heads and Legs Paradox

This heads and legs paradox has been famous from grade school to mid-schoolers. The problem is something about determining the number of animals given the total number of their heads and legs or feet. For grade schoolers, they can solve it by trial and error until the given condition is achieved. For middle schoolers, they used algebra to solve this. Assign unknowns, generate equations and solve it. For better understanding, here is an example.

*Mang Kanor is breeding Chickens and Goats. He asked his nephew Ben to count the number of heads of these animals. He also asked Loi to count the total number of legs these animals have. Ben reported that he counted 40 heads, Loi counted 110 legs. How many chickens Mang Kanor have?*

Solution:

Let C be the number of chicken

Let G be the number of goats

Since the number of heads is 40,

Heads of Chicken + Heads of Goats = 40

1 Head of Chicken = 1 Chicken(C )

1 Head of Goat = 1 Goat (G)

(1)

Since there are 110 legs,

Legs of Chicken + Legs of Goat = 110

1 Chicken(C ) has 2 legs

1 Goat (G ) has 4 legs

Goats (4 legs per goat) + Chicken(2 legs per chicken) = 110

(2)

(1) and (2) are the smart way to solve this paradox. These are two equations in two unknowns.

We can rewrite (1) as

Substitute this to (2)

Therefore, there are 25 chickens. Since there are 40 animals, there are 15 goats. Try to check if the number of legs will equal to 110.