Assuming health non-mutated animals:
[tex] Feet = 4*Pigs + 2*Chickens[/tex]
[tex] Heads = Pigs + Chickens [/tex]
By back substitution:
[tex] 78 = 4*(27-Chickens) + 2*Chickens[/tex]
[tex] 78 = 108 -2*Chickens[/tex]
[tex] -30 = -2*Chickens[/tex]
[tex] Chickens= 15[/tex]
Then:
[tex] 27 = Pigs + 15 [/tex]
[tex] Pigs = 12 [/tex]
To check:
[tex] Feet = 4*Pigs + 2*Chickens[/tex]
[tex] 78 = 4*12 + 2*15[/tex]
[tex] 78 = 48 + 30[/tex]
[tex] 78 = 78[/tex] CHECKS