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.