The Polynomial Algebra of Discrete Models in Systems Biology