Bags containing Balls, Here we go again

A bag contains 6 red balls, 2 green balls, and 8 blue balls.

You take a ball out of the bag blindfolded, and the ball is not put back into the bag.

What is the minimum number of balls you have to take out so that you have 4 balls of the same color taken out for certain?


The answer is 9.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Geoff Pilling
Jan 26, 2017

Relevant wiki: Pigeonhole Principle

The maximum number you can take out without having four matching is eight:

  • 3 3 red
  • 2 2 green
  • 3 3 blue

The next ball you take out, though, is guaranteed to give you four that match.

So, the answer is 9 \boxed{9}

That's not how the question is worded, however. It asks how many balls must be removed so that we're guaranteed four balls of the same color. The correct answer, following this principle, is 10.

Dave Goldman - 4 years, 4 months ago

Log in to reply

Why do you say 10?

Geoff Pilling - 4 years, 4 months ago

Log in to reply

Sure, the question, as I read it, asks for the minimum number of balls to ensure we have four balls of a single color. The principle you explained above shows the maximum number of balls we can have without fulfilling four balls of a single color. Add one and this gives us the minimum number of balls with four-of-a-kind.

Dave Goldman - 4 years, 4 months ago

Log in to reply

@Dave Goldman Sorry, I misread something... I'll reply in a bit.

Dave Goldman - 4 years, 4 months ago

Log in to reply

@Dave Goldman Yeah, whoops. You're right. Tricky. That single digit addition is what got me! 3+2+4=9, not 10.

Dave Goldman - 4 years, 4 months ago

You have to allow for the possibility that you pick both green balls. Then, you must assume that you pick each color at the same ratio. Thus, three of red & blue can be taken, and the next one guarantees four matching. 2 + 3 + 3 + 1 = 9

Stephen Vignere - 4 years, 4 months ago
Vijay Simha
Jan 25, 2017

The answer is min(6.3) + min(2,3) + min(8,3) + 1

In general if there are a Red colored balls, b Green Colored Balls and c Blue colored balls. and we are wanting to get k balls of the same color,

We know that one of a,b, or c has to be at least equal to k, otherwise it is impossible to have k balls of the same color.

Then the minimum number of balls required is

min(a, k-1) + min(b, k-1) + min(c, k-1 ) + 1

We add one because, we can pick min(a, k-1) + min(b, k-1) + min(c, k-1 ) and still not have k balls of the same color. Adding any ball will guarantee that we now have k balls of the same color.

A trivial example is as follows:

If the bag contains 2 red, 2 green, and 2 blue balls and k=2 Then we need to choose minimum 4 balls out of bag such that 2 balls are of same color.

Very nice general solution

Richard Costen - 4 years, 4 months ago

for the worst case to happen, g,g,r,b,r,b,r,b,r or g,g,b,r,b,r,b,r,b to have at least 4 balls having same color............

Ramiel To-ong - 4 years ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...