We have a column which has following format : (1, 1, 1, 0, 1).
Here is the definition of what means two columns are compatible.
Using the notation Oi to denote the collection of rows possessing a
1in theiri-thelement, we conclude that one of three possibilities must be true: $O_i ⊆ O_j$ , $O_j ⊆ O_i$ , or $O_i$ and $O_j$ are disjoint (the first two cases include the possibility that Oi = Oj). If columns i and j satisfy this condition, then we call them compatible.
The question is : How many possible columns of length 5 are compatible with the column (1, 1, 1, 0, 1)?
You can read more here where problem is described in page 14-16.
Thanks in advance !
Assume that a column contains $n$ elements. If all are zero, then the column is compatible with any other column of $n$ elements, of which there are $2^n$.
Suppose instead that a column contains $x$ ones, where $x>0$. We will now construct a compatible column next to it. There are three ways to do so:
Thus, summing, the answer is $2\cdot 2^{n-x}+2^x-2$.
In your specific case, $n=5$ and $x=4$, so the answer is $18$.