13
Today's XKCD is a sports-tournament style bracket, where the contestants are well-known names, put into groups of possibly confusing names.
Give the probability that a given contestant will win the entire tournament, based on each contestant in a given round having an equal chance of winning that round.
Input
The name of a contestant.
- XKCD likes to use all upper case, but you may use whatever case makes sense for you or make your input case insensitive.
- You may assume all input names are valid.
Jeff Gordan
is probably a misspelling ofJeff Gordon
. You may choose to accept either or both of these.- Some names include punctuation, e.g.
H. G. Wells
andJoseph Gordon-Levitt
. You may choose to accept names with or without punctuation (or both). The above without punctuation would beH G Wells
andJoseph Gordon Levitt
- Similarly, you may choose to accept either
Beyoncé
orBeyonce
or both - The
Mister/Fred Astaire/Rogers
line is a bit odd. For this one, you must accept all of the following:Fred Rogers
,Mister Rogers
andFred Astaire
Output
The probability of the given contestant winning the whole tournament, in rational form (e.g. 1/64
)
Examples
- Louis Armstrong will potentially play in 6 rounds, each with two contestants, so he has a 1/64 chance of winning.
- Alan Rickman will potentially play in 7 rounds, the first with 3 contestants and the rest with 2 contestants, so he has a 1/192 chance of winning.
To save you the effort of typing in all the names from the image, explainXKCD already has them tabulated. I've also dumped them to this pastebin.
Note the winning probabilities in the explainXKCD are wrong - they are twice as big as they should be because they are presumably forgetting the final round. Thanks for pointing this out @Geobits.
so we have to first convert the image into text and then hardcode probability buckets .. ughh – Optimizer – 2015-05-26T16:34:08.003
2
@Optimizer explainxkcd can help you with that
– Martin Ender – 2015-05-26T16:47:17.153@MartinBüttner That's dope – Optimizer – 2015-05-26T16:48:47.333
@Optimizer no image conversion required :) – Digital Trauma – 2015-05-26T16:51:11.140
You should link that in the question at the end... – Optimizer – 2015-05-26T16:52:27.590
@Optimizer Done. – Digital Trauma – 2015-05-26T17:06:56.167
These odds (examples and explain.xkcd) are all too high, because they're forgetting the last match (between winners of each side). Each should be halved. – Geobits – 2015-05-26T18:23:32.843
@Geobits facepalm - let me fix that! – Digital Trauma – 2015-05-26T18:26:31.123
@sanchises Please see the second bullet point in the input spec. – Digital Trauma – 2015-05-26T18:53:15.970
4explainxkcd is a wiki; why fix it with a note in the spec when you could fix it for everyone? :P – undergroundmonorail – 2015-05-26T20:07:56.120
Relevant Twitter account.. – Martin Ender – 2015-06-19T07:21:48.010