where D i gives the nodes which are at depth i from the primary nodes, v ∈ D i (H), and E(u) are the edges connected to node u that only exist between nodes at the depth of i or smaller, and • is the bit vector population count. Starting from D 0 , the nodes are mapped subject to maximizing w 0 (Eqn. 7). This is done by considering all possible permutations for each depth. For each depth beyond 0, the valid permutations to search depend on the mapping already established from the previous depth. Then, w 1 , w 2 , . . . , w n are sequentially maximized until all nodes have been generated and a complete map has formed. This can be solved using dynamic programming, avoiding the need to consider all possible permutations. In this regard, the mapping algorithm presented here is similar to VF2 algorithm except that this method always produces a mapping and modifies the graphs to do so depending on the mapping function used.