{'fraction_non_alphanumeric': 0.0517367014816614, 'fraction_numerical': 0.008987126548457614, 'mean_word_length': 3.828772478498827, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
On Non-Markovian Performance Models

We present an approach that can be useful when the network or system performance is described by a model that is not Markovian. Although most performance models are based on Markov chains or Markov processes, in some cases the Markov property does not hold. This can occur, for example, when the system exhibits long range dependencies. For such situations, and other non-Markovian cases, our method may provide useful help.


Introduction
Network performance analysis is often based on models that apply the mathematical technique of Markov chains (or Markov processes when continuous time is considered). Once we are able to set up a Markovian model, we can investigate both the stationary and transient behavior of the system, using well established methods. A classic example is the rich analysis of loss networks in telecommunications, see Kelly [2].
In some cases, however, a Markov model cannot adequately capture the behavior of the system. One possible reason for this is when the network behavior is inherently non-Markovian, possibly due to long-range dependencies. We describe an approach that can help the analysis of non-Markovian models, and bring back the possibility to apply results that are routinely used for Markov chains.

General Setting: Discrete Stochastic Processes
Let us consider stochastic processes with discrete time and finite state space, without assuming that they are Markov chains. For brevity, we call such a process a discrete stochastic process. We use the following notations: • A discrete stochastic process: ξ = (ξ t , t = 0, 1, 2, . . .).
• The state space of the process is assumed finite, and is denoted by S. Each ξ t takes its values in S. The finiteness assumption can be relaxed, we just adopt it here for simplicity.
• The probability distribution of ξ t is denoted by π t , which is identified with a vector in [0, 1] |S| . (In matrix expressions it will be regarded a row vector.) We call these distributions the one-dimensional distributions of the process.
• We define the first-order transition probability matrix (or, simply, transition probability matrix) of ξ at time t by This is routinely used for Markov chains, but the conditional probabilities can be defined for any discrete stochastic process. Note, however, that if the process is not a Markov chain, then, generally, the value of Pr(ξ t+1 = b | ξ t = a) is not independent of previous history, i.e., it may hold that which we refer to as history dependence.
• If P t is independent of t, then we call the process first-order homogeneous. In this case all P t matrices can be replaced by the single matrix Note that first-order homogeneity generally does not imply the Markov property, so history dependence may still occur, i.e., we may still have (1).
We are also going to use the terminology that ξ is the parent process of ξ. It is clear from the definition that ξ is indeed a Markov chain, since it is generated such that whenever we are in a given state a at time t, we move into a state b with probability p t (a, b) and this random choice is made, by definition, independently of the previous history. (Note that even if the original process exhibits history dependence, p t (a, b) is used as a constant probability for any given t, a, b.) Consequently, for every a, b ∈ S and for every t Thus, ξ has the same first-order transition probabilities as the parent process ξ, namely, p t (a, b). (On the other hand, generally this does not extend to higher order probability distributions if the parent process is not a Markov chain.) Furthermore, it is well known from the theory of Markov chains that the initial distribution and the (first-order) transition probabilities determine the chain uniquely, so there is no ambiguity when we talk about the 1-EMC of a discrete stochastic process.

The Fundamental Property of the 1-EMC
Let us now look at a key property of the First-Order Equivalent Markov Chain.
Lemma 1 For every t the equality π t = π t holds, where π t , π t are the one-dimensional distributions of the 1-EMC and the parent process, respectively, at time t.
Proof. Assume there is an integer τ with π τ = π τ and choose τ such that it is the smallest such integer. Since π 0 = π 0 by definition, we have τ ≥ 1. Let us express π τ (b) for an arbitrary b ∈ S. We can write, using the law of total probability: With our notation this is which in vector form gives By the choice of τ we have π τ −1 = π τ −1 , yielding On the other hand, as the first-order transition probabilities of ξ and ξ are equal by the defining construction, we obtain that in the Markov chain ξ holds. Comparing (2) and (3) results in π τ = π τ , contradicting to the definition of τ. Thus, π t = π t must hold for every t. ♠

Trajectory Summation Formula
An important consequence of Lemma 1 is that some basic formulas that are routinely used for Markov chains, in fact remain valid for arbitrary discrete stochastic processes.
Corollary 1 For every discrete stochastic process holds. The probability Pr(ξ t = a) can be expressed as where the summation is taken over all trajectories a 0 , a 1 , . . . , a t with a t = a. Moreover, if the process is first-order homogeneous (but still not necessarily Markov), then the above formulas simplify to π t = π 0 P t and Pr(ξ t = a) = a 0 ,...,at=a Proof. For the 1-EMC of ξ the relationship π t = π 0 t−1 i=0 P i holds, being a Markov chain. By Lemma 1 we have π t = π t , implying (4). If we write down the details of the matrix product in (4), we get precisely (5). If ξ is first-order homogeneous, then P 0 = P 1 = . . . = P t holds, too, yielding the second pair of formulas. ♠ Note that if ξ is a Markov chain (possibly not time-homogeneous), then the probability that we reach a t via a given trajectory a 0 , a 1 , . . . , a t is precisely the product due to the Markov property. Since reaching a t via different trajectories are exclusive events and they represent all possibilites, therefore, summing up for all such possible products naturally gives the formula Pr(ξ t = a) = a 0 ,...,at=a for Markov chains. On the other hand, if ξ is not a Markov chain, then the probability of traversing a given trajectory a 0 , . . . , a t may not be equal to (6) because of the effect of history dependence. Nevertheless, the trajectory summation formula (7) still remains valid, even though the individual summands may not be equal to the individual probabilities of the corresponding trajectories.

Stationary Distribution
Via the 1-EMC, we can directly carry over a number of fundamental concepts and results from Markov chain theory to a more general setting. Let us look at the stationary distribution.
Definition 2 Let ξ = (ξ t , t = 0, 1, 2, . . .) be a discrete stochastic process with state space S. Assume that ξ is first-order homogeneous (but may not be Markov) and let its first-order transition probability matrix be P .
• A probability distribution π on S is called a stationary distribution of ξ if π = πP holds.
• A process is called ergodic if it has a stationary distribution π, and the one-dimensional distribution π t satisfies lim t→∞ π t = π.
• The process is called irreducible if there exists a positive integer k with P k > 0, that is, every entry of the matrix P k is positive.
• The process is called aperiodic if for every a ∈ S gcd{m : p (m) (a, a) > 0} = 1 holds, where the p (m) (., .) are the entries of P m , and gcd means greatest common divisor.
The concepts of Definition 2 are routinely used for Markov chains, but they do not actually require the Markov property, so they can be extended to arbitrary first-order homogeneous discrete stochastic processes. Now we can state how the fundamental features of these concepts carry over from Markov chains to arbitrary first-order homogeneous discrete stochastic processes.
• The 1-EMC of ξ also has a unique stationary distribution π. Moreover, π = π, and the 1-EMC is an ergodic Markov chain.
• The rate of convergence to stationarity in ξ is the same as in the 1-EMC. In particular, π t − π = π t − π holds for every t.
Proof. By the definition of the 1-EMC, the (first-order) transition probability matrix is the same for ξ and ξ. By Lemma 1 we have π t = π t for every t. The rest follows directly from the well known fundamental results of Markov chain theory on the stationary distribution and ergodicity, see, e.g., [3,4,5]. ♠

Censored Discrete Stochastic Processes
The concept of censoring is well known in the Markov chain setting; it means that we only observe the chain when it is in a given subset, the rest is "censored out." Below we explain it in some more details. Let X = (X t , t = 0, 1, 2, . . .) be a Markov chain, and let A ⊆ S be a nonempty subset of states. The censored Markov chain (with respect to A), which is also referred to as the chain watched only on A, is defined by keeping only those members of the sequence that fall in A (the A-hits), the rest are censored out. That is, if τ 0 < τ 1 < τ 2 < . . . are the (random) times of all the A-hits, then the censored Markov chain is represented by the sequence Y = (Y t , t = 0, 1, 2, . . .) = (X τt , t = 0, 1, 2, . . .).
Interestingly, the censored sequence Y remains a Markov chain, with state space A. The (nontrivial) fact that Y satisfies the Markov property is a consequence of the Strong Markov Property (for a derivation see, e.g., Norris [5]). There is also an expression for the transition probabilities of the censored chain, but we are not going to need it.
Another feature of the censored Markov chain is that if the original chain is ergodic with stationary distribution π, then the censored chain remains ergodic with stationary distribution This fact follows from the Ergodic Theorem, see, e.g., Aldous and Fill [1], Section 2.7.1. Note that π A is just the original stationary stationary distribution conditioned on the set A. A simple, but useful consequence is stated in the next lemma.
Lemma 2 Let X = (X t , t = 0, 1, 2, . . .) be an ergodic Markov chain, with stationary distribution π, and A ⊆ S, A = ∅. Let the distribution of X 0 be π A , given in (8). Then each A-hit has the same distribution π A .
Proof. Let τ 0 < τ 1 < τ 2 < . . . be the random times of all the A-hits. As discussed above, Y = (X τt , t = 0, 1, 2, . . .) remains an ergodic Markov chain with stationary distribution π A . Since we start X from the initial distribution π A , therefore, τ 0 = 0. It means, the censored chain Y = (X τt , t = 0, 1, 2, . . .), which is obtained by keeping only the A-hits from the original chain, starts from its stationary distribution, so it must also remain in the same distribution. Consequently, each A-hit X τt is distributed by π A . (This holds even if the original chain X may not be in its stationary distribution π at any given time.) ♠ The above results carry over to discrete stochastic processes, as well, via the 1-EMC. Specifically, we have the following theorem: Theorem 2 Let ξ = (ξ t , t = 0, 1, 2, . . .) be a first-order homogeneous discrete stochastic process. Assume that ξ is irreducible and aperiodic, with stationary distribution π (but it may not be Markov). Further, let A ⊆ S, A = ∅, and let the distribution of ξ 0 be π A , given by the formula (8). Then each A-hit of ξ has the same distribution π A .
Proof. By Theorem 1, ξ has a stationary distribution π. Let X = (X t , t = 0, 1, 2, . . .) be the 1-EMC of ξ. Again by Theorem 1, X is an ergodic Markov chain with stationary distribution π. Then, by Lemma 2, we have that each A-hit of X has the same distribution π A , given by the formula (8). Since by Lemma 1 the one-dimensional distributions of the 1-EMC and the parent process coincide, therefore, each A-hit of ξ has the same distribution π A , as well. ♠

Conclusion
The presented results provide a method to handle non-Markovian models. If we are able to deduce or measure the first-order transition probabilities of the system, then the stationary distribution and also the speed of convergence to stationarity (transient analysis) can be obtained from the analysis of the 1-EMC, utilizing the fact that its 1-dimensional distributions coincide with that of the original process. In other words, we can reduce the analysis of a non-Markovian system to a Markov chain, carrying over a number of results from Markov chain theory.