Browse · MathNet
PrintIII OBM
Brazil number theory
Problem
Two thieves stole a container of liters of wine. How can they divide it into two parts of liters each if all they have is a liter container and a liter container? Consider the general case of dividing liters into two equal amounts, given a container of liters and a container of liters (where and are positive integers). Show that it is possible iff is even and is divisible by .
Solution
Call the containers , , . Fill from , then fill from , leaving in . Empty into . Empty into (so now has , has , has ). Fill from . Fill from . Empty into . Now and each contain .
Now consider the general case. It is an easy induction that the amount in each container is always a multiple of . Use induction on the number of steps, and note that the only possible move is to replace by , where is one of . So it is certainly a necessary condition that is divisible by . In particular, it must be an integer and so must be even. So it remains to show that if is even and is a multiple of then we can get into . If , then that is trivial. So assume . Put . Now suppose that after some moves we have got in the and the rest in the . Fill from , then fill from . That gives in . Now for some . Repeatedly (for more precisely times) fill from and empty it into , finally pour the remainder of from into . So starting with all the wine in (i.e. ), and iterating this process we get in where denotes the residue of mod . Now we may put , where . Since and are multiples of , so is . But . So is a multiple of . But that means we can write for some
(1981)
Now consider the general case. It is an easy induction that the amount in each container is always a multiple of . Use induction on the number of steps, and note that the only possible move is to replace by , where is one of . So it is certainly a necessary condition that is divisible by . In particular, it must be an integer and so must be even. So it remains to show that if is even and is a multiple of then we can get into . If , then that is trivial. So assume . Put . Now suppose that after some moves we have got in the and the rest in the . Fill from , then fill from . That gives in . Now for some . Repeatedly (for more precisely times) fill from and empty it into , finally pour the remainder of from into . So starting with all the wine in (i.e. ), and iterating this process we get in where denotes the residue of mod . Now we may put , where . Since and are multiples of , so is . But . So is a multiple of . But that means we can write for some
(1981)
Techniques
Greatest common divisors (gcd)Invariants / monovariants