[Math] Finding the probability of a complex event…

probabilityprobability theoryproblem solving

My apologies – I'm not a math professional, but the guys in my office (a bunch of web programmers) just came across across a logic problem that we've been discussing. We have a solution, but now wanted to find the probability that it will result in the correct answer. Thought someone here might find it interesting enough to reply.

Problem: You have 9 keys – all identical, except one weighs slightly more than the others. To pick the winning key (the one that weighs slightly more), you have two tries with a balance scale. Based on the results, you pick the winning key (and win a car.) What strategy do you use?

If you want to answer this question for yourself, don't read any further..

Our solution: Pick four of the keys for the first weigh, placing two on each side. If the scale is even, then we know that none of those four are winners; if the scale tips, then we place the remaining two keys on the scale to find the heaviest.
If the first test doesn't yield a winner, we repeat with four more keys. If the scale remains even, then we know that ninth key wins; if the scale tips, we have a 50/50 chance of selecting the winning key choosing one of the two keys on the heavier side of the scale.

The real question: How do you calculate the probability that our particular solution will yield the correct result?

We have a 5/9 shot of picking the correct key outright (if the key is in the first group of four or is the ninth remaining key.) If the first weigh doesn't yield any results (and the second weigh doesn't indicate the ninth key), then we have a 50% chance of picking the correct key.

With any given trial, I can be absolutely certain about the state of 7 of the 9 keys. If I'm left to guess one of the remaining 2 keys, does that mean this solution has an 8/9 chance of yielding the correct key?

How would you solve that probability mathematically?

Best Answer

sds's solution finds the right key any time.

Your approach finds the right key with probability $7/9$. Number the keys $1$ through $9$. If the key is $1$ through $4$, or $9$, you will find it with certainty. If it's $5$ through $8$, you will find it with probability $1/2$. Therefore the probability that you find the right key is $5/9 + (4/9)(1/2) = 7/9$.

Related Question