generalization from L(2,1) labeler to L(Polynomial) labeler