Empirical formula determination and balancing equations