# Pigs, goats and sheep

Achievement Objectives
NA6-5: Form and solve linear equations and inequations, quadratic and simple exponential equations, and simultaneous equations with two unknowns.
Student Activity

Mr Daley bought some pigs, goats and sheep.
Altogether he bought 100 animals and spent \$600.
Mr Daley paid \$21 for each pig, \$8 for each goat and \$3 for each sheep.
There was an even number of pigs.

How many of each animal did Mr Daley buy? Specific Learning Outcomes
Use algebraic skills to solve a problem involving three variables.
Devise and use problem solving strategies to explore situations mathematically (be systematic, use algebra).
Description of Mathematics

This problem can be done in a number of ways, such as trial and improve and using a table

A better solution, that gives more insight into what is actually happening, can be found using algebra. When algebraic equations are set up, it can appear that there are not enough equations to be able to solve them for all of the variables. The fact that the question is about whole numbers is what is important here.

This problem then is an exercise in Diophantine equations. These are equations that only have whole number (or integer) solutions.

One important Diophantine equation that was solved in 1975 (and had been unsolved for over 300 years), is the subject of Fermat’s Last Theorem. This asks if it is possible to solve xn + yn = zn for integers x, y, z, where n is a whole number bigger than 2. The problem was originally posed by Fermat. It took a tour de force by the mathematician Andrew Wiles before the problem was solved.

Required Resource Materials
Activity

### The Problem

Mr Daley bought some pigs, goats and sheep. Altogether he bought 100 animals and spent \$600. Mr Daley paid \$21 for each pig, \$8 for each goat and \$3 for each sheep. There was an even number of pigs.

How many of each animal did Mr Daley buy?

### Teaching sequence

1. Pose the problem to the class.
What strategy can we use to start this problem?
If we just use guess and check how will we know if we have all the possible answers?
2. Have students try a systematic list, but there are a number of combinations to try due to the three variables.  Encourage the students to think about applying algebra to the problem.
3. Support in working with three variables may be needed but it is a good opportunity to apply elimination skills to the problem.
4. A systematic list can be used once the s has been eliminated.
5. Questions that focus on the parameters for the variables can help the students to use number strategies instead of the systematic list approach.
What do you know about the 18 p?

#### Extension to the problem

Reword this problem to put it into another setting, and write your own similar problem. Swap your problem with someone else in your class.

### Solution

From the information in the question we can make up two equations. Let p, g, s be the numbers of pigs, goats, sheep, respectively. Then

p + g + s = 100
21p + 8g + 3s = 600.

The difficulty that we are now faced with is that we have two equations and three unknowns. In general there are no unique solutions in such situations. However, here we have the added fact that the solutions are whole numbers – we can’t have a fraction of an animal. The problem now is to get the equations into a form that will allow us to solve them.

3p + 3g + 3s = 300
21p + 8g + 3s = 600

If we eliminate s from these two equations we get 18p + 5g = 300. Can we solve this in some way? At this point we could continue with a systematic list using guess and check.

Another approach, but one that will probably be too complex for most students involves rearranging the equation to give:

18p = 300 – 5g.

It's interesting (and crucial) to note that 5 is a factor of the right hand side of this last equation. So 5 must be a factor of 18p. Since 18 and 5 have no factors in common (they are relatively prime) then 5 is a factor of p. We can therefore let p = 5k. On the other hand, we know from the question that p has to be even. This means that p is a multiple of 10. So let p = 10m.

We can now substitute this back into the last equation to give

180m = 300 – 5g
... 36m = 60 – g.

At the moment this doesn’t appear to be any better than the equation 18p = 300 – 5g, after all, it still has two unknowns, m and g. What values can m actually take? Since 36m is positive (the original question implies that there is at least one of each animal), 60 – g has to be strictly positive. So 60 – g ranges between 1 and 60. And since the original question implies that there is at least one of each animal, g is at least 1, and so 60 – g can’t equal 60. So 1 ≤ 36m ≤ 59 (depending on the value of g). So m can only be 1.

So if m = 1, then p = 10m = 10.

So 36 = 60 – g. Hence g = 24.

Going back to the first equation we get s = 66. Mr Daley bought 10 pigs, 24 goats and 66 sheep.

Attachments