where j ∈ {0} N ∪ {1} N determines whether new nodes are set to empty or full. These definitions apply to edges as well. The prime notation G and H indicates that the mapper will modify G and/or H in order to form a bijection. The T mapper will remove any unmapped nodes and will therefore map to the maximum common substructure. Conversely, T ‡ will add nodes to either graph in order for unmapped nodes to have a mapping. The T † mapper is similar, but will only modify one of G in order to form a bijection to H. T † does not commute, whereas T and T ‡ do. Commutation of these mappers is an important aspect that will become important in the following sections. Additionally, for T † and T ‡ we assume that unions will create empty nodes and edges (_[_]), but intersections will create full nodes and edges (∼[*]). The _ symbol represents a SMARTS atom or bond where all primitives are 0; this is neither valid nor defined in standard SMARTS but useful for our purposes. We use the same notation from the mapping function on the BESMARTS operations, e.g. ∪ † ↔ (T † , ∨). See Fig. for an illustration and Tbl. I showing some examples of the union of two SMARTS patterns with the three mapping functions. Operation Result . Mapping functions T, T † , and T ‡ . All three mapping functions create a bijection between G and H by potentially modifying the graphs. All three functions will give (u1, u2) → (v1, v2), but the map of u3 depends on the mapper. For T, any unmapped nodes are removed and this example corresponds to u3. For T † , only G is modified, and therefore removes u3 to match H. For T ‡ both graphs can be modified by adding nodes, and so v3 is added to map to u3. The primitives are set depending on the bitwise operation to either empty or full. The underscore notation signifies that all primitives are 0, which do not have a valid SMARTS representation.