Since co-occurrence is a symmetric relation, it suffices to compute half of the matrix.
for conceptual clarity and to generalize to instances where the relation may not be symmetric, the algorithm computes the entire matrix.