Choose the learning badge you'll earn today

Current time:0:00Total duration:5:26

0 energy points

# Heavier ball

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

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.