Efficient Computation of Renaming Functions for ρ-reversibility Discrete and Continuous Time Markov Chains