Some applications of the chromatic polynomials