# Determining whether or not a binary array has two consecutive 1s with less than n index accesses?

Say we have an array of size n, with each index containing the values 0 or 1. We need to determine whether or not the array contains two consecutive 1 bits.

For which values of n in the range {3, 4, 5, 6, 7} can this be done by checking fewer than n elements (in the worst case)?

My attempt:

When n is in {4,7}, we can determine if there are consecutive 1's without checking all the elements.

For 4, we can do this by checking the either of the middle two elements. If either of them is 0, then we no longer have to check the index on its outer side.

For we first check if the 2nd index has a 1, if it does then we check the 1st and 3rd element. If there is not a consecutive pair, then we move on to the 6th element. If it has a 1, then we check the 5th and 7th element. If there is no consecutive pair, then we return false. However, if the 6th element did not contain a 1, then we consider the 4th and 5th element. This is a max total of 6 indexes checks for any list combination of 1's and 0's of size 7.

Am I missing something? I sort of just tried out random algorithms to see if I can get less than n index accesses for each value of n. How can I prove that {3,5,6} can't be done with less than n index checks?