00:02
Alright, so here we're working with binary strings of length 8, and so for each element we have two choices, and so if we just wanted to know how many possibilities there were, we would have two choices for the first element times two choices for the second times the third, fourth, fifth, six, seven, eight, right? so we'd have two to the power of eight possibilities.
00:28
But we're going to narrow that down to just ones that have three consecutive zero, or four consecutive ones.
00:39
Okay, so let's assume that the zeros are in the start at the first item of the strings.
00:51
So then we would have three zeros followed by five other numbers, and those five can be five numbers, any five numbers, basically.
01:03
Okay, so then we're going to have two times, two times, two times two times two possibilities.
01:12
Which is 2 to the total of 5.
01:20
And so this happens to be 32.
01:25
Now we'll assume they start at the second element in the sequence.
01:38
Okay, but if this first number was a 0, it would be included in the case above.
01:42
So it actually has to be a 1, which means in this case, there's four spots that we have to fill, right? so that's going to be 2 to the power of 4, which is 16.
01:55
Now let's say what if the 0 starts, at the third section.
02:05
Well, if there was a zero in the second case, that would be included in this step above.
02:12
Okay, so that second number has to be one.
02:15
But the first, sixth, seventh, and eighth element can be anything.
02:21
So again, we have two to the power of four options.
02:27
By the same logic, the next case is also going to be two to the power of four, or 16 ways to write that.
02:47
And then this pattern is just going to continue until we basically reach the end of the string.
03:03
Okay, so what we get is 16.
03:09
So we just add all this up.
03:10
We had 16 occur five times and then plus the 32.
03:17
So this is going to be 112...