Two farmers agree that pigs are worth dollars and that goats are worth dollars. When one farmer owes the other money, he pays the debt in pigs or goats, with "change" received in the form of goats or pigs as necessary. (For example, a dollar debt could be paid with two pigs, with one goat received in change.) What is the amount of the smallest positive debt that can be resolved in this way?
- A)
- B)
- C)
- D)
- E)
Answer
C
Key insight
Payments are integer combinations 300p + 210g, which are exactly the multiples of gcd(300, 210) = 30; three goats for two pigs realizes 30.
Solution
A debt can be settled exactly when for some integers and , where a negative count means that animal is handed back as change.
Lower bound: and , so is always a multiple of . The smallest positive debt is therefore at least .
Achievability: we need . Trying small values, , works: . In words, the debtor hands over three goats and receives two pigs in change.
So is both a lower bound and attainable.
The answer is .
Why this works
The set of values with integer is exactly the set of multiples of ; this is Bezout's identity. The two halves of the argument mirror that theorem: the gcd divides every combination (bound), and some combination equals the gcd (construction). "Change" in the story is what allows negative coefficients.
Alternative approach
Scale down by : pigs are worth , goats . Since , every integer is reachable in these units, so every multiple of dollars is a settleable debt and is the smallest positive one.
The trap
Answering a small number like 10 or 5 without checking that every 300p + 210g is a multiple of 30, or thinking the debt must be a whole animal (210).
Common mistakes
- Answering a small number like or without checking that every is a multiple of , or thinking the debt must be a whole animal ().
- Computing the gcd wrongly (e.g. from ) or using only positive numbers of animals, which would make the smallest.
Techniques
Bound the quantity above/below or estimate to pin it down · Test small/specific values or special cases to find or verify the answer