I am proposing to replace this entire section with the text below if nobody objects The Tanimoto Similarity Coefficient is a generalisation of Jaccard which allows for a similarity to be calculated over multisets To calculate Tanimoto Similarity the multisets must first be viewed as vectors In some arbitrary order each element of each set is considered as a vector dimension and the cardinality of the element within that set is used as the magnitude of that dimension in its representative vector For example the multisets apple apple pear and banana pear may be viewed as the vectors 2 0 1 and 0 1 1 respectively if the elements are considered in alphabetical order Cosine Similarity already gives a similarity coefficient over vectors bounded in 0 1 for this use However the Cosine Similarity of the simple sets apple pear and banana pear yields one half whereas the Jaccard Coefficient of these sets is one third The purpose of the Tanimoto Coefficient is thus dual to give a similarity coefficient over multisets but also to specialise to the same value as Jaccard Coefficent when only simple sets are considered The equation identified by Tanimoto also anecdotally by Jaccard nearly 50 years earlier is Notice that the product and magnitude operators are vector not set operators When two sets not multisets are viewed as vectors the dot product of those vectors is equal to the cardinality of their intersection and the square of each vector magnitude is the cardinality of the set itself Thus the formula immediately specialises to the Jaccard Coefficent for simple sets Tanimoto is bounded within 0 1 and the Tanimoto Distance 1 T A B is a proper distance metric