Let p ij and p ij be the values of the i'th property in the j'th slot in p, p (e.g., for a second order sibling part as in Figure 1, p 1,4 will correspond to the label of the edge e2 in p) , and let C p↔p ∈ {0, 1} m×s be a binary matrix comparing p and p such that C p↔p ij = 1 when p ij = p ij and 0 otherwise.
simple algebra yields that: calculating k (p, p ) amounts to multiplying the sums of the columns in C. 3 The runtime of where |y 1 | , |y 2 | are the number of parts in y 1 and y 2 .