A note on maxima in random walks

We give a combinatorial proof that a random walk attains a unique maximum with probability at least 1/2. For closed random walks with uniform step size, we recover Dwass’s count of the number of length ` walks attaining the maximum exactly k times. We also show that the probability that there is both a unique maximum and a unique minimum is asymptotically equal to 1 4 and that the probability that a Dyck word has a unique minimum is asymptotically 12 .

The paper centers around a combinatorial proof of the following theorem which was first proven by Dwass in [5]: 1  2 |C(n)| for each n 1.In [5], this is proven by a method that computes the probabilities of events in finite random walks by relating them to events in infinite random walks for which probabilities are more readily computed.This is a general analytic method used to compute a large number of quantities including M(n) as well as the more general M(n, r) which we discuss in Section 3.
As is often the case, a combinatorial proof offers other intuition and insight.In this case, we will see that our method generalizes to certain cases not amenable to Dwass's method.
In Section 2 we give a first proof of Dwass's result, which uses a method we will employ fundamentally in the text.A second more transparent proof is give in Section 6.This second proof uses that the number of Dyck words is the corresponding Catalan number.In Section 3 we recover Dwass's stronger result that there are precisely 2n−r r−1 length 2n closed walks attaining their maximum exactly r times.In Section 4 we explain that the combinatorial proof generalizes to show that more general types of finite random walks have probability 1 2 of attaining a unique maximum.This conclusion does not assume that the walks are closed and allows an arbitrary distribution of step sizes.In Section 5 we show that the probability of having both a unique minimum and a unique maximum approaches 1  4 as the length of a uniform closed walk increases.In Section 6 we show that the probability that a length n Dyck word has a unique minimum approaches 1  2 as n → ∞.

Dyck Words and Leads
A Dyck word of length 2n is a closed walk w such that max(w) = 0. Let D(n) denote the set of length 2n Dyck words.The number of Dyck words of a given length is the corresponding Catalan number: The lead of w ∈ C(k) is the number of values i ∈ {1, . . ., 2k} with both w(i) > 0 and w(i) > 0. For 0 e k let L(k, e) ⊂ C(k) be the set of lead e walks (so that n , Theorem 2.1 follows from the Chung-Feller Theorem which states that |L(k, e)| is independent of e [2].Among the many proofs of the Chung-Feller theorem is a bijective explanation given in [1,6] the former of which traced the explanation to [4].We now recount the bijection: Lemma 2.2.For each 1 e k there is a bijection ψ : L(k, e − 1) → L(k, e).
Proof.Let w ∈ L(k, e − 1).Let p > 0 be maximal such that w(p) = −1 and w(p) = −1.Regard w as a string in {±1}, and express w as the concatenation axb where a is the initial length p subpath and x is a single symbol (which is necessarily −1).Define ψ(w) to be the sequence corresponding to bxa.This lies in L(k, e) since a, xb, bx are all closed and the lead of bx is one greater than that of b.
The map ψ −1 is defined by recognizing the decomposition of w ∈ L(k, e) as a concatenation bxa by declaring b to be the length n subword where n is minimal such that w(n + 1) = −1 and w(n + 1) = 0.  Remark 2.3.We utilize ψ : 2, we let a be the nontrivial subsequence of w with domain {p, . . ., q} ⊂ N where p − 1, q are the minimal and maximal values of w−1 (max(w)).Note that a ∈ L(q − p + 1, 0) and let ψ(a) ∈ L(q − p + 1, 1) be as provided by Lemma 2.2.Define Ψ(w) to be the sequence obtained from w by substituting ψ(a) for a as in Figure 1.Note that Ψ(w) ∈ M(n) by Remark 2.3.
An alternate proof is given in Section 6.

Counting walks of arbitrary rank
The rank of a walk We now extend this result and count each M(n, r): We first observe that the numbers M (n, r) satisfy the following recursive definition (see Figure 2).The base cases are: The inductive step for n, r 2 follows by iterating Pascal's identity: We will show that Equations ( 1) and ( 2 To verify Equation ( 2), for each n, r 2, we describe a bijection χ r between n j=r−1 M(n− 1, j) and M(n, r).Let w ∈ n j=r−1 M(n − 1, j).As rank(w) r − 1, we may consider the (r − 1)th maximal peak of w, counted from the right.As in Figure 3, we insert a peak at this point to obtain a path ŵ ∈ M(n).We then apply the map We must show that χ r is injective and that its image is M(n, r).The former holds since a left-inverse to χ r is obtained by first applying Ψ and then removing the single maximal peak.The latter holds by Lemma 3.2.Lemma 3.2.Let n, r 2, let w ∈ M(n, r) and let w be obtained by removing the single maximal peak from Ψ(w).Then rank(w ) r − 1.
Proof.The general case follows from the case where w ∈ D(m) ∩ M(m, r) so that w ∈ D(m − 1).We express w as axb where the length i of a is maximal such that i < m and w(i) = 0. Then Ψ(w) = bxa by definition.As rank(w) = r, we have rank(a) = r − 1. Hence rank(w ) r − 1 as desired.

Variable step lengths
In this section we provide a different generalization of Theorem 2.4: we prove that for a random closed walk of variable step size, and with a nonzero fixed number of each type of step, the probability of attaining a unique maximum is at least 1 2 .Definition 4.1.Let S be a finite set.A length S-walk w is a sequence {1, . . ., } → S. Let W S (n) denote the set of length n S-walks.Let v : S → R. The v-trajectory of w is the electronic journal of combinatorics 23(1) (2016), #P1.17 wv (j) = j i=1 v(w(i)).The v-maximum of w is max v (w) = max{ wv (j) : 0 j }.Let M v (n) ⊂ W S (n) denote the subset consisting of those walks w for which there is a unique i ∈ {1, . . ., n} such that w(i) = max(w).The length S-walk w is v-closed if wv ( ) = 0. Let D v (n) ⊂ W S (n) denote the set of length N v-closed S-walks with v-maximum 0.
The proof of Lemma 2.2 can be carried over to this more general context: Lemma 4.2.There is an injection Let p < n be maximal such that wv (p) = 0. Regard w as a string in S, and express w as the concatenation axb where a is the initial length p subpath and x is a single symbol (which necessarily satisfies v(x) < 0).Define ψ v (w) to be the sequence corresponding to bxa.This lies in M v (n) since a has v-maximum 0 and bv obtains its unique maximum at the end.
To see that ψ v is injective, we describe its (left-)inverse.Any walk w in the image of ψ v has the form bxa, where max v (a) = 0, b has length q, wv (q) > 0, and wv (q + 1) = 0. Moreover there can clearly be at most one such representation of w.The unique pre-image of w under ψ v is then axb.Theorem 4.3.Let S be a finite set and let v : The proof is the same as that of Theorem 2.4; we use ψ v in the same way to define a map For example, we could take X to be the set of v-closed walks, since Ψ v takes v-closed walks to v-closed walks.Also, note that Ψ v preserves the cardinality of S-fibers in the sense that |w −1 (s)| = |(Ψ v w) −1 (s)| for each s ∈ S. Hence, we could take X to be the set of walks whose S-fibers have some prescribed cardinalities.Remark 4.5.We can also consider weighted random walks.That is, we let µ be a probability measure on S, and consider the induced measure µ on W(n) that assigns to a walk w the probability 1 n s∈S |w −1 (s)| µ(s).Theorem 4.3 also generalizes to this case: with respect to this measure, the measure of M v (n) is at least 1  2 .This works because the measure is Ψ v -invariant, so

Estimating the probability of a unique max and a unique min
The goal of this section is to prove Theorem 5.9 which gives a 1  4 asymptotic probability that a random walk with uniform step size has both a unique minimum and a unique maximum.The strategy of the proof is to show that there is a dense subset having a partition into four equal cardinality parts lying in: the electronic journal of combinatorics 23(1) (2016), #P1.17 ∈ M(n), we define the max-interval of w to be the largest subsequence {p, . . ., q} of {1, . . ., 2n} such that w(p − 1) = max(w) = w(q).For w ∈ M(n), we define the max-interval of w to be the max-interval of Ψ −1 (w).Note that the max-interval subtends the part of w which is modified by Ψ (or Ψ −1 ).We define the min-interval of w to be the max-interval of −w.The size of the max-interval is its cardinality and likewise for the min-interval.
The max-interval and min-interval are generically small in the following sense: Lemma 5.2.Let U + (n, k) ⊂ C(n) be the set of walks whose max-interval has size 2k.Similarly, U − (n, k) denotes the walks with a size 2k min-interval.For any > 0, there exists N such that for all n N we have: and similarly for U − .
Proof.We will prove the claim for U + as the proof for U − is identical.
From the definitions we have Proof.For each fixed n, we prove this by induction on k.
Base case: the electronic journal of combinatorics 23(1) (2016), #P1.17 where this equality holds for |x| < 1/4.Setting x = 1/4, the left-hand side converges by the elementary estimate 2k k 4 k √ 3k+1 of the central binomial coefficient.We thus obtain the following by applying lim x 1   4   to each side, and note that Abel's theorem ensures the convergence of this limit on the left.
The conclusion follows since the 0-th term of this series is 1.
Lemma 5.5.If the max-interval and min-interval of w intersect and have size s 1 and s 2 , then: Proof.Let {a, . . ., b} be the max-interval of w.By hypothesis, there is c ∈ {a, . . ., b} with w(c) = min(w).Clearly, the difference between the maximum and minimum on a size s interval is at most s.Since max(w) and min(w) are both attained on {a, . . ., c} and on {c, . . ., b}, and since one of these intervals is of size at most s 1 2 , it follows that max(w) − min(w) s 1 2 .Similarly, max(w) − min(w) s 2 2 .The following is a classical fact about random walks, and we refer to [7] for an account of its history: Lemma 5.6 (Reflection principle).For h 0, the number of walks w ∈ C(n) with max w h is equal to 2n n+h .Proof.For any w ∈ C(n) with max(w) h, define Rw by where I(w) is minimal such that w(i) = h.Then R is an injection onto the set of walks w ∈ W(2n) such that w(2n) = 2h.The cardinality of the latter set is 2n n+h .Lemma 5.7 (Generically Disjoint).Let J (n) ⊂ C(n) be the subset of walks whose maxinterval and min-interval are disjoint.Then lim n→∞ the electronic journal of combinatorics 23(1) (2016), #P1.17 Proof.Fix > 0. Let N be as in Lemma 5.2 and let n N .Let O(n) = C(n) \ J (n) consist of those walks whose max-interval and min-interval overlap.Let 1 − 2 for every > 0, which proves the claim.
Lemma 5.8.J (n) is partitioned into 4 subsets of equal cardinality according to whether there is a unique max and/or unique min.
Proof.Since the max-interval and min-interval of elements of J (n) are disjoint, it is easily seen that the restrictions of the map Ψ to J (n) leaves J (n) ∩ −M(n) invariant and hence provides bijections Similarly, the map w → −Ψ(−w) provides bijections Combining these gives the desired one-to-one-to-one-to-one correspondence.

Figure 2 :
Figure 2: The base cases (1) are the entries 1, 3, 10, 35, . . .and the 1 at the top.The identity (2) states that an entry in Pascal's triangle is the sum of all the numbers in the diagonal path above it, e.g.15=10+4+1.

Definition 5 . 1 .
Let w ∈ C(n).If w / k) corresponds to a pair (d, m) with d ∈ D(k) and m ∈ M(n − k).The correspondence arises by inserting d at the maximum of m.We now have the following inequality which proves the claim.Its first part holds since n k=1 U * + (n, k) = C(n) \ M(n) and |M(n)| = 1 2 |C(n)| by Theorem 2.4.Its second part holds by Lemma 5.3 and its last part holds for N sufficiently large by Lemma 5.4.
The well-known generating function for the Catalan numbers is