{'fraction_non_alphanumeric': 0.0653256885045587, 'fraction_numerical': 0.013112134599116459, 'mean_word_length': 3.5053991107347025, 'pattern_counts': {'":': 1, '<': 4, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 17, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Random walks in random environment: What a single trajectory tells

We present a procedure that determines the law of a random walk in an iid random environment as a function of a single"typical"trajectory. We indicate when the trajectory characterizes the law of the environment, and we say how this law can be determined. We then show how independent trajectories having the distribution of the original walk can be generated as functions of the single observed trajectory.


Introduction
Suppose you are given a "typical" trajectory of a random walk in an iid random environment. Can you say what the law of the environment is on the basis of the information supplied by this single trajectory? Can you determine the law of the walk? Such questions may arise if one intends to use the random environment model in applications.
These questions are essentially pointless if the group is finite (in which case the environment at each of the finitely many sites that happen to be visited infinitely many times can of course be determined, but it is hard to say much more). So we assume that the group is infinite, and we go a little further: we assume that the (random) set of sites visited by the walk is almost surely infinite. (See remark 5.1.) Questions of this kind have been studied in the context of random walks in random scenery by Benjamini and Kesten [1], Löwe and Matzinger [3], and Matzinger [5].
In the case of an iid random environment, the information furnished by a single ("typical") trajectory tells us whether the walk is recurrent; indeed, one can show that one of the events {each visited site is visited infinitely many times}, {no site is visited infinitely many times} is an almost sure event. (Cf Kalikow [4].) Now, if the walk is recurrent, the problem is quite simple: we can know much more than the law of the environment, because we find the environment itself at each visited site, which is given by the frequency of each possible jump from this site. In the transient case, the "naïve" approach consisting of doing statistics on sites which have been visited many times cannot be utilized directly, since the assumption of being at a site which has been frequently visited introduces a bias on the environment at that site, which should encourage jumps to sites from which it is be easier to come back (loosely speaking, close sites).
We present a procedure that eliminates any source of bias, collecting information on sites displaying some specified "histories". Each such "history" which can be encountered is almost surely encountered infinitely often (Proposition 3). This is combined with an interpretation of the process as an edge-oriented reinforced random walk (cf Enriquez and Sabot [2]), allowing us to find the exact law of the process. Now, there may exist "bad" transitions: if the walk jumps from a site along a "bad" transition, it will never get back to that site. If the set of these "bad" transitions is empty or has just one element, we can find the distribution of the environment (Theorem 1).
Finally, we show how countably many independent trajectories having the distribution of the original walk can be generated by concatenating steps of the observed trajectory. The algorithm is purely "mechanical": it does not imply any computation, and, in particular, the knowledge of the law of the walk (or of the environment) is not needed.

Framework and notations
Our "canonical" process X := (X n ) n≥0 walks on a group G. We denote by (F n ) n≥0 the natural filtration of X.
We assume that the group G is Abelian, although this is never used in our arguments. Its only utility is in the possibility of writing things like x − y = e or x = y + e indifferently. We use the additive notation, and the identity element of G is denoted by 0.
We assume moreover that the group G is countable. This assumption can be dispensed with−see remark 5.2−but we feel that it renders the reading easier and the discussion more tractable. It does not affect the core of the argument.

Random walks in random environment.
We denote by P the set of non-negative families p := (p e ) e∈G such that e∈G p e = 1. The environment at the site x, ν(x) := (ν(x, e)) e∈G , is a random element of P. We assume that the environments at sites are iid P-valued random variables with common distribution µ.
The random environment ν := (ν(x)) x∈G is a random element of P G , and it is governed by the probability measure µ ⊗G .
For all π = ((π(x, e)) e∈G ) x∈G ∈ P G , let Q π be the probability measure under which X is a G-valued Markov chain started at 0 whose transition probability from x to x + e is π(x, e) (x, e ∈ G).
The law of the random walk in random environment (or the so-called "annealed" law) is the probability measure P µ = Q π µ ⊗G (dπ) (= E[Q ν ], Q ν being what is usually called the "quenched" law).
We recall our "infinitude assumption" according to which the (random) set of sites visited by the walk, S := {X n | n ≥ 0}, is P µ -almost surely infinite. (This implies, of course, that the group G itself is infinite.) We let E denote the set of those g ∈ G such that the probability of the event {ν g > 0} is strictly positive. (It is easy to see that the random set {X n+1 − X n | n ≥ 0} is P µ -almost surely exactly E.) We then partition E into two sets, R and T , defined as follows.
• R is the set of elements r of E that can be written as −(e 1 + ... + e n ) where (e i ) 1≤i≤n is a finite nonempty sequence of elements of E. It is easy to see that r ∈ R if and only if P µ (X 1 = r and, for some n > 1, X n = 0) > 0 ; and Proposition 3 below implies that if r ∈ R, then the random set {n | X n+1 = X n + r and, for some k > 0, X n+k = X n } is P µ -almost surely infinite. It is therefore quite easy to identify R when observing a single trajectory.
• T is the complement of R in E. It represents the "possible" transitions which do not allow a return to the original site.

Histories.
We start with some definitions. Definition 1. The history of the site x at time n, which we denote by H(n, x), is the random finite sequence of elements of G defined by the successive moves of the process from the site x before time n. More formally, H(0, x) is the empty sequence ( ); H(n + 1, x) = H(n, x) if X n = x; and, if X n = x, then H(n + 1, x) is the finite sequence obtained by adjoining X n+1 − X n as a new rightmost term to H(n, x).
Let us denote by (Z G + ) 0 the set of families (n g ) g∈G ∈ Z G + with a finite number of non null terms.
Definition 2. The unordered history of the site x at time n, denoted by N (n, x) := (N g (n, x)) g∈G , is a random element of (Z G + ) 0 where, for all g ∈ G, N g (n, x) is the random number of moves from the site x to x + g before time n. In other words, Also, the local unordered history at time n is the unordered history of the site X n at time n, N (n) := N (n, X n ).

Reinforced random walks.
An edge-oriented reinforced random walk consists of a discrete random process whose transition probabilities are functions of the number of each type of move in the history of the process that has been made from the site currently occupied. A good point of view, in order to get a non-biased procedure of reconstitution of the environment, is to view the random walk in random environment as an edge-oriented reinforced random walk. It is the essence of the easy part of the result of [2] (the other part examines the conditions on a reinforced random walk to correspond to a RWRE).
We introduce the reinforced random walks by the following definitions.

Definition 3. A reinforcement function is a function
Definition 4. We call edge-oriented reinforced random walk with reinforcement function V the random walk defined by the law P V on the trajectories starting at 0 given by

RWRE as an edge-oriented reinforced random walk.
We can now state the result of Enriquez and Sabot [2]: Proposition 1. The annealed law P µ of the RWRE coincides with the law P V of the reinforced random walk whose reinforcement function V satisfies, for all e ∈ G, In order to be self-contained we recall the proof of this proposition.

PROOF.
For any x, e in G, for all n ∈ N, P µ -almost everywhere on the event {X n = x}, Now using the independence of the random variables ν(y) for different sites y, the terms depending on ν(y) for y = x cancel in the previous ratio, and we get the result.
The following result is an analogue of the strong Markov property for reinforced random walks.
Proposition 2. Let X be a reinforced random walk with reinforcement function V , and let T be a stopping time with respect to the natural filtration of X. Assume T is almost surely finite. Then The proof is obtained in an obvious way, by considering the events {T = n}.

A zero-one result.
The following zero-one result happens to be quite useful.
(Note that if r m = 0, then k m = 0.) For all k ∈ {1, . . . , q}, denote by y k the k-th term of the list L. For all k ∈ {1, . . . , q + 1}, set ) Now consider the list (g 1 , g 2 , ...) of newly visited sites in their order of appearance. So S = {g 1 , g 2 , ...}. By the assumption made in the introduction, S is almost surely infinite.
We denote by k(n) the random smallest integer m ≥ 1 such that g i(n) = g n +x m . (Obviously, k(n) ≤ q.) The sequence (g i(n) ) n≥1 takes infinitely many values (since the infinite set S is included in {g i(1) , g i(2) , ...} − {x 1 , ..., x q }). Now, for any i ≥ 1, we denote by T i the hitting time of g i by the walk. By definition of i(n), none of the sites g i(n) − x k(n) + x j (1 ≤ j ≤ q) is visited by the trajectory before time T i(n) .
As a result, there exist infinitely many sites g ′ 1 , g ′ 2 , . . . visited by the trajectory (enumerated in their order of appearance) such that, for some k ∈ {1, . . . , q}, if T ′ n denotes the hitting time of g ′ n , then none of the sites g ′ n −x k +x j (1 ≤ j ≤ q) is visited by the trajectory before time T ′ n . We denote by k ′ (n) the least such integer k. T ′ n are clearly stopping times. For all n ≥ 1, let ψ n be the Bernoulli variable that equals 1 if and only if (Otherwise, ψ n equals 0.) Observe that for all n, if ψ n = 1, then X T ′ n − x k ′ (n) ∈ S (r 1 ,...,r l ) . Due to the fact that the prescribed path the process has to follow during the time period [T ′ n , T ′ n + 2q − k ′ (n) + 1] in order to satisfy ψ n = 1 is a path that does not intersect the trajectory before T ′ n , Let ξ n := ψ (2q+1)n and τ n = T ′ (2q+1)n (n ≥ 1). For all n, ξ 1 , . . . , ξ n are measurable with respect to F τ n+1 .
REMARK. If G equals Z d , the notion of convexity can be exploited in a proof slightly different from the one given above.
We deduce that the sets R and T can be "viewed" on the trajectory: Corollary 1. The sets R and T are such that Let S n denote the random set {x ∈ G | ∃n ≥ 0, N(n, x) = n}. An easy corollary of the above proposition is the following analogous result concerning unordered histories. Proposition 3'. If n ∈ (Z G + ) 0 , then S n is either P µ -almost surely empty or P µ -almost surely infinite.
We now distinguish a particular subset of (Z G + ) 0 , N poss := { n ∈ (Z G + ) 0 | S n = ∅ P µ − a.s.}. Loosely speaking, N poss is the set of "possible" unordered histories for sites that are presently occupied. An element n = (n g ) g∈G of (Z G + ) 0 belongs to N poss if n g = 0 whenever g / ∈ R and if, moreover, it satisfies (any one of) the three following equivalent conditions: (a) P µ (∃n ≥ 0 | N (n, 0) = n) > 0; (b) the random set S n is almost surely infinite; (c) E[ r∈R ν nr r ] > 0. Note that, by (c) and Proposition 1, the law of the process is determined by the restriction of the reinforcement function to the set N poss .

What a single trajectory tells
In the sequel we assume that the law of the process X is P µ (or, equivalently, P V ).

Determining the law of the walk.
As noted in the introduction, "straightforward" computation based on the frequencies of transitions from sites visited "many" times is not reliable. What we do here, instead, is collecting information on sites displaying some specified histories (or specified unordered histories).
For any n ∈ N poss , let T n i (i ≥ 1) be the successive times where the unordered history of the currently occupied site is n: are independent. Also, for all n ∈ N poss , the random variables ∆ n i have the same law: ∀e ∈ E, P(∆ n i = e) = V e ( n).
PROOF. Let Θ n i (i ≥ 1, n ∈ (Z G + ) 0 ) be independent random variables such that for all e ∈ E, P(Θ n i = e) = V e ( n) Now we consider the process (Y n ) n≥0 : where N y is to the process Y what N is to the process X, and τ (n) := card{j ∈ {0, · · · , n} | N y (j) = N y (n)}.
But on the event A l, m,n := {τ (n) = l, N y (n) = m}, Θ m l is independent of σ(Y k , k ≤ n). Thus, Consequently, the two processes X and Y have the law. But ∆ n i is to the process (X n ) n≥0 exactly what Θ n i is to the process Y . The result follows.
We deduce from this proposition the following corollary, which describes the construction of the reinforcement function on N poss or, equivalently (by Proposition 1), of the annealed law: Corollary 2. If n ∈ N poss , then almost surely, for all e ∈ E,

4.2.
The law of the environment.
The next result follows easily.

Theorem 1. (a) A single trajectory determines almost surely the moments of the form
for all r 1 , ..., r k ∈ R, t ∈ T , n 1 , ..., n k ∈ Z + , ε = 0 or 1. Moreover, if these moments coincide for two distinct environment distributions, the induced RWRE have the same annealed law (and, consequently, two such environment distributions cannot be distinguished).
(b) If card T = 0 or 1, a single trajectory determines almost surely the distribution of the environment.
PROOF. (a) By Corollary 2, the restriction of V to N poss is almost surely determined by a single trajectory. So almost surely, for all n = (n g ) g∈G ∈ N poss and for all e ∈ G, a single trajectory determines the moments E[( g∈G ν ng g ) · ν e ]. Moreover, all the other moments of the type E µ [ν n 1 r 1 · · · ν n k r k ν ε t ] (r j ∈ R, t ∈ T ) are zero. Finally, the restriction of V to N poss determines the law of the process.
(b) If card T = 0, we get all the moments of the ν e 's. Since these variables are compactly supported variables, this determines all the finite dimensional marginals of the distribution of ν. 1 If card T = 1, we get all the moments involving the ν r 's. And if t is the unique element of T , then ν t = 1 − r∈R ν r , and we get all the moments of ν.
When card T ≥ 2 the law of the environment can be determined in some cases, but not in general. (Accordingly, Corollary 1 of [2] should be amended; it holds in fact if card T ≤ 1, but not in complete generality.) Here are two examples: EXAMPLE 1. We consider the two following walks on Z: • The first one has a deterministic environment, and moves from x ∈ Z with probability 1 2 to x + 1, with probability 1 2 to x + 2. • The environment in the second walk is coin-tossed independently at each site x ∈ Z: with probability 1 2 , the transition probability to x + 1 is 1, and with probability 1 2 , the transition probability to x + 2 is 1.
Here T = {1, 2}, and, obviously, the two walks have the same law. EXAMPLE 2. Again, G = Z; for any x ∈ Z, with probability 1 2 , the transition probability from x to x is equal to 1 2 , and the transition probability from x to x + 1 is also equal to 1 2 ; 1 We recall a standard fact: if U1, . . . , U l are positive random variables such that U1 + · · · + U l ∈ [0, 1] almost surely then, for Lebesgue-almost all (a1, . . . , a l ) ∈ R l , P(U1 < a1, . . . , U l < a l ) = lim n→∞ k 0 ,...,k l ≥0 k 0 +···+k l =n k 1 n <a 1 ,..., k l n <a l and, with probability 1 2 , the transition probability from x to x + 2 is equal to 1. In this case, T = {1, 2}, but the distribution of the environment is almost surely completely determined by the single trajectory we observe.
We can only see 0-transitions (from a site x to itself), 1-transitions (x → x + 1) and 2-transitions (x → x + 2). So µ, which is the law of ν(0), satisfies µ(ν 0 + ν 1 + ν 2 = 1) = 1. The fact that a 0-transition is never followed by a 2-transition tells us that if ν 2 > 0, then ν 0 = 0. Statistics on sites from which there are 0-transitions or 1-transitions reveals that the (conditional) distribution of the number of 0-transitions from such a site is geometric. But a geometric distribution cannot be a nondegenerate convex combination of geometric distributions, and the conditional number of 0-transitions from a visited site x for which ν(x, 0) is given (and is in ]0, 1[) has a geometric distribution. We deduce that there is exactly one value a (= 1 2 ) such that almost surely, for all x ∈ Z, if ν(x, 0) = 0, then ν(x, 0) = a. And a simple computation shows that the proportion of visited sites from which a 0-transition is possible but does not take place fits exactly with the proportion of visited sites from which the first (and unique) transition is a 1-transition; so µ(ν 1 > 0 and ν 2 > 0) = 0. We deduce that µ is a convex combination of µ 1 and µ 2 , where µ 1 (ν 0 = ν 1 = 1 2 ) = 1 and µ 2 (ν 2 = 1) = 1. And the coefficients (both equal 1 2 ) in this convex combination are easily determined.

Sampling iid trajectories.
Here we show that infinitely many independent trajectories drawn under P µ can be generated by concatenating steps of the single trajectory at our disposal.
For simplicity, we describe the construction of just two trajectories, X 1 and X 2 . This is enough, since we can do the following: once X 1 and X 2 are constructed, leave X 1 as it is and extract two trajectories, say X 3 and X 4 , out of X 2 exactly the way we extracted X 1 and X 2 out of X, then, out of X 4 , get X 5 and X 6 , and so on; and the family (X 1 , X 3 , X 5 , . . . ) is exactly what we want.
All we do is construct X 1 (resp. X 2 ) using in the "natural" way the transitions ∆ n i with i odd (resp. even). More formally, X 1 and X 2 are defined as follows: where N 1 is to the process X 1 what N is to the process X, and τ 1 (n) := card{j ∈ {0, · · · , n} | N 1 (j) = N 1 (n)}; and, similarly, where N 2 is to the process X 2 what N is to the process X, and τ 2 (n) := card{j ∈ {0, · · · , n} | N 2 (j) = N 2 (n)}.
The validity of this construction is an immediate consequence of Proposition 4.

Remarks
5.1. Infinitude of S. The "infinitude assumption" (according to which the random set S of sites visited by X is almost surely an infinite set) is made in order to avoid discussing rather trivial cases. (If S is finite, then precise knowledge of the environment at some sites is almost surely available; but, unless some specific conditions are imposed on µ, complete knowledge of µ is out of reach.) Proceeding along the general lines of the proof of Proposition 3, one can show that the random set S is either almost surely infinite or almost surely finite.

5.2.
Countability of G. If we abandon the countability assumption on G, the set E = {x ∈ G | P (X 1 = x) > 0} remains countable, and our sampling procedure works just as well. Consequently, P µ can be determined in non-pathological situations (and in particular if G is the real line). 2 (This can also be seen by introducing a new kind of reinforcement function which, to a given unordered history at a site, associates the probability that the next transition falls into some measurable set.) If there is no countable set D ⊂ G such that X 1 ∈ D almost surely, then µ cannot be determined (as one can see after studying the first example of section 4). (If there is some countable set D ⊂ G such that X 1 ∈ D almost surely then, almost surely, each X n is in the subgroup generated by D; and since this subgroup is countable, all we did is adaptable in an obvious way.) 5.3. Structure of G. The choice of dealing with RWRE on a group captures, we think, the essence of the matter. We could have restricted ourselves to groups like Z d (or some other subgroups of R d ) without a substantial gain in simplicity. A group structure is suitable (though not absolutely indispensable) if the notion of iid random environment is to make sense. We could have dealt with RWRE on homogenous spaces, or on some trees, without gaining new insight.

5.4.
Assumptions on the environment. The requirement that environment at sites are iid can be loosened in various ways.
EXAMPLE. G = Z; there are two laws for the environment at sites, say µ 0 and µ 1 ; environments at sites are independent; and ν(n) is governed by µ 0 if n is even, by µ 1 if n is odd.
EXAMPLE. G = Z; there are laws µ 0 , µ 1 . . . for the environment at a site; K is a random variable taking values in the set {2, 3, . . . }; and, conditioned on K, the ν(n) are independent and, for all n, ν(n) is governed by µ n(mod K) .
EXAMPLE. G = Z; the couples (ν(2n), ν(2n + 1)) (n ∈ Z) are iid, but ν(0) and ν(1) are not independent. 5.5. Other reinforcements. Our results on the determination of the law of the process and on sampling iid trajectories can be extended to various other edge-oriented reinforced random walks that do not correspond to a random environment. Whenever an appropriate analogue of Proposition 3 is valid, things work quite well. (A sufficient condition is strict positivity of the restriction of V r to (Z R + ) 0 for all r ∈ R.)