Characterizing binary discriminator algebras