If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

## Math for fun and glory

### Course: Math for fun and glory>Unit 2

Lesson 1: Brain teasers

# Heavier ball

## Want to join the conversation?

• I have a good brain teaser.
One day, A king found a prisoner. In his kingdom, it was tradition for one prisoner to get out of the prison every year. The king didn't like it, so he made a rule. He said that he had two cups. He said that under one of them had a silver coin and the under the other one there was a gold coin. He said that the prisoner had to guess under which one had a gold. But the king put a silver coin under each one. The prisoner knows that the king tricked him, but he can't accuse the king of cheating. What does the prisoner do?
(11 votes)
• The prisoner reaches under the cup, takes out the coin and swallows it (or throws it in a lake, or something like that so it'll never be found). The other cup is lifted and the silver coin is shown. The people, who don't know that the king cheated, would know that the gold coin would have to be under the other.
And by the way, yes, good brain teaser.
(9 votes)
• i'm not really sure yet but at I think it's 8
(6 votes)
• how is it heavier if the balls are identical?
(4 votes)
• For 12 balls, we need 3 times.
Split the balls into 4,4 and 4.
First time, weigh the two 4s. Let's call them group A and B.
If they weigh same, the different ball is in other 4 balls(Let's call it group C),
meanwhile, it means the ball from A or B group is common.
Take 3 balls from A, and take 3 balls from C. We weigh them. If their weight are same, the different ball is the remaining one of C. Third time, compare it and a common ball, we will know it is heavier or lighter.
On the second weighing, if the weight of the three balls from group C is defferent from another three balls(heavier or lighter.), so one of this three ball is defferent, and also we know it is heavier or lighter.. Third time, take two balls from this three balls, compare their weight, so we will know which one is defferent.
On the first weighing, if weight of group A is defferent group B(suppose group A is heavier), then 4 balls of group C are common.
We number the 4 balls of group A----"1","2","3" and "4", number the 4 balls of group B----"5","6","7" and "8".
We gather "5" "2" "3" "4" become group M, gather "1" and three ball from C become group N.
Second time, we compare group M and N. If their weights are same, then the defferent ball is "6" or "7" or "8", and we already have known it is lighter. So third time we can find the defferent ball.
If group M("5" "2" "3" "4") is heavier than group N("1" and three common balls), then the defferent ball is "2" or "3" or "4", and we already have known it is heavier. So third time we can find the defferent ball.
If group M("5" "2" "3" "4") is lighter than group N("1" and three common balls), then "1" must be heavier or "5" must be lighter. So third time we can find the defferent ball.
(end)
(4 votes)
• But only odd number balls can use this method,how about even numbers?
(5 votes)
• This question is actually flawed. What you wrote is that this method works for an odd number. The reality is that it only works for a number that is a power of three. When you make thirds, you cannot use any odd number. If, for instance, you used 13 balls, when you divided it in your first step you would get three groups of four and one ball left over. Lets say that you were lucky and one of the groups you put on the scale did work out. Then, you would make four groups of one (three groups of one and one group of one). That wouldn't work, so just try to keep at it in thirds until you get the answer. That might mean taking a few extra steps, but it is the fastest way.
(1 vote)
• I have a riddle for anybody who wants to solve it. Here it is. A man is working in a gold mine. His employer is giving him an equal part of a gold bar each day. But the employer can only cut the bar twice. How does the man get 1/7 more each day?

HINT: You can take gold away from the man.
(1 vote)
• Here's how you do it. Cut the gold at the 1/7 mark and then at the 3/7 mark so you have 3 pieces that are 1/7 long, 2/7 long and 4/7 long. On the first day give him the 1/7 piece. On the second day give him the 2/7 piece and take back the 1/7 piece. On the third day give him back the 1/7 piece. On the fourth day take the 2/7 piece and the 1/7 piece and give him the 4/7 piece. On the fifth day give him the 1/7 piece back. On the sixth day take away the 1/7 piece again and give him the 2/7 piece again. On the last, seventh, day give him the 1/7 piece for a final time.

Personally I think it would be much easier to just pay him at the end of the week and give him the whole bar. Also isn't it unfair to pay somebody and tell them you can't spend it until the end of the week?
(7 votes)
• If they are balanced they weigh the first group against the third group. Here you will get a couple choices. If the first group is heavier then both the first and the second group contain a bad ball. Weigh 1 vs. 1 within both groups to find the bad balls (4 weighs). If the third group is heavier then it contains both bad balls. Within that group weigh one ball vs. another then weigh that one ball vs. the third. That will tell you which two balls are bad (4 weighs). If the 1st group balances the 3rd group then the 2nd group has both bad balls. Within that group weigh one ball vs. another then weigh that one ball vs. the third. That will tell you which two balls are bad (4 weighs).

If one is heavier take that group and weigh it against the third. If they balance then both of those groups has a heavier ball. Do 1 vs. 1 within both of the groups to isolate the bad balls (4 weighs). If the original one is heavier then it contains both bad balls. Within that group weigh one ball vs. another then weigh that one ball vs. the third. That will tell you which two balls are bad (4 weighs).

So if there are two bad balls that both are heavier and weigh the same you can conclusively find both bad balls within 4 weighs.
(3 votes)
• To solve the problem split the balls into 4,4 and 1. Then weigh the two 4s. If they weigh the same then the one left is the counterfeit. If one group (let's say group A) weighs more than the other group (group B) then the counterfeit is in group A, or vice versa. Divide group A (or B) into two groups of two. The group that is heavier contains the counterfeit. Then divide the heavier group into two groups of 1 and weigh them. the heavier ball is the counterfeit.
(2 votes)
• That will give an expected number of weightings to be 2 7/9, which is not the lowest possible. However, what Sal wants is the number of weightings that you can be 100% sure will be present, never based on random chance, which means the maximum possible number of weightings using your scheme, which is 3. This scheme, with 3 weightings, however, does not give the least possible number of weightings.
(3 votes)
• I wish there was a program in which you were able to drag the ball and check it on the scale.
(2 votes)
• That would actually take longer, waste money, time, etc, and ruin the purpose of this brainteaser. It has a very simple solution, once you figure it out.
(2 votes)
• this is awesome
(2 votes)
• Which one is actually the heavier ball?
(2 votes)

## Video transcript

- [Voiceover] So we have these nine balls right over here. We're going to assume that they are completely identical. At least they are identical in appearance. But one of the nine balls is heavier, just a little bit heavier, is heavier than the other eight balls. And my question to you is: What's the minimum number of times that we can use this scale in order to know, definitively, which is the heavier ball. So there's some number of weighings using the scale, that after that number of weighings I know for a fact that I've found the heavier ball. We're not going to do something based on luck that you just happen to pick the right ball when you weigh it. It has to be 100 percent chance after this number of weighings that you have the ball. And so what is the minimum number of those, what is the minimum number of weighings using the scale? And I encourage you to pause the video and think about it as long as necessary to come up with your own conclusions. So I'm assuming you've given a go at it, so I'll give you a couple of hints now. So my first hint is that you can do it in exactly two weighings of the scale. If I do two weighings of the scale, I know for a fact that I can find, not just through luck, I can find definitively the heavier ball. So that's my first hint and if that helps you, pause the video. I'm about to give you another hint. So my second hint is that with each weighing of the scale you should be able to rule out 2/3 of the balls that are essentially still candidates for the heavier ball. So if that helps you, once again, pause the video. So now I'm assuming you've had a go at it and maybe you were able to figure it out. Maybe you weren't. So now let's work through it together. So I mentioned that in each weighing you can rule out 2/3 of the balls. So how do we do that? So in the first weighing, what we essentially do is take our nine balls and put it into three groups of three. And we take two of those groups of three, so we take this group. Let me actually do that in a different color. So we can take this group of three right over here. Put those three balls on that side of the scale. And then we can take these three balls, and put it on that side of the scale. And so you're essentially weighing three versus three balls. Now, there's a couple of outcomes here. You're either going to have a balance, you're going to have the left is heavier. So let me write that. Say it's going to tip down, so the left is heavier. Or the right is heavier. Or the right is heavier. Now what does each of these tell you? Well if this, if they balance, that tells you that the third group has the heavy ball. So, actually let me write it this way. If this is group one, group two, group three, then this tells you that group three has heavy ball. Has heavy ball. If the left is heavier, then we know group one has the heavy ball. Group one has the heavy ball. And then finally, of course, if the right is heavier we know that group two has the heavy ball. Now just like that with one way, we have narrowed it down to one of the three groups. We have essentially narrowed it down. We now know that our heavy ball is one of three balls. It's either one of these three, one of these three, or one of these three. And so I just repeat the process. But instead of doing it with three balls at a time, I now do it with one ball at a time. So if I'm taking three balls. If I have three balls, what I could do is, I will now... So my step two, I guess I could say, my step two. I now weigh one versus one. And once again I have the outcomes. So if they are balanced, if they are balanced, then that means the... So once again, if we're taking, say, this group of three, we're in the balanced situation from the first weighing. And so if we put, if we put this ball here, and this ball here, if they are balanced then we know that this must be the heavy ball. Because these two are the same. If the left goes down, if the left goes down then we know this is the heavy ball. And likewise, if the right goes down, if the right goes down, we know that this is going to be the heavy ball. So this is actually a little bit of a brain teaser that you see. It's a pretty common one. It's actually even, sometimes you'll hear it in some job interviews. But you can see, it comes out of the idea that through each weighing you can rule out 2/3 of the balls. And so you could use this principle, if you want, to drive other brain teasers. What if you had 27 balls? How many weighings would you need? What if you had 81? And sometimes when you see this brain teaser, instead of giving you a nice clean, I guess you could say, power of three right over here, they might give you something off. So they might give you eight balls. But the exact same principle holds. If you had eight balls, you could split it up into two groups of three, and then two more. And then do the same, and then do the exact same process. But I think people like to do the eight balls because it takes you a little away from the idea of maybe you have to divide it into groups of three, or something like that. Anyway, hopefully you have enjoyed this.