Mr. Siddique asks his 1st grade class (containing Willy and David) to create a six-digit string of 0's and 1's such that there is at least one string of two consecutive 1's. For example, the numbers and fulfill this requirement, however, does not.
However, though their task isn't too hard, Willy and David are dumbies, so they randomly write six 0's or 1's.
Mr. Siddique will be very mad if neither Willy nor David completes this simple task, and will retire from his teaching job and travel to Bangladesh to see one of the greatest countries in the world. However, this is bad because Willy and David love Mr. Siddique and if he leaves, Willy and David will cry.
What is the probability that Willy and David will cry because Mr. Siddique leaves to go to Bangladesh?
The answer can be expressed as , where and are positive integers and are relatively prime to each other. Find the sum .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Let E n denote the number of n-digit strings composed of 0's and 1's such that there is at least one string of two consecutive 1's.
If the last digit of the string is a 0, then there must be at least one string of two consecutive 1's in the previous n − 1 digits, and hence the number of possibilities in this case is E n − 1
If the last digit of the string is a 1, the ( n − 1 )th digit can either be a 1 or a 0.
If the ( n − 1 )th digit is a 0, we can see that there must be at least one string of two consecutive 1's in the previous n − 2 digits, and hence the number of possibilities in this case is E n − 2
If the ( n − 1 )th digit is a 1, we can see that we already have a string of two consecutive 1's in the nth and ( n − 1 )th digit, and so it does not matter what the preceding n − 2 digits are. The number of possibilities in this case is 2 n − 2
In this way, we can obtain a recursive formula: E n = E n − 1 + E n − 2 + 2 n − 2
We can work out that E 2 = 1 as the only possibility is 11. The next term to calculate is E 3 = 3 as there are three possibilities: 011, 110, and 111.
Using the recursive formula, we can work out E 4 = E 3 + E 2 + 2 2 = 3 + 1 + 4 = 8
Similarly, E 5 = E 4 + E 3 + 2 3 = 8 + 3 + 8 = 1 9
Finally, E 6 = E 5 + E 4 + 2 4 = 1 9 + 8 + 1 6 = 4 3
The total number of six-digit strings of 0's and 1's such that there is at least one string of two consecutive 1's is 2 6 = 6 4 , since there is a choice between 1 or 0 for each digit.
The probability that someone is unable to do the task is 6 4 6 4 − 4 3 = 6 4 2 1
The probability that both of them are unable do the task is ( 6 4 2 1 ) 2 = 4 0 9 6 4 4 1
Therefore, a + b = 4 4 1 + 4 0 9 6 = 4 5 3 7