About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
May 2011
The probability of 20 consecutive bits being black is 2-20, therefore the expected distance between two occurrences is 220.
There is a 0.5 probability of getting a black bit immediately after the 20 black bits, which should not be counted since it is the same bad bar.
Therefore the expected distance is 221.
Stephen Morris sent us a relevant link to this factor 2 "paradox": http://mathfactor.uark.edu/2009/07/morris-world-of-britain-2-proof-and-paradox (link resides outside of ibm.com).
Since we are seeking the distance between consecutive black bars, we should subtract the length of the bad bar, whose expected value is 21.
So the answer is 221-21 = 2,097,131.
This month we didn't ask an IBM-related bonus question, but we do have a bonus answer: IBM invented the bar code.
If you have any problems you think we might enjoy, please send them in. All replies should be sent to: ponder@il.ibm.com