Answer:
Let the number of chickens in the farm = x
Let the number of pigs in the farm = y
Number of legs of chickens = 2*x (since chickens have 2 legs)
Number of legs of pigs = 4*y (since pigs have 4 legs)
We are given that there are a total of 20 animals (pigs + chickens)
so, number of chickens + number of pigs = 20
x + y = 20
We are given that there is a total of 54 legs in the farm
so, legs of chickens + legs of pigs = 54
2x + 4y = 54
Solving for number of chickens and pigs:
from the question, we have deduced that:
x + y = 20
2x + 4y = 54
taking the value of x from the first equation and using it in the second equation
x = 20 - y
2(20-y) + 4y = 54
40 - 2y + 4y = 54
40 + 2y = 54
2y = 14
y = 7
Using this value of y in the first equation:
x + y = 20
x + (7) = 20
x = 13
Therefore, there are 13 chickens and 7 pigs in the farm