1. ## Scrambled Labels

I had three containers each with two balls. The one labelled WW contains two white balls, the one labelled BB contains two black balls and one labelled BW contains one white and one black ball.

Now the labels are scrambled so that the boxes are all labelled incorrectly.

If you are allowed to remove one ball at a time from boxes of your choosing without seeing what else is in the boxes, what is the minimum number of balls that must be examined to determine what each container contains?

(puzzle due to Martin Gardner)

CB

2. ## Re: Scrambled Labels

I think three 1st we check two balls from one container if it is BW then next ball will clear the situation

if 1st container is BB and third ball is black it will solve the problem again, however if third ball is white then we have to check 4th ball

same if 1st container is WW

3. ## Re: Scrambled Labels

Hello, CaptainBlack!

This is an excellent classic!

I had three containers each with two balls.
The one labelled WW contains two white balls, the one labelled BB contains
two black balls, and one labelled BW contains one black and one white ball.

Now the labels are scrambled so that the boxes are all labelled incorrectly.

If you are allowed to remove one ball at a time from boxes of your choosing
without seeing what else is in the boxes, what is the minimum number of balls
that must be examined to determine what each container contains?

(puzzle due to Martin Gardner)
Spoiler:

Take one ball from the box labeled $\displaystyle \boxed{BW}.$
Suppose is its White. .(We can change this later.)
We know the contents are not BW, so it must be the WW

Now look at the box labeled $\displaystyle \boxed{BB}.$
It does not contains BB; it does not contain WW.
Hence, it contains BW.

This leaves the box labeled $\displaystyle \boxed{WW}$ which contains BB.

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

There is a variation of this problem which is even more baffling.

There are three dormitories.

One has 20 women and is labeled "Women".
One has 20 men and is labeled "Men".
One has 10 women and 10 men and is labeled "Co-ed".

A prankster switched the signs so that all the dorms are mislabeled.

You may knock at the front door of any dorm
. . and one of the residents will join you on the porch.

You may repeat this sampling procedure as often as you like.

How many samplings are required to identify the residents of the dorms
. . and to replace the signs correctly?

Spoiler:

Knock at the dorm with the $\displaystyle \boxed{\text{Co-Ed}}$ sign.
Suppose a Man comes out.
Since this dorm is not $\displaystyle \text{Co-Ed}$, it must be (all) $\displaystyle \text{Men}.$

The dorm with the $\displaystyle \boxed{\text{Women}}$ sign does not have (all) $\displaystyle \text{Women}.$
. . It does not have (all) $\displaystyle \text{Men.}$
Hence, it has $\displaystyle \text{Co-Ed}$ residents.

This leaves the dorm with the $\displaystyle \boxed{\text{Men}}$ sign which has (all) $\displaystyle \text{Women}.$

4. ## Re: Scrambled Labels

Well... the "Spoliers" aren't working for me this morning (Firefox 3.6.8/Macbook), so I hope the first answer is FOUR!

5. ## Re: Scrambled Labels

Originally Posted by TheChaz
Well... the "Spoliers" aren't working for me this morning (Firefox 3.6.8/Macbook), so I hope the first answer is FOUR!
Well its been here long enough, the answer to the first one is one.

CB

6. ## Re: Scrambled Labels

Originally Posted by TheChaz
Well... the "Spoliers" aren't working for me this morning (Firefox 3.6.8/Macbook), so I hope the first answer is FOUR!
If you want to see into the spoilers, click on the "Reply with Quote" button at the bottom of Soroban's comment.

Note for Soroban: The reason that the spoilers don't work (on my browser at any rate, and also evidently on TheChaz's) is that there appears to be some incompatibility between the [size] and [spoiler] commands. If you edit out the [size] command then the [spoiler] command will work.