# Constructive Ramsey Numbers for Loose Hyperpaths

## Abstract

For positive integers *k* and \(\ell \), a *k*-uniform hypergraph is called a *loose path of length* \(\ell \), and denoted by \(P_\ell ^{(k)}\), if its vertex set is \(\{v_1, v_2, \ldots , v_{(k-1)\ell +1}\}\) and the edge set is \(\{e_i = \{ v_{(i-1)(k-1)+q} : 1 \le q \le k \},\ i=1,\dots ,\ell \}\), that is, each pair of consecutive edges intersects on a single vertex. Let \(R(P_\ell ^{(k)};r)\) be the *multicolor Ramsey number of a loose path* that is the minimum *n* such that every *r*-edge-coloring of the complete *k*-uniform hypergraph \(K_n^{(k)}\) yields a monochromatic copy of \(P_\ell ^{(k)}\). In this note we are interested in *constructive* upper bounds on \(R(P_\ell ^{(k)};r)\) which means that on the cost of possibly enlarging the order of the complete hypergraph, we would like to efficiently find a monochromatic copy of \(P_\ell ^{(k)}\) in every coloring. In particular, we show that there is a constant \(c>0\) such that for all \(k\ge 2\), \(\ell \ge 3\), \(2\le r\le k-1\), and \(n\ge k(\ell +1)r(1+\ln (r))\), there is an algorithm such that for every *r*-edge-coloring of the edges of \(K_n^{(k)}\), it finds a monochromatic copy of \(P_\ell ^{(k)}\) in time at most \(cn^k\).

## 1 Introduction

*k*-uniform hypergraph is called a

*loose path of length*\(\ell \), and denoted by \(P_\ell ^{(k)}\), if its vertex set is \(\{v_1, v_2, \ldots , v_{(k-1)\ell +1}\}\) and the edge set is \(\{e_i = \{ v_{(i-1)(k-1)+q} : 1 \le q \le k \},\ i=1,\dots ,\ell \}\), that is, for \(\ell \ge 2\), each pair of consecutive edges intersects on a single vertex (see Fig. 1), while for \(\ell =0\) and \(\ell =1\) it is, respectively, a single vertex and an edge. For \(k=2\) the loose path \(P_{\ell }^{(2)}\) is just a (graph) path on \(\ell +1\) vertices.

Let *H* be a *k*-uniform hypergraph and \(r\ge 2\) be an integer. The *multicolor Ramsey number* *R*(*H*; *r*) is the minimum *n* such that every *r*-edge-coloring of the complete *k*-uniform hypergraph \(K_n^{(k)}\) yields a monochromatic copy of *H*.

*constructive*bounds which means that on the cost of possibly enlarging the order of the complete hypergraph, we would like to efficiently find a monochromatic copy of a target hypergraph

*F*in every coloring. Clearly, by examining all copies of

*F*in \(K^{(k)}_n\) for \(n\ge R(F;r)\), we can always find a monochromatic one in time \(O(n^{|V(F)|})\). Hence, we are interested in complexity not depending on

*F*, preferably \(O(n^k)\). Given a

*k*-graph

*F*, a constant \(c>0\) and integers

*r*and

*n*, we say that a property \(\mathcal {R}(F,r,c,n)\) holds if there is an algorithm such that for every

*r*-edge-coloring of the edges of \(K_n^{(k)}\), it finds a monochromatic copy of

*F*in time at most \(cn^k\). For graphs, a constructive result of this type can be deduced from the proof of Lemma 3.5 in Dudek and Prałat [2].

### Theorem 1

**(**[2]**)** **.** There is a constant \(c>0\) such that for all \(\ell \ge 3\), \(r\ge 2\), and \(n\ge 2^{r+1} \ell \), property \(\mathcal {R}(P_\ell ^{(2)},r,c,n)\) holds.

Our goal is to obtain similar constructive results for loose hyperpaths. However, to have a reference point we first state, without proof, a general (nonconstructive) upper bound, obtained iteratively for all \(k\ge 2\), starting from the Erdős-Gallai bound (3).

### Theorem 2

For all \(k\ge 2\), \(\ell \ge 3\), and \(r\ge 2\) we have \(R(P_\ell ^{(k)};r) \le (k-1)\ell r\).

*n*given in Theorem 1, the proof of Theorem 2 can be adapted to yield a constructive result.

### Theorem 3

There is a constant \(c>0\) such that for all \(k\ge 2\), \(\ell \ge 3\), \(r\ge 2\), and \(n\ge 2^{r+1}\ell + (k-2)\ell r\), property \(\mathcal {R}(P_\ell ^{(k)},r,c,n)\) holds.

Our main constructive bound (valid only for \(r\le k\)) utilizes a more sophisticated algorithm.

### Theorem 4

There is a constant \(c>0\) such that for all \(k\ge 2\), \(\ell \ge 3\), \(2\le r\le k\), and \(n\ge k(\ell +1)r\left( 1+\frac{1}{k-r+1}+\ln \left( 1+\frac{r-2}{k-r+1}\right) \right) \), property \(\mathcal {R}(P_\ell ^{(k)},r,c,n)\) holds. For \(r=2\), the bound on *n* can be improved to \(n\ge (2k-2)\ell +k\).

*n*in Theorem 4 is very close to that in (5). For \(r=k\ge 3\) the bound assumes a simple form

### Corollary 1

There is a constant \(c>0\) such that for all \(k\ge 3\), \(\ell \ge 3\), \(3\le r\le k-1\), and \(n\ge k(\ell +1)r\left( 1+\ln \left( 1+\frac{r-1}{k-r}\right) \right) \), property \(\mathcal {R}(P_\ell ^{(k)},r,c,n)\) holds.

We can further replace the lower bound on *n* by (slightly weaker but simpler) \(n\ge k(\ell +1)r(1+\ln r)\).

Observe that in several instances the lower bound on *n* in Theorem 4 (and also in Corollary 1) is significantly better (that means smaller) than the one in Theorem 3 (for example for large *k* and \(k/2 \le r \le k\)). On the other hand, for some instances the bounds in Theorems 3 and 4 are basically the same. For example, for fixed *r*, large *k* and \(\ell \ge k\) the lower bound is \(k\ell r + o(k\ell )\). This also matches asymptotically the bound in Theorem 2.

In this note we only present the proof of Theorem 4.

## 2 Proof of Theorem 4

Given integers *k* and \(2\le m\le k\), and disjoint sets of vertices \(W_1,\dots , W_{m-1}\), \(V_m\), *an m-partite complete k-graph* \(K^{(k)}(W_1,\dots , W_{m-1},V_m)\) consists of all *k*-tuples of vertices with exactly one element in each \(W_i\), \(i=1,\dots ,m-1\), and \(k-m+1\) elements in \(V_m\). Note that if \(|W_i|\ge \ell \), \(i=1,\dots ,m-1\), and \(|V_m|\ge \ell (k-m)+1\) for \(m\le k-1\) (or \(|V_m|\ge \ell \) for \(m=k\)), then \(K^{(k)}(W_1,\dots , W_{m-1},V_m)\) contains \(P_\ell ^{(k)}\).

We now give a description of the algorithm. As an input there is an *r*-coloring of the edges of the complete *k*-graph \(K_n^{(k)}\). The algorithm consists of \(r-1\) implementations of the depth first search (DFS) subroutine, each round exploring the edges of one color only and either finding a monochromatic copy of \(P_\ell ^{(k)}\) or decreasing the number of colors present on a large subset of vertices, until after the \((r-1)\)st round we end up with a monochromatic complete *r*-partite subgraph, large enough to contain a copy of \(P_\ell ^{(k)}\).

During the *i*th round, while trying to build a copy of the path \(P_\ell ^{(k)}\) in the *i*th color, the algorithm selects a subset \(W_{i,i}\) from a set of still available vertices \(V_i\subseteq V\) and, by the end of the round, creates trash bins \(S_i\) and \(T_i\). The search for \(P_\ell ^{(k)}\) is realized by a DFS process which maintains a working path *P* (in the form of a sequence of vertices) whose endpoints are either extended to a longer path or otherwise put into \(W_{i,i}\). The round is terminated whenever *P* becomes a copy of \(P_\ell ^{(k)}\) or the size of \(W_{i,i}\) reaches certain threshold, whatever comes first. In the latter case we set \(S_i=V(P)\).

To better depict the extension process, we introduce the following terminology. An edge of \(P_\ell ^{(k)}\) is called *pendant* if it contains at most one vertex of degree two. The vertices of degree one, belonging to the pendant edges of \(P_\ell ^{(k)}\) are called *pendant*. In particular, in \(P_1^{(k)}\) all its *k* vertices are pendant. For convenience, the unique vertex of the path \(P_0^{(k)}\) is also considered to be pendant. Observe that for \(t\ge 0\), to extend a copy *P* of \(P_t^{(k)}\) to a copy of \(P_{t+1}^{(k)}\) one needs to add a new edge which shares exactly one vertex with *P* and that vertex has to be pendant in *P*. Our algorithm may also come across a situation when \(P=\emptyset \), that is, *P* has no vertices at all. Then by an extension of *P* we mean any edge whatsoever.

The sets \(W_{i,i}\) have a double subscript, because they are updated in the later rounds to \(W_{i,i+1}\), \(W_{i,i+2}\), and so on, until at the end of the \((r-1)\)st round (unless a monochromatic \(P_\ell ^{(k)}\) has been found) one obtains sets \(W_i:= W_{i,r-1}\), \(i=1,\dots , r-1\), a final trash set \(T = \bigcup _{i=1}^{r-1} T_{i} \cup \bigcup _{i=1}^{r-1} S_{i}\) and the remainder set \(V_r=V\setminus (\bigcup _{i=1}^{r-1} W_i\cup T)\) such that all *k*-tuples of vertices in \(K^{(k)}(W_1,\dots ,W_{r-1},V_r)\) are of color *r*. As an input of the *i*th round we take sets \(W_{j,i-1}\), \(j=1,\dots , i-1\), and \(V_{i-1}\), inherited from the previous round, and rename them to \(W_{j,i}\), \(j=1,\dots , i-1\), and \(V_{i}\). We also set \(T_i=\emptyset \) and \(P=\emptyset \), and update all these sets dynamically until the round ends.

*i*th round, we deal separately with the 1st and 2nd round.

**Round 1.** Set \(V_1=V\), \(W_{1,1}=\emptyset \), and \(P=\emptyset \). Select an arbitrary edge *e* of color one (say, *red*), add its vertices to *P* (in any order), reset \(V_1:=V_1\) \(\setminus e\), and try to extend *P* to a red copy of \(P_2^{(k)}\). If successful, we appropriately enlarge *P*, diminish \(V_1\), and try to further extend *P* to a red copy of \(P_3^{(k)}\). This procedure is repeated until finally we either find a red copy of \(P_\ell ^{(k)}\) or, otherwise, end up with a red copy *P* of \(P_t^{(k)}\), for some \(1\le t\le \ell -1\), which cannot be extended any more. In the latter case we shorten *P* by moving all its pendant vertices to \(W_{1,1}\) and try to extend the remaining red path again. When \(t\ge 2\), the new path has \(t-2\) edges. If \(t=2\), *P* becomes a single vertex path \(P_0^{(k)}\), while if \(t=1\), it becomes empty.

*n*. This means that the completely blue copy of \(K^{(k)}(W_{1,1},V_1)\) is large enough to contain a copy of \(P_\ell ^{(k)}\).

**Round 2.** We begin with resetting \(W_{1,2}:=W_{1,1}\) and \(V_2 := V_1\), and setting \(P:=\emptyset \), \(W_{2,2}=\emptyset \), and \(T_2 := \emptyset \). In this round only the edges of color two (say, blue) belonging to \(K^{(k)}(W_{1,2}, V_2)\) are considered. Let us denote the set of these edges by \(E_2\). We choose an arbitrary edge \(e\in E_2\), set \(P=e\), and try to extend *P* to a copy of \(P_2^{(k)}\) in \(E_2\) but only in such a way that the vertex of *e* belonging to \(W_{1,2}\) remains of degree one on the path. Then, we try to extend *P* to a copy of \(P_3^{(k)}\) in \(E_2\), etc., always making sure that the vertices in \(W_{1,2}\) are of degree one. Eventually, either we find a blue copy of \(P_\ell ^{(k)}\) or end up with a blue copy *P* of \(P_t^{(k)}\), for some \(1\le t\le \ell -1\), which cannot be further extended. We move the pendant vertices of *P* belonging to \(W_{1,2}\) to the trash set \(T_2\), while the remaining pendant vertices of *P* go to \(W_{2,2}\). Then we try to extend the shortened path again.

**Round**

*i*, \(3\le i\le r-1\). We begin the

*i*th round by resetting \(W_{1,i}:=W_{1,i-1},\dots ,W_{i-1,i}:=W_{i-1,i-1}\), and \(V_i:=V_{i-1}\), and setting \(P:=\emptyset \), \(W_{i,i}:=\emptyset \), and \(T_i:=\emptyset \). We consider only edges of color

*i*in \(K^{(k)}(W_{1,i},\dots , W_{i-1,i},V_{i})\). Let us denote the set of such edges by \(E_i\).

*P*using the edges of \(E_i\), but only in such a way that the vertices of degree two in

*P*belong to \(V_i\). When an extension is no longer possible and \(P\ne \emptyset \), we move the pendant vertices of

*P*belonging to \(\bigcup _{j=1}^{i-1}W_{j,i}\) to the trash set \(T_i\), while the remaining pendant vertices of

*P*go to \(W_{i,i}\) (see Fig. 2). Then we try to extend the shortened path. We terminate the

*i*th round as soon as \(P=\emptyset \) cannot be extended or

*i*th round ends, we have (18) for all \(1\le j\le i\). We also have \(|S_{i}| \le |V(P_{\ell -1}^{(k)})|\), \(|T_{i}| \le t_{i}\), and \(V_{i} = V \setminus \bigcup _{j=1}^{i} (W_{j,i} \cup S_j \cup T_j )\) such that \(K^{(k)}(W_{1,i},\dots , W_{i-1,i},W_{i,i},V_{i})\) has no edges of color \(1,2,\dots ,\) or

*i*.

*r*.

To prove the \(O(n^k)\) complexity time, observe that in the worst-case scenario we need to go over all edges colored by the first \(r-1\) colors and no edge is visited more than once.

## References

- 1.Davies, E., Jenssen, M., Roberts, B.: Multicolour Ramsey numbers of paths and even cycles. Eur. J. Comb.
**63**, 124–133 (2017)MathSciNetCrossRefzbMATHGoogle Scholar - 2.Dudek, A., Prałat, P.: On some multicolor Ramsey properties of random graphs. SIAM J. Discrete Math.
**31**(3), 2079–2092 (2017)MathSciNetCrossRefzbMATHGoogle Scholar - 3.Erdős, P., Gallai, T.: On maximal paths and circuits of graphs. Acta Math. Acad. Sci. Hungar
**10**, 337–356 (1959)MathSciNetCrossRefzbMATHGoogle Scholar - 4.Faudree, R.J., Schelp, R.H.: Path Ramsey numbers in multicolorings. J. Comb. Theory Ser. B
**19**(2), 150–160 (1975)MathSciNetCrossRefzbMATHGoogle Scholar - 5.Figaj, A., Łuczak, T.: The Ramsey number for a triple of long even cycles. J. Comb. Theory Ser. B
**97**(4), 584–596 (2007)MathSciNetCrossRefzbMATHGoogle Scholar - 6.Gerencsér, L., Gyárfás, A.: On Ramsey-type problems. Ann. Univ. Sci. Budapest. Eötvös Sect. Math.
**10**, 167–170 (1967)MathSciNetzbMATHGoogle Scholar - 7.Gyárfás, A., Ruszinkó, M., Sárközy, G., Szemerédi, E.: Three-color Ramsey numbers for paths. Combinatorica
**27**(1), 35–69 (2007)MathSciNetCrossRefzbMATHGoogle Scholar - 8.Gyárfás, A., Ruszinkó, M., Sárközy, G., Szemerédi, E.: Corrigendum: three-color Ramsey numbers for paths. Combinatorica
**28**(4), 499–502 (2008)MathSciNetCrossRefzbMATHGoogle Scholar - 9.Sárközy, G.N.: On the multi-colored Ramsey numbers of paths and even cycles. Electron. J. Comb.
**23**(3), 3–53 (2016)MathSciNetzbMATHGoogle Scholar