Abstract
We study a number of combinatorial and algebraic structures arising from walks on the twodimensional integer lattice. To a given step set \(X\subseteq \mathbb Z^2\), there are two naturally associated monoids: \(\mathscr {F}_X\), the monoid of all Xwalks/paths; and \(\mathscr {A}_X\), the monoid of all endpoints of Xwalks starting from the origin O. For each \({A\in \mathscr {A}_X}\), write \(\pi _X(A)\) for the number of Xwalks from O to A. Calculating the numbers \(\pi _X(A)\) is a classical problem, leading to Fibonacci, Catalan, Motzkin, Delannoy and Schröder numbers, among many other wellstudied sequences and arrays. Our main results give relationships between finiteness properties of the numbers \(\pi _X(A)\), geometrical properties of the step set X, algebraic properties of the monoid \(\mathscr {A}_X\), and combinatorial properties of a certain bilabelled digraph naturally associated to X. There is an intriguing divergence between the cases of finite and infinite step sets, and some constructions rely on highly nontrivial properties of real numbers. We also consider the case of walks constrained to stay within a given region of the plane. Several examples are considered throughout to highlight the sometimessubtle nature of the theoretical results.
This is a preview of subscription content, access via your institution.
References
 1.
The Online Encyclopedia of Integer Sequences. Published electronically at oeis.org.
 2.
Abdallah Assi and Pedro A. GarcíaSánchez. Numerical semigroups and applications, volume 1 of RSME Springer Series. Springer, Cham, 2016.
 3.
Alin Bostan. Computer algebra for lattice path combinatorics. Habilitation thesis, Université Paris 13, 2017.
 4.
Arne Brøndsted. An introduction to convex polytopes, volume 90 of Graduate Texts in Mathematics. SpringerVerlag, New YorkBerlin, 1983.
 5.
Ashley Clayton and Nik Ruškuc. On the number of subsemigroups of direct products involving the free monogenic semigroup. J. Aust. Math. Soc. 109(1):24–35, 2020.
 6.
Igor Dolinka, James East, Athanasios Evangelou, Des FitzGerald, Nicholas Ham, James Hyde, and Nicholas Loughlin. Enumeration of idempotents in diagram semigroups and algebras. J. Combin. Theory Ser. A, 131:119–152, 2015.
 7.
Igor Dolinka, James East, Athanasios Evangelou, Des FitzGerald, Nicholas Ham, James Hyde, Nicholas Loughlin, and James D. Mitchell. Enumeration of idempotents in planar diagram monoids. J. Algebra, 522:351–385, 2019.
 8.
Igor Dolinka, James East, and Robert D. Gray. Motzkin monoids and partial Brauer monoids. J. Algebra, 471:251–298, 2017.
 9.
James East and Robert D. Gray. Diagram monoids and Graham–Houghton graphs: Idempotents and generating sets of ideals. J. Combin. Theory Ser. A, 146:63–128, 2017.
 10.
James East and Nicholas Ham. Lattice paths and submonoids of \(\mathbb{Z} ^2\). Preprint, 2018, arXiv:1811.05735v1.
 11.
P. A. Grillet. Commutative semigroups, volume 2 of Advances in Mathematics (Dordrecht). Kluwer Academic Publishers, Dordrecht, 2001.
 12.
Nicholas Ham. The planar modular partition monoid. PhD thesis, University of Tasmania, 2015.
 13.
Nicholas Ham. Lattice path enumeration algorithms, September 2018, https://gitlab.com/nhampaperfiles/latticepathalgorithms.
 14.
G. H. Hardy and E. M. Wright. An introduction to the theory of numbers. The Clarendon Press, Oxford University Press, New York, fifth edition, 1979.
 15.
Katherine Humphreys. A history and a survey of lattice path enumeration. J. Statist. Plann. Inference, 140(8):2237–2254, 2010.
 16.
Aubrey J. Kempner. A theorem on latticepoints. Ann. of Math. (2), 19(2):127–136, 1917.
 17.
B. Pascal. Traité du triangle Arithmétique, avec quelques autres petits traitez sur la mesme matiere. Paris, G. Desprez, 1665.
 18.
J. L. Ramírez Alfonsín. The Diophantine Frobenius problem, volume 30 of Oxford Lecture Series in Mathematics and its Applications. Oxford University Press, Oxford, 2005.
 19.
Wolfgang M. Schmidt. Diophantine approximation, volume 785 of Lecture Notes in Mathematics. Springer, Berlin, 1980.
Acknowledgements
We thank Igor Dolinka, Rupert McCallum, Laurence Park and Stewart Wilcox for a number of helpful conversations during the preparation of the article; we are especially indebted to Wilcox for his construction of the sequences used in Example A.5. We also thank the referees who have read and commented on the paper. The first author is supported by ARC Future Fellowship FT190100632.
Author information
Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Communicated by Marni Mishna.
Appendix (joint with Stewart Wilcox): Combination (V)
Appendix (joint with Stewart Wilcox): Combination (V)
In Sect. 2.9 we used Theorem 2.24 to limit the ostensibly possible combinations of finiteness conditions and geometric properties of step sets to just ten. One combination was shown never to occur (cf. Proposition 2.36), and all but one of the other combinations have been exemplified by various step sets whose locations are listed in Table 1. The purpose of this appendix is to construct a step set with the final combination (see Example A.5). The construction relies crucially on the existence of very specific sequences of real numbers (see Proposition A.2), and we turn to these first.
In all that follows, we fix a positive irrational number \(\xi \), and we denote by
the additive monoid consisting of all nonnegative \(\mathbb Z\)linear combinations of 1 and \(\xi \). Note that a or b might be negative in \(a+b\xi \in M\), but we require \(a+b\xi \) itself to be nonnegative. So M is a submonoid of \(\mathbb R_{\ge 0}\), and is dense in \(\mathbb R_{\ge 0}\); see the claim in the proof of Lemma 2.15. Since 1 and \(\xi \) are linearly independent over \(\mathbb Q\), there is a well defined (and surjective) monoid homomorphism
For \(a,b\in \mathbb R\), we write [a, b] and (a, b) for the closed and open intervals of all \(x\in \mathbb R\) satisfying \(a\le x\le b\) or \(a<x<b\), respectively; we also write [a, b) and (a, b] for the halfopen intervals, with the obvious meanings. If \(\Sigma \subseteq \mathbb R\), we will also write \([a,b]_\Sigma =[a,b]\cap \Sigma \), with similar notation for other kinds of intervals; for example, if \(a,b\in \mathbb Z\) and \(a\le b\), then \([a,b]_\mathbb Z=\{a,a+1,\ldots ,b\}\). If x is a real number, we will write \((\!(x)\!) = x\lfloor x\rfloor \) for the fractional part of x.
Lemma A.1
There is a mapping \(\mathbb P\rightarrow \mathbb P:k\mapsto p_k\) such that
Proof
Fix some \(k\in \mathbb P\). By the claim in the proof of Lemma 2.15, there exists \(l\in \mathbb P\) and \(a\in \mathbb Z\) such that \(0<l\xi a<\frac{1}{k}\). Let \(p_k\in \mathbb P\) be arbitrary so that
Now suppose we are given \(p\in \mathbb Z\) and \(\alpha \in \mathbb R_{\ge 0}\). Define
Then
We also claim that
Indeed, for the inequality \(0 < t(l\xi a)  (\!(\alpha p\xi )\!)\), note that if we write \(\beta =l\xi a\) and \(\gamma =(\!(\alpha p\xi )\!)\), then we have
while for the inequality \(t(l\xi a)  (\!(\alpha p\xi )\!) \le l\xi a\), we continue from above to obtain
Now that we have established (A.2), adding \(\alpha \) throughout gives
Since \(\alpha (\!(\alpha p\xi )\!)=\alpha (\alpha p\xi )+\lfloor \alpha p\xi \rfloor =p\xi +\lfloor \alpha p\xi \rfloor \), it follows that
That is,
So \(b+c\xi \in (\alpha ,\alpha +\frac{1}{k})\), and also \(b+c\xi \in \phi ^{1}\big ([p,p+p_k]_\mathbb Z\big )\) since \(\phi (b+c\xi )=c=tl+p\) clearly satisfies \(p\le c\), while \(c\le p+p_k\) follows from \(t<\frac{p_k}{l}\) which is itself part of (A.1).\(\square \)
In what follows, we fix the mapping \(\mathbb P\rightarrow \mathbb P:k\mapsto p_k\) from Lemma A.1. In fact, by suitably increasing each \(p_k\) if necessary, we may assume that \(p_1<p_2<\cdots \).
In what follows, for any subset \(\Sigma \) of \(\mathbb R\), we write \(S_n(\Sigma )=\{ {\sigma _1+\cdots +\sigma _n} : {\sigma _1,\ldots ,\sigma _n\in \Sigma } \}\) for the set of all sums of n elements of \(\Sigma \). Clearly if \(\Sigma \) is finite, then \(S_n(\Sigma )\le \Sigma ^n\).
For each \(l\in \mathbb P\), we define
Note that the “[0, l)” in the definition of B(l) is not “\([0,l)_\mathbb Z\)”; in particular, B(l) contains nonintegers. We clearly have \(B(1)\subseteq B(2)\subseteq \cdots \), and we also have \(M=\bigcup _{l\in \mathbb P}B(l)\). Indeed, for the latter, if \(\alpha \in M\), then \(\alpha \in B(l)\) for any l greater than both \(\alpha \) and \(\phi (\alpha )\). We aim to prove the following:
Proposition A.2
There exist sequences \(\alpha _i,\beta _i,\gamma _i\) \((i\in \mathbb P)\) of elements of M satisfying:

(i)
\(\lim _{i\rightarrow \infty }\alpha _i=0\),

(ii)
\(\lim _{i\rightarrow \infty }\gamma _i=1\),

(iii)
\(\gamma _i>1 \text { for all}\,\, i\in \mathbb P\),

(iv)
\(\beta _i+\gamma _i=4 \text { for all}\,\, i\in \mathbb P\), and

(v)
\(S_n(\Sigma )\cap B(l)=\emptyset \) for all \(l\in \mathbb P\) and \(n>n_l\), where \(\Sigma =\{ {\alpha _i,\beta _i,\gamma _i} : {i\in \mathbb P} \}\).
To prove the proposition, we will construct the \(\alpha _i\) series shortly, and after that the \(\beta _i,\gamma _i\) series inductively. We will write \(\mathbf{A}=\{ {\alpha _i} : {i\in \mathbb P} \}\) and \(\mathbf{A}_k=\{ {\alpha _i} : {i\in \{1,\ldots ,k\}} \}\) for each \(k\in \mathbb P\), and similarly define the sets \(\mathbf{B}\), \(\mathbf{C}\), \(\mathbf{B}_k\) and \(\mathbf{C}_k\). (Of course these sets are only welldefined once their elements have been specified.)
For \(k\in \mathbb P\), define
noting that \(R_1<R_2<\cdots \). For each \(k\in \mathbb P\), let \(\alpha _k\in M\cap (\frac{1}{k},\frac{2}{k})\) be such that \(\phi (\alpha _k)>k(1+R_k)\); such an element \(\alpha _k\) exists by Lemma A.1.
We will now inductively construct \(\beta _k,\gamma _k\) (\(k\in \mathbb P\)) satisfying \(\beta _k+\gamma _k=4\), \(\gamma _k\in (1,1+\frac{1}{k}]\) and
For the base of the induction, we set \(\beta _1=\gamma _1=2\). We must show the following:
Lemma A.3
With the above notation, we have \(S_n(\mathbf{A}\cup \{2\})\cap B(l)=\emptyset \) for all \(l\in \mathbb P\) and \(n>n_l\).
Proof
Suppose to the contrary that there exists \(\varepsilon \in S_n(\mathbf{A}\cup \{2\})\cap B(l)\) for some \(l\in \mathbb P\) and \(n>n_l\). Then there exist integers \(c_i,d\in \mathbb N\) (\(i\in \mathbb P\)) such that
In particular, recalling the definition of B(l), we have \(l>\varepsilon>c_i\alpha _i>\frac{c_i}{i}\) for each \(i\in \mathbb P\), so that \(c_i<il\) for each i. Similarly \(l>2d\ge d\). Again recalling the definition of B(l), we also have
But \(\phi (\alpha _i)>i(1+R_i)\) for all i, so it follows that \(\phi (\alpha _i)\ge 0\) for all \(i\in \mathbb P\), and that \(\phi (\alpha _i)>l\) for \(i>l\). This gives \(c_i=0\) for all \(i>l\). Putting all of the above together, we have
a contradiction.\(\square \)
Now suppose \(k>1\), and that we have defined the sequences \(\beta _i,\gamma _i\) as desired for all \(i<k\). Let \(K>k\) be such that
Define the sets
Note that
It quickly follows that \(\big (\Gamma +1\big )(2K+p_k+1) < 2R_K\), and so there exists an integer \(p\in \mathbb Z\) such that
By Lemma A.1, we may fix some
Since \(\phi (\gamma _k)\in [p+K,p+K+p_k]_\mathbb Z\subseteq [p,p+2K+p_k]_\mathbb Z\subseteq (R_K,R_K)_\mathbb Z\), we have \(\phi (\gamma _k)<R_K;\) since \(\phi (\beta _k)=\phi (\gamma _k)\), it follows that \(\phi (\beta _k)<R_K\) as well. We also claim that
Indeed, we have \(\phi (\gamma _k)\in [p+K,p+K+p_k]_\mathbb Z\), so the set of all integers of distance at most K from \(\phi (\gamma _k)\) is contained in \([p,p+2K+p_k]_\mathbb Z\), and by (A.3) the latter interval is disjoint from \(\Gamma \). Thus, for any \(\omega \in \Omega \), since \({\mp }\omega \in \Gamma \), it follows that the distance from \(\phi (\gamma _k)\) to \({\mp }\omega \) is greater than K: i.e., \(\phi (\gamma _k)({\mp }\omega )>K\), completing the proof of (A.4).
Lemma A.4
With the above notation, we have \(S_n(\mathbf{A}\cup \mathbf{B}_k\cup \mathbf{C}_k)\cap B(l)=\emptyset \) for all \(l\in \mathbb P\) and \(n>n_l\).
Proof
Suppose to the contrary that there exists \(\varepsilon \in S_n(\mathbf{A}\cup \mathbf{B}_k\cup \mathbf{C}_k)\cap B(l)\) for some \(l\in \mathbb P\) and \(n>n_l\). Then there exist integers \(c_i,d_i,e_i\in \mathbb N\) such that
Since \(\beta _k+\gamma _k=\beta _1+\gamma _1\), we may assume without loss of generality that \(d_k=0\) or \(e_k=0\). But we note that \(d_k\) and \(e_k\) cannot both be zero, or else then \(\varepsilon \in S_n(\mathbf{A}\cup \mathbf{B}_{k1}\cup \mathbf{C}_{k1})\cap B(l)\), contradicting the assumption that \(\beta _i,\gamma _i\) (\(i=1,\ldots ,k1\)) have the desired properties. As in the proof of Lemma A.3, we have \(c_i<il\) for all \(i\in \mathbb P\).
Case 1. Suppose first that \(d_k=0\), so that \(e_k>0\) as just noted. Also, since each \(\beta _i,\gamma _i>1\) and each \(\alpha _i>0\), and since \(\varepsilon \in B(l)\), we have \(\sum _{i=1}^k(d_i+e_i)<\sum _{i=1}^k(d_i\beta _i+e_i\gamma _i)\le \varepsilon <l\). Next note that
from which it follows that
We now consider two subcases.
Case 1.1. Suppose \(l\ge K\). Then (A.5) gives
From this it follows that
But \(l+l^3<\frac{l^3}{2}+2l\) implies \(l^2<2\), a contradiction since \(l\ge K>1\).
Case 1.2. Now suppose \(l<K\). For \(i\ge K\) we have \(\phi (\alpha _i)>i(1+R_i)\ge K(1+R_K)\). Together with (A.5), it follows that for any such i,
so that \(c_i=0\) for all \(i\ge K\).
Setting \(t=e_k\ge 1\), we have
But also
and \(t=e_k\le \sum _{i\in \mathbb P}c_i + \sum _{i=1}^k(d_i+e_i) = n<n_K\). So it follows that \(\phi (\varepsilon )t\phi (\gamma _k)\in t\Omega \), say \(\phi (\varepsilon )t\phi (\gamma _k)=t\omega \). Then by (A.4),
But also from \(\varepsilon \in B(l)\), we have \(\phi (\varepsilon )<l<K\), so we have arrived at a contradiction again.
Case 2. The case in which \(e_k=0\) and \(d_k>0\) is almost identical, since \(\phi (\beta _k)=\phi (\gamma _k)\). \(\square \)
We are now ready to tie together the loose ends.
Proof of Proposition A.2
With respect to the sequences \(\alpha _i,\beta _i,\gamma _i\) (\(i\in \mathbb P\)) constructed above, conditions (i)–(iv) are immediate, while (v) follows from the fact that
for all \(n,l\in \mathbb P\). \(\square \)
We now use Proposition A.2 to construct a step set \(X\subseteq \mathbb Z_\times ^2\) with combination (V); cf. Table 1.
Example A.5
In all that follows, we keep the notation above: in particular, the irrational number \(\xi >0\), the monoid \(M=\{ {a+b\xi } : {a,b\in \mathbb Z,\ a+b\xi \ge 0} \}\) and the sequences \(\alpha _i,\beta _i,\gamma _i\) \((i\in \mathbb P)\). Also let
be the additive submonoid of \(\mathbb Z^2\) consisting of all lattice points on or above the line \(\mathscr {L}\) with equation \({x+\xi y=0}\). The map
is clearly a surjective monoid homomorphism. In fact, \(\psi \) is an isomorphism, as injectivity follows quickly from the irrationality of \(\xi \). For each \(i\in \mathbb P\), let
and put \(X=\{ {A_i,B_i,C_i} : {i\in \mathbb P} \}\). Also let \(E=(1,0)=\psi ^{1}(1)\). We claim that:

(i)
X does not satisfy the SLC,

(ii)
X satisfies the LC,

(iii)
X does not have the FPP,

(iv)
X has the BPP.
First note that (ii) is clear, as \(\mathscr {L}\) itself witnesses the LC (as \(\xi \) is irrational, the only lattice point on \(\mathscr {L}\) is O). Item (iii) follows quickly from the fact that \(\beta _i+\gamma _i=4\) for all \(i\in \mathbb P\); indeed, since \(\psi \) is an isomorphism, this implies that \(B_i+C_i=\psi ^{1}(4)=(4,0)=4E\) for all i, and hence \(\pi _X(4E)=\infty \).
To establish the remaining items, first define \(\eta =\sqrt{1+\xi ^2}\). For \(A=(u,v)\in N\) write \(\delta (A)\) for the (perpendicular) distance from A to \(\mathscr {L}\). Then by (2.7), and since \(u+v\xi \ge 0\) as \(A\in N\), we have
Next, let \(\mathscr {L}'\) and \(\mathscr {L}''\) be the lines obtained, respectively, by sliding \(\mathscr {L}\) a distance of \(\frac{1}{\eta }\) or \(\frac{3}{\eta }\) units into the halfplane on the side of \(\mathscr {L}\) containing X (or, equivalently, by sliding \(\mathscr {L}\) by 1 or 3 units to the right, since \(\delta (E)=\frac{1}{\eta }\)). This is all shown in Fig. 18. Now,
This shows that X contains points arbitrarily close to \(\mathscr {L}\), and consequently that:

(v)
no line parallel to \(\mathscr {L}\) witnesses the SLC.
We also have
This means that the points \(C_1,C_2,\ldots \) approach \(\mathscr {L}'\) from the right, while \(B_1,B_2,\ldots \) approach \(\mathscr {L}''\) from the left. Since the points \(C_1,C_2,\ldots \) are between the lines \(\mathscr {L}'\) and \(\mathscr {L}''\), and since a bounded region of \(\mathbb R^2\) contains only finitely many lattice points, the ycoordinates of \(C_1,C_2,\ldots \) are unbounded, either above or below or both; it follows (since \(B_i=4EC_i\) for all i) that the ycoordinates of \(B_1,B_2,\ldots \) are unbounded below or above or both, respectively. Thus, X contains points between \(\mathscr {L}'\) and \(\mathscr {L}''\) with arbitrarily large positive and negative ycoordinates, and it quickly follows that:

(vi)
\(\mathscr {L}\) is the only line through O that witnesses the LC.
Items (v) and (vi), together with Lemma 2.9(ii), show that X does not satisfy the SLC. Figure 18 depicts all the above, but only showing subsequences \(A_i\) (\(i\in I\)), and \(B_j,C_j\) (\(j\in J\)) with monotone ycoordinates (with the ycoordinates of \(A_i,C_j\) increasing, and those of \(B_j\) decreasing).
Finally, the BPP follows quickly from the properties of the \(\alpha _i,\beta _i,\gamma _i\) sequences. Indeed, let \(D\in \mathscr {A}_X\) be arbitrary, and fix some \(w\in \Pi _X(D)\). Write \(w=F_1\cdots F_k\), where \(F_1,\ldots ,F_k\in X\), so that \({D=F_1+\cdots +F_k}\). Now consider the real number \({\psi (D)\in M}\), and let \(l\in \mathbb P\) be such that \(\psi (D)\in B(l)\); the set \(B(l)\subseteq M\) was defined just before Proposition A.2. Now, \(\psi (D)=\psi (F_1)+\cdots +\psi (F_k)\), and \(\psi (F_1),\ldots ,\psi (F_k)\) all belong to \(\Sigma =\{ {\alpha _i,\beta _i,\gamma _i} : {i\in \mathbb P} \}\). This means that \(\psi (D)\in S_k(\Sigma )\cap B(l)\), and so Proposition A.2 gives \(\ell (w)=k\le n_l=l+l^3\). This shows that the set \(\{ {\ell (w)} : {w\in \Pi _X(D)} \}\) is contained in \(\{1,\ldots ,n_l\}\), and hence is finite. Since \(D\in \mathscr {A}_X\) was arbitrary, the BPP has been established.
Rights and permissions
About this article
Cite this article
East, J., Ham, N. Lattice Paths and Submonoids of \(\mathbb Z^2\). Ann. Comb. (2021). https://doi.org/10.1007/s00026021005463
Received:
Accepted:
Published:
Keywords
 Lattice paths
 Enumeration
 Commutative monoids
Mathematics Subject Classification
 05A15
 05C38
 05C12
 20M14
 05C20
 05C30
 20M13
 05A10