2026 Volume 35 Issue 1
Article Contents

Ya-Nan Sun, Xin-Zhi Liu, You-Ming Lei. Dynamic balance and reliability of a stochastic ecosystem with Markov switching[J]. Chinese Physics B, 2026, 35(1): 010507. doi: 10.1088/1674-1056/adea58
Citation: Ya-Nan Sun, Xin-Zhi Liu, You-Ming Lei. Dynamic balance and reliability of a stochastic ecosystem with Markov switching[J]. Chinese Physics B, 2026, 35(1): 010507. doi: 10.1088/1674-1056/adea58

Dynamic balance and reliability of a stochastic ecosystem with Markov switching

  • Received Date: 10/04/2025
    Accepted Date: 25/06/2025
    Available Online: 01/01/2026
通讯作者: 陈斌, bchen63@163.com
  • 1. 

    沈阳化工大学材料科学与工程学院 沈阳 110142

  1. 本站搜索
  2. 百度学术搜索
  3. 万方数据库搜索
  4. CNKI搜索

Figures(11)

Article Metrics

Article views(241) PDF downloads(0) Cited by(0)

Access History

Dynamic balance and reliability of a stochastic ecosystem with Markov switching

Abstract: A stochastic predator–prey system with Markov switching is explored. We have developed a new chasing technique to efficiently solve the Fokker–Planck–Kolmogorov and backward Kolmogorov equations. Dynamic balance and reliability of the switching system are evaluated via stationary probability density function and first-passage failure theory, taking into account factors such as switching frequencies, noise intensities, and initial conditions. Results reveal that Markov switching leads to stochastic P-bifurcation, enhancing dynamic balance and reducing white-noise-induced oscillations. But frequent switching can heighten initial value dependence, harming reliability. Further, the influence of the subsystem on the switching system is not proportional to its action probabilities. Monte Carlo simulations validate the findings, offering an in-depth exploration of these dynamics.

1.   Introduction
  • Since the Lotka–Volterra system was proposed in 1926, various mathematical models have been developed to predict predator–prey interactions and help prevent species extinction.[1–5] However, most predator–prey models assume constant coefficients, neglecting environmental fluctuations caused by natural disasters and human activities. These fluctuations, often modeled as telegraph noise, are better represented by Markov switching processes with continuous time and discrete states.[6–8] This approach turns constant coefficients into time-varying ones, leading to the development of Markov switching systems that more accurately capture ecological dynamics.

    Markov switching systems, a subset of regime-switching systems, use Markov chains to model stochastic transitions among finite environmental states.[9–11] Recent research on their application to predator–prey systems mainly centers on species persistence and extinction. For instance, Liu et al. established theoretical conditions for persistence and extinction in terms of time average and proposed optimal harvest strategies.[6,7] Sun et al. employed the energy envelope stochastic average method to analyze system responses and designed feedback control to restore switching systems.[12] Some works combined the Lyapunov function and Khasminskii stability theory to study asymptotic stability of the stationary distribution.[13–15]

    However, current research on switching systems has mainly relied on theoretical derivations to determine species coexistence conditions. In fact, switching frequency, initial conditions, and noise intensity, which are vital for species coexistence, need further numerical exploration. For instance, day–night species interactions with different durations can be seen as two-subsystem stochastic switching,[16,17] and seasonal variations as four-subsystem switching.[18–20] Studies have indicated that lions hunt better at night because zebras and some prey are more vigilant in daylight.[21] Arctic foxes and red foxes have different seasonal hunting strategies.[22] These highlight the need to study how Markov switching frequency impacts predator–prey dynamics.

    Dynamic balance, defined as the stable coexistence of species over time, is crucial for ecosystem reliability. Yet, random environmental changes can disrupt this balance, causing species extinction and reducing system reliability.[23,24] First-passage failure theory has been used to analyze stochastic predator–prey systems, exploring the impact of system parameters and white noise on dynamic balance.[23–26] Markov switching has then been introduced. The stationary response has been solved using the stochastic averaging of the energy envelope method or the splitting method.[8,27] The Fokker–Planck equation, k-core method, and spectral early warning signals have been applied to determine the tipping time of dynamic balance.[28–30] Nevertheless, many studies primarily focus on system dynamic balance in non-switching environments, leaving the influence of Markov switching on dynamic balance largely unexplored.

    To fill this research gap, we introduce Markov switching into a stochastic predator–prey system. Against the backdrop of day–night cycles and seasonal variations, the effects of Markov switching frequency, noise intensity, and initial conditions on the dynamic balance system are analyzed. The patterns of their effects on system reliability are identified, and some rational control strategies are proposed. The paper is structured as follows: Section 2 presents a stochastic predator–prey system with Markov switching. Section 3 examines the dynamic balance of the switching system from the stationary probability density function perspective, while Section 4 explores the reliability through first-passage failure theory. Finally, Section 5 gives the conclusions.

2.   Stochastic predator–prey system
  • Cai et al. analyzed a predator–prey system incorporating white noise and Holling type-II functional response[31]

    where X(t) and Y(t) denote the population densities of prey and predators, respectively. The parameters a (intrinsic growth rate), s (prey self-competition rate), b (capture rate), m (predator-dependent saturation coefficient), c (mortality rate), and f (consumption rate) are positive constants. Wi(t) (i = 1,2) are independent Gaussian white noises in the context of the Stratonovich sense with auto-correlation functions E[WiWi(t + τ)] = δ(τ). Here, δ(t) is the Dirac delta function, and di are noise intensities.

    All coefficients in system (1) are constant. Environmental mutations often lead to abrupt and random changes in ecosystems. So the system (1) can be extended to the following Markov switching form:

    For the Markov switching process {r(t)}t ⩾ 0, its values are drawn from a finite set S={1,2,…,n}. Let r(t) be a right-continuous Markov chain governed by the transition matrix Γ = {γi j} for i,j = 1,2,…, n. The transition probability of r(t) is given by

    where γij is the transition rate from i to j, with γij > 0 for i ≠ j and γii=−∑i≠jγij for all i∈S. Given a state space S={1,2}, then the transition matrix Γ is given by

  • Since the state (X, Y) of system (2) is no longer a Markov diffusion process. Traditional stochastic methods cannot directly handle the complexity of this discrete-state switch. Hence, consider the following transformation:[8,27]

    System (1) can then be rewritten as

    Based on the method described in Eqs. (8)–(16) of Ref. [31], the conservative system corresponding to system (6) can be derived as

    Define f∼=f−cm, then the Hamiltonian function of system (7) can be constructed as

    The system (7) exhibits the same equilibrium as system (6) under noise-free conditions. Thus, the dynamics of system (6) can be studied through the Hamiltonian function F(q, p). Rewrite the system (2) in the following way:

    where F(i) is the Hamiltonian function for state r(t) = i, and the correction terms MQ(i) and MP(i) are

    In line with the treatment in Refs. [8,27], the system (9) can be rewritten as

    where F¯ is the probability-weighted Hamiltonian function, and

    where μ = [μ(1), μ(2),…,μ(n)], with μ(i) being the stationary probability of the Markov switching process r(t) in the i-th state. Based on the Markov switching theory,[12,27] we get

  • The probability density function (PDF) p(x) describes the distribution of a random variable x, indicating the likelihood of x taking values within a specific range.[32–34] Specifically, the stationary probability density function (SPDF) ps(x) characterizes a stochastic process where p(x) is time-invariant, i.e., dps(x)/dt = 0.

    To verify the approximation of systems (9) and (11), we employ the Monte Carlo method to simulate their marginal SPDFs ps(Q) and ps(P), and the fitting results are good, as depicted in Figs. 1(a) and 1(b). We set n = 2 and define the switching parameters as follows: a(1) = 0.9, b(1) = 1, c(1) = 0.5, f(1) = 0.5, s(1) = 0.15, m(1) = 0.1, d1(1)=d2(1)=0.1; a(2) = 0.85, b(2) = 0.9, c(2) = 0.5, f(2) = 0.5, s(2) = 0.1, m(2) = 0.3, d1(2)=d2(2)=0.1.[31,35] Three transition matrices are considered: Γ1: = (γ12,γ21) = (1,9), Γ2 : = (γ12, γ21) = (6,3), and Γ3: = (γ12,γ21) = (9,1). In this work, Monte Carlo simulations are carried out using stochastic Runge–Kutta algorithms.[36] We randomly select 100 points as initial values for the variables Q and P within their allowed ranges, with a time step size of 10−2 (e.g., the initial values in Fig. 1 lie within the domain [−3,3]×[−3,3]). For each sample trajectory, we discard the first N = 106 steps as transient and subsequently perform N = 2 × 107 iterative steps to collect data. The simulation is deemed converged when the normalized L2-norm difference between consecutive probability distributions falls below 10−3, ensuring statistical stability.

    The Monte Carlo method used above is time-consuming because it requires a large sample size to obtain reliable results. To improve research efficiency, we improved a numerical approach that combines the splitting method[37,38] and chasing technique[23,24] to obtain the dynamic characteristics of SPDF in a short computation time.

    Returning to system (11) and applying the Itô differential rule, we obtain its Itô form

    where B1(t) and B2(t) are independent Brownian motions. In the context of stochastic dynamical system theory, the transition probability density p(Q, P,t|Q0, P0,t0) of system (9) can be approximated using the Fokker–Planck–Kolmogorov (FPK) equation associated with system (14):

    with

    The initial condition and boundary condition of Eq. (15) are

    where ∂Ω denotes the boundary surface.

    Utilizing the splitting method on the FPK equation (15), we can obtain

    where pk, pk + 1/2, and pk + 1 signify the values that the function p(Q, P,t|Q0, P0, t0) attains at t = kΔ t, (k + 1/2)Δ t, and (k + 1)Δ t, respectively. In particular, we enhance the splitting method and chasing technique (SMCT) from Refs. [23,24] and replace the LU decomposition with the Thomas algorithm, significantly reducing the calculation time of solving the Eqs. (15)–(18) (see Appendix A). A numerical example shows the accuracy of the new method in Fig. 2.

3.   Dynamic balance analysis based on SPDF
  • Random environmental disturbances can lead to extreme population densities. When densities fall below 20% or exceed 80% of equilibrium levels,[8,24,39] the dynamic balance of the system is disrupted, potentially leading to species extinction.[23,40] Therefore, it is important to study the impacts of Markov switching on the dynamic balance of system (14).

    Assume the system (14) operates in four distinct environments, with parameters specified as follows:[24,31] For r(t) = 1: a(1) = 0.9, b(1) = 1, c(1) = 0.5, f(1) = 0.5, s(1) = 0.2, m(1) = 0.25, d1(1)=d2(1)=0.1; for r(t) = 2: s(2) = 0.15, m(2) = 0.5, with other parameters identical to r(t) = 1; for r(t) = 3: a(3) = 0.85, b(3) = 0.9, c(3) = 0.5, f(3) = 0.5, s(3) = 0.12, m(3) = 0.15, d1(3)=d2(3)=0.1; for r(t) = 4: s(4) = 0.1, m(4) = 0.3, and the rest are the same as r(t) = 3. Based on the above analysis, we define the rectangular domain Ω = (−1,1) × (−1,0.5) as the safe domain for system (14) in Fig. 3.

  • In the absence of Markov switching, the system parameters remain constant and correspond directly to one of the four subsystems (r(t) = 1,2,3,4). The marginal SPDFs ps(Q) and ps(P) of the system (14) under four cases are given in the following Fig. 4.

    In Figs. 4(a) and 4(b), all marginal SPDFs exhibit unimodal distributions. The peak points lie within the safe domain Ω, hinting at a greater chance of dynamic balance. The higher peak amplitude for r(t) = 1 compared to r(t) = 3 suggests higher system reliability. However, for r(t) = 2, only the peak point of ps(P) is in Ω, while that of ps(Q) is not. In Fig. 4(c), ps(Q) and ps(P) are bimodal and outside Ω. Thus, dynamic balance may break when r(t) = 2, 4.

    To better understand Fig. 4, examine the cases of r(t) = 1, 4. Figure 5 shows the surface plots of the joint SPDF ps(Q, P) along with its projections. For r(t) = 1, the joint SPDF forms a conical shape, projecting as a divergence point in the Q–P plane, falling within Ω. While for r(t) = 4, the SPDF is asymmetric and crater-like, with a diverging loop projection outside Ω, representing the system break-out.

  • According to Eqs. (4) and (13), the effect of Markov switching on the system (2) equals the influence of stationary probability on the system (14). For example, as system (14) switches randomly between two subsystems, like the day–night cycle,[16,17] we obtain μ1 = γ21/(γ12 + γ21) and μ2 = 1 − μ1 = γ12/(γ12 + γ21). Let Sij (i = 1,2, j = 2,4, i ≠ j) denote system parameters switching from state r(t) = i to r(t) = j with μi + μj = 1. The marginal SPDFs ps(Q) of system (14) with different stationary probabilities are shown in Fig. 6.

    In Fig. 6(a), ps(Q) remains unimodal as the system switches from r(t) = 1 to r(t) = 2. For μ1 = 0, the system becomes subsystem r(t) = 2, with its peak point outside Ω (losing balance). When μ1 = 1, it is subsystem 1 with a peak point in Ω (maintaining balance). As μ1 increases from 0 to 1, the peak point of ps(Q) moves from outside Ω to inside Ω, with a narrower, higher-peaked distribution, indicating Markov switching boosts reliability. In Fig. 6(b), μ1 = 0 gives subsystem 4 with a bimodal SPDF (peak outside Ω), and μ1 = 1 gives subsystem 1 with a unimodal one (peak inside Ω). As μ1 varies from 0 to 1, the two peaks merge into a higher single peak, triggering a stochastic P-bifurcation phenomenon.[8] In Fig. 6(c), a similar bifurcation emerges, accompanied by a lower and wider distribution. This is due to the lower reliability of subsystem 2 than subsystem 1, underscoring the importance of subsystems to the dynamics of switching systems.

    Next, we analyze the impact of Markov switching on system reliability for system (14) switching among four subsystems (r(t) = 1,2,3, 4), akin to the seasonal variations.[18,20] We assume pairwise equal stationary probabilities, giving three cases: S12–34, S13–24, and S14−23. The marginal SPDFs of the system (14) for these cases are presented in Fig. 7.

    Compared with Fig. 6, the ps(Q) in Fig. 7 features lower peaks and broader distributions, indicating that frequent switching weakens system stability. In Fig. 6, the peak of ps(Q) may be outside Ω, yet in Fig. 7, it is more likely to be inside Ω, suggesting the system is more likely to achieve dynamic balance during frequent switching. Moreover, the unimodal SPDFs in Fig. 7 imply a lower likelihood of stochastic P-bifurcation. That means frequent switching can diminish the probability of periodic oscillations.

4.   Reliability analysis based on first-passage failure
  • The above research shows that the solution of system (14) may either stay within the safe domain Ω (dynamic balance) or escape it (system failure). To mitigate the latter scenario, it is crucial to analyze both the failure probability and failure time of the Markov switching system.[41] We adopt the first-passage failure theory to assess system reliability. In particular, the first-passage time T is defined as the time at which the system first reaches the boundary of the safe domain Ω.

    Assume the system starts within the Ω with initial values (Q0, P0). We define the conditional reliability function (CRF) R(t|Q0, P0) as the probability that the population densities Q and P remain within the safe domain during the interval (0, t]. Mathematically,

    The conditional probability distribution function for T, which can be called the failure probability, is expressed as

    The conditional probability density (CPD) for T is

    The n-th moment of T can be derived as

    Based on Markov process theory, the CRF R(t|Q0, P0) follows the backward Kolmogorov equation for system (14):

    where a1, a2, b11, and b22 are obtained by substituting (Q0, P0) for (Q,P) in Eq. (16). The initial condition and boundary condition of Eq. (23) are

    Analogous to Eq. (15), with the splitting method, equation (23) can be expressed as

    where Rk, Rk + 1/2, and Rk + 1 represent the values of the CRF R(t | Q0, P0) when t = kΔ t, (k + 1/2)Δ t, and (k + 1)Δt. Equation (25) is solved analogously to Eq. (18). When the CRF R(t|Q0, P0) is determined, the CPD p(t | Q0, P0) can be computed via Eq. (21). By multiplying Eq. (23) by tn and integrating over t, we obtain the Pontryagin equations of the moments of T

    with

    Equation (26) can be solved via the finite difference method from the lower order to the higher order given that ϕ0 = 1. The first-order moment, i.e., ϕ1, which is the mean first-passage time (MFPT), represents the average time required for the system to first reach ∂Ω.

  • In this part, we explore the impacts of Markov switching on the CRF R(t|Q0, P0) for system (14) switching between two or four subsystems, as shown in Fig. 8.

    In Fig. 8, as time t increases, R(t|Q0, P0) initially drops sharply and then slowly to zero, meaning noise will significantly weaken system reliability in the initial stage. In Fig. 8(a), μ1 = 1 makes the system operate as subsystem 1, with R(t|Q0, P0) reaching zero last. μ1 = 0 gives subsystem 2, where it reaches zero first. For μ1∈(0,1), zero-reaching time is in-between, showing Markov switching can neutralize the dynamic characteristics of the subsystem. Similar trends are in other subgraphs. Additionally, by comparing the time when R(t|Q0,P0) approaches 0 under two-subsystem and four-subsystem switching, it can be concluded that frequent switching can delay the system failure time to a certain extent.

    On the other hand, the CRF R(t|Q0,P0) of the switching system may align more closely with that of a certain subsystem, indicating the contribution of the subsystem may not be proportional to its action probability. To verify this, figure 9 shows ε(t), the difference between the CRF R(t|Q0,P0) of the switching system and its subsystems at each t.

    In Fig. 9, a smaller ε(t) means the CRF of the switching system is closer to that of the subsystem. In Figs. 9(a) and 9(d), subsystems are either in dynamic balance or break out. The CRF of the switching system first closely follows the CRF of the balanced subsystem (t < tA or t < tB), then that of the broken-out subsystem (t > tA or t > tB). In contrast, when all subsystems break out (Fig. 9(b)), system reliability depends on the least reliable one. When all maintain dynamic balance (Fig. 9(c)), it is determined by the more reliable subsystem. This provides an effective basis for maintaining population coexistence through ecological environment management.

  • According to the previous analysis, we use switching cases S12 and S12−34 as examples to explore the effects of Markov switching on the CPD p(t| Q0, P0), and the results are illustrated in Fig. 10.

    In Fig. 10, p(T| Q0, P0) indicates the probability density of the first-passage time T. The quasi-periodic nature of the system accounts for the oscillation patterns of the CPD curve. In Figs. 10(a) and 10(c), the CPD p(T|Q0, P0) of subsystem 2 (μ1 = 0) rapidly attains a high value, suggesting a high system failure likelihood, in line with Fig. 8(a). For μ1 = 0.5, there are more peaks with lower amplitudes. This means Markov switching can decrease the probability of premature failure, thereby enhancing system reliability. As noise intensity increases from 0.05 to 1, CPD curves exhibit fewer but larger peaks, indicating excessive noise can severely undermine system reliability, leading to brief but continuous breakouts. While frequent switching can somewhat weaken this negative impact. The same is true in Figs. 10(b) and 10(d).

  • Since the mean first-passage time is usually determined by initial conditions, we examine how Markov switching affects the MFPT under different initial values to assess its impact on the reliability of system (14).

    In Fig. 11, when Q0 = −1 or Q0 = 1 (boundary of ΩQ), ϕ1 is zero. In Fig. 11(a), as Q0 moves from −1 to 1, ϕ1 exhibits three phases: sharp rise, stabilization, and decline. In Fig. 11(b), ϕ1 first increases, peaks, and then decreases. Clearly, ϕ1 is smaller near the boundary, and two-subsystem switching may be less affected by the initial value than frequent switching. The ϕ1 of the switching system is intermediate but closer to subsystem 2 (μ1 = 0) in Fig. 11(a), indicating its reliability may be more vulnerable to a break-out subsystem. In addition, the overall value of MFPT ϕ1 in Fig. 11(b) is small yet exceeds the minimum curve value in Fig. 11(a). This implies that frequent switching can prevent the system from breaking out prematurely. In particular, for Q0 ∈ [−0.2,0.4], the ϕ1 of the switching system exceeds that of subsystems, suggesting enhanced reliability.

5.   Conclusions
  • This paper studies a stochastic predator–prey system with Markov switching. Considering day–night cycles and seasonal variations, we investigate the dynamic balance and reliability of the switching system under the joint effects of switching frequency, noise intensity, and initial conditions. We developed a Hamiltonian function and a probability-weighted system. By applying the Thomas algorithm, we enhance the splitting method and chasing technique, which notably improves research efficiency.

    The results show that Markov switching induces stochastic P-bifurcations. Whether these bifurcations result in dynamic balance depends on subsystem distributions. Frequent switching reduces the bifurcation probability and mitigates population oscillations caused by environmental noise. However, it increases the initial-value dependence of the switching system, harming stability. Specifically, the impact of subsystem dynamics on the switching system is not proportional to its occurrence probability. In poor environments (where all subsystems break out), improving the worst environment helps restore balance; in favorable environments (where all subsystems are in dynamic balance), enhancing the better ones is more beneficial. Future research will develop control strategies to optimize the Markov switching, enhancing the reliability of the stochastic predator–prey system in complex network environments.

Appendix A: The solving process of FPK equation
  • The first equation in Eq. (18) can be expressed as

    By defining

    the implicit difference equation is derived as

    The right side of Eq. (A2) represents the probability density function at time k. By defining δi=−αipi−1k+ηipik−θipi+1k, equation (A2) can be rewritten as

    Notably, the subscript j is omitted since it does not affect the partial derivatives with respect to Q. Equation (A3) can be expressed in the following tridiagonal form Ap = δ, where A is a tridiagonal matrix:

    Different from the LU decomposition method in Refs. [23,24], we employ the Thomas algorithm to solve Eq. (A4), leveraging the tridiagonal structure of A to enhance computational efficiency. The solution begins with forward elimination to transform matrix A into an upper triangular form. Specifically, eliminating α2 is achieved by adding the first row multiplied by −α2/β1 to the element of the second row. To eliminate α3, the modified second row is multiplied by −α3β∼2(−α3β∼2=α3β1α2θ1−β1β2) and added to the third row. This iterative process continues for each subsequent row, with corresponding adjustments to the δ vector. Once all αi (i = 1,2,…,n) are zero, equation (A4) is transformed into

    where β∼1=β1, β∼i=βi−αiθi−1/β∼i−1 and δ∼1=δ1, δ∼i=δi−αiδ∼i−1/β∼i−1.

    Next, the back substitution is performed on the upper triangular matrix A∼, starting with the last equation β∼npnk+1/2=δ∼n. Substituting pnk+1/2=δ∼n/β∼n into the second-to-last equation to obtain

    This process is generalized to solve for pik+1/2 (i=1,2,…,n − 2) using the formula

    Therefore, we obtain the value of the probability density function in the Q direction at time k + 1/2. The methodology for deriving values step by step from one instant to the next by using the Thomas algorithm is regarded as a new chasing technique. Similarly, the solution in the P direction can be obtained by solving the second equation in Eq. (18), rewritten as

    By setting u2 = Δt/ΔP, v2 = Δt/(Δ P)2, αj=−u2a2,i,j−1/4−v2b22,i,j−1/4, βj=1+v2b22,i,j/2, θj=u2a2,i,j+1/4−v2b22,i,j+1/4 and ηj=1−v2b22,i,j/2, the implicit difference equation becomes

    where δj=−αjpj−1k+1/2+ηjpjk+1/2−θjpj+1k+1/2. Then we use the same forward elimination and back substitution Thomas algorithm as above to solve for pm+1. In this way, the transition probability density at t = (k + 1)Δt is obtained, leading to the joint PDF p(Q,P). As t → tn (a sufficiently large time), the marginal probability density functions are

Figure (11)  Reference (41)

Catalog

    /

    DownLoad:  Full-Size Img  PowerPoint
    Return
    Return