General formulas for types of chemical reactions