1 Introduction

Mathematical models can be viable tools in analyzing the spread and control of infectious diseases; for instance, the susceptible-exposed-infective (SEI) epidemic model developed by Kermack and Mckendrick (1927), less than a decade after the 1918 influenza pandemic [1]. The SEI epidemic model is a new tool to help planners explore future scenarios in ways that consider how the pandemic and related public health and policy measures may affect the national economy and the global economic environment. The SEI model aims to predict the number of individuals who are susceptible to exposed, or have infected from infection at any given time. Mathematical modeling has proven to be one of the tool used to analysis, among other things, to study the impact of media coverage on spread and control of infectious diseases. We used the SEI model for including individual’s behavior changes in their contacts due to the influences of media coverage, and fully investigate the model dynamics. The COVID-19 is evidently observed to be the extremely contagious one with high fatality rate worldwide. In March 2020, the disease was declared a “global pandemic” by the World Health Organization (WHO). So far, there is no known/effective vaccine or medicine [2]. With the recent outbreak of the pandemic of COVID-19, every country has made significant steps to combat this widely spreading threat to the human community [3]. There are models such as SEIR, shall be a great boon for predicting the future of COVID-19. In this paper, SEI model is modeling as a Markov chain, and computed the MFPT’s vector. Let, \(\tau_{ij} = \min \left\{ {\left. {n \ge 1,X_{n} = j} \right|X_{0} = i} \right\}\) be the first passage time from state \(i\) to state \(j\) in the state space \({\text{S}} = \left\{ {0,1, \ldots ,N} \right\} \equiv {\text{S}}_{N + 1}\). The MFPT’s is denoted by \(\mu_{ij}\), \(\mu_{ij} = E\left( {\tau_{ij} } \right)\) is the expected number of time steps to reach \(j\) for the first time starting from \(i\). It is well known (cf. [4]) that,

$$\mu_{ij} = 1 + \sum\limits_{k \ne j} {p_{ik} \mu_{kj} } .$$
(1)

The notation of mean first-passage times (MFPTs) is valuable in science as it offers insights into the short-term dynamical behavior of Markov chains (MC) [5, 6].

Consider a non-homogeneous Markov chain random walk (NHMC-RW) model, \(\left\{ {X_{k}^{\,} ,\,k = 0,1,...} \right\}\) on state space \({\text{S}} = \left\{ {0,1, \ldots ,N} \right\}\), with transition Probabilities \(\left\{ {p_{ij} = {pr}\left( {X_{k + 1} = j\left| {X_{k} = i} \right.} \right)} \right\},\,\,\,i,j \in {\text{S}}\), and first column singly bordered tri-diagonal (FC-SBT) transition probability matrix (TPM) \({\text{P}} = \left( {p_{ij} } \right),\)

$${\text{P}} = \left( {\begin{array}{*{20}c} 1 & 0 & 0 & \cdots & 0 & 0 \\ {q_{1} } & {r_{1} } & {p_{1} } & 0 & \cdots & 0 \\ {\delta_{2} } & {q_{2} } & {r_{2} } & {p_{2} } & \ddots & \vdots \\ \vdots & 0 & \ddots & \ddots & \ddots & 0 \\ {\delta_{N - 1} } & \vdots & \ddots & {q_{N - 1} } & {r_{N - 1} } & {p_{N - 1} } \\ {\delta_{N} } & 0 & \cdots & 0 & {q_{N} } & {r_{N} } \\ \end{array} } \right) \equiv {\text{P}}_{N + 1} .$$
(2)

The entries of the matrix \({\text{P}}_{N + 1}\) are nonnegative and the sum of each row equal one, clearly is stochastic matrix since, \({\text{P}}_{N + 1} \,{\text{e}} = {\text{e}}\), \({\text{e}}\) is column vector of 1’s.

A NHMC-RW is a process moves from state to another state in a manner that dependent on the times at which the step. Markov chain random walk model received considerable attention from the scientific society since it found a wide range of distinct applications in various theoretical and applied fields such as in statistics “to analyze sequential test procedures”, in computer science “to estimate the size of the world wide web using randomized algorithms”, as references to this material we recommend book [7], and articles [8,9,10]. The purpose of the current work is to use the method of state reduction (Sheskin 1985) [11] for computing MFPT’s vector of a FC-SBT matrix \({\text{P}}_{N + 1}\) (2). Let \({\varvec{\mu}}_{N}^{(N + 1)}\), denote to the MFPT’s vector of \({\text{P}}_{N + 1}\), with the sub-script \(N\) denote to the length of this vector, and the super-script \(\left( {N + 1} \right)\) denote to this vector associated to the matrix \({\text{P}}_{N + 1}\). Some special cases of MFPT’s vector of \({\text{P}}_{N + 1}\), which lead to a relationship between the elements of MFPT’s vector on two state spaces \({\text{S}}_{N}\) and \({\text{S}}_{N + 1}\). We introduced an efficient algorithm by mathematica program for computing MFPT’s vector of the NHMC-RW.

2 SEI Modeling by Markov Chain Process

SEI epidemic models based on Markov chains are mathematical models used to describe the spread of infectious diseases within a population. The SEI model extends the basic SI model by adding an “Exposed” (E) compartment to account for individuals who are infected but not yet infectious. In these model, each compartments (S, E, I) represents a state in a Markov chain, and individuals move between these states based on probabilistic rules. Here’s how we can describe an SEI epidemic model based on Markov chains:

Compartment Definitions:

Susceptible (S): Individuals who are susceptible to the disease.

Exposed (E): Individuals who have been exposed to the disease but are not yet infectious.

Infectious (I): Individuals who are currently infected and can transmit the disease.

Transition Probabilities:

  • The transition from Susceptible (S) to Exposed (E) occurs with a certain infection rate, often denoted as \({\upbeta }\)(beta).

  • The transition from Susceptible (E) to Exposed (I) occurs after an incubation period, which follows an exponential distribution with a rate parameter rate, often denoted as \({\upalpha }\)(alpha).

State Diagram:

We can introduce the SEI model as a state diagram, with each compartment (S, E, I) representing a state, and transitions between these state as in Fig. 1:

Fig. 1
figure 1

Diagram of the SEI model

Where, \({\upmu }\) denote to the birth and the natural death rates of the population, so the total population remains constant. The size of the population is \({\text{N}}\), \({\text{N}}\,{ = }\,{\text{S}}\,{ + }\,{\text{E}}\,{ + }\,{\text{I}}\).

Differential Equations:

Alternatively, we can describe the SEI model using a system of differential equations. The rates of change of individuals in each compartment are described by differential equations, such as:

$$\dot{S}\, = \,\mu N\, - \,\beta \frac{SI}{N}\, - \,\mu s$$
(3)
$$\dot{E}\, = \,\beta \frac{SI}{N}\, - \,\alpha E\, - \,\mu E$$
(4)
$$\dot{I}\, = \,\alpha E\, - \,\mu I$$
(5)

These equations express how the population in each compartment changes over time.

Parameters:

The model’s behavior depends on parameters like \({\upalpha }\)(incubation rate), and \({\upbeta }\)(infection rate), which can vary based on the specific disease and other factors.

Analysis:

By analyzing the Markov chain or solving the differential equations, you can make predictions about the disease’s dynamics, such as the peak of the epidemic, the time course of the outbreak, and the effectiveness of interventions like vaccination or quarantine. SEI-type epidemic models are widely used in epidemiology and public health to understand and mode the spread of infectious diseases, especially when there is a significant incubation period between exposure and infectiousness, as seen in diseases like COVID-19. These models can help inform public health responses and policy decisions.

For modeling the SEI model as a Markov chain, the divided population of size \({\text{N}}\) into three classes: susceptible, exposed and infectious, let the sizes of the classes be denoted by S, E, and I respectively. The class of E split into two classes E1 and E2 which denote to the size of exposed with strain 1, exposed with strain 2, respectively. Suppose there is a person standing in queue, to receive a certain service, be it in a bank, hospital, restaurant or any place and we assume this person is susceptible (S) to contracting the disease, the person (E1) before him and the person (E2) after him are carriers of the disease but do not transmit the disease, and the person providing the service already has the disease (I). For modeling the model SEI to Markov chain, consider \(N + 1\) discrete states: Susceptible (state \(i\)), exposed with strain 1(state \(i - 1\)), exposed with strain 2 (state \(i + 1\)), and infected (state \(0\)) states. If (\(X_{i} ,\,\,i = 1,2,...,N\)) represent the number of individuals at any state from underlying diseases at any time \(t,\) then clearly, \(X_{i}\) is a stochastic process with state space \({\text{S = }}\left\{ {0,1,...,N} \right\}\). This model treats with a general NHMC-RW model, which proceed according to the following assumptions:

  1. o

    The transition probabilities between the states are dependent on the particle position.

  2. o

    From the current state \(k,\,\,\,k \in {\text{S}}\backslash \left\{ {0,N} \right\}\), the particle may be remains at the same state \(k\) with probability \(r_{k}\), or move to the left at state \(k - 1\) with probability \(q_{k}\), or move to the right at state \(k + 1\) with probability \(p_{k}\), or reaches to the boundary \(0\) with probability \(\delta_{k}\), \(\delta_{k} = 1 - r_{k} - q_{k} - p_{k}\), \(0 \le r_{k} ,\,\,q_{k} ,\,\,p_{k} \le 1\).

  3. o

    If the particle reaches to the boundary state \(k = 0\),it is absorbing with probability one, and when it at the state \(k = N,\) at the next move it may be remains at the same state \(k = N,\) or reflected to the state \(k = N - 1\), or reaches to the boundary \(0,\) respectively with probabilities, and \(r_{N}\),\(q_{N}\), and \(\delta_{N} = 1 - r_{N} - q_{N}\), \(0 \le q_{N} ,r_{N} \le 1\), see Fig. 2.

Fig. 2
figure 2

General NHMC-RW with variable absorbing probabilities

The calculation of various charact0eristics of NHMC-RW include MFPT’s vector of a NHMC-RW model was specified by a TPM \({\text{P}}\) (2). The MFPT’s vector is one of the properties of a NHMC-RW. The mean first passage times in going from state \(i\) to the target state \(0\) in a Markov Chain is the mean length of time required to go from state \(i\) to state \(j\) for the first time. MFPT’s are useful statistics for analyzing the behavior of various Markovian models of random processes.

State reduction method for computing MFPT’s vector

State reduction method is an iterative procedure which reduces a Markov Chain to a smaller chain from which a solution to the original chain can be found. Round-off error can be reduced when subtractions are avoided [12]. In this method, we assume the target state is absorbing state, thus all the remaining states become transient states. For the NHMC-RW model, \(\left\{ {X_{k}^{\,} ,\,k = 0,1,...} \right\}\) with TPM (2), the target state 0 is already absorbing and there are \(N\) transient states \(\left\{ {1,2,...,N} \right\}\). The procedure for computing the MFPT’s vector \({{\varvec{\upmu}}}_{N}^{{\left( {N + 1} \right)}} = \left( {\begin{array}{*{20}c} {\mu_{10}^{{\left( {N + 1} \right)}} } & {\mu_{20}^{{\left( {N + 1} \right)}} } & \ldots & {\mu_{N0}^{{\left( {N + 1} \right)}} } \\ \end{array} } \right)^{T}\) of the matrix \({\text{P}}\) has three steps shown as:

  • First step: Augmented Matrix

Constructing an \(N \times \left( {N + 2} \right)\) rectangular augmented matrix, denoted by \({\mathbf{G}}_{N}\) from putting the FC-SBT matrix \({\text{P}}\)(2) in canonical form as:

$${\text{P}} = \left( {\begin{array}{*{20}c} 1 &\vline & 0 & 0 & \cdots & 0 & 0 \\ \hline {q_{1} } &\vline & {r_{1} } & {p_{1} } & 0 & \cdots & 0 \\ {\delta_{2} } &\vline & {q_{2} } & {r_{2} } & {p_{2} } & \ddots & \vdots \\ \vdots &\vline & 0 & \ddots & \ddots & \ddots & 0 \\ {\delta_{N - 1} } &\vline & \vdots & \ddots & {q_{N - 1} } & {r_{N - 1} } & {p_{N - 1} } \\ {\delta_{N} } &\vline & 0 & \cdots & 0 & {q_{N} } & {r_{N} } \\ \end{array} } \right) = \left( {\begin{array}{*{20}c} {\mathbf{I}} &\vline & {\mathbf{0}} \\ \hline {R_{N}^{{\left( {N + 1} \right)}} } &\vline & {Q_{N}^{{\left( {N + 1} \right)}} } \\ \end{array} } \right),$$
(6)

where, \({\mathbf{I}}\) is an identity matrix, \({\mathbf{0}}\) is zero matrix with all elements equal zeros, \(R_{N}^{{\left( {N + 1} \right)}}\) is an \(N \times 1\) column vector of all transient states to an absorbing state \(0\), and \(Q_{N}^{{\left( {N + 1} \right)}}\) is an \(N \times N\) square tri-diagonal matrix of all transient states, with the sub-script \(N\) denote to they are matrices of length \(N\), and the super-script \(\left( {N + 1} \right)\) denote to they are sub- matrices of \({\text{P}}\). The augmented matrix is given as:

$${\mathbf{G}}_{N} = \left( {\begin{array}{*{20}c} {Q_{N}^{{\left( {N + 1} \right)}} } & {R_{N}^{{\left( {N + 1} \right)}} } & {{\text{e}}_{N} } \\ \end{array} } \right) = \left( {g_{ij} } \right),\,\,\,1 \le i \le N,\,\,\,\,\,1 \le j \le N + 2,$$
(7)

where, \({\text{e}}_{N}\) is a column vector with all entries equal one.

Second step: Matrix reduction

Partition the augmented matrix \({\mathbf{G}}_{N}\) into four sub-matrices, single element, row vector, column vector, and rectangular matrix, as:

$${\mathbf{G}}_{N} = \left( {\begin{array}{*{20}c} A &\vline & {B_{1}^{\left( N \right)} } \\ \hline {D_{N - 1}^{\left( N \right)} } &\vline & {C_{N - 1}^{\left( N \right)} } \\ \end{array} } \right),$$
(8)

where, \(A\) is the single element, \(B_{1}^{\left( N \right)}\) is an \(1 \times \left( {N + 1} \right)\) row vector, \(D_{N - 1}^{\left( N \right)}\) is \(\left( {N - 1} \right) \times 1\) column vector and \(C_{N - 1}^{\left( N \right)}\) is an \(\left( {N - 1} \right) \times \left( {N + 1} \right)\) matrix. When the four sub-matrices are combined create a reduced augmented matrix, the number of states in the reduced augmented matrix is one less than the number of states in the original augmented matrix. The augmented reduced matrix is given by:

$${\mathbf{G}}_{\left( N \right)red} = C_{N - 1}^{\left( N \right)} + D_{N - 1}^{\left( N \right)} \left( {1 - A} \right)^{ - 1} B_{1}^{\left( N \right)} .$$
(9)

The augmented reduced matrix formula equal to the sum of rectangular matrix and the product of the column vector, the reciprocal of one minus the single element, and the row vector, we can terminate the matrix reduction formula when the reduced augmented matrix has only one row.

  • Third step: Back substitution

We can compute the last component \(\mu_{N0}^{{\left( {N + 1} \right)}}\) of the vector \({{\varvec{\upmu}}}_{N}^{{\left( {N + 1} \right)}}\) by dividing the last element on the previous element in the last reduced augmented matrix with only one row:

$$\mu_{N0}^{{\left( {N + 1} \right)}} = \left( {g_{NN + 2}^{{\left( {N - 1} \right)}} } \right)\left( {g_{NN + 1}^{{\left( {N - 1} \right)}} } \right)^{ - 1} .$$
(10)

and computing the remaining elements \(\mu_{i0}^{{\left( {N + 1} \right)}}\) for \(i = 1,2,...,N\) by recalling the previous reduced augmented matrices as:

$$\mu_{i0}^{{\left( {N + 1} \right)}} = \left( {g_{iN + 2}^{{\left( {i - 1} \right)}} + \sum\limits_{r = i + 1}^{N} {g_{ir}^{{\left( {i - 1} \right)}} \mu_{r0}^{{\left( {N + 1} \right)}} } } \right)\left( {\sum\limits_{r = i + 1}^{N + 1} {g_{ir}^{{\left( {i - 1} \right)}} } } \right)^{ - 1} .$$
(11)

For computing the MFPT’s vector we have:

\({{\varvec{\upmu}}}_{N}^{{\left( {N + 1} \right)}} = \left( {\begin{array}{*{20}c} {\mu_{10}^{{\left( {N + 1} \right)}} } & {\mu_{20}^{{\left( {N + 1} \right)}} } & \ldots & {\mu_{N0}^{{\left( {N + 1} \right)}} } \\ \end{array} } \right)^{T}\) for FC-SBT matrix \({\text{P}}\) (2).

3 Computing the MFPT’s Vector on State Space \({\text{S}}_{N + 1}\)

Let us introduce the following lemma in case of \(N = 1\).

Lemma 1

Closed form expression for the MFPT’s vector \({{\varvec{\upmu}}}_{1}^{\left( 2 \right)} = \left( {\mu_{10}^{\left( 2 \right)} } \right)^{T}\) of two states. NHMC-RW with state space \({\text{S}}_{2} = \left\{ {0,1} \right\}\) and TPM \({\text{P}}_{2}\),

$$P_{2} = \left( {\begin{array}{*{20}c} 1 & 0 \\ {q_{1} } & {r_{1} } \\ \end{array} } \right).$$
(12)

is given as

$$\mu_{10}^{\left( 2 \right)} = \left( {q_{1} } \right)^{ - 1} .$$
(13)

Proof.

Putting \({\text{P}}_{2}\) in canonical form as:

$${\text{P}}_{2} = \left( {\begin{array}{*{20}c} 1 &\vline & 0 \\ \hline {q_{1} } &\vline & {r_{1} } \\ \end{array} } \right) = \left( {\begin{array}{*{20}c} {\mathbf{I}} &\vline & {\mathbf{0}} \\ \hline {R_{1}^{\left( 2 \right)} } &\vline & {Q_{1}^{\left( 2 \right)} } \\ \end{array} } \right).$$
(14)

First step: (Augmented matrix)

The augmented matrix \({\mathbf{G}}_{1}\) such formed as:

$${\mathbf{G}}_{1} = \left( {\begin{array}{*{20}c} {Q_{1}^{\left( 2 \right)} } & {R_{1}^{\left( 2 \right)} } & {{\text{e}}_{1} } \\ \end{array} } \right) = \left( {g_{ij} } \right),\,\,\,\,i = 1,\,\,\,\,\,1 \le j \le 3, = \left( {\begin{array}{*{20}c} {r_{1} } & {q_{1} } & 1 \\ \end{array} } \right).$$
(15)

\({\mathbf{G}}_{1}\) has only one row, so we can terminate this step and start back substitution.

Using (15), we get

$$\mu_{10}^{\left( 2 \right)} = \left( {g_{13} } \right)\left( {g_{12} } \right)^{ - 1} = \left( {q_{1} } \right)^{ - 1} .$$
(16)

Thus the proof of lemma finished, and this result may be found for examples in [4], see also [6, 13].

We proceed with increasing the state spaces, for computing the MFPT’s vector in cases \(N = 2\) and \(N = 3\), by introducing the following two lemmas 2, and 3.

Lemma 2

Closed form expression for the MFPT’s vector \({{\varvec{\upmu}}}_{2}^{\left( 3 \right)} = \left( {\begin{array}{*{20}c} {\mu_{10}^{\left( 3 \right)} } & {\mu_{20}^{\left( 3 \right)} } \\ \end{array} } \right)^{T}\) of the three states NHMC-RW with state space \(S_{3} = \left\{ {0,1,2} \right\}\) and TPM \({\text{P}}_{3}\),

$${\text{P}}_{3} = \left( {\begin{array}{*{20}c} 1 & 0 & 0 \\ {q_{1} } & {r_{1} } & {p_{1} } \\ {\delta_{2} } & {q_{2} } & {r_{2} } \\ \end{array} } \right).$$
(17)

is given as

$$\left( {\begin{array}{*{20}c} {\mu_{10}^{\left( 3 \right)} } & {\mu_{20}^{\left( 3 \right)} } \\ \end{array} } \right)^{T} = \frac{1}{{\psi_{1} }}\left( {\begin{array}{*{20}c} {p_{1} + q_{2} + \delta_{2} } \\ {p_{1} + q_{1} + q_{2} } \\ \end{array} } \right),$$
(18)

where,

$$\psi_{1} = \left( {q_{2} + \delta_{2} } \right)q_{1} + p_{1} \delta_{2} .$$
(19)

Proof.

Putting \({\text{P}}_{3}\) in canonical form as:

$${\text{P}}_{3} = \left( {\begin{array}{*{20}c} 1 &\vline & 0 & 0 \\ \hline {q_{1} } &\vline & {r_{1} } & {p_{1} } \\ {\delta_{2} } &\vline & {q_{2} } & {r_{2} } \\ \end{array} } \right) = \left( {\begin{array}{*{20}c} {\mathbf{I}} &\vline & {\mathbf{0}} \\ \hline {R_{2}^{\left( 3 \right)} } &\vline & {Q_{2}^{\left( 3 \right)} } \\ \end{array} } \right).$$
(20)

Constructing the augmented matrix \({\mathbf{G}}_{2}\) associated to the matrix \({\text{P}}_{3}\) as:

$${\mathbf{G}}_{2} = \left( {\begin{array}{*{20}c} {Q_{2}^{\left( 3 \right)} } & {R_{2}^{\left( 3 \right)} } & {{\text{e}}_{2} } \\ \end{array} } \right) = \left( {g_{ij} } \right),\,\,\,\,1 \le i \le 2,\,\,\,\,\,1 \le j \le 4, = \left( {\begin{array}{*{20}c} {r_{1} } & {p_{1} } & {q_{1} } & 1 \\ {q_{2} } & {r_{2} } & {\delta_{2} } & 1 \\ \end{array} } \right)$$
(21)

Partition \({\mathbf{G}}_{2}\) into four sub-matrices as:

$${\mathbf{G}}_{2} = \left( {\begin{array}{*{20}c} {r_{1} } &\vline & {p_{1} } & {q_{1} } & 1 \\ \hline {q_{2} } &\vline & {r_{2} } & {\delta_{2} } & 1 \\ \end{array} } \right) = \left( {\begin{array}{*{20}c} A &\vline & {B_{1}^{\left( 2 \right)} } \\ \hline {D_{1}^{\left( 2 \right)} } &\vline & {C_{1}^{\left( 2 \right)} } \\ \end{array} } \right).$$
(22)

The augmented reduced matrix formula, denoted by \({\mathbf{G}}_{2red}\) is given by:

$${\mathbf{G}}_{2red}^{\left( 1 \right)} = C_{1}^{\left( 2 \right)} + D_{1}^{\left( 2 \right)} \left( {1 - A} \right)^{ - 1} B_{1}^{\left( 2 \right)}$$
$$= \left( {\begin{array}{*{20}c} {r_{2} } & {\delta_{2} } & 1 \\ \end{array} } \right) + q_{2} \left( {p_{1} + q_{1} } \right)^{ - 1} \left( {\begin{array}{*{20}c} {p_{1} } & {q_{1} } & 1 \\ \end{array} } \right)$$
$${\mathbf{G}}_{2red}^{\left( 1 \right)} = \left( {\begin{array}{*{20}c} {g_{22}^{\left( 1 \right)} } & {g_{23}^{\left( 1 \right)} } & {g_{24}^{\left( 1 \right)} } \\ \end{array} } \right).$$
(23)

where,

$$g_{22}^{\left( 1 \right)} = r_{2} + q_{2} \left( {p_{1} + q_{1} } \right)^{ - 1} p_{1} ,g_{23}^{\left( 1 \right)} = \delta_{2} + q_{2} \left( {p_{1} + q_{1} } \right)^{ - 1} q_{1} ,\;{\text{and}}\;g_{24}^{\left( 1 \right)} = 1 + q_{2} \left( {p_{1} + q_{1} } \right)^{ - 1} .$$
(24)

Using (24), we get

$$\mu_{20}^{\left( 3 \right)} = \left( {g_{24}^{\left( 1 \right)} } \right)\left( {g_{23}^{\left( 1 \right)} } \right)^{ - 1} = \left( {p_{1} + q_{2} + q_{1} } \right)\left( {\left( {q_{2} + \delta_{2} } \right)q_{1} + p_{1} \delta_{2} } \right)^{ - 1} .$$
(25)

From (21), and (25), we obtain

$$\mu_{10}^{\left( 3 \right)} = \left( {g_{14} + \mu_{20}^{\left( 3 \right)} \,g_{12} } \right)\left( {g_{12} + g_{13} } \right)^{ - 1} = \left( {p_{1} + q_{2} + \delta_{2} } \right)\left( {\left( {q_{2} + \delta_{2} } \right)q_{1} + p_{1} \delta_{2} } \right)^{ - 1} .$$
(26)

This completes the proof of lemma.

Lemma 3

The MFPT’s vector \({{\varvec{\upmu}}}_{3}^{\left( 4 \right)} = \left( {\begin{array}{*{20}c} {\mu_{10}^{\left( 4 \right)} } & {\mu_{20}^{\left( 4 \right)} } & {\mu_{30}^{\left( 4 \right)} } \\ \end{array} } \right)^{T}\) of four states NHMC-RW with state space \(S_{4} = \left\{ {0,1,2,3} \right\}\) and TPM \({\text{P}}_{4}\),

$${\text{P}}_{4} { = }\left( {\begin{array}{*{20}c} 1 & 0 & 0 & 0 \\ {q_{1} } & {r_{1} } & {p_{1} } & 0 \\ {\delta_{2} } & {q_{2} } & {r_{2} } & {p_{2} } \\ {\delta_{3} } & 0 & {q_{3} } & {r_{3} } \\ \end{array} } \right).$$
(27)

is given as

$$\left( {\begin{array}{*{20}c} {\mu_{10}^{\left( 4 \right)} } & {\mu_{20}^{\left( 4 \right)} } & {\mu_{30}^{\left( 4 \right)} } \\ \end{array} } \right)^{T} = \frac{1}{{\psi_{2} }}\left( {\begin{array}{*{20}c} {\left( {p_{1} + q_{2} + \delta_{2} } \right)\left( {q_{3} + \delta_{3} } \right) + p_{2} \left( {p_{1} + \delta_{3} } \right)} \\ {\left( {p_{2} + q_{3} + \delta_{3} } \right)\left( {q_{1} + p_{1} } \right) + q_{2} \left( {q_{3} + \delta_{3} } \right)} \\ {\left( {p_{2} + q_{3} + \delta_{2} } \right)\left( {q_{1} + p_{1} } \right) + q_{2} \left( {q_{1} + q_{3} } \right)} \\ \end{array} } \right),$$
(28)

where,

$$\psi_{2} = \left( {q_{3} + \delta_{3} } \right)\left( {\left( {q_{2} + \delta_{2} } \right)q_{1} + q_{1} \delta_{2} } \right) + p_{2} \delta_{3} \left( {p_{1} + q_{1} } \right).$$
(29)

Proof.

Putting \({\text{P}}_{4}\) in canonical form as:

$${\text{P}}_{4} = \left( {\begin{array}{*{20}c} 1 &\vline & 0 & 0 & 0 \\ \hline {q_{1} } &\vline & {r_{1} } & {p_{1} } & 0 \\ {\delta_{2} } &\vline & {q_{2} } & {r_{2} } & {p_{2} } \\ {\delta_{3} } &\vline & 0 & {q_{3} } & {r_{3} } \\ \end{array} } \right) = \left( {\begin{array}{*{20}c} {\mathbf{I}} &\vline & {\mathbf{0}} \\ \hline {R_{3}^{\left( 4 \right)} } &\vline & {Q_{3}^{\left( 4 \right)} } \\ \end{array} } \right).$$
(30)

We can construct \(3 \times 5\) rectangular augmented matrix \({\mathbf{G}}_{3}\) associated to the matrix.

\({\text{P}}_{4}\) as:

$${\mathbf{G}}_{3} = \left( {\begin{array}{*{20}c} {Q_{3}^{\left( 4 \right)} } & {R_{3}^{\left( 4 \right)} } & {{\text{e}}_{3} } \\ \end{array} } \right) = \left( {g_{ij} } \right),\,\,1 \le i \le 3,\,\,\,\,\,1 \le j \le 5$$
$$= \left( {\begin{array}{*{20}c} {r_{1} } & {p_{1} } & 0 & {q_{1} } & 1 \\ {q_{2} } & {r_{2} } & {p_{2} } & {\delta_{2} } & 1 \\ 0 & {q_{3} } & {r_{3} } & {\delta_{3} } & 1 \\ \end{array} } \right).$$
(31)

Partition \({\mathbf{G}}_{3}\) into four sub-matrices as:

$${\mathbf{G}}_{3} = \left( {\begin{array}{*{20}c} {r_{1} } &\vline & {p_{1} } & 0 & {q_{1} } & 1 \\ \hline {q_{2} } &\vline & {r_{2} } & {p_{2} } & {\delta_{2} } & 1 \\ 0 &\vline & {q_{3} } & {r_{3} } & {\delta_{3} } & 1 \\ \end{array} } \right) = \left( {\begin{array}{*{20}c} A &\vline & {B_{1}^{\left( 3 \right)} } \\ \hline {D_{2}^{\left( 3 \right)} } &\vline & {C_{2}^{\left( 3 \right)} } \\ \end{array} } \right).$$
(32)

Applying the matrix reduction formula as:

$${\mathbf{G}}_{3red}^{\left( 1 \right)} = C_{2}^{\left( 3 \right)} + D_{2}^{\left( 3 \right)} \left( {1 - A} \right)^{ - 1} B_{1}^{\left( 3 \right)}$$
$$= \left( {\begin{array}{*{20}c} {r_{2} } & {p_{2} } & {\delta_{2} } & 1 \\ {q_{3} } & {r_{3} } & {\delta_{3} } & 1 \\ \end{array} } \right) + \left( {\begin{array}{*{20}c} {q_{2} } \\ 0 \\ \end{array} } \right)\left( {p_{1} + q_{1} } \right)^{ - 1} \left( {\begin{array}{*{20}c} {p_{1} } & 0 & {q_{1} } & 1 \\ \end{array} } \right)$$
$${\mathbf{G}}_{3red}^{\left( 1 \right)} = \left( {\begin{array}{*{20}c} {g_{22}^{\left( 1 \right)} } & {p_{2} } & {g_{24}^{\left( 1 \right)} } & {g_{25}^{\left( 1 \right)} } \\ {q_{3} } & {r_{3} } & {\delta_{3} } & 1 \\ \end{array} } \right) = \left( {g_{ij}^{\left( 1 \right)} } \right),\,\,2 \le i \le 3,\,\,\,\,\,2 \le j \le 5.$$
(33)

where,

$$g_{22}^{\left( 1 \right)} = r_{2} + p_{1} \left( {p_{1} + q_{1} } \right)^{ - 1} q_{2} ,g_{24}^{\left( 1 \right)} = \delta_{2} + q_{1} \left( {p_{1} + q_{1} } \right)^{ - 1} q_{2} ,{\text{and}}\;g_{25}^{\left( 1 \right)} = 1 + \left( {p_{1} + q_{1} } \right)^{ - 1} q_{2} .$$
(34)

Also partition \({\mathbf{G}}_{3red}^{\left( 1 \right)}\) into four sub-matrices as:

$${\mathbf{G}}_{3red}^{\left( 1 \right)} = \left( {\begin{array}{*{20}c} {g_{22}^{\left( 1 \right)} } &\vline & {p_{2} } & {g_{24}^{\left( 1 \right)} } & {g_{25}^{\left( 1 \right)} } \\ \hline {q_{3} } &\vline & {r_{3} } & {\delta_{3} } & 1 \\ \end{array} } \right) = \left( {\begin{array}{*{20}c} A &\vline & {B_{1}^{\left( 2 \right)} } \\ \hline {D_{1}^{\left( 2 \right)} } &\vline & {C_{1}^{\left( 2 \right)} } \\ \end{array} } \right).$$
(35)
$${\mathbf{G}}_{3red}^{\left( 2 \right)} = C_{1}^{\left( 2 \right)} + D_{1}^{\left( 2 \right)} \left( {1 - A} \right)^{ - 1} B_{1}^{\left( 2 \right)}$$
$$= \left( {\begin{array}{*{20}c} {g_{33}^{\left( 2 \right)} } & {g_{34}^{\left( 2 \right)} } & {g_{35}^{\left( 2 \right)} } \\ \end{array} } \right),$$
(36)

where, \(g_{33}^{\left( 2 \right)} = r_{3} + q_{3} \left( {p_{2} + g_{24}^{\left( 1 \right)} } \right)^{ - 1} p_{2} ,\)

$$g_{34}^{\left( 2 \right)} = \delta_{3} + q_{3} \left( {p_{2} + g_{24}^{\left( 1 \right)} } \right)^{ - 1} g_{24}^{\left( 1 \right)} ,{\text{and}}\;g_{35}^{\left( 2 \right)} = 1 + q_{3} \left( {p_{2} + g_{24}^{\left( 1 \right)} } \right)^{ - 1} g_{25}^{\left( 1 \right)} .$$
(37)

Using (37), we get

$$\mu_{30}^{\left( 4 \right)} = \left( {g_{35}^{\left( 2 \right)} } \right)\left( {g_{34}^{\left( 2 \right)} } \right)^{ - 1} = \left( {\left( {p_{2} + q_{3} + \delta_{2} } \right)\left( {p_{1} + q_{1} } \right) + q_{2} \left( {q_{1} + q_{3} } \right)} \right)\left( {\psi_{2} } \right)^{ - 1} ,$$
(38)
$$\psi_{2} = \left( {q_{3} + \delta_{3} } \right)\left( {\left( {q_{2} + \delta_{2} } \right)q_{1} + q_{1} \delta_{2} } \right) + p_{2} \delta_{3} \left( {p_{1} + q_{1} } \right).$$
(39)

From (34), and (38), we get

$$\mu_{20}^{\left( 4 \right)} = \left( {g_{25}^{\left( 1 \right)} + g_{23}^{\left( 1 \right)} \mu_{30}^{\left( 4 \right)} } \right)\left( {g_{23}^{\left( 1 \right)} + g_{24}^{\left( 1 \right)} } \right)^{ - 1}$$
$$= \left( {\left( {p_{2} + q_{3} + \delta_{3} } \right)\left( {q_{1} + p_{1} } \right) + q_{2} \left( {q_{3} + \delta_{3} } \right)} \right)\left( {\psi_{2} } \right)^{ - 1} .$$
(40)

Using (31), (38), and (39) we get,

$$\mu_{10}^{\left( 4 \right)} = \left( {g_{15} + g_{12} \mu_{20}^{\left( 4 \right)} + g_{13} \mu_{30}^{\left( 4 \right)} } \right)\left( {g_{12} + g_{13} + g_{14} } \right)^{ - 1}$$
$$= \left( {\left( {p_{1} + q_{2} + \delta_{2} } \right)\left( {q_{3} + \delta_{3} } \right) + p_{2} \left( {p_{1} + \delta_{3} } \right)} \right)\left( {\psi_{2} } \right)^{ - 1} .$$
(41)

Thus the results follow.

4 Relationship Between the Elements of two MFPT’s Vectors on Consecutive State Spaces \({\text{S}}_{N}\) and \({\text{S}}_{N + 1}\)

Theorem 1

The connection between the elements of two MFPT’s vectors of the regular NHMC-RW on two state spaces \({\text{S}}_{N} = \left\{ {0,1,...,N - 1} \right\}\) and \({\text{S}}_{N + 1} = \left\{ {0,1,...,N} \right\},\) for \(k = 1,2,...,N\) is given by

$$\mu_{k0}^{{\left( {N + 1} \right)}} = \mu_{k0}^{\left( N \right)} + \left( {\prod\limits_{i = 1}^{N} {q_{i} } } \right)^{ - 1} \sum\limits_{m = 0}^{k - 1} {\left( {\prod\limits_{j = 1}^{m} {q_{j} } } \right)\left( {\prod\limits_{i = m + 1}^{N - 1} {p_{i} } } \right)} .$$
(42)

Proof.

In particular case \(\delta_{i} = 0,\,\,\,\,(2 \le i \le N)\) into TPM \({\text{P}}\) (2), Using lemmas 1, and 2 in case of \(\delta_{2} = 0\), we can obtain the following relationships as:

  • relationship between the elements of two MFPT’s vectors \({{\varvec{\upmu}}}_{1}^{\left( 2 \right)} = \left( {\mu_{10}^{\left( 2 \right)} } \right)^{T}\) and \({{\varvec{\upmu}}}_{2}^{\left( 3 \right)} = \left( {\begin{array}{*{20}c} {\mu_{10}^{\left( 3 \right)} } & {\mu_{20}^{\left( 3 \right)} } \\ \end{array} } \right)^{T}\) on two state spaces \({\text{S}}_{2} = \left\{ {0,1} \right\}\) and \({\text{S}}_{3} = \left\{ {0,1,2} \right\}\) as: \(\mu_{10}^{\left( 3 \right)}\) can be rewritten in terms of \(\mu_{10}^{\left( 2 \right)}\) as

    $$\mu_{10}^{\left( 3 \right)} = \left( {q_{1} } \right)^{ - 1} + \frac{{p_{1} }}{{q_{1} q_{2} }}$$
    $$= \mu_{10}^{\left( 2 \right)} + \left( {\prod\limits_{i = 1}^{2} {q_{i} } } \right)^{ - 1} \sum\limits_{m = 0}^{0} {\left( {\prod\limits_{j = 1}^{m} {q_{j} } } \right)\left( {\prod\limits_{i = m + 1}^{1} {p_{i} } } \right)} .$$
    (43)

Using lemmas 2, and 3 in case of \(\delta_{2} = \delta_{3} = 0\), we obtain the following relationship between the elements of two MFPT’s vectors \({{\varvec{\upmu}}}_{2}^{\left( 3 \right)} = \left( {\begin{array}{*{20}c} {\mu_{10}^{\left( 3 \right)} } & {\mu_{20}^{\left( 3 \right)} } \\ \end{array} } \right)^{T}\) and \({{\varvec{\upmu}}}_{3}^{\left( 4 \right)} = \left( {\begin{array}{*{20}c} {\mu_{10}^{\left( 4 \right)} } & {\mu_{20}^{\left( 4 \right)} } & {\mu_{30}^{\left( 4 \right)} } \\ \end{array} } \right)^{T}\) on two state spaces, \({\text{S}}_{3} = \left\{ {0,1,2} \right\}\) and \({\text{S}}_{4} = \left\{ {0,1,2,3} \right\}\) as

  • \(\mu_{10}^{\left( 4 \right)}\) can be rewritten in terms of \(\mu_{10}^{\left( 3 \right)}\) as

    $$\mu_{10}^{\left( 4 \right)} = \frac{{p_{1} + q_{2} }}{{q_{1} q_{2} }} + \frac{{p_{1} p_{2} }}{{q_{1} q_{2} q_{3} }}$$
    $$= \mu_{10}^{\left( 3 \right)} + \left( {\prod\limits_{i = 1}^{3} {q_{i} } } \right)^{ - 1} \sum\limits_{m = 0}^{0} {\left( {\prod\limits_{j = 1}^{m} {q_{j} } } \right)\left( {\prod\limits_{i = m + 1}^{2} {p_{i} } } \right)} ,$$
    (44)

    \(\mu_{20}^{\left( 4 \right)}\) can be rewritten in terms of \(\mu_{20}^{\left( 3 \right)}\) as

    $$\mu_{20}^{\left( 4 \right)} = \frac{{p_{1} + q_{2} + q_{1} }}{{q_{1} q_{2} }} + \frac{{p_{2} \left( {q_{1} + p_{1} } \right)}}{{q_{1} q_{2} q_{3} }}$$
    $$= \mu_{20}^{\left( 3 \right)} + \left( {\prod\limits_{i = 1}^{3} {q_{i} } } \right)^{ - 1} \sum\limits_{m = 0}^{1} {\left( {\prod\limits_{j = 1}^{m} {q_{j} } } \right)\left( {\prod\limits_{i = m + 1}^{2} {p_{i} } } \right)} .$$
    (45)

Thus the proof of theorem finished.

Theorem 2

Closed form expression for the mean first passage times vector \({{\varvec{\upmu}}}_{N}^{{\left( {N + 1} \right)}}\) of NHMC-RW with state space \({\text{S}}_{N + 1} = \left\{ {0,1,2, \ldots ,N} \right\}\), for \(k = 1,2,...,N\) is given by,

$$\mu_{k0}^{{\left( {N + 1} \right)}} = \sum\limits_{m = 1}^{k} {\left[ {\left( {\prod\limits_{i = m}^{N} {q_{i} } } \right)^{ - 1} \sum\limits_{r = m - 1}^{N - 1} {\left( {\prod\limits_{i = m}^{r} {p_{i} } } \right)} \left( {\prod\limits_{j = r + 2}^{N} {q_{j} } } \right)} \right]} .$$
(46)

Proof.

(By Mathematical induction)

  • At \(N = 1\) with \({\text{S}}_{2} = \left\{ {0,1} \right\}\)

Using lemma 1, \(\mu_{10}^{\left( 2 \right)}\) can be rewritten as

$$\mu_{10}^{\left( 2 \right)} = \left( {q_{1} } \right)^{ - 1} = \sum\limits_{m = 1}^{1} {\left[ {\left( {\prod\limits_{i = m}^{1} {q_{i} } } \right)^{ - 1} \sum\limits_{r = m - 1}^{1 - 1} {\left( {\prod\limits_{i = m}^{r} {p_{i} } } \right)} \left( {\prod\limits_{j = r + 2}^{1} {q_{j} } } \right)} \right]} .$$
(47)

Thus formula (46) holds for \(N = 1\).

  • At \(N = 2\) with \({\text{S}}_{3} = \left\{ {0,1,2} \right\}\)

Using lemma 2, in special case \(\delta_{2} = 0\). \(\mu_{k0}^{\left( 3 \right)} ,\,\,k = 1,2\) can be rewritten as

$$\mu_{10}^{\left( 3 \right)} = \frac{{p_{1} + q_{2} }}{{q_{1} q_{2} }} = \sum\limits_{m = 1}^{1} {\left[ {\left( {\prod\limits_{i = m}^{2} {q_{i} } } \right)^{ - 1} \sum\limits_{r = m - 1}^{2 - 1} {\left( {\prod\limits_{i = m}^{r} {p_{i} } } \right)} \left( {\prod\limits_{j = r + 2}^{2} {q_{j} } } \right)} \right]} ,$$
(48)
$$\mu_{20}^{\left( 3 \right)} = \frac{{p_{1} + q_{1} + q_{2} }}{{q_{1} q_{2} }} = \sum\limits_{m = 1}^{2} {\left[ {\left( {\prod\limits_{i = m}^{2} {q_{i} } } \right)^{ - 1} \sum\limits_{r = m - 1}^{2 - 1} {\left( {\prod\limits_{i = m}^{r} {p_{i} } } \right)} \left( {\prod\limits_{j = r + 2}^{2} {q_{j} } } \right)} \right]} .$$
(49)

Thus formula (46) holds for \(N = 2\).

  • Assume that formula (46) holds for \(N = L - 1\) as

$$\mu_{k0}^{\left( L \right)} = \sum\limits_{m = 1}^{k} {\left[ {\left( {\prod\limits_{i = m}^{L - 1} {q_{i} } } \right)^{ - 1} \sum\limits_{r = m - 1}^{L - 2} {\left( {\prod\limits_{i = m}^{r} {p_{i} } } \right)} \left( {\prod\limits_{j = r + 2}^{L - 1} {q_{j} } } \right)} \right]} ,\,\,\,\,\,\,k = 1,2,..,L - 1$$
(50)
  • At \(N = L\), \(k = 1,2,...,L\) we can using theorem 1 as:

    $$\mu_{k0}^{{\left( {L + 1} \right)}} = \mu_{k0}^{\left( L \right)} + \left( {\prod\limits_{i = 1}^{L} {q_{i} } } \right)^{ - 1} \sum\limits_{m = 0}^{k - 1} {\left( {\prod\limits_{j = 1}^{m} {q_{j} } } \right)\left( {\prod\limits_{i = m + 1}^{L - 1} {p_{i} } } \right)}$$
    $$= \sum\limits_{m = 1}^{k} {\left[ {\left( {\prod\limits_{i = m}^{L - 1} {q_{i} } } \right)^{ - 1} \sum\limits_{r = m - 1}^{L - 2} {\left( {\prod\limits_{i = m}^{r} {p_{i} } } \right)} \left( {\prod\limits_{j = r + 2}^{L - 1} {q_{j} } } \right)} \right]} + \left( {\prod\limits_{i = 1}^{L} {q_{i} } } \right)^{ - 1} \sum\limits_{m = 0}^{k - 1} {\left( {\prod\limits_{j = 1}^{m} {q_{j} } } \right)\left( {\prod\limits_{i = m + 1}^{L - 1} {p_{i} } } \right)}$$
    $$= \sum\limits_{m = 1}^{k} {\left[ {\left( {\prod\limits_{i = m}^{L} {q_{i} } } \right)^{ - 1} \sum\limits_{r = m - 1}^{L - 2} {\left( {\prod\limits_{i = m}^{r} {p_{i} } } \right)} \left( {\prod\limits_{j = r + 2}^{L} {q_{j} } } \right)} \right]} + \sum\limits_{m = 0}^{k - 1} {\frac{{\left( {\prod\limits_{j = 1}^{m} {q_{j} } } \right)\left( {\prod\limits_{i = m + 1}^{L - 1} {p_{i} } } \right)}}{{\prod\limits_{i = 1}^{m} {q_{i} } \prod\limits_{i = m + 1}^{L} {q_{i} } }}}$$
    $$\mu_{k0}^{{\left( {L + 1} \right)}} = \sum\limits_{m = 1}^{k} {\left[ {\left( {\prod\limits_{i = m}^{L} {q_{i} } } \right)^{ - 1} \sum\limits_{r = m - 1}^{L - 1} {\left( {\prod\limits_{i = m}^{r} {p_{i} } } \right)} \left( {\prod\limits_{j = r + 2}^{L} {q_{j} } } \right)} \right]} .$$
    (51)

Thus formula (46) holds at \(N = L\), and the proof of theorem completed.

Corollary 1

In case of homogeneity Markov chain random walk (HMC-RW) models, \(\left\{ {X_{k}^{{\left( {N + 1} \right)}} ,\,k = 0,1,...} \right\}\) on state space \({\text{S}}_{N + 1} \equiv \left\{ {0,1, \ldots ,N} \right\}\), with one- step transition probabilities are \(p_{i} = p\), \(r_{i} = 1 - p - q\), and \(q_{i} = q\) with \(p\) and \(q\) are positive. The closed form expression for the vector of mean first passage times \({{\varvec{\upmu}}}_{N}^{{\left( {N + 1} \right)}} = \left( {\begin{array}{*{20}c} {\mu_{10}^{{\left( {N + 1} \right)}} } & {\mu_{20}^{{\left( {N + 1} \right)}} } & \ldots & {\mu_{N0}^{{\left( {N + 1} \right)}} } \\ \end{array} } \right)^{T} ,\) is given b.

$$\mu_{k0}^{{\left( {N + 1} \right)}} = \frac{1}{q - p}\left( {k - \frac{{\left( {{q \mathord{\left/ {\vphantom {q p}} \right. \kern-0pt} p}} \right)^{N} \left( {1 - \left( {{q \mathord{\left/ {\vphantom {q p}} \right. \kern-0pt} p}} \right)^{k} } \right)}}{{1 - \left( {{q \mathord{\left/ {\vphantom {q p}} \right. \kern-0pt} p}} \right)}}} \right),\,\,\,\,\,\,\,\,\,\,\,k = 1,2,...,N$$
(52)

Proof.

Putting \(q_{i} = q\,\,\,,\,\,\,p_{i} = p\,\,,\,\,\,1 \le i \le N\) into formula (46) we get,

$$\mu_{k0}^{{\left( {N + 1} \right)}} = \sum\limits_{m = 1}^{k} {\left[ {\left( {q^{N - m + 1} } \right)^{ - 1} \sum\limits_{r = m - 1}^{N - 1} {\left( {p^{r - m + 1} } \right)} \left( {q^{N - r - 1} } \right)} \right]}$$
$$= \frac{1}{q - p}\left( {\sum\limits_{m = 1}^{k} {\left( 1 \right)} - \sum\limits_{m = 1}^{k} {\left( {{p \mathord{\left/ {\vphantom {p q}} \right. \kern-0pt} q}} \right)^{N - m + 1} } } \right) = \frac{1}{q - p}\left( {k - \frac{{\left( {{q \mathord{\left/ {\vphantom {q p}} \right. \kern-0pt} p}} \right)^{N} \left( {1 - \left( {{q \mathord{\left/ {\vphantom {q p}} \right. \kern-0pt} p}} \right)^{k} } \right)}}{{1 - \left( {{q \mathord{\left/ {\vphantom {q p}} \right. \kern-0pt} p}} \right)}}} \right).$$
(53)

Thus formula (53) follows, and this result agree with the expected duration of gambler’s ruin problem, see [13].

Note that,

$$\prod\limits_{k + 1}^{k} {\left( . \right)} = 1.$$
(54)

5 Algorithm

We can describe the method of state reduction, for computing the MFPT’s vector \({{\varvec{\upmu}}}_{N}^{{\left( {N + 1} \right)}} = \left( {\begin{array}{*{20}c} {\mu_{10}^{{\left( {N + 1} \right)}} } & {\mu_{20}^{{\left( {N + 1} \right)}} } & \ldots & {\mu_{N0}^{{\left( {N + 1} \right)}} } \\ \end{array} } \right)^{T}\) for the FC-SBT matrix \({\text{P}}_{N + 1}\) (2), by introducing the computational algorithm as:

figure a

We can apply this algorithm on Mathematica program for computing the MFPT’s vector \({{\varvec{\upmu}}}_{4}^{\left( 5 \right)} = \left( {\begin{array}{*{20}c} {\mu_{10}^{\left( 5 \right)} } & {\mu_{20}^{\left( 5 \right)} } & {\mu_{30}^{\left( 5 \right)} } & {\mu_{40}^{\left( 5 \right)} } \\ \end{array} } \right)^{T}\) for \(5 \times 5\) TPM \({\text{P}}_{5}\),

$${\text{P}}_{5} { = }\left( {\begin{array}{*{20}c} 1 & 0 & 0 & 0 & 0 \\ {q_{1} } & {r_{1} } & {p_{1} } & 0 & 0 \\ {\delta_{2} } & {q_{2} } & {r_{2} } & {p_{2} } & 0 \\ {\delta_{3} } & 0 & {q_{3} } & {r_{3} } & {p_{3} } \\ {\delta_{4} } & 0 & 0 & {q_{4} } & {r_{4} } \\ \end{array} } \right).$$
(55)

The output as:

$$\left( {\begin{array}{*{20}c} {\mu_{10}^{\left( 5 \right)} } \\ {\mu_{20}^{\left( 5 \right)} } \\ {\mu_{30}^{\left( 5 \right)} } \\ {\mu_{40}^{\left( 5 \right)} } \\ \end{array} } \right) = \frac{1}{{\psi_{3} }}\left( {\begin{array}{*{20}c} {\left( {q_{4} + \delta_{4} } \right)\left( {\left( {q_{3} + \delta_{3} } \right)\left( {p_{1} + q_{2} + \delta_{2} } \right) + p_{2} \left( {p_{1} + \delta_{3} } \right)} \right) + p_{3} \left( {\delta_{4} \left( {p_{1} + p_{2} + q_{2} + \delta_{2} } \right) + p_{1} p_{2} } \right)} \\ {\left( {q_{4} + \delta_{4} } \right)\left( {\left( {q_{3} + \delta_{3} } \right)\left( {p_{1} + q_{2} + q_{1} } \right) + p_{2} \left( {p_{1} + q_{1} } \right)} \right) + p_{3} \left( {\left( {p_{2} + \delta_{4} } \right)\left( {p_{1} + q_{1} } \right) + q_{2} \delta_{4} } \right)} \\ {\left( {q_{4} + \delta_{4} } \right)\left( {\left( {p_{1} + q_{1} } \right)\left( {p_{2} + \delta_{2} } \right) + q_{3} \left( {p_{1} + q_{2} + q_{1} } \right) + q_{1} q_{2} } \right) + p_{3} \left( {\left( {p_{2} + \delta_{2} } \right)\left( {p_{1} + q_{1} } \right) + q_{1} q_{2} } \right)} \\ \begin{gathered} q_{4} \left( {\left( {p_{1} + q_{1} } \right)\left( {p_{2} + q_{3} + \delta_{2} } \right) + q_{2} \left( {q_{3} + q_{1} } \right)} \right) + \left( {q_{3} + \delta_{3} } \right)\left( {\delta_{2} \left( {p_{1} + q_{1} } \right) + q_{1} q_{2} } \right) + p_{2} \delta_{3} \left( {p_{1} + q_{1} } \right) \hfill \\ \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\, + p_{3} \left( {\left( {p_{2} + \delta_{2} } \right)\left( {p_{1} + q_{1} } \right) + q_{1} q_{2} } \right) \hfill \\ \end{gathered} \\ \end{array} } \right),$$
(56)

where,

$$\psi_{3} = \left( {q_{4} + \delta_{4} } \right)\left( {\left( {q_{3} + \delta_{3} } \right)\left( {\left( {q_{2} + \delta_{2} } \right)q_{1} + q_{1} \delta_{2} } \right) + p_{2} \delta_{3} \left( {p_{1} + q_{1} } \right)} \right) + p_{3} \delta_{4} \left( {\left( {p_{1} + q_{1} } \right)\left( {p_{2} + \delta_{2} } \right) + q_{1} q_{2} } \right).$$
(57)

In special case \(\delta_{2} = \delta_{3} = \delta_{4} = 0\), we get

$$\mu_{k0}^{\left( 5 \right)} = \sum\limits_{m = 1}^{k} {\left[ {\left( {\prod\limits_{i = m}^{4} {q_{i} } } \right)^{ - 1} \sum\limits_{r = m - 1}^{3} {\left( {\prod\limits_{i = m}^{r} {p_{i} } } \right)} \left( {\prod\limits_{j = r + 2}^{4} {q_{j} } } \right)} \right]} ,\,\,\,\,\,\,k = 1,2,3,4.$$
(58)

6 Conclusions

Closed form expression for the MFPT’s of Corona virus infection to the susceptible person, when he contact by the exposed person is introduced. We used the method of state reduction for computing the MFPT’s vector of general regular TPM arising from NHMC-RW \(\left\{ {X_{k}^{{\left( {N + 1} \right)}} ,\,k = 0,1,...} \right\}\) on the state space \({\text{S}} = \left\{ {0,1, \ldots ,N} \right\}\) by. Some special cases, which lead to relationships between the elements of the MFPT’s vectors on two state spaces \(S_{N}\) and \(S_{N + 1}\). Computational algorithm for computing MFPT’s vector by the mathematica program is introduced. Finally, about the future direction we will compute the MFPT’s of Corona virus infection for any model of infectious diseases of the general random walk around a ring with equal size steps.