Wednesday, June 17, 2009

Combinatorics for fun and profit

Score in my office:

This problem - 3
Hackers - 0

Suppose Steve and Rasalom are evenly matched at playing Azad. That is, any time Steve and Rasalom play Azad, each has a 50% chance of winning (there are no draws). Which scenario is more likely: a) Steve and Rasalom play 4 times and Steve wins exactly 3, or b) Steve and Rasalom play 8 times and Steve wins exactly 5.

Justify your answer; right guesses will be ignored, wrong guesses will be mocked.

8 comments:

Steve said...

Both results are off of the presumed most-likely outcome of a 50-50 split by a single game. My gut tells me the 3-1 split is more likely because it is a single special case out of a small number of possibilities, whereas 5-3 is a single special case out of a larger number of outcomes. But it's the odds of the special cases that counts. So let's calculate.

[24 hours pass]

I worked out the numbers during a meeting today, and decided that 3 out of 4 is about 14% more probable than 5 out of 8. I also asked a coworker, and he thought that 3/4 was more likely, but it is 50-50 if you guess, after all.

The red herring might be less appealing if you frame it as 3-out-of-4 versus 500,001-out-of-1,000,000.

RWH said...

1/4 vs. 56/256, or about 14% higher, yes. I'm curious as to how you calculated it. Did you use mCn?

Steve said...

Tedious enumeration, my method of first resort, got me the value for the four-game case. As I started working out the value for the eight-game case, it became clear that is was a combination. But I can never remember the formulas for those combinatoric functions and had to work that out too.

RWH said...

The formula that's most useful to remember is the one for how many ways there are to choose n items from a set of m items, or mCn, read "m choose n":

m!/(n! * (m - n)!)

So e.g. 8 choose 5 is 8!/(5! * 3!), or (8*7*6)/(3*2) = 56. Makes this problem trivial.

Steve said...

Another hacker/cracker at my workplace got this one right, bringing the score to 3-0, solvers' favor. But you seem not to have counted yourself.

RWH said...

But you seem not to have counted yourself.

Oh yeah. So the overall score is 4-3, hackers. Although if you've taken probability/statistics the problem is so trivial that I didn't really consider counting myself as a solver. I was quite disappointed that the other math major here was among the failure triad.

The same guy whiffed on the old Car Talk annulus problem: "not enough information to solve it". That problem also achieved a 3-1 score here (counting me - I had to take 30 seconds or so to figure it out again).

Matt Weir said...

I'm the hacker, (not a cracker - I'm one of the good guys), that Steve mentioned. Like Steve, I also figured the problem out via enumeration. I didn't remember the mCn formula so I just used a quick shorthand to find the possible combinations

0=loss
1=win

Taking into account the first two losses
00011111-00111110 = 6 options
01001111-01011110 = 5 options
....+4+3+2+1
10001111-10011110 =5 options
+4+3+2+1
11000111-11001110 =4 options

Well you get the idea, so I just added 6+5+4+3+2+1+5+4+3+2+1+4+3+2+1+3+2+1+2+1+1 = 56

That being said, Steve's explanation of why this is true helped clarify the problem quite a bit for me. Aka 5-4 is a special case out of a larger number of outcomes. I have to admit that until I worked out the numbers my gut instinct was wrong.

Matt Weir said...

Edit: I meant 5-3 is a special case out of a larger number of outcomes. Of course, getting a score of 5-4 out of 8 games would reallly be special ;)