Martin rushed into the room bearing good news.
“Joseph, your idea worked! The company liked the idea of using only two types of weights to measure heavy objects!” announced Martin, giving the letter to Joseph.
“I told you so. Given any two types of weights, you can measure objects that are above a certain weight,” explained Joseph, reading the letter, “Well, as long as the two weights are not both even.”
Martin thought for a moment and then realized that he had no clue what Joseph meant by that, so he asked, “Huh? What? Isn’t the new weight system designed to measure all types of objects?”
Joseph smiled and replied, “Technically, yes. However, this system can’t measure objects that weigh 1 pound, 2 pounds and other lighter objects. Besides, both weights are heavier than 10 pounds.”
“Really? But then why did the company like it?” wondered Martin, “What use does it have then? Can it measure 300 pounds? 90 pounds? 69 pounds?!”
“Yes, yes, and no.” Joseph laughed, “You’re not getting the point. The company only weighs things 120 pounds or heavier. This weighing system can’t measure 119 pounds but any object above 119 pounds can be expressed as a sum of combinations of these two weights.”
After hearing that, Martin was even more confused. Finally, Joseph said, “Look, 17 (5+5+7) can be expressed as a sum of only 5s and 7s. 18, on the other hand, can’t. It works on the same principles. Think about it. You’ll get it eventually.”
Assuming everything has integer weights, what were the two types of weights that Joseph suggested?
Hint
Try it out with small numbers. What is the largest number that cannot be expressed as a sum of 3s and 4s? The answer is 5. Try it out with other numbers. You’ll find a pattern eventually.
Answer
The two weights are 11 and 13.
If you played around with the hint, you’ll realize that the largest number that cannot be expressed as a sum of Xs and Ys is equal to (X-1)(Y-1)—1.
We are told that the largest number that cannot be expressed as a sum of a combination of the two weights is 119.
Thus,
119 = (x-1)(y-1)—1
120 = (x-1)(y-1)
From here, we only have to list 120’s factors: (1,120), (2,60), (3,40), (4,30), (5,24), (6,20), (8,15), (10,12). There are 8 possible combinations.
However, we were told that both weights were above 10 pounds. Thus, only one pair remains (10,12). So, x=11 and y=13.
Try it out. You can’t make 119 using only 11s and 13s but you can make 120 and above using only 11s and 13s.