the results of [@Barlow1980] to each $\mG_t$, $t\geq 0$.

The paper is organized as follows. In Section \[sec:setup\] we provide a motivation and the setup up for our problem. In Section \[subsec:th\] we introduce a randomization method and we give the main results of the paper. Section \[sec:Numerical\] provides a numerical algorithm for computing our version of the WHf and its application in a specific example. Finally, we give some supporting results in the Appendix.

Motivation and problem set-up {#sec:setup}
=============================

Let $\mathbf{E}$ be a finite set, $(\Omega,\sF,\bP)$ be a complete probability space, and $X:=(X_{t})_{t\geq 0}$ be a [*time-inhomogeneous*]{} Markov chain on $(\Omega,\sF,\bP)$ with state space $\mathbf{E}$ and generator function $\mG=\{\mG_{t},t\geq 0\}$. In particular, each $\mG_{t}$ is a $|\mathbf{E}|\times |\mathbf{E}|$ matrix. We assume that $\bP\left(X_{0}=i\right)>0$ for each $i\in\mathbf{E}$ and we let $\bP^{i}$ be the probability measure on $(\Omega,\sF)$ defined by $$\begin{aligned}
\bP^{i}(A):=\bP\left(A\,|\,X_{0}=i\right),\quad A\in\sF,\end{aligned}$$ with $\bE^{i}$ denoting the associated expectation.

In this paper we assume that the generator $\mG$ is piecewise constant, namely we assume that $$\begin{aligned}
\mG_{t}=\left\{\begin{array}{ll} \mG_{1},\quad &\text{if }\,s_{0}\leq t<s_{1},\\ \mG_{2},\quad &\text{if }\,s_{1}\leq t<s_{2},\\ \,\,\vdots & \\ \mG_{n},\quad &\text{if }\,s_{n-1}\leq t<s_{n},\\ \mG_{n+1},\quad &\text{if }\,t\geq s_{n}, \end{array}\right.\end{aligned}$$ for some $n\in\bN$ and $0=s_{0}<s_{1}<\ldots<s_{n}$. Without loss of generality we assume that $\mG_{1},\ldots,\mG_{n+1}$ 