Functional limit laws for recurrent excited random walks with periodic cookie stacks

We consider one-dimensional excited random walks (ERWs) with periodic cookie stacks in the recurrent regime. We prove functional limit theorems for these walks which extend the previous results of D. Dolgopyat and E. Kosygina for excited random walks with"boundedly many cookies per site."In particular, in the non-boundary recurrent case the rescaled excited random walk converges in the standard Skorokhod topology to a Brownian motion perturbed at its extrema (BMPE). While BMPE is a natural limiting object for excited random walks with boundedly many cookies per site, it is far from obvious why the same should be true for our model which allows for infinitely many"cookies"at each site. Moreover, a BMPE has two parameters $\alpha,\beta<1$ and the scaling limits in this paper cover a larger variety of choices for $\alpha$ and $\beta$ than can be obtained for ERWs with boundedly many cookies per site.


Introduction
Excited random walks (ERWs), also sometimes called cookie random walks, are self-interacting random walks where the transition probabilities of the walk depend on the local time of the walk at the current site. More precisely, a cookie environment ω = {ω x (j)} x∈Z, j≥1 is an element of [0, 1] Z×N . For any fixed cookie environment ω ∈ Ω, an ERW is a nearest-neighbor path {X n } n≥0 starting at X 0 = 0 and evolving so that on the j-th visit to a site y ∈ Z the walk moves right (resp. left) on the next step with probability ω y (j) (resp. 1 − ω y (j)). That is, P ω is the law on nearest-neighbor paths on Z with P ω (X 0 = 0) and P ω (X n+1 = X n + 1 | X 0 , X 1 , . . . , X n ) = 1 − P ω (X n+1 = X n − 1 | X 0 , X 1 , . . . , X n ) = ω Xn n k=0 1 {X k =Xn} .
Remark 1.1. The cookie terminology comes from the following interpretation. One imagines a stack of cookies at each site in Z. On each visit to a site the walker eats the next cookie in the stack at that site and the cookie creates an "excitement" that determines the transition probability of the next step.
The description of ERW given above was for a fixed cookie environment ω, but one can also allow the cookie environment to be random. The probability distributions P ω defined above are called the quenched laws of the ERW, while if P is a probability distribution on the space of cookie environments Ω then the averaged law of the ERW is given by P (·) = Ω P ω (·) P(dω).
To obtain some spatial regularity it is usually assumed that under P the cookie stacks are stationary and ergodic under the shifts on Z (see, for example, [Zer05]) or i.i.d. (the most common assumption). That is, if ω x = {ω x (j)} j≥1 denotes the cookies stack at x ∈ Z, then it is assumed that the sequence {ω x } x∈Z is either ergodic or i.i.d..
The recent review article [KZ13] gives an extensive summary of many of the known results for ERW on Z d , d ≥ 1. Here we will give a shorter summary of the known results for one-dimensional ERW that are relevant for the present paper. The most extensive results for one-dimensional ERW are under the following assumptions on the cookie environments.
• There is an M < ∞ such that ω x (j) = 1/2 for all j > M .
We will refer to ERW under these assumptions as the case of boundedly many cookies per site since only the first M cookies at each site give a non-zero drift (an "excitement" to the right or left). For this model of ERW many results are known including (but not limited to) explicit criterion for recurrence/transience, a law of large numbers with an explicit criteria for ballisticity, limiting distributions, large deviation asymptotics, and scaling limits of the occupation times of the right and left semi-axes [Zer05, BS08a, BS08b, KZ08, KM11, DK12, Pet12, KZ14,Pet15]. In these results, many aspects of the behavior of the walk are determined by a single explicit parameter, which is the expected total drift contained in the cookie stack at a fixed site. For instance, the walk is recurrent if and only if δ ∈ [−1, 1] [Zer05,KZ08], and the type of the limiting distributions are determined by the value of δ [BS08b, KZ08,KM11,DK12]. In this paper, instead of assuming boundedly many cookies per site, we will consider the model of ERW with periodic cookie stacks which was first introduced in [KOS14].
One can also consider ERW with periodic cookie stacks as in Assumption 1 but withp = 1/2. In this case, it was shown in [KOS14] and [KP15] that the ERW is transient with non-zero speed and with a Gaussian limiting distribution under diffusive scaling. Assumption 1 restricts us to the critical casē p = 1/2 where the asymptotic behavior of the walk is much more delicate. Since under Assumption 1 the sums n j≥1 (2ω 0 (j) − 1) oscillate as n → ∞, there is no obvious way to generalize the known results for boundedly many cookies per site which are expressed in terms of a single parameter δ in (1). However, the following result from [KOS14] gives an explicit criterion for recurrence/transience of ERW.
Remark 1.3. The fact that the parameters θ andθ cannot both be greater than one follows from the relation θ +θ = 1 − . This identity can be obtained either from the formulas in (2) and some algebra or as a consequence of a more general argument in [KP15,Proposition 4.3].
Remark 1.4. The proof of Theorem 1.2 in [KOS14] uses an approach based on Lyapounov functions to give criteria for recurrence and transience. Another proof of Theorem 1.2 was given in [KP15] for a more general model of ERW where the cookie stacks at each site come from independent realizations of a finite state Markov chain. This more general model includes both periodic cookie stacks and certain models of bounded cookie stacks as special cases. The proof in [KP15] relied on certain tail asymptotics for regeneration times of a related Markov chain. This method had the advantage of also leading to further results such as a criterion for ballisticity and a characterization of the limiting behavior in the transient cases; results which were previously only known for the case of bounded cookie stacks. Not covered in [KP15] were the scaling limits of ERWs in the recurrent cases. This is the topic of the current paper.
Remark 1.5. While for ERW with bounded cookie stacks the recurrence/transience, ballisticity, and limiting distributions in the transient cases depend only on the single parameter δ defined in (1), the more general results in [KOS14] and [KP15] for ERW with periodic (or Markovian) cookie stacks rely on two parameters θ andθ. In the special case of bounded cookie stacks these parameters are θ = δ andθ = −δ, but in general it is not the case that θ +θ = 0 (see Remark 1.3 above).
1.1. Main results: functional limit theorems in the recurrent regime. To review the known results for recurrent ERW with boundedly many cookies per site, we first must recall the definition of a perturbed Brownian motion. For fixed parameters α, β ∈ (−∞, 1), a (α, β)-perturbed Brownian motion is a solution Z α,β · to the functional equation where B t is a standard Brownian motion. It was shown in [PW97,CD99] that if α, β < 1 then there is almost surely a pathwise unique solution of (3) that is continuous and adapted to the filtration of the Brownian motion. 1 The following functional limit theorems were proved in [DK12] for recurrent ERW with boundedly many cookies per site.
• Boundary case. If δ = 1 then there exists a constant a > 0 such that { X nt a √ n(log n) } t≥0 converges in distribution to the running maximum of a Brownian motion B * (t) = sup s≤t B s . Similarly, if δ = −1 then the rescaled ERW converges to the running minimum of a Brownian motion.
• Non-boundary case. If δ ∈ (−1, 1), then { X nt √ n } t≥0 converges in distribution to a (δ, −δ)perturbed Brownian motion. Our main results are similar functional limit theorems for ERW with periodic cookie stacks. Here, and throughout the paper, D([0, ∞)) will denote the space of cádlág functions equipped with the Skorokhod J 1 topology, and convergence in distribution on this space will be denoted by Theorem 1.6 (Recurrent ERW -boundary case). Let Assumption 1 hold. If θ = 1 then there exists a constant a > 0 such that X nt a √ n(log n) t≥0 where B * t = sup s≤t B s is the running maximum of a standard Brownian motion. Ifθ = 1 a similar scaling limit holds with the limiting process instead being the running minimum of a Brownian motion.
The proof of Theorem 1.6 is follows word for word the proof of of [DK12, Theorem 1.2] for boundedly many cookies per site once we substitute the necessary tail asymptotic results for the associated branching-like processes (proved in [KP15] and re-stated in Theorem 2.1 below) for the corresponding results in the case of boundedly many cookies per site. We will therefore omit the proof of Theorem 1.6 and focus on the proof of Theorem 1.7.
For recurrent ERW with boundedly many cookies per site it is easy to see why the scaling limit would be a perturbed Brownian motion. After a large number of steps, one can expect that the walk will have visited the sites in the interior of its range a large number of times. If the walk only experiences "excitement" in the first M visits to a site then it is intuitively obvious that the limiting process should behave like a Brownian motion when it is away from its running minimum or maximum and should experience some additional drift at the edge of its current range. For ERW with periodic cookie stacks it is not nearly so obvious why the scaling limit should be a Brownian motion in the interior of its range. In fact, while the ERW does scale to a Brownian motion in the interior of the range, since the scaling parameter a in Theorem 1.7 is larger than one 2 it is evident that consecutive steps of the ERW in the interior of the range are quite strongly correlated.
1.2. Overview of ideas and structure of the paper. Many of the recent results about onedimensional ERWs rely on the analysis of certain branching-like processes which are related to the directed edge local times of the random walk. Similar ideas have been used previously in the study of other non-standard random walks [KKS75,Tót94,Tót95,Tót96,Tót97]. For ERW, these methods were first used in [BS08a] and have since become the primary tool for the study of one-dimensional ERWs.
The connection between random walks and branching-like processes is in the spirit of the Ray-Knight theorems which relate the local times of a one-dimensional Brownian motion with certain squared Bessel processes. B. Tóth used this connection to prove generalized Ray-Knight theorems for a large class of self-interacting random walks [Tót94,Tót95,Tót96,Tót97]. These theorems were a key tool in obtaining limiting distributions for the random walk stopped at an independent exponential random time. Limiting distributions at deterministic late times still remain an open problem. We note, that for a certain sub-class of the self-interacting random walks B. Tóth identified the limiting distributions with the one-dimensional marginal distributions of Brownian motion perturbed at its extrema [Tót96, Remark on p. 1334].
More recently, similar Ray-Knight theorems for ERWs have been proven and used in [KM11,KZ14,DK15,KP15]. In the present paper, we are able to combine some of the ideas introduced by Tóth together with a martingale decomposition of the excited random walk as in [Dol11,DK12] to prove a full process-level convergence to Brownian motion perturbed at its extrema.
The remainder of the paper is structured as follows. In Section 2 we recall the definitions of the branching-like processes associated with the ERWs. We will review the construction of these branchinglike processes, their connection with the directed-edge local times of the ERW, and some results from [KP15] regarding tail asymptotics and scaling limits of these processes. In Section 3 we will prove some preliminary results in preparation for the proof of Theorem 1.7. In particular, using the connection with the branching-like processes we will show that diffusive scaling is the right scaling to obtain a limiting distribution and that for any fixed γ ∈ (0, 1/2) and a sufficiently large time n most of the sites in the interior of the range have been visited at least n γ times. Finally, in Section 4 we give the proof of Theorem 1.7. The key to the proof is Lemma 4.2 which gives sufficient control on the total drift contained in the "cookies" used by the ERW in the first n steps. Again the connection with the branching-like processes is essential. We close the paper in Section 5 with a brief discussion of the more general model of ERW with Markovian cookie stacks introduced in [KP15] and explain the difficulty in extending Theorem 1.7 to this more general model.

Related branching-like processes
In this section we will introduce four Markov chains which we will refer to as "branching-like processes" (BLPs) that are related to the directed-edge local times of the random walk. We will also recall some important results concerning the BLPs proved in [KP15]; in particular, we will recall certain tail asymptotic results (Theorem 2.1) and the fact that scaling limits of BLPs are squared Bessel processes (Theorem 2.2).
2.1. Construction of the BLP. To prepare for both the construction of the BLPs and the connection with the random walk, we first recall the following simple construction of the ERW. While we are primarily interested in ERW with periodic cookie stacks in this paper, the results of this section are more general (with the exception of the specific formulas for parameters in Section 2.3.1 below), and thus we will give the construction of the BLPs in the more general setting of random cookie environments that are (spatially) i.i.d. (that is {ω x } x∈Z is i.i.d. under the distribution P on cookie environments).
Given an environment ω = {ω x (j)} x∈Z, j≥1 we let {ξ x (j)} be a family of independent Bernoulli random variables with ξ x (j) ∼ Ber(ω x (j)). Then the path {X n } n≥0 of the ERW can be constructed iteratively as follows. If X n = x and n k=0 1 {X k =x} = j, then X n+1 = x + (2ξ x (j) − 1). That is, upon visiting a site x for the j-th time the walk steps to the right if ξ x (j) = 1 and to the left if ξ x (j) = 0.
We will now use these Bernoulli random variables ξ x (j) to construct the BLPs. For this construction we will only need to consider the sequence {ξ x (j)} j≥1 for a fixed x, and since these have the same distribution for each x (under the averaged measure) we will, for simplicity of notation, simply use {ξ(j)} j≥1 to denote one such sequence. Next, for any m ≥ 0 let Note that by the convention that an empty sum is equal to zero, we have that S 0 = 0 and F 0 = 0. If we refer to a Bernoulli random variable ξ(j) as a "success" if ξ(j) = 1 and a "failure" if ξ(j) = 0 then S m is the number of successes before the m-th failure and F m is the number of failures before the m-th success in the sequence of Bernoulli trials {ξ(j)} j≥1 . Having introduced this notation, we may now define the BLPs U,Û , V andV to be Markov chains on Z + = {0, 1, 2, . . .} with the following transition probabilities.
Note since S 0 = F 0 = 0 that the BLPs U and V are absorbing at the state x = 0. On the other hand, the Markov chainsÛ andV are irreducible Markov chains.
To explain the terminology of "branching-like processes" note that if ω x (j) ≡ α ∈ (0, 1) for all j ≥ 1 (in this case the ERW is just a simple random walk) then the processes U and V are branching processes with offspring distributions that are Geo(1 − α) and Geo(α), respectively, and the processesÛ andV are branching processes with the same offspring distributions but with an extra immigrant prior to reproduction in each generation. For ERW with boundedly many cookies per site, the processes U,Û , V andV can be interpreted as branching processes with migration (see [BS08a,KZ08]). For a discussion of the branching-like structure of the processes in the more general case of Markovian (or periodic) cookie stacks see [KP15, Section 2].
2.2. Connection with ERW. Before studying properties of the above BLPs more in depth, we will first recall the connection of these processes with the directed edge local times of the random walk. To this end, let λ x,m be the stopping times for the ERW defined for x ∈ Z and m ≥ 0 λ x,0 = inf{n ≥ 0 : X n = x} and λ x,m = inf{n > λ x,m−1 : X n = x}.
That is, λ x,m is the time of the (m + 1)-st visit to x ∈ Z. Note that these stopping times could in theory be infinite, but since we are concerned in this paper only with recurrent ERW the stopping times λ x,m are almost surely finite. For a fixed x ∈ Z and m ≥ 0, define the directed edge local time processes E (x,m) y and D (x,m) y as follows.
give the number of steps to the right and left, respectively, from the site y by time λ x,m .
For fixed x ∈ Z and m ≥ 0, it follows from the construction of the ERW in terms of the Bernoulli random variables ξ y (j) that (1 − ξ x (j)).
We claim that the processes {E x−k } k≥0 are Markov chains with transition probabilities which are the same as the BLPs defined above. For specificity we consider first the case when x > 0. x+k+1 equals the number of jumps to the right from x + k + 1 before the -th jump to the left, or equivalently the number of successes before the -th failure in the Bernoulli sequence {ξ x+k+1 (j)} j≥1 . Therefore, for any sequence 1 , 2 , · · · , k+1 ∈ Z + we have x+k } k≥0 is a Markov chain with the same transition probabilities as the BLP U . (Note that for the first equality in (5) we use that the cookie environment The analysis of the process D (x,m) x−k when x > 0 is similar, but slightly more complicated. If there are steps to the left from x − k by time λ x,m (i.e., D (x,m) x−k = ) then the number of steps to the right from The analysis of the directed edge local time processes is similar in the cases x = 0 and x < 0. A summary of the correspondence of the directed edge local time processes to the BLPs in the different cases is given in Table 1.
Case Directed edge local time BLP Table 1. The directed edge local time processes are Markov chains with initial conditions given by (4) and transition probabilities corresponding to BLP as given in this table.
We note also that the directed edge local times can be used to represent the local time of the random walk at sites. That is, if L(n; x) = n−1 k=0 1 {X k =x} is the number of visits to a site x before time n, then The first equality in (7) is obvious since every visit to y must result in a jump to the right or left. For the second equality in (7) the formula in the case y = x is clear by the definition of the stopping time λ x,m . In the case y > x the second equality in (7) follows from the fact that D (x,m) y = E (x,m) y−1 + 1 {x<y≤0} since every jump to the left from y can be paired with a preceding jump to the right from y − 1 except in the case when x < y ≤ 0 where there is no such corresponding jump for the first jump to the left from y.
2.3. Previous results. As noted above, the BLPs have been studied quite extensively in the case of ERW with boundedly many cookies per site, and many of these results were extended to the case of periodic (and even Markovian) cookie stacks in [KP15]. In this subsection we will recall some of these results which will be of importance in the current paper.
2.3.1. The parameters θ andθ. We begin by recalling the connection of the parameters θ andθ defined in (2) with the BLPs defined above. These parameters were defined in [KOS14] in terms of asymptotics of the mean and variance of the BLPs when the BLPs are large. The parameters are given by θ = 2ρ and ν = lim In fact, it was shown in [KOS14] that the convergence in the above definitions of ρ andρ is exponentially fast in n. Since we will use this later, we record here that for some constants C, c > 0. The explicit formulas for θ andθ in (2) follow from the following explicit formulas for ρ,ρ and ν derived for periodic cookie stacks in [KOS14].
Finally, we also note the following relation between the parameters ρ,ρ, and ν which will be used in the proof of Theorem 1.7 below.
2.3.2. Tail asymptotics. The relevance of the parameters θ andθ defined above is that they determine certain tail asymptotics for the BLPs. To provide some unified notation for studying these tail asymptotics we will adopt the following notation for certain hitting times of a stochastic process. If {Z i } i≥0 is a stochastic process, then for x ∈ R we will let Theorem 2.1 (Theorems 2.6 and 2.7 in [KP15]). Let Z be one of the BLPs U,Û , V , orV , and let s Z be defined for each of these cases by (12) s U = 1 − θ, sÛ =θ, s V = 1 −θ, and sV = θ.
where for s Z = 0 we replace n s Z with ln n.
2.3.3. Squared Bessel processes. Finally, we recall the following diffusive scaling limits for the BLPs. The asymptotics of the mean and variance of the BLPs in (8) suggest the following diffusion approximations for the BLPs which were proved in [KP15].
Theorem 2.2 (Lemma 6.1 in [KP15]). Fix y > ε > 0 and a sequence z n ∈ Z + with z n /n → y as n → ∞. Let Z n · be a sequence of one of the BLPs U,Û , V , orV with initial conditions Z n 0 = z n , and let Y ε,n (t) = Z nt∧σ Z εn n for t ≥ 0. Then, with respect to the standard Skorokhod(J 1 ) topology on the space of cádlág functions on [0, ∞) the process Y ε,n converges in distribution to where B(t) is a standard Brownian motion, and the drift constant b Z for the four possible BLPs is given by b U = ρ, bÛ = 1 + ρ, b V =ρ, and bV = 1 +ρ.
Remark 2.3. Note that 2Y (t) is a (time-rescaled) squared Bessel process of generalized dimension 4b Z ν . The exponents s Z defined in (12) which are used in Theorem 2.1 are related to this generalized dimension by the relation

Preliminaries
3.1. Diffusive scaling. We begin by proving some lemmas which indicate that the diffusive scaling is the correct scaling to obtain non-trivial limits when max{θ,θ} < 1. The first lemma indicates that it takes on the order of n 2 steps for the ERW to cross an interval of length n.
Proof. We shall show how to get the first inequality in (13), the proof of the second one being similar. Since T = + 2 y≤ D  Table 1 in Section 2.2) implies that We claim that it is sufficient to show that there exists an L 0 < ∞ and n 0 ≥ 1 such that Indeed, since the statement of the Lemma holds trivially when n < L, this would then imply that √ L for n ≥ max{L 0 , n 2 0 } and L ≥ L 0 , and then by choosing c 2 sufficiently large (depending on L 0 and n 0 ) the bound in (13) holds for all n ≥ 1 and 0 < L ≤ n. If θ ∈ (0, 1), the proof of (14) is the same as that of [DK12, Lemma 3.2], where we use the first inequality of Theorem 2.1 (ii) instead of [DK12, (2.2)]. On the other hand, if θ = sV ≤ 0 then this argument no longer works. We will thus handle the case θ ≤ 0 by couplingV with a "smaller" BLPV h,ε which has parameter θ h,ε ∈ (0, 1).
Since the above construction couples the cookie environments ω and ω h,ε in such a way that ω x (j) ≤ ω h,ε x (j), it follows that we can couple BLPsV andV h,ε the the corresponding cookie environments so thatV i ≥V h,ε i for all i ≥ 0. The random cookie environment ω h,ε fits into the framework of the Markovian cookie stacks considered in [KP15]; in particular, by [KP15, Theorem 2.7] the tail asymptotics in Theorem 2.1 hold for Z =V h,ε with parameter s Z = θ h,ε that can be calculated using [KP15,Lemma 5.1] to be θ h,ε = θ + 4h(1−ε) νε . Therefore, if θ ≤ 0 we may choose an ε ∈ (0, 1) so that θ h,ε ∈ (0, 1). Then the coupling ofV andV h,ε together with the argument above for θ ∈ (0, 1) applied to the BLPV h,ε will ensure that Lemma 3.1 easily implies the following control for the range of the EWR.
Another consequence of Lemma 3.1 is the following process-level tightness estimate for the running minimum and maximum of the ERW. Corollary 3.3. Let M n = sup k≤n X k and I n = inf k≤n X k be the running maximum and minimum, respectively, of the excited random walk. If max{θ,θ} < 1, then for any ε > 0 and t < ∞, Proof. It's enough to prove the limit for the running maximum process since the proof is the same for the running minimum. If the running maximum increases at least 2ε √ n over some time interval less than δn, then it follows that some interval of the form [(m − 1) ε √ n , m ε √ n ] is crossed in less than δn steps. Therefore, and the conclusion of Corollary 3.3 follows easily from this and Lemma 3.1. If some site x ≥ 0 is visited more than K √ n times by time n, then during the first √ Kn excursions to the right of the origin either • the walk takes at most n steps to complete these excursions to the right, • or some point to the right of the origin is visited at least K √ n times during these excursions.
For any m ≥ 1, the sum 2 x≥0 E (0,m) x gives the total amount of time taken by the excursions to the right of the origin during the first m excursions from the origin (to the right or left). Also, during the first m excursions from the origin the total time spent at a site x ≥ 0 is equal to D where in the last line we used the connection with the BLP detailed in Section 2.2. For the first probability in (15), note that the diffusion approximation in Theorem 2.2 implies that for any ε > 0, where Y (t) is solves the SDE dY (t) = ρ dt + νY (t) dB(t). The last probability vanishes when we let K → ∞. The second probability in (15) can be bounded uniformly in n by a quantity that vanishes as K → ∞. This is asserted by the following lemma.
Lemma 3.5. If θ < 1, then for every ε > 0 there is a constant c 3 = c 3 (ε) such that 3.2. Control of rarely visited sites. Lemmas 3.1 and 3.4 together imply that there are of the order √ n sites with local time of the order √ n. However, there may be some sites in the range that have been visited far fewer than √ n times. The lemmas in this section give control on how often one of the BLPs can be below some fixed level. Since the BLPs are related to the local times of directed edges, these then give control on the number of directed edges which have been traversed a relatively small number of times.
Lemma 3.6. Let Z be one of the BLPs U ,Û , V ,V with s Z > 0, where s Z is defined in Theorem 2.1. For every γ ∈ (0, 1/2) and ε > 0 there exist positive constants c 4 = c 4 (γ, ε) and c 5 = c 5 (γ, ε) such that Proof. By the Markov property, it is enough to prove the statement of the lemma for m < n γ . Let k = min{j ∈ N : 2 j ≥ n γ }. Define I j = [2 k−j , 2 k−j+1 ), j ∈ N, and events Since 2 j−1 |I j | = 2 k−1 < n γ and k j=1 j2 −(j+1) < 1, we get the inclusion Thus, it is enough to show that k j=1 P (A j | Z 0 = m) ≤ c 4 e −c 5 n 1/2−γ . To estimate the probabilities of sets A j we shall need the following proposition, which is an adaptation of [KM11, Proposition 6.1].
Proposition 3.7. Let Z be one of the BLPs U ,Û , V ,V with s Z > 0. Then there is a positive constant c 6 such that for all n, x ∈ N, and m ≥ 0 Proof of Proposition 3.7. The proof for all four processes is identical to that of Proposition 6.1 in [KM11]. For reader's convenience we note that our processV corresponds to the process V in [KM11] and s Z corresponds to δ in [KM11]. In the proof of Proposition 6.1 we only need to replace the references to Lemma 3.1 and Lemma 5.3 of [KM11] with the references to Theorem 2.2 above and Lemma 6.4 of [KP15] respectively. The only place which uses the inequality s Z > 0 is Corollary 5.5 of [KM11]. Since this corollary depends only on [KM11, Lemma 5.3], which is fully replaced by Lemma 6.4 of [KP15] in our setting, the proof goes through without any changes.
Applying Proposition 3.7 to each term of the sum we get This immediately implies the statement of the lemma.
Lemma 3.8. Let Z be either the BLPÛ orV and let max{θ,θ} < 1. For every γ ∈ (0, 1/2), ε > 0 and β > 1 there is a c 9 = c 9 (γ, β, ε) such that for any K > 1 and all sufficiently large n Proof of Lemma 3.8. We will give the proof only for the processV as the proof forÛ is similar. First of all, by the monotonicity of the BLPs with respect to their initial conditions, the maximum is attained at m = 0. Thus, we shall set m = 0. Secondly, we note that it is sufficient to consider only the case θ = sV ∈ (0, 1). Indeed, suppose that θ ≤ 0. Just as in the proof of Lemma 3.1, we can invoke [KP15, Lemma 5.1] to construct a "smaller" BLP processV h,ε such that θ h,ε = sV h,ε ∈ (0, 1) and and it is sufficient to show that the last probability does not exceed c 9 /n β . Thus, without loss of generality we shall also assume that θ ∈ (0, 1).
Step 2. Now that we know that the number of regenerations can not be too large, we can add up the time spent below level n γ for up to n 1/2−α regenerations. Let t i = σV 0,i −1 Note that the t i 's are independent and identically distributed. Lemma 3.6 (for Z =V ) implies that the tail of each t i decays faster than any power of n, so every moment of t i is finite. Using Step 1, the Markov inequality with power > β/α, and then Jensen's inequality we get n β , for n large enough as claimed.
Corollary 3.9. Let max{θ,θ} < 1. For every γ ∈ (0, 1/2), ε > 0 and β > 1 there is a c 11 = c 11 (γ, β, ε) such that for all sufficiently large n Proof. Suppose that after n steps the ERW is at X n = x and has previously visited that site m times; that is, λ x,m = n. In this case, the local times at sites can be expressed using the directed edge local times E (x,m) y and D (x,m) y as given in (7). In particular, if 0 ≤ x ≤ n and m ≥ 0 this implies that Note that this upper bound is uniform over all 0 ≤ x ≤ n and m ≥ 0, and that Lemmas 3.6 and 3.8 imply that this is bounded above by c 9 (γ, β + 2, ε/3)n −β−2 for all n large enough. A similar upper bound holds uniformly for −n ≤ x < 0 and m ≥ 0. Finally, since exactly one of the events {λ x,m = n} occurs for |x| ≤ n and m < n, we have that for all n large enough.

Functional limit laws: Non-boundary cases
In this section we give the proof of Theorem 1.7: convergence to perturbed Brownian motion for ERW when max{θ,θ} < 1. Our proof mimics in some ways the proof in [DK12] for the case of ERW with boundedly many cookies per site in that we decompose the walk into a martingale plus a term that is approximately equal to a linear combination of the running maximum and minimum of the walk. However, the decomposition in this paper is different and less transparent than in [DK12] (as will be evident from the proof below, this is due to the fact that θ +θ is not necessarily equal to zero; in contrast, for ERW with boundedly many cookies per site we have θ = δ andθ = −δ). Moreover, the control of the non-martingale part of the decomposition is much more difficult than in [DK12] due to the fact that there may be infinitely many cookies at a site with non-zero drift.
Step 1: Control of martingale term. We begin by noting that if F n = σ(X k , k ≤ n) then E[X n+1 − X n |F n ] = 2ω Xn (L(n + 1; X n )) − 1. Therefore, if (2ω X k (L(k + 1; X k )) − 1) = y∈Z L(n;y) j=1 (2ω y (j) − 1), it follows that B n = X n − C n is a martingale with respect to the filtration F n . The first step in the proof of Theorem 1.7 is the following control of this martingale.
Lemma 4.1. Let B n = X n − C n , with C n defined in (16). Then, where B(t) is a standard Brownian motion and ν is the parameter given in (10).
Proof. Since B n is a martingale with bounded steps we need only to check the convergence of the quadratic variation of the process [Bil99, Theorem 18.2]. In particular, it is sufficient to show that Note first of all that Therefore, (18) is equivalent to where the last equality follows easily from the formula for ν in (10). To prove the first equality in (19), we first note that since {ω y (j)} j≥1 is a deterministic periodic sequence then for some C > 0. Since y L(n; y) = n, it follows that for any γ ∈ (0, 1/2). It follows from Corollary 3.9 and the Borel-Cantelli Lemma that the sum in the last line is o( √ n), P -a.s., and from this the limit in (19) follows.
Step 2: Control of accumulated drift. Having proved Lemma 4.1 we now need to control the term C n defined in (16) which records the total drift which the ERW has accumulated from the cookie environment. The following lemma shows that C n is approximated by a fixed linear combination of the distance of the random walk from its running maximum and running minimum. Recall that M n and I n were defined in Corollary 3.3 as the running maximum and minimum, respectively, of the ERW.
Proof. For the proof of Lemma 4.2, we need to show that total drift contained in the used cookies to the right (resp. left) of X k is approximately ρ (resp. −ρ) times the number of sites visited to the right (resp. left) of X k . That is, if we decompose C n as C n = C − n + C 0 n + C + n , where (2ω y (j) − 1), and C 0 n = L(n;Xn) j=1 (2ω 0 (j) − 1), then since C 0 n ∈ { j=1 (2p j − 1), = 1, 2, . . . , N } is a bounded random variable it is enough to show The proofs of (20) and (21) are similar, and thus we will only give the proof of (20). We will prove this using properties of the BLP and the connection with the random walk given in Section 2.2. To this end, for any x, y ∈ Z and m ≥ 0 let = 0 for sites y that have not been visited, we can restrict the sum in this representation of C + k to y ≤ M (x,m) := M λx,m . Therefore, with this notation we have that We will use the representation in (23) to prove (20) by showing that the terms inside the sum on the right in (23) are nearly equal to a martingale difference sequence. To this end, for x ∈ Z and m ≥ 0 fixed let } y>x is a martingale difference sequence with respect to the filtration {G (x,m) y } y>x , and the following lemma shows that this is not too far from the original sequence.
(2ω 1 (j) − 1) U 0 = n . Therefore, we need only to show that |ψ(n) − ρ| ≤ Ce −cn for some constants C, c > 0. To this end, first note that By the construction of the BLP U , U 1 + n is the number of trials in the Bernoulli sequence {ξ 1 (j)} j≥1 until the n-th failure. Thus, the sum inside the second expectation in (24) equals n and the Optional Stopping theorem implies that the first expectation in (24) is equal to zero. Thus, we have shown that ψ(n) = E[U 1 | U 0 = n] − n and it follows from (9) that |ψ(n) − ρ| ≤ Ce −cn .
We are now ready to give the proof of (20). For any n ≥ 1 and K, t < ∞ let Note that Corollary 3.2 and Lemma 3.4 imply that the first two events on the right are typical events for K sufficiently large. To see that the intersection of the other events is also typical, recall that for any fixed (x, m) the directed edge local time process {E (x,m) y } y≥x is a Markov chain with transition probabilities given by the BLP U andÛ . In particular, for any fixed |x| ≤ K √ n and Lemmas 3.6 and 3.8 imply that both probabilities on the right decay faster than any polynomial in n. It follows from this and Corollary 3.2 and Lemma 3.4 that (25) lim K→∞ lim sup n→∞ P (G c n,K,t ) = 0.
If the event G n,K,t occurs, then for any k ≤ nt there is an x ∈ [−K √ n, K √ n] and 0 ≤ m ≤ K √ n such that λ x,m = k. Moreover, on the event G n,K,t ∩ {λ x,m ≤ nt} for fixed |x|, m ≤ K √ n we have If K is chosen large enough so that K > 2C/ε then for n sufficiently large the last line above is less than ε √ n/2. Therefore, if K > 2C/ε we have for all sufficiently large n that Since the random variables ∆ (x,m) y only take values from the finite set { j=1 (2p j − 1), = 1, 2, . . . , N }, the sum inside the probability in (26) is a martingale with bounded increments. Therefore, it follows from Azuma's inequality that the last probability in (26) is bounded above by 2 exp{− Cε 2 √ n K } for some constant C > 0 that does not depend on x or m, and so the second term in (26) vanishes as n → ∞ for any fixed K. Finally, recalling (25) the limit in (20) follows by taking n → ∞ and then K → ∞ in (26).
Step 3: Tightness. The next step in the proof of Theorem 1.7 is to prove tightness for the random walk under diffusive scaling.
Lemma 4.4. The sequence of processes X n· / √ n, n ≥ 0, is tight in the space D([0, ∞)) of cádlág paths equipped with the Skorokhod(J 1 ) topology. Moreover, any subsequential limiting distribution is concentrated on continuous paths.
Proof. For the proof of this lemma, and also for step 4 of the proof, it will be helpful to use a slightly different decomposition of the walk instead of X n = B n + C n . Lemma 4.2 implies that X n can be approximated as X n ≈ B n + ρM n +ρI n − (ρ +ρ)X n = B n + ρM n +ρI n − ν 2 − 1 X n , where we used the identity (11) in the last equality. The disadvantage of this decomposition is that X n appears both on the left and the right above. To account for this, we define D n = C n + ( ν 2 − 1)X n so that X n = B n + D n − ( ν 2 − 1)X n , or equivalently, The representation (27) is helpful since we know by Lemma 4.1 that the first term on the right converges to Brownian motion and by Lemma 4.2 that the second term on the right is approximated by a linear combination of the running maximum and running minimum of the walk. We will use these facts to reduce the proof of Lemma 4.4 to proving tightness for the (rescaled) running maximum and running minimum processes.
Indeed, it follows from (28) The limit in (29) follows from Lemma 4.1, and to prove (30) note that so that (30) follows from Corollary 3.3 and Lemma 4.2.
Step 4: Convergence to perturbed Brownian motion. Finally, we collect the results from the first three steps to prove that the rescaled path of the ERW converges in distribution to a (θ,θ)perturbed Brownian motion. We begin by introducing the following notation for the rescaled process versions of X n , B n and D n ,  (27) implies that X n = B n + D n . Note that Lemmas 4.1 and 4.4 imply that the joint sequence (X n , B n , D n ) is a tight sequence in D([0, ∞)) 3 such that any subsequence that converges in distribution is concentrated on C([0, ∞)) 3 . (Note that the argument in the proof of Lemma 4.4 also shows that the sequence of paths D n is tight with any subsequential weak limits concentrated on continuous paths.) Now, let Ψ : D([0, ∞)) → D([0, ∞)) be the mapping defined by Note that since θ = (2ρ)/ν andθ = (2ρ)/ν then Lemma (4.2) is equivalent to the statement that Since the function Ψ is continuous on the subset C([0, ∞)) of continuous functions, it follows from (31), the continuous mapping theorem, and Lemmas 4.1 and 4.4 that if n k is a subsequence on which the joint sequence (X n , B n , D n ) converges in distribution it must converge to a joint process of the form (X, B, Ψ(X)), where X is a continuous process and B is a standard Brownian motion. However, since X n = B n + D n the limit process must also satisfy X = B + Ψ(X); that is, and so X must be a (θ,θ)-perturbed Brownian motion. Note that the above argument shows that any subsequential limit X n is a (θ,θ)-perturbed Brownian motion, and since the sequence X n is tight it follows that X n converges in distribution to a (θ,θ)-perturbed Brownian motion.

Markovian cookie stacks
The main results for this paper (Theorems 1.6 and 1.7) are stated for recurrent ERW with periodic cookie stacks. However, many of the results in the present paper also hold for recurrent ERW in the more general model of Markovian cookie stacks which was introduced and studied in [KP15]. For Markovian cookie stack environments, the cookie environment ω = {ω x } x∈Z is spatially i.i.d., but the cookie sequence at each site ω x = {ω x (j)} j≥1 comes from the realization of a finite state Markov chain. For this model the analogs of parameters θ,θ, ν have been explicitly computed in [KP15]. 3 Nearly all of the results in the present paper can be adapted to the case of recurrent ERW in Markovian cookie stacks with little or no changes in the proofs. In particular, since the proof of the functional limit laws in the boundary cases (Theorem 1.6) depends only on the tail asymptotics for the BLP in Theorem 2.1, and since these tail asymptotics were proved for the model of Markovian cookie stacks in [KP15], then Theorem 1.6 also holds for ERW in Markovian cookie stacks.
The only part of the current paper that doesn't generalize to Markovian cookie stacks is Lemma 4.2 which controls the error in the approximation of C n by ρ(M n − X n ) +ρ(I n − X n ). In fact, in the general case of Markovian cookie stacks a heuristic argument suggests that the difference C n − ρ(M n − X n ) − ρ(I n − X n ) is of the order √ n, whereas Lemma 4.2 shows that it is o( √ n) for periodic cookie stacks. (See Figure 2 for simulations which support this claim.) We remark, that the only place where the proof of Lemma 4.2 breaks down for Markovian cookie stacks is in the application of Azuma's inequality to bound the second probability in (26). Thus, Lemma 4.2 and therefore also Theorem 1.7 hold for more general recurrent ERW with the property that the partial sums n j=1 (2ω x (j)−1) are uniformly bounded in x and n. In spite of the fact that Lemma 4.2 does not hold for the more general Markovian cookie stack model, other results suggest that it may be the case that the scaling limit for recurrent ERW in the non-boundary cases are still perturbed Brownian motions.
Conjecture 5.1. If X n is an ERW in a cookie environment with Markovian cookie stacks and max{θ,θ} < 1 , then for some a > 0 the sequence of processes X nt a √ n t≥0 converges in distribution to a (θ,θ)perturbed Brownian motion.
Some evidence for Conjecture 5.1 is provided by the diffusion approximations for the BLPs in Theorem 2.2 which were already proved in the case of Markovian cookie stacks in [KP15]. Due to the connection of the BLPs with directed edge local times of the ERW, these diffusion approximations are consistent with Ray-Knight theorems for the local times of perturbed Brownian motion that were proved in [CPY98].
Remark 5.2. In the process of finishing the current paper, we learned of a recent paper [HLSH16] which proves the convergence to perturbed Brownian motion for a special case of ERW in Markovian cookie stacks. This paper considers the case where the cookie sequence at each site {ω x (j)} j≥1 is a Markov chain on {0, 1} with transition probability p 1 − p 1 − p p . Note that for this model the path of the random walk is deterministic once the cookie environment ω is fixed since ω x (j) ∈ {0, 1} for all x ∈ Z, j ≥ 1. Convergence to perturbed-Brownian motion remains an open problem for the more general model considered in Conjecture 5.1.