A Characteristic Polynomial for the Transition Probability Matrix of Correlated Random Walks on a Graph