A relation between tilting graphs and cluster-tilting graphs of hereditary algebras