Ab initio total energy calculation of the dynamical stability of noble metal carbides