and as shorthand we write this as {L|S 0 }, or the reference labels L that the SMARTS S 0 maps to. Ideally, {L|S 0 } are singletons and every SMARTS in the hierarchy maps to exactly one reference label. Therefore, we seek an objective that is minimal when all mappings are singletons. A simple objective definition to accept a new SMARTS pattern is