representations. The key is that all the molecules will be encoded by equal-length "vectors". Then, we just need to form a cumulative vector, σ, with components σk equal to the sum of each of the components of the molecules to be analyzed (if the molecular representations are aligned in a matrix-like array, then σ will correspond to the sums of the columns of this matrix). This is the most time-consuming step in the calculation of the n-ary indices, however, it is easy to see that it will scale as O(N), so it is dramatically more efficient than using any binary comparison (e.g., recent benchmarks have been able to compare tens of billions of molecules using extended indices in a regular laptop). The next step is to define a coincidence threshold, γ, that is going to be used to determine which of the components of σ are going to be identified as corresponding to similarity or dissimilarity descriptors. This classification is extremely easy to perform, since we just need to notice that |2*σk -n| > γ indicates that σk will be a similarity, while |2*σk -n| ≤ γ indicates dissimilarity (with n being the number of molecules to be compared). We can gain even more detail into the nature of the similarity descriptors: if 2*σk -n > γ, the similarity will be given by the dominant contribution of "on" bits in the fingerprints (they mostly share the presence of the same feature), but if n -2*σk > γ, then the similarity will be given by the preponderance of "off" bits in the fingerprints (the given feature is mostly absent from the molecules). Of course, this means that unless we select γ = n -1 (which is an extreme choice), we are going to consider similar descriptors that do not necessarily correspond to a perfect coincidence of the features. To properly account for this, we have to introduce weight functions in the formalism, which will penalize these partial coincidences. Then, with all these ingredients, we just need to substitute the (weighted) 1-and 0-similarity, together with the dissimilarity descriptors in the same expressions used to define the binary similarity indices, and we have their corresponding extended version.