2006 AMC 10A Problem 22
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?
Show solution without answering
Key insight
Every payment is made of 300s and 210s, added or subtracted, so it is a multiple of 30. Three goats minus two pigs makes exactly 30.
Solution
A debt can be paid if it equals (pigs handed over) plus (goats handed over) , where animals given back as change count as negative. This is a "smallest possible" question, so show two things: nothing smaller than works, and does work.
Part 1: every debt is a multiple of 30.
- Both prices are multiples of : and .
- Adding or subtracting multiples of always gives a multiple of . So any debt that can be settled is a multiple of , and the smallest positive one is at least .
Part 2: a debt of 30 can be settled.
3. In units of dollars, a pig is worth and a goat . We want unit. Try multiples of : . The number is more than . So goats minus pigs works:
4. In words: the farmer who owes dollars hands over goats and gets pigs back as change.
Nothing smaller than works, and does, so the answer is .
The answer is .
Why this works
When you can add and subtract two amounts as often as you like, the smallest positive total you can reach is their greatest common divisor. It can never be smaller, because the greatest common divisor divides everything you make, and some combination always reaches it exactly. The "change" in the story is what allows subtracting.
Concise solution
A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.
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 .
Review in the AoPS books
- Introduction to Number Theory, Chapter 7: Algebra With Integers
- Introduction to Number Theory, Chapter 3: Multiples and Divisors (§3.3, §3.4, §3.7)
- Introduction to Algebra, Chapter 11: Special Factorizations (§11.5)
- Introduction to Number Theory, Chapter 4: Prime Factorization (§4.7)
Similar problems
Problem © Mathematical Association of America (MAA), American Mathematics Competitions. Reproduced for non-commercial educational use. Solution and commentary are original to this site. Also appeared as 2006 12A #14.