The Ball Weighing Problem:
Two other Algorithms:
Go through the balls one by one.
Divide by two.
We are dealing with 6 balls, one heavier or lighter
12 equiprobable outcomes.
The Shannon Clue: We need experiments that produce Bits of Information, however the experiments have only 3 possible outcomes, left side up, left side down or balance so the most Information I can get from 1 experiment is bits when the outcomes are equiprobable, so 2 experiments should not be enough.
Verifying the Shannon Clue: Since we can analyze 12 balls with 3 experiments, I will take as a given that we can analyze 6 with 3 as well. Rather than 4-4-4 start with 2-2-2 and go from there.
We need to verify that for 6 balls, 2 experiments are not enough. The only first experiments that produce information are:
1 on the left side 1 on the right side with 4 balls off.
2 on the left side 2 on the right side with 2 balls off.
3 on the left side 3 on the right.
We need to show that for each of the first experiments, No additional second experiment would produce the odd ball.
It is easy to see that starting 3 balls on each side, 1 additional experiment would not be enough.
The cases that needs attention are 1 and 2 on each side. Again, we do not have
to look at all the possible outcomes of the first experiment, we need only
find an outcome for which 1 additional experiment would not be enough. The
outcome to look at is the scales balance:
For 1 on each side, this leaves us with 4 balls off the scale with 8
equiprobable outcomes
Bits of Information to be determined , and for 2 on each side, this leaves
with 2 balls with 4 equiprobable outcomes
Bits of Information to be determined.
Focusing on the second case requiring us to only study 2 balls rather than 4, the choices for a second experiment are:
Weight them against each other, I would learn that the left is heavier or lighter than the right but not which is the odd ball.
Weight one against a good ball. If the scale tips I know the odd ball and whether it is heavier or lighter. If the scale balances I know the odd ball ball is off the scale but I am not done since I don't know if it is heavier or lighter! I need a third experiment!
The Partition Property Problem:
I choose a ball at random from a bag containing 3 red balls and 1 blue ball and I choose a card at random from an ordinary deck of playing cards. If I choose a red ball I tell you the cards rank (A,2,3....,K).
If I chose the blue ball I tell you the cards suit (S,H,D,C).
More Analysis Then I Need:
There are three Sample Spaces:
4
members
52
members
208 members
There are four Random Variables. We can think of them as taking numerical
values, I'll just write suggestive letters.
briefly, the rank of if is red and the suit of if is blue.
,1 blue ball times 13 cards of that suit
,3 red balls times 4 cards of that rank.
See the calculation of below
Exercise or Practice for the Exam: Finish this detailed version.
As a Single Experiment:
Experiment
has 17 possible outcomes. {RA , R2, ....,RK, BS, BH, BD, BC}
RAR2RK
BSBHBDBC
So
Experiment
has 2 possible outcomes. {R, B}
R
and
B
So
Experiment
has 13 equiprobable outcomes. {A, ....K} with probabilities
So
Experiment
has 4 equiprobable outcomes. {S,H,D,C} with probabilities
So
Finally: