The algorithm for discovering strong identity can be changed so that it also finds weak identity, without additional overhead. The change is to first check the standard stoichiometry matrix and then check either the reactant or product stoichiometry matrix. If the first test succeeds, then there is weak identity even if the second test does not succeed.