{'fraction_non_alphanumeric': 0.04240854645516348, 'fraction_numerical': 0.009064422143088379, 'mean_word_length': 4.842553191489362, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Phase-Transition in Binary Sequences with Long-Range Correlations

Motivated by novel results in the theory of correlated sequences, we analyze the dynamics of random walks with long-term memory (binary chains with long-range correlations). In our model, the probability for a unit bit in a binary string depends on the fraction of unities preceding it. We show that the system undergoes a dynamical phase-transition from normal diffusion, in which the variance D_L scales as the string's length L, into a super-diffusion phase (D_L ~ L^{1+|alpha|}), when the correlation strength exceeds a critical value. We demonstrate the generality of our results with respect to alternative models, and discuss their applicability to various data, such as coarse-grained DNA sequences, written texts, and financial data.

Motivated by novel results in the theory of correlated sequences, we analyze the dynamics of random walks with long-term memory (binary chains with long-range correlations). In our model, the probability for a unit bit in a binary string depends on the fraction of unities preceding it. We show that the system undergoes a dynamical phase-transition from normal diffusion, in which the variance DL scales as the string's length L, into a super-diffusion phase (DL ∼ L 1+|α| ), when the correlation strength exceeds a critical value. We demonstrate the generality of our results with respect to alternative models, and discuss their applicability to various data, such as coarse-grained DNA sequences, written texts, and financial data.
Dynamical systems with long-range spatial (and/or temporal) correlations are attracting considerable interest across many disciplines. They are identified in physical, biological, social, and economic sciences (see e.g., [1][2][3][4][5][6] and references therein). Of particular interest are situations in which the system can be mapped onto a mathematical object, such as a correlated sequence of symbols, preserving the essential statistical properties of the original system.
One of the methods most frequently used to obtain insight into the nature of correlations in a dynamical system consists of mapping the space of states onto two symbols [5]. Thus, the problem is reduced to the exploration of the statistical properties of correlated binary chains. This can also be viewed as the analysis of a history-dependent random walk. Random walk is one of the most ubiquitous concepts of statistical physics. It lends applications to numerous scientific fields (see e.g., [7][8][9][10][11][12][13] and references therein).
It is well established that the statistical properties of coarse-grained DNA strings and written texts significantly deviate from those of purely random sequences [2,14]. Financial data (such as stock market quotes) are similarly far from being pure-diffusive. Moreover, these systems exhibit "super-diffusive" behavior in the sense that the variance D(L) grows asymptotically faster than L (where L is the length of the considered text). Specifically, D ∼ L α , with α > 1 [5]. Such a remarkable (and essentially universal) phenomenon can be attributed to long-range positive correlations. Systems with such correlations may be anticipated to exhibit a dynamical phase transition (from normal to super diffusive behavior) at some critical correlation strength.
Thus, the problem of random walk where the jumping probabilities are history-dependent is of great interest for understanding the behavior of systems with long-range correlations, such as DNA strings, written texts, and financial data. The aim of the present Letter is to analyze this problem, and to provide a simple yet generic analytical description of the statistical properties of these systems.
We begin by solving a simple model which incorporates long-range correlations into an otherwise random sequence. We consider a discrete binary string of symbols, a i = {0, 1}, in which the conditional probability of a given symbol (say, a unit bit) occurring at the position L + 1 is history-dependent, and given by where k is the number of such symbols (unities) appearing in the preceding L bits. The correlation parameter µ, where −1 < µ < 1, determines the strength of correlations in the system. The persistence condition µ > 0 implies that a given symbol in the preceding sequence promotes the birth of a new identical symbol. On the other hand, in the anti-persistence region µ < 0, each symbol inhibits the appearance of a new identical symbol. The parameter L 0 > 0 is a constant transient time.
For L ≪ L 0 the sequence is approximately random (uncorrelated), whereas for L ≫ L 0 the effect of correlations takes over [15]. In this model, the conditional probability p(k, L; µ, L 0 ) depends on the fraction of unities (or zeroes) in the preceding bits, and is independent of their arrangement. This allows one to obtain an analytical description of the system's dynamical behavior. As we shall demonstrate below, this simple model provides a good quantitative description of the observed statistical properties of various natural systems, such as coarse-grained DNA strings, written texts, and financial data.
The probability P (k, L + 1) of finding k identical symbols (say, unities) in a sequence of length L + 1 follows the evolution equation Crossing to the continuous limit, one obtains the Fokker-Planck diffusion equation for the correlated process where x ≡ 2k − L. The evolution equation (3) along with the initial condition P (x, t = 0) = δ(x), has a solution in the form of a Gaussian distribution where the variance D(L) is given by Equation (5) breaks down at the special case µ = 1 2 , in which case the variance is given by Remarkably, one finds that the correlated system undergoes a dynamical phase transition at the critical correlation strength µ c ≡ 1 2 . The variance D(L) of the correlated sequence has three qualitatively different asymptotic behaviors (in the L ≫ L 0 limit) Thus, for µ < µ c the asymptotic variance scales linearly with the string length, whereas for a history-dependent chain with strong positive correlations (µ > µ c ) the system is characterized by a super-diffusion phase, in which case D(L) grows asymptotically faster than L [16]. The analytical model can readily be extended to encompass situations in which the binary sequence is biased. Let with −1 < q < 1. The distribution P (x, L) corresponding to this conditional probability is given by a Gaussian function, centered about the position Thus, the drift velocity approaches an asymptotically constant value q 1−µ . The variance D(L), unaltered by the bias is given by Eqs. (5) and (6).
In order to confirm the analytical results, we perform numerical simulations of (discrete) binary sequences. Figure 1 displays the resulting scaled variance L −1 D(L) of correlated strings with various different values of the correlation parameter µ. We find an excellent agreement between the analytically predicted results [see Eqs. (5) and (6)] and the numerical ones.  5) and (6)] to within less than 1%.
Robustness of the linear model.-In order to show the generality of the model discussed above, we consider situations in which the (history-dependent) jump probability is an arbitrary odd function [17] of the fraction ξ ≡ x L+L0 of unities (zeroes) that appeared in the previous L symbols For asymptotically large L, one always finds ξ → 0 for non-ballistic diffusion, justifying a power-law expansion of F (ξ). As long as this expansion includes a linear term, the original differential equation (3) is recovered for large L. We therefore expect the previous analytical results [Eqs. (5) and (6)] to hold true for generic (non-linear) models as well. The generality of the model is illustrated in Fig. 2, in which we depicts results for various choices of the probability function F (ξ). As predicted, the results are found to agree with the linear model.
Applications.-The robustness of the linear model (see Fig. 2) suggests that it may capture the essence of the underlying correlations in a diversity of systems in nature. We therefore examine the use of the results derived in the present work as an analytical explanation for the observed statistical properties of natural systems, such as DNA strings, written texts, and financial data.
As mentioned, it is well established that these systems often exhibit a significant deviation from random sequences [2,14], and are characterized by a "superdiffusive" behavior in which D ∼ L α , with α > 1 [5]. In such systems, super-diffusion may be attributed to long-range (positive) correlations. In fact, the analytical model allows one to determine the correlation strength of these chains. Figure 3 depicts the scaled variance L −1 D(L) calculated from DNA sequences of various organisms, as a function of the string length L. It is of considerable interest to examine in such methods the statistical properties characterizing the DNA of organisms in various evolutionary levels: Bacillus subtilis (Bacteria), Methanosarcina acetivorans (Archaea), and Drosophila melanogaster (Eukarya) [5,18]. The theoretical model provides a good description of the empirical data [19], attributing different correlation strengths µ to different organisms, as summarized in Table I. The super-diffusive behavior, shown in Fig. 3 to persist across very long sequences is highly suggestive of long-range correlation extending over more than one gene (e.g., ∼ 5 × 10 4 base-pairs in Drosophila).
Next, we have applied the results of the analytical model to various coarse-grained written texts [2,14,5]. It has long been recognized that the corresponding binary strings are highly self-correlated. The present analytical model enables one to determine quantitatively the strength of these inner correlations; see Table I.
In Figure 4 we show the scaled variance of coarsegrained financial data (daily quotes of the Dow Jones Industrial Average, and the NASDAQ [20]). We note that the linear model underestimates the empirical variance at short time scales. This fact can be traced back to short-term correlations in the markets. (It is interesting to note that the DJIA maintains an approximately normal diffusive behavior for a period of about one month). However, this short-term memory is washed out at longer time scales, in which case the analytical model provides a good description of the empirical results, as evident   [5,18]; (a to m) → 0, (n to z) → 1 for written texts [5]; and daily fall → 0, daily rise → 1 for stock market quotes [20]. from Fig. 4. The corresponding values of the correlation parameter µ are summarized in Table I. In summary, in this Letter we have analyzed the dynamics of random walks with history-dependent jump probabilities. Our work was motivated not only by the intrinsic interest in such dynamical processes, but also by the flurry of activity in the field of long-range correlated systems, and by some universal statistical features observed in many different natural systems.
We have broadened the study of binary strings to include long-range correlations, extending throughout the length of the chain. Using a simple and exactly solvable model, we identify a dynamical phase transition, from normal diffusion [D(L) ∼ L] to super-diffusive behavior [D(L) ∼ L 2µ ], taking place as the correlation parameter µ exceeds its critical value. We show that in spite of the simplicity of the model, it is robust, and can easily be extended to describe various features (such as a biased  [20]. The mapping and parameters used are given in Table I history-dependent random walk or sub-diffusion).
Next, we have applied the analytical results of the model to various binary strings, extracted from very different natural systems, such as coarse-grained DNA sequences, written texts, and financial data. We find that the model adequately describes the long-term behavior of these systems. Furthermore, the model provides a straightforward method to measure the correlation strength of these systems. Our results can be applied to various natural systems, and may shed light on the underlying rules governing their dynamics. For example, the super-diffusive behavior of DNA sequences (see Fig.  3) suggests long-range correlations extending across more than one gene. The model attributes different correlation strengths to different organisms.