# Basis Number of Graphs Excluding Minors

Colin Geniet, Ugo Giocanti

► To cite this version:

Colin Geniet, Ugo Giocanti. Basis Number of Graphs Excluding Minors. 2026. hal-05448270

HAL Id: hal-05448270

https://hal.science/hal-05448270v1

Preprint submitted on 8 Jan 2026

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons CC BY 4.0 - Attribution - International License
# Basis Number of Graphs Excluding Minors

Colin Geniet*¹ and Ugo Giocanti†²

¹Discrete Mathematics Group, Institute for Basic Science, Daejeon, South Korea

²Faculty of Mathematics and Computer Science, Jagiellonian University, Kraków,
Poland

## Abstract

The *basis number* of a graph $G$ is the minimum $k$ such that the cycle space of $G$ is generated by a family of cycles using each edge at most $k$ times. A classical result of Mac Lane states that planar graphs are exactly graphs with basis number at most 2, and more generally, graphs embedded on a fixed surface are known to have bounded basis number. Generalising this, we prove that graphs excluding a fixed minor $H$ have bounded basis number.

Our proof uses the Graph Minor Structure Theorem, which requires us to understand how basis number behaves in tree-decompositions. In particular, we prove that graphs of treewidth $k$ have basis number bounded by some function of $k$. We handle tree-decompositions using the proof framework developed by Bojańczyk and Pilipczuk in their proof of Courcelle's conjecture.

Combining our approach with independent results of Miraftab, Morin and Yuditsky (2025) on basis number and path-decompositions, one can moreover improve our upper bound to a polynomial one: there exists an absolute constant $c > 0$ such that every $H$-minor free graph has basis number $|H|^c$.

## 1 Introduction

Given two graphs $G = (V, E_G), H = (V, E_H)$ with the same vertex set $V$, one can define their $sum\ G \oplus H$ as the graph with vertex set $V$, and whose edge set is the symmetric difference $E_G \Delta E_H$. The *cycle space* of a (finite) graph $G$ is the set of all subgraphs of $G$ that can be expressed as a sum of cycles of $G$. This corresponds exactly to the set of subgraphs of $G$ whose degrees are all even. When $G$ is planar, a basic observation is that the set of *facial* cycles forms a *cycle basis* of $G$, i.e. a generating set of the cycle space. In particular, this gives a cycle basis $\mathcal{B}$ such that each edge of $G$ appears it at most two elements of $\mathcal{B}$. Mac Lane proved that this gives in fact a characterisation of planar graphs.

**Theorem 1.1** (Mac Lane's planarity criterion, [17]). A graph $G$ is planar if and only if there exists a cycle basis $\mathcal{B}$ of $G$ for which each edge of $G$ appears in at most two elements of $\mathcal{B}$.

<footnote>*Supported by the Institute for Basic Science (IBS-R029-C1).</footnote>

<footnote>†Supported by the National Science Center of Poland under grant 2022/47/B/ST6/02837 within the OPUS 24 program.</footnote>
More generally, we call *edge-congestion* (or just *congestion*) of a cycle basis $\mathcal{B}$ the smallest integer $k$ such that each edge of $G$ appears in at most $k$ cycles of $\mathcal{B}$. Inspired by Theorem 1.1, Schmeichel [26] defined the *basis number* of a graph $G$, which we denote by $\text{bn}(G)$, as the minimum edge-congestion over all cycle bases of $G$. He proved that cliques have basis number only 3, yet there are graphs with arbitrarily large basis number, and also that — of particular interest to us — graphs embedded in the orientable surface with genus $g$ have basis number at most $2g+2$. Recently, this result was significantly improved by Lehner and Miraftab.

**Theorem 1.2** ([15, Theorem 4]). If $G$ is a graph embeddable in a surface (orientable or not) with genus at most $g$, then $\text{bn}(G) = O(\log(g)^2)$.

A natural question, which also appeared in an early version of [15], is whether the aforementioned results in the planar and more generally in the bounded genus case generalise to proper minor-closed classes: does every graph excluding a fixed minor $H$ have basis number upper bounded by a constant that only depends of $H$? Our main result is a positive answer to this question.

**Theorem 1.3.** There exists a function $f_{1.3}: \mathbb{N} \to \mathbb{N}$ such that for any graph $H$, any $H$-minor free graph $G$ satisfies $\text{bn}(G) \le f_{1.3}(|H|)$.

Our proof gives a double exponential bound $f_{1.3}(t) = 2^{2^{O(t^2)}}$. As discussed in Section 1.1 below, Miraftab, Morin, and Yuditsky [20] independently proved one of the key results we use to establish Theorem 1.3, with a significantly better bound than ours. Using their result, the bound $f_{1.3}$ can be improved to a polynomial function.

A class of graphs is called *monotone* if it is closed under taking subgraphs. Let us observe that Theorem 1.3 can be rephrased as a characterisation of bounded basis number among monotone classes of graphs.

**Corollary 1.4.** Let $\mathcal{C}$ be a monotone class of graphs. Then $\mathcal{C}$ has bounded basis number if and only if all graphs in $\mathcal{C}$ exclude some fixed graph $H$ as a minor.

Indeed, Theorem 1.3 proves the right-to-left implication. Conversely, if $\mathcal{C}$ is a monotone graph class with bounded basis number, then its *minor closure* (i.e. the class of all minors of graphs in $\mathcal{C}$) also has bounded basis number, since contracting edges cannot increase the basis number (see e.g. [1, Lemma 3.1]). Thus, as there exists some graphs with arbitrarily large basis number [26], the minor closure of $\mathcal{C}$ cannot contain all graphs, i.e. $\mathcal{C}$ excludes some fixed graph $H$ as a minor.

Our approach to prove Theorem 1.3 uses the Graph Minor Structure Theorem of Robertson and Seymour [24], a cornerstone of the Graph Minors series. Avoiding any formal statement for now (we refer to Section 7 for definitions and for a more detailed statement), it shows that for any fixed $H$, all $H$-minor free graphs can be constructing thanks to the following procedure:

1. taking graphs embedded on a fixed surface,

2. glueing a bounded number of *vortices of bounded width* inside the faces,

3. adding a bounded number of *apices* (i.e. vertices with arbitrary adjacencies to the rest of the graph),
4. and finally combining the graphs obtained in the first three steps by doing some clique-sums of bounded order.

To prove Theorem 1.3, we thus want to show that each of these steps preserves bounded basis number. Theorem 1.2 handles the case of graphs embedded on a surface, and it is simple to show that adding $\ell$ apices increases the basis number by at most $2\ell$ (see Lemma 2.4). Glueing vortices requires some more involved topological arguments, but our approach is conceptually quite natural, so we will not discuss it here. What remains is thus to understand how basis number behaves with respect to clique-sums of bounded order, or equivalently tree-decompositions of bounded adhesion (see Section 2 for definitions related to tree-decompositions).

First, we show that graphs with bounded treewidth have bounded basis-number.

**Theorem 1.5.** There exists a function $f_{1.5}: \mathbb{N} \to \mathbb{N}$ such that for every $k \ge 0$, every graph with treewidth $k$ has basis number at most $f_{1.5}(k)$.

Here again, our proof gives the exponential bound $f_{1.5}(k) = 2^{2^{O(k^2)}}$, but this can be improved to a polynomial thanks to [20], see Section 1.1.

Theorem 1.5 does not apply to tree-decompositions obtained through the Graph Minor Structure Theorem, as the latter only have bounded adhesions, but not necessarily bounded width. Our second main result is the following, whose statement is more technical, but which gives some sufficient conditions for a tree-decomposition with bounded adhesion to preserve the property of having bounded basis number. This will allow to handle the last part of our proof of Theorem 1.3.

**Theorem 1.6.** There exists a function $f_{1.6}: \mathbb{N}^2 \to \mathbb{N}$ such that the following holds. Let $G$ be a monotone class of graphs such that each graph in $G$ has basis number at most $b$, and let $G$ be a graph with a tree-decomposition with adhesion at most $k$ and whose torsos are all in $G$. Then

$$ \mathrm{bn}(G) \le f_{1.6}(b, k). $$

Once again, our bound is exponential $f_{1.6}(b, k) = b \cdot 2^{2^{O(k^2)}}$, and improves to a polynomial thanks to [20].

Our proofs of Theorems 1.5 and 1.6 are based on techniques developed by Bojańczyk and Pilipczuk [3] in their proof of Courcelle's conjecture on MSO-definable tree-decompositions, see Section 1.2 for an overview.

## 1.1 Polynomial bounds

One of the steps of our proof consists in dealing separately with the case of graphs of bounded pathwidth, and more generally with path-decompositions of bounded adhesion.

Independently from our work, Miraftab, Morin, and Yuditsky proved that graphs of pathwidth $k$ in fact have linear basis number.

**Theorem 1.7 ([20]).** Any graph with pathwidth $k$ has basis number at most $4k$.
It turns out that the bounded pathwidth case is the only reason for the double-exponential $2^{2^{O(k^2)}}$ bound in our proof of Theorem 1.5. Indeed, following the techniques of [3], the first half of our proof shows that graphs of bounded pathwidth have bounded basis number, using a Ramsey-like result from semigroup theory known as Simon's Factorisation Forests Theorem. The double-exponential bound on basis number in Theorem 1.5 already appears at this step. The second half of our proof — generalising from bounded pathwidth to bounded treewidth — only increases the basis number polynomially.

The work of Miraftab, Morin, and Yuditsky thus solves this bottleneck, and combining Theorem 1.7 with the second half of our proof of Theorem 1.5, one can obtain a general polynomial bound on basis number in terms of the treewidth.

**Corollary 1.8** ([20] and our results). Any graph with treewidth $k$ has basis number at most $O(k^5)$.

The proof technique of Miraftab, Morin and Yuditsky generalises to graphs admitting some path-decompositions with bounded adhesion, whose parts have bounded basis number, with the following polynomial bound.

**Theorem 1.9** ([20]). Let $b, k \in \mathbb{N}$ and let $G$ be a graph admitting a path-decomposition of adhesion $k$, in which each part has basis number at most $b$. Then

$$ \mathrm{bn}(G) \le b + O(k \log(k)^2). $$

Again, combining Theorem 1.9 with our proof of Theorem 1.6, one can obtain the improved polynomial bound $f_{1.6}(b, k) = O((b + k \log(k)^2) \cdot k^4)$.

Combining this with the recent polynomial bounds in the Graph Minor Structure Theorem obtained by Gorksy, Seweryn, and Wiederrecht [10], this in turn implies that one can obtain a polynomial bound for Theorem 1.3.

**Corollary 1.10.** There exists a constant $c \le 32210$ such that for every fixed graph $H$ and every $H$-minor free graph $G$, we have

$$ \mathrm{bn}(G) = O(|H|^c). $$

## 1.2 Overview of the proof of Theorem 1.6

A very natural approach to prove Theorems 1.5 and 1.6 is the following. Consider a tree-decomposition $(T, \beta)$ of $G$, and for each bag $\beta(t)$ of $(T, \beta)$, choose a basis $B_t$ for $G[\beta(t)]$ with small congestion. One then wants to combine all the $B_t$ into a low congestion basis for $G$. It quickly becomes apparent that for this approach to work, any cycle $C$ going through $\beta(t)$ should project to some cycle inside $\beta(t)$, and to this end one should not consider the subgraph of $G$ induced by $\beta(t)$, but rather its *torso*, where one adds new edges corresponding to all connections made by paths in $G$ outside $G[\beta(t)]$.

Now imagine that $C$ is a cycle in the basis $B_t$ which uses one of these edges $e$ created in the torso of $t$. We want to use $C$ as part of a basis of the cycle space of $G$, and this requires replacing $e$ (which does not exist in $G$), by some path in $G$. Naturally, this may happen for any edge $e$ added in any torso of $(T, \beta)$, and one should care about the congestion of the family of paths used to replace all these edges. This leads to the following result (see Theorem 3.1 for a more precise statement), whose proof uses elementary reasoning on cycle bases.
**Theorem 1.11.** Let $G$ be a graph, and $(T, \beta)$ a tree-decomposition of $G$ with bounded adhesion, whose torsos have bounded basis number. For each edge $e$ created in each torso of $(T, \beta)$, pick a path in $G$ joining the endpoints of $e$, and assume that the family of all these paths has bounded congestion. Then $G$ has bounded basis number.

Unfortunately, the assumptions from Theorem 1.11 fail even in some very simple cases: in a long cycle, one can observe that no tree-decomposition of bounded width satisfies these hypotheses. Nevertheless, this path system assumption turns out to be extremely similar to the conditions used by Bojańczyk and Pilipczuk in their proof of Courcelle's conjecture [3]. Using the proof framework they developed, we are able to reduce Theorems 1.5 and 1.6 to Theorem 1.11.

This is done in two stages. The first only considers path-decompositions, and applies Simon's Factorisation Forests Theorem to obtain some regularity conditions on the connections between the different adhesions of the path-decomposition. After removal of a bounded number of vertices, these conditions give the path system needed to apply Theorem 1.11. Note that in view of the results from [20], this approach gives suboptimal bounds.

For the second stage, we use a technical result Bojańczyk and Pilipczuk, namely [3, Lemma 5.9]. This result implies that any graph $G$ of treewidth $k$ has a tree-decomposition with bounded adhesions, whose torsos have bounded pathwidth, and with a path system as required by Theorem 1.11. Together with the previous results, this immediately implies Theorem 1.5. To prove Theorem 1.6, we need to generalise [3, Lemma 5.9] to tree-decompositions with small adhesions but unbounded width. Though quite technical, the ideas remain fundamentally the same as in [3].

**Structure of the paper** We introduce in Section 2 all basic definitions and properties related to graphs, basis numbers and tree-decompositions. Then, in Section 3, we prove Theorem 3.1, which gives some simple sufficient condition for a tree-decomposition of bounded adhesion to preserve basis number. This result will be extensively used in all subsequent sections.

Section 4 proves Theorem 1.6 in the special case of path-decompositions using Simon's Forest Factorisation Theorem, and in particular shows that graphs of bounded path-width have bounded basis number. Then, in Section 5 we combine the results of the previous two sections with [3, Lemma 5.9] to prove Theorem 1.5. To further obtain Theorem 1.6, we prove in Section 6 a generalisation of [3, Lemma 5.9] to tree-decompositions of unbounded width.

We then explain in Section 7 how to combine Theorem 1.6 and the Graph Minor Structure Theorem in order to derive a proof of Theorem 1.3. This part still requires some technical work and the use of known results on graphs embedded in surfaces to handle vortices. Finally, we give in Section 8 some examples of graph families with unbounded basis number, and conclude with some related questions and possible future directions.

# 2 Preliminaries

We introduce in Section 2.1 some basic notions on graphs, and give then in Section 2.2 the definition of the basis number of a graph, together with some
basic first properties. Section 2.3 defines standard notions related to tree-
decompositions, as well as some additional terminology from [3].

**2.1 Graphs**

In the whole paper, if *k* is a non-negative integer, we let [*k*] denote the set
{1, ..., *k*} of integers.

Unless stated otherwise, all the graphs we will consider are finite, unoriented
and without loops or multi-edges. A *path* *P* in *G* is a sequence *v*₁...*v*ₖ of
pairwise distinct vertices such that for each *i* ∈ [*k* − 1], we have *v*ᵢ*v*ᵢ₊₁ ∈ *E*(*G*).
Throughout the paper, a path *P* will be identified with the subgraph of *G*
consisting of the *v*ᵢ's and the edges *v*ᵢ*v*ᵢ₊₁. The *length* of *P* is its number *k* − 1
of edges. If *v*₁ = *x* and *v*ₖ = *y*, then we say that *P* is a *xy-path*. We let *d*<sub>*G*</sub>(*,·)
denote the shortest path metric in *G*, and let *diam*(*G*) denote the *diameter* of
the graph *G*, that is, the largest possible distance between two vertices.

For every graph G, and every subset X ⊆ V(G) of vertices, we let G[X] :=
(X, E(G) ∩ (X/2)) denote the subgraph of G induced by X, and we set G − X :=
G[V(G) \ X]. Similarly, for every F ⊆ E(G), we set G − F := (V(G), E(G) \ F),
and for simplicity, for every v ∈ V(G), e ∈ E(G) we write G − v := G − {v}
and G − e := G − {e}. A spanning subgraph of G is a subgraph containing all
vertices of G.

For every two graphs $G_1, G_2$, whose vertex and edge sets possibly intersect,
their union is the graph $G_1 \cup G_2 := (V(G_1) \cup V(G_2), E(G_1) \cup E(G_2))$, and
similarly the intersection is $G_1 \cap G_2 := (V(G_1) \cap V(G_2), E(G_1) \cap E(G_2))$.

Remark 2.1. Let $G$ be a connected graph. For every family $H_1, \dots, H_k$ of pairwise vertex-disjoint subgraphs of $G$, there exists some subforest $T$ of $G$ such that the graph $T \cup H_1 \cup \dots \cup H_k$ is connected, and such that the cycles from $G$ are exactly the ones of $H_1 \cup \dots \cup H_k$. We call such a forest $T$ a *connecting forest* for $H_1, \dots, H_k$ in $G$.

The *square* of a graph *G* is the graph *G*² with vertex set *V*(*G*) and which contains an edge between every two vertices at distance at most 2 in *G*. Note that we always have *diam*(*G*) ≤ 2·*diam*(*G*²).

If $G$ is a graph, for every $u \in V(G)$, we let $N_G[u] := \{v \in V(G) : uv \in E(G)\} \cup \{u\}$ denote the closed neighbourhood of $u$ in $G$, and for every subset $X \subseteq V(G)$, we set $N_G[X] := \bigcup_{u \in X} N_G[u]$. A dominating set in a graph $G$ is a subset $D \subseteq V(G)$ such that $V(G) = N_G[D]$.

Remark 2.2. Let $G$ be a connected graph and $D \subseteq V(G)$ be a dominating set of $G$. Then $\mathrm{diam}(G) \le 3|D| - 1$.

Proof. Let $x, y \in V(G)$ and consider a shortest *xy*-path *P* in *G*. Then note that for every *u* ∈ *D*, *P* must intersect $N_G[u]$ in at most 3 vertices. This implies that *P* has at most $3|D|$ vertices. □

In a graph *G*, a *separation* is a pair (*X*, *Y*) of subsets of vertices such that
*V*(G) = *X* ∪ *Y*, and there are no edges joining *X* \ *Y* and *Y* \ *X*, i.e. these two
sets are separated by *X* ∩ *Y*. The *order* of the separation is |*X* ∩ *Y*|.
## 2.2 Basis number

Given a (finite) graph $G$, we are interested in subsets of $E(G)$. They form an $\mathbb{F}_2$-vector space, where the sum operation is the symmetric difference, denoted by $X \oplus Y$. We frequently identify subgraphs of $G$ with their set of edges. We call $\mathbb{F}_2$-cycle a subgraph of $G$ whose vertices all have even degree, and reserve the name cycle for the graph theoretic notion, i.e. connected subgraphs whose vertices all have degree 2. Any $\mathbb{F}_2$-cycle can be obtained as disjoint union of cycles. The set of all $\mathbb{F}_2$-cycles is a vector subspace of $\mathbb{F}_2^{E(G)}$ called the cycle space of $G$. A basis for the cycle space is called a cycle basis. A well-known and easy fact is that the cycle space of a finite connected graph $G$ has dimension exactly $|E(G)| - |V(G)| + 1$.

The (edge-)congestion of a family $\mathcal{X} = \{X_1, \dots, X_n\}$ of subgraphs of $G$ is

$$ \max_{e \in E(G)} |\{i : e \in X_i\}|. $$

The basis number of $G$, denoted $\text{bn}(G)$, is the minimum edge-congestion of a cycle basis of $G$. One can always find a cycle basis with minimum congestion consisting only of cycles.

The next result is a fundamental property of basis number (see for example [1, Lemma 3.8] in the case where $G_X \cap G_Y$ is spanning).

**Lemma 2.3.** Let $G$ be a graph with two subgraphs $G_X, G_Y$ such that $G = G_X \cup G_Y$, and $G_X \cap G_Y$ is connected. If $B_X, B_Y$ are cycle bases of $G_X$ and $G_Y$ respectively, then $B_X \cup B_Y$ generates the cycle space of $G$. In particular,

$$ \text{bn}(G) \le \text{bn}(G_X) + \text{bn}(G_Y). $$

*Proof.* Take $C$ an $\mathbb{F}_2$-cycle in $G$, and partition it into $C = C_X \oplus C_Y$ such that $C_X \subseteq G_X$ and $C_Y \subseteq G_Y$ (these are not necessarily $\mathbb{F}_2$-cycles). Let $U$ be the set of vertices with odd degree in $C_X$. Clearly $U$ is also equal to the set of odd-degree vertices in $C_Y$, hence $U \subseteq V(G_X \cap G_Y)$. Moreover, $|U|$ must be even.

Since $G_X \cap G_Y$ is connected, there is some subgraph $H \subseteq G_X \cap G_Y$ such that $U$ is exactly the set of odd-degree vertices of $H$: if the vertices of $U$ are $u_1, \dots, u_{2n}$ ordered arbitrarily, then pick an $u_{2i-1}u_{2i}$-path $P_i$ in $G_X \cap G_Y$ for each $i \in [n]$, and define $H = \bigoplus_{i=1}^n P_i$. Now $C'_X := C_X \oplus H$ and $C'_Y := C_Y \oplus H$ are $\mathbb{F}_2$-cycles in $G_X$ and $G_Y$ respectively, and $C = C'_X \oplus C'_Y$, proving the result. $\square$

In the remainder of Section 2.2, we establish a number of consequences of Lemma 2.3, starting with small graph modifications that preserve basis number.

**Lemma 2.4.** For any graph $G$, we have

$$ \text{bn}(G) \le \text{bn}(G - v) + 2 \qquad \text{for any vertex } v \qquad (1) $$

$$ \text{bn}(G) \le \text{bn}(G - A) + O(\log^2 |A|) \qquad \text{for any subset } A \text{ of edges} \qquad (2) $$

$$ \text{bn}(G - A) \le (|A| + 1) \cdot \text{bn}(G) \qquad \text{for any subset } A \text{ of edges} \qquad (3) $$

*Proof.* (1) Pick $F$ a spanning forest of $G$, and consider the following two subgraphs. First set $G_1 := F \cup (G - v)$. This consists exactly of $G - v$, plus
for each connected component $X$ of $G-v$, a single edge from $v$ to $X$. These additional edges do not create any new cycle, thus $\text{bn}(G_1) = \text{bn}(G - v)$. Next define $G_2$ by adding to $F$ all edges incident to $v$. This is a planar graph, hence $\text{bn}(G_2) \le 2$. Clearly $G = G_1 \cup G_2$, while $G_1 \cap G_2 = F$ is connected. Lemma 2.3 then gives

$$ \text{bn}(G) \le \text{bn}(G_1) + \text{bn}(G_2) \le \text{bn}(G - v) + 2. $$

(2) Without loss of generality, we may assume that $G$ is connected. Furthermore, if $G - A$ is not connected, then there is an edge $e \in A$ joining two components of $G - A$. For $A' := A \setminus \{e\}$, we then have $\text{bn}(G - A) = \text{bn}(G - A')$. By induction on the size of $A$, we may assume $\text{bn}(G) \le \text{bn}(G - A') + O(\log^2|A'|)$, which implies the desired bound.

We thus assume that $G - A$ is connected too. Pick $F$ a spanning tree of $G - A$ and define $H := F \cup G[A]$. Then $H$ can be embedded on a surface of genus at most $|A|$, by drawing $F$ on the sphere and adding a handle to draw each edge of $A$. By Theorem 1.2, this gives $\text{bn}(H) = O(\log^2|A|)$. Now $G - A$ and $H$ are two subgraphs whose union is $G$, and whose intersection $F$ is connected. By Lemma 2.3, we obtain $\text{bn}(G) \le \text{bn}(G - A) + O(\log^2|A|)$.

(3) Once again, without loss of generality we may assume that $G$ is connected, and if $G - A$ is not connected, then picking $e \in A$ between two components and defining $A' := A \setminus \{e\}$ yields $\text{bn}(G - A) = \text{bn}(G - A')$, allowing to conclude by induction on the size of $A$.

We may thus assume now that each edge $e \in A$ is not a cutedge of $G - (A \setminus \{e\})$, i.e. there exists a path $P_e$ in $G - A$ connecting the two endpoints of $e$. For each $\mathbb{F}_2$-cycle $C$ of $G$, we let $\tilde{C}$ denote the subgraph of $G - A$ obtained from $C$ after replacing every edge $e \in F \cap E(C)$ by the path $P_e$. More formally, $\tilde{C} = C \oplus (\bigoplus_{e \in A \cap E(C)} (P_e \oplus \{e\}))$. Note that as every path $P_e$ avoids $A$, $\tilde{C}$ is a $\mathbb{F}_2$-cycle in $G - A$, and that for every two $\mathbb{F}_2$-cycles $C, C'$ in $G$, the mapping $f: C \mapsto \tilde{C}$ satisfies $f(C \oplus C') = f(C) \oplus f(C')$. Let $\mathcal{B}$ denote a cycle basis of $G$ with congestion $\text{bn}(G)$. We set $\mathcal{B}' := \{\tilde{C} : C \in \mathcal{B}\}$, and observe that the equality $f(C \oplus C') = f(C) \oplus f(C')$ implies that $\mathcal{B}'$ generates the cycle space of $G - A$.

We claim that $\mathcal{B}'$ has congestion at most $(|A| + 1) \cdot \text{bn}(G)$. Indeed, note that for every edge $e' \in E(G - A)$, if $\tilde{C}$ is a $\mathbb{F}_2$-cycle in $\mathcal{B}'$ containing $e'$, then either $C$ also contains $e'$, or $C$ contains some edge $e \in A$, and $e'$ is on the path $P_e$. In particular, as $\mathcal{B}$ has edge-congestion $\text{bn}(G)$, this implies that $e'$ is contained in at most $(|A| + 1) \cdot \text{bn}(G) \mathbb{F}_2$-cycles of $\mathcal{B}'$, as desired. $\square$

Note that [1, Open Problem 3.7] asks whether (3) holds with only an additive increase to the basis number. Unlike the previous three operations, deleting a vertex can increase the basis number arbitrarily.

*Remark 2.5.* For any $k \in \mathbb{N}$, there exists a graph $G$ with $\text{bn}(G) \le 3$, and a vertex $v \in V(G)$ such that $\text{bn}(G - v) \ge k$.
Proof. Take a cubic graph $H$ with basis number at least $k$ (it suffices to pick $G$ with sufficiently large girth, see Proposition 8.3). Define $G$ by adding to $H$ a vertex $v$ connected to all of $V(H)$. Then the set of all triangles of the form $vab$ for $ab \in E(H)$ generates the cycle space of $G$, and since $H$ is cubic, each edge of the form $av$ appears in at most 3 such triangles, hence this family has congestion 3. $\square$

Lemma 2.3 can also be phrased in terms of separators, which proves to be more convenient in the context of tree-decompositions. First, it directly implies the following for connected separators.

**Lemma 2.6.** Consider a graph $G$ and a separation $(X, Y)$ with $G[X \cap Y]$ connected. If $B_X, B_Y$ are cycle bases of $G[X]$ and $G[Y]$ respectively, then $B_X \cup B_Y$ generates the cycle space of $G$. In particular,

$$ \mathrm{bn}(G) \le \mathrm{bn}(G[X]) + \mathrm{bn}(G[Y]). $$

Indeed, Lemma 2.6 is a special case of Lemma 2.3 when taking $G_X = G[X]$ and $G_Y = G[Y]$. For non-connected separators, next lemma shows that one can still obtain a bound depending on the separator size.

**Lemma 2.7 (|20|).** For any graph $G$ and separation $(X, Y)$ of order $|X \cap Y| = k$,

$$ \mathrm{bn}(G) \le \mathrm{bn}(G[X]) + \mathrm{bn}(G[Y]) + O(\log^2 k). $$

We thank Pat Morin for suggesting the use of Theorem 1.2, improving a bound we had in an earlier version of Lemma 2.7 (see also Lemmas 7 and 8 in [20]).

Proof. Without loss of generality, we may assume that $G$ is connected. Take $F$ a spanning tree of $G$, and define $G_X := G[X] \cup F$ and $G_Y := G[Y] \cup F$. We claim that $\mathrm{bn}(G_X) \le \mathrm{bn}(G[X]) + O(\log^2 k)$ and similarly for $G_Y$, which implies the result by Lemma 2.3.

Let $A$ be a set of $k-1$ edges such that the $k$ vertices of $X \cap Y$ are all in different components of $F-A$. Then $G[X] \cup (F-A)$ consists of $G[X]$ plus $k$ disjoint trees branching out from each of the vertices of $X \cap Y$. These trees do not create any additional cycle, hence $\mathrm{bn}(G[X] \cup (F-A)) = \mathrm{bn}(G[X])$. To obtain $G_X$, it suffices to add back the missing edges of $A$, which by Lemma 2.4 case (2) increases the basis number by at most $O(\log^2 k)$, proving $\mathrm{bn}(G_X) \le \mathrm{bn}(G[X]) + O(\log^2 k)$ as desired. $\square$

Finally, we will need a variant of Lemma 2.3 with several connected components.

**Lemma 2.8.** Consider a graph $G$ and two subgraphs $G_X, G_Y$ such that $G = G_X \cup G_Y$, and such that for each connected component $U$ of $G_X$, the graph $G_X[U] \cap G_Y$ is connected. If $B_X, B_Y$ are cycle bases of $G_X$ and $G_Y$ respectively, then $B_X \cup B_Y$ generates the cycle space of $G$. In particular,

$$ \mathrm{bn}(G) \le \mathrm{bn}(G_X) + \mathrm{bn}(G_Y). $$
Proof. Assume without loss of generality that all the graphs of $\mathcal{B}_X$ are connected. Consider $G_X^1, \dots, G_X^m$ the connected components of $G_X$. For each $i \in [m]$, let $\mathcal{B}_X^i$ denote the set of cycles of $\mathcal{B}_X$ included in the component $G_X^i$. Clearly the basis $\mathcal{B}_X$ is the disjoint union of cycle bases $\mathcal{B}_X^i$ of $G_X^i$ for each $i \in [m]$. Since $G_X^1, \dots, G_X^m$ are disjoint subgraphs, we have for any $i \in [m]$

$$G_X^i \cap (G_Y \cup \bigcup_{j<i} G_X^j) = G_X^i \cap G_Y,$$

and the right hand side is connected by assumption. An immediate induction using Lemma 2.3 then gives that $\mathcal{B}_Y \cup (\bigcup_{j<i} \mathcal{B}_X^i)$ generates the cycle space of $G_Y \cup (\bigcup_{j<i} G_X^j)$, proving the result when $i = m$. $\square$

## 2.3 Tree-decompositions

For tree-decompositions, we will use some of the terminology from [3]. A tree-decomposition of a graph $G$ is a pair $(T, \beta)$, where $T$ is a rooted tree and $\beta: V(T) \to 2^{V(G)}$ is a mapping that associates for each node $t \in V(T)$, some subset $\beta(t)$ of $V(G)$ called the *bag* of $t$, so that the following properties hold:

$$ (\mathcal{T}1) \quad V(G) = \bigcup_{t \in V(T)} \beta(t), $$

$$ (\mathcal{T}2) \quad \text{for each edge } e = uv \text{ in } G, \{u, v\} \text{ is contained in some bag of } T, \text{ and} $$

$$ (\mathcal{T}3) \quad \text{for each vertex } v \text{ of } G, \text{ the set of nodes of } T \text{ whose bags contain } v \text{ induces a connected subtree of } T. $$

**Remark 2.9.** The three conditions imply that for any non-empty connected subgraph $H \subseteq G$, the subtree $T_X := \{t \in V(T) : \beta(t) \cap V(H) \neq \emptyset\}$ of $T$ induced by the nodes of $T$ whose bags contain some vertex of $H$ induces a non-empty connected subtree of $T$.

The width of a tree-decomposition is the maximum size of its bags, minus 1, and the treewidth of $G$, denoted $\text{tw}(G)$ is the minimum width of a tree-decomposition of $G$.

For a node $t \in V(T)$, the adhesion of $t$ is the intersection of the bag of $t$ with the bag of its parent (recall that $T$ is rooted). The adhesion of the root of $T$ is defined as being the empty set. We say that the tree-decomposition has adhesion at most $k$ if the adhesion of each node has size at most $k$.

The margin of a node $t$ consists of its bag minus its adhesion. The component of $t$ is the union of the margins of all descendants of $t$ in $T$ (including $t$ itself). Equivalently, the component of $t$ is the union of the bags of all descendants of $t$, minus the adhesion of $t$. The part of $t$ is the induced subgraph $G[\beta(t)]$, and the torso of $t$ is the graph obtained from the part of $t$ after cliquifying each adhesion, that is, adding edges $uv$ for each pair $u, v$ contained in the adhesion of either $t$ or one of its children. The marginal graph of $t$ is the torso of $t$ with the adhesion vertices of $t$ removed. In other words, it is the subgraph induced by the margin of $t$, with the adhesions of children of $t$ cliquified.

When there is ambiguity regarding the tree-decomposition $(T, \beta)$ considered, we will also talk about $(T, \beta)$-bag, $(T, \beta)$-adhesion, etc., or simply of $T$-bag, $T$-adhesion, etc., when the context is clear.
*Remark 2.10.* Consider $(T, \beta)$ a tree-decomposition, $t$ a node of $T$, and $u, v \in \beta(t)$. If the pair $\{u, v\}$ is contained in any adhesion of $(T, \beta)$, then $uv$ is an edge in the torso of $t$. Indeed, in this case, $\{u, v\}$ is both in $\beta(t)$ and some different bag, which implies it is in the adhesion of $t$ or one of its children.

A *path-decomposition* is a special case of tree-decomposition where the tree $T$ is a path. If $(P, \beta)$ is a path-decomposition, with $P = v_1, \dots, v_p$, then we respectively call $\beta(v_1)$ and $\beta(v_p)$ the *leftmost* and *rightmost* bags of $(P, \beta)$. The pathwidth of $G$, denoted $pw(G)$, is the minimum width of a path-decomposition.

A tree-decomposition $(T, \beta)$ is called *sane* if the following holds at every node $t \in V(T)$:

1. the margin of $t$ is non-empty,

2. the component of $t$ is connected, and

3. each vertex in the adhesion of $t$ has a neighbour in the component of $t$.

**Lemma 2.11 ([3, Lemma 2.8])**. For any tree-decomposition $(T, \beta)$ of a connected graph $G$, there is a sane tree-decomposition $(T', \beta')$ of $G$ such that each bag of $(T', \beta')$ is contained in some bag of $(T, \beta)$.

In particular, Lemma 2.11 shows that one can always find a sane tree-decompositions of minimal width.

*Remark 2.12.* In fact, the proof from [3, Lemma 2.8] can be reproduced exactly as it is to show that we can moreover assume that all the adhesion sets of the obtained sane tree-decomposition $(T', \beta')$ are subsets of adhesion sets of the initial tree-decomposition $(T, \beta)$. For technical reasons, this additional property will turn out to be useful later. In particular, note that this implies that adhesions in $(T', \beta')$ are no larger than the ones of $(T, \beta)$, and by Remark 2.10 that torsos of $(T', \beta')$ are subgraphs of torsos of $(T, \beta)$.

# 3 Adhesions captured by a path system

This section proves Theorem 3.1, which gives some sufficient conditions on a tree-decomposition $(T, \beta)$ ensuring that a bound on the basis number of each torso of $(T, \beta)$ yields a bound on the basis number of the whole graph. Note that the conditions of Theorem 3.1 cannot always be satisfied: for example, no tree-decomposition of bounded width of a long cycle satisfies these properties. In Sections 4 to 6, we will adapt the machinery of [3] to reduce Theorem 1.6 to cases where Theorem 3.1 can be applied.

Let $(T, \beta)$ be a tree-decomposition of a graph $G$. We say that a multi-set of paths $\mathcal{P}$ of $G$ captures the adhesions of $(T, \beta)$ if the following holds: $\mathcal{P}$ consists of paths $P_{t,u,v}$, where $t$ ranges over all nodes of $(T, \beta)$, $u, v$ ranges over all pairs of vertices in the adhesion of $t$, and $P_{t,u,v}$ is a *uv*-path in $G$. The index $t$ in $P_{t,u,v}$ is only here to indicate that $\mathcal{P}$ must contain as many *uv*-paths as there are nodes $t$ whose adhesion contains $u, v$; there is no requirement relating $t$ and $P_{t,u,v}$, the latter can be any *uv*-path of $G$. It is also possible for $P_{t,u,v}$ and $P_{t',u,v}$ to be the same path for $t \neq t'$.

As long as $G$ is connected, finding a family of paths that captures the adhesions of $(T, \beta)$ is trivial. We will be interested in finding such families with
bounded congestion. Here, the congestion of the family $\mathcal{P}$ is

$$ \max_{e \in E(G)} |\{(t, u, v) : e \in P_{t,u,v}\}|, $$

meaning that we count paths with multiplicity: when two paths $P_{t,u,v}$, $P_{t',u,v}$ in $\mathcal{P}$ are equal, they both contribute to the congestion of $\mathcal{P}$.

**Theorem 3.1.** Let $G$ be a graph and $(T, \beta)$ a tree-decomposition of $G$ such that

1. for each $t \in V(T)$, the torso of $t$ has basis number at most $b$, and

2. there is a family of paths $\mathcal{P}$ of $G$ capturing the adhesions of $T$ with edge congestion at most $c$.

Then $\text{bn}(G) \le (2c+1)(b+1)$.

*Proof.* For each node $t$ of $T$, consider a cycle basis $\mathcal{B}_t$ for the torso of $t$ with congestion at most $b$. We construct a generating set $\mathcal{B}$ of the cycle space of $G$ as follows. We recall that the tree $T$ is rooted.

1. For each pair of vertices $u, v$, consider all the nodes (when they exist) $t_1, \dots, t_k \in V(T)$ whose adhesion contains $\{u, v\}$, ordered arbitrarily. Then we add to $\mathcal{B}$ the $\mathbb{F}_2$-cycles $P_{t_i,u,v} \oplus P_{t_{i+1},u,v}$ for each $i < k$. If $uv$ is an edge in $G$, then we also add the $\mathbb{F}_2$-cycle $\{uv\} \oplus P_{t_1,u,v}$.

2. For each node $t \in V(T)$ and each $\mathbb{F}_2$-cycle $C \in \mathcal{B}_t$, we add to $\mathcal{B}$ one $\mathbb{F}_2$-cycle $\tilde{C}$ of $G$ obtained from $C$ as follows. First, for each $t \in V(T)$ and each edge $e = uv$ in the adhesion of $t$, we set $C_{e,t} := e \oplus P_{t,u,v}$. Note that $e$ is an edge of the torso of $t$, but not necessarily of $G$, hence $C_{e,t}$ is not necessarily an $\mathbb{F}_2$-cycle in $G$. Now, if $e$ is an edge of $C$ which is contained in the adhesion of some node of $T$, then $e$ is in the adhesion of either $t$ or of some child $t'$ of $t$. Choose $t_e$ to be one such node, choosing arbitrarily when several options are available. Finally, $\tilde{C}$ is defined as the sum of $C$ together with all $C_{e,t_e}$, for each edge $e$ of $C$ contained in some adhesion of $(T, \beta)$. We insist that this sum ranges over all edges $e$ contained in some adhesion, not just the ones that are present in the torso but missing in $G$. Each edge $e \in E(C) \setminus E(G)$ appears only in $C$ and $C_{e,t_e}$ in this sum, hence $\tilde{C}$ is an $\mathbb{F}_2$-cycle of $G$.

We say that the $\mathbb{F}_2$-cycles of $\mathcal{B}$ added in these two steps are respectively of type 1 and 2, and for each $i \in \{1, 2\}$, we let $\mathcal{B}^i$ denote the set of $\mathbb{F}_2$-cycles of type $i$ in $\mathcal{B}$, so that $\mathcal{B} = \mathcal{B}^1 \cup \mathcal{B}^2$.

**Congestion** Let us first bound the congestion of $\mathcal{B}$, considering the two types of $\mathbb{F}_2$-cycles separately. Observe that for every fixed triple $(t, u, v)$ such that $t \in V(T)$ and $u, v$ belong to the adhesion of $t$, the path $P_{t,u,v}$ is only used in the definition of at most two $\mathbb{F}_2$-cycles of type 1. Moreover, each edge $e = uv \in E(G)$ included in some adhesion of $(T, \beta)$, is used in the definition of exactly one of the $\mathbb{F}_2$-cycles of type 1 of the form $e \oplus P_{t,u,v}$ (namely when $t = t_1$). As $\mathcal{P}$ has congestion at most $c$, this implies that the congestion of $\mathcal{B}^1$ is at most $2c+1$.

Now, consider an edge $e$ of $G$, and assume that it appears in an $\mathbb{F}_2$-cycle $\tilde{C}$ of type 2 constructed from some $\mathbb{F}_2$-cycle $C \in \mathcal{B}_t$, for some $t \in V(T)$. This can occur for two different reasons:
(i) Either $e$ is an edge of $C$ that appears in none of the $\mathbb{F}_2$-cycles $C_{e',t_{e'}}$ for any edge $e'$ of $C$ belonging to an adhesion of $(T, \beta)$. Then we say that $e$ is a core edge of $\tilde{C}$. In particular, it implies that $e$ does not belong to any adhesion of $(T, \beta)$, and that $\beta(t)$ is the only bag of $(T, \beta)$ that contains $e$. Now if a different cycle $\tilde{C}' \in \mathcal{B}$ coming from $C' \in \mathcal{B}_{t'}$ also uses $e$ as a core edge, then the above implies $t = t'$, and the cycles $C, C'$ in $\mathcal{B}_t$ both use $e$. As $\mathcal{B}_t$ has edge-congestion at most $b$, it follows that at most $b$ $\mathbb{F}_2$-cycles $\tilde{C}$ of type 2 contain $e$ as a core edge.

(ii) Otherwise $e$ is used in $\tilde{C}$ as part of some $\mathbb{F}_2$-cycle $C_{e',t_{e'}}$, and we say that $e$ is a substitute edge in $\tilde{C}$. In this case, $e$ must also appear in some path $P_{t',u,v}$ which is involved in the definition of $\tilde{C}$. Since the family $\mathcal{P}$ has congestion $c$ it suffices to prove that each path $P_{t',u,v}$ is used in the definition of at most $2b$ $\mathbb{F}_2$-cycles of type 2 to obtain that $e$ is used at most $2cb$ times as substitute edge.

Thus we only need to show that the number of times that a path $P_{t',u,v}$ is used in the definition of some $\mathbb{F}_2$-cycle $\tilde{C}$ of type 2 is at most $2b$. If $\tilde{C} \in \mathcal{B}$ was obtained from $C \in \mathcal{B}_t$, then the construction of $\tilde{C}$ guarantees that $\tilde{C}$ only uses paths $P_{t',u,v}$ where $t'$ is either $t$ itself or one of its children. Thus conversely, a given path $P_{t',u,v}$ is only used for $\mathbb{F}_2$-cycles of type 2 coming from $\mathcal{B}_{t'}$ or $\mathcal{B}_t$, where $t$ is the parent of $t'$ in $T$. That is, $P_{t',u,v}$ is only used to replace an occurrence of $uv$ in some $\mathbb{F}_2$-cycle of either $\mathcal{B}_t$ or $\mathcal{B}_{t'}$. Thus $P_{t',u,v}$ is used in the definition of at most $2b$ $\mathbb{F}_2$-cycles of type 2.

To summarize, each edge $e \in E(G)$ is contained in at most $b$ cycles of $\mathcal{B}^2$ as a core edge, and at most $2bc$ cycles as a substitute edge, proving that $\mathcal{B}^2$ has congestion at most $2bc + b$. Recall also that $\mathcal{B}^1$ has congestion at most $2c + 1$. Combining the two, we find that $\mathcal{B} = \mathcal{B}^1 \cup \mathcal{B}^2$ has congestion at most $2bc + 2c + b + 1 = (2c + 1)(b + 1)$.

**Generating cycles** Let us now prove that $\mathcal{B}$ indeed generates the cycle space of $G$. The arguments we present are standard, and similar to the ones used in [11] and [8, Section 5.3].

As an intermediate step, consider the graph $G^+$ obtained by glueing all the
torsos of $T$, i.e. $G^+$ has the same vertices as $G$, and $xy \in E(G^+)$ whenever $xy$
is an edge in the torso of some $t \in T$. Further, define $\mathcal{B}^+ := \bigcup_{t \in T} \mathcal{B}_t$, which is
a family of cycles in $G^+$.

**Claim 3.2.** The family $\mathcal{B}^+$ generates the cycle space of $G^+$.

*Proof of the Claim.* The graph $G^+$ is obtained from the collection of torsos of $T$ by iteratively glueing them along their adhesions, which are cliques. Lemma 2.6 shows that when glueing two graphs $G_1, G_2$ into $G$ along a clique, one may generate the cycle space of $G$ by taking the union of cycle bases of $G_1$ and $G_2$. Repetitively applying this lemma to the construction of $G^+$, we then obtain that the cycle space of $G^+$ is generated by the union of cycle bases of all torsos, that is $\mathcal{B}^+$.

$\blacksquare$

Consider the linear projection $f : \mathbb{F}_2^{E(G^+)} \to \mathbb{F}_2^{E(G)}$ which maps any edge of $E(G)$ to itself, and maps an edge $uv \in E(G^+) \setminus E(G)$ to $P_{t,u,v}$ for some arbitrary choice of a node $t \in V(T)$ whose adhesion contains $uv$. Clearly, $f$
maps $\mathbb{F}_2$-cycles to $\mathbb{F}_2$-cycles, and its restriction to $\mathbb{F}_2^{E(G)}$ is the identity map, hence $f$ maps the cycle space of $G^+$ to the cycle space of $G$. Since $\mathcal{B}^+$ generates the cycle space of $G^+$, it follows that $f(\mathcal{B}^+)$ generates the cycle space of $G$. Thus, to conclude, it suffices to show that $\mathcal{B}$ generates $f(\mathcal{B}^+)$.

**Claim 3.3.** For any $t \in T$ and $\mathbb{F}_2$-cycle $C \in \mathcal{B}_t$, the family $\mathcal{B}$ generates $f(C)$.

*Proof of the Claim.* First, note that for all vertices $u, v \in V(G)$ and all nodes $t, t' \in V(T)$ such that $u, v$ belong to the adhesions of $t$ and $t'$, the $\mathbb{F}_2$-cycles of type 1 in $\mathcal{B}$ generate the cycle $P_{t,u,v} \oplus P_{t',u,v}$, and also the $\mathbb{F}_2$-cycle $\{uv\} \oplus P_{t,u,v}$ when $uv \in E(G)$.

Consider now $C \in \mathcal{B}_t$, and the corresponding $\mathbb{F}_2$-cycle $\tilde{C} \in \mathcal{B}$ of type 2. If $uv$ is an edge of $C$ contained in some adhesion, then in $\tilde{C}$, $uv$ is replaced by some path $P_{t',u,v}$. In $f(C)$ on the other hand, $uv$ is either kept as is (if it is an edge of $G$), or replaced by a possibly different path $P_{t'',u,v}$. Thus, with regards to the handling of $uv$, $\tilde{C}$ and $f(C)$ differ by either $P_{t',u,v} \oplus P_{t'',u,v}$ or $\{uv\} \oplus P_{t',u,v}$, which are generated by $\mathbb{F}_2$-cycles of type 1. Applying this reasoning to all such edges $uv$ of $C$, we obtain that $\tilde{C}$ can be transformed into $f(C)$ by adding to it $\mathbb{F}_2$-cycles of type 1, proving the claim. ■

Claim 3.3 thus implies that $\mathcal{B}$ generates $f(\mathcal{B}^+)$, which by Claim 3.2 generates the cycle space of $G$. This implies that $\mathcal{B}$ indeed generates the cycle space of $G$, and concludes the proof of Theorem 3.1. □

# 4 Path-decompositions

The main result of this section bounds the basis number of any graph with a path-decompositions which has both bounded adhesions, and parts of bounded basis number.

**Theorem 4.1.** Let $b, k \in \mathbb{N}$, $G$ be a graph and $(P, \beta)$ be a path-decomposition of $G$ with adhesion at most $k$. Suppose that for any bag $\beta(t)$ of $(P, \beta)$, and any subset $A \subseteq \beta(t)$, the subgraph $G[A]$ has basis number at most $b$, with $b \ge 1$. Then $\text{bn}(G) \le b \cdot 2^{2^{O(k^2)}}$.

In a path-decomposition of width $k$, adhesions have size at most $k$, and bags and their induced subgraphs have order at most $k+1$, and thus they all have basis number at most $b := 2k$ by Lemma 2.4. Thus Theorem 4.1 immediately implies the following for bounded pathwidth graphs.

**Corollary 4.2.** For every $k \ge 0$, every graph with pathwidth at most $k$ has basis number $2^{2^{O(k^2)}}$.

Theorem 4.1 and Corollary 4.2 have been proved independently by Miraftab, Morin and Yuditsky [20], who moreover improved the bounds to polynomial ones, see Theorem 1.7 and Theorem 1.9. In later sections, we will prefer to refer to their stronger results to obtain much better bounds, but nonetheless include this section for completeness, and also since our approaches differ significantly.

Our proof follows closely the framework of [3, Section 4]. The key idea is that in a path-decomposition of adhesion $k$, one can encode with a semigroup of bounded size all the relevant information concerning how the at most $2k$ vertices
in the two adhesions of a given bag connect to each other. Using Simon's Factorisation Forests Theorem [27], one designs a bounded depth induction in which a given path-decomposition is decomposed into simpler (sub-)path-decompositions. We will show in Section 4.2 that at each step of this induction, after ignoring a bounded number of problematic vertices, one can construct a family of paths identifying the adhesions of the relevant path-decomposition such that each path of the family intersects few bags, implying that the constructed family has bounded congestion. This will allow us to apply Theorem 3.1 in order to derive Theorem 4.1.

**4.1 Simon's Factorisation Forests Theorem**

Let us recall the key notions defined in [3].

**Bi-interface graphs** A bi-interface graph $\mathbf{G}$ of arity $k$ consists of an underlying graph $G$ and two partial injective maps $\lambda, \rho: [k] \to V(G)$, called left and right interface maps. For each $i \in [m]$, the vertices $\lambda(i), \rho(i)$ are called the $i$-th left and right interface vertices respectively, and the images of $\lambda$ and $\rho$ are called the left and right interfaces respectively. We require that when $\lambda(i)$ and $\rho(j)$ are defined for some $i, j \in [k]$ such that $\lambda(i) = \rho(j)$, then $i = j$.

Consider $G_1, G_2$ two bi-interface graphs with same arity and interface maps $\lambda_i, \rho_i$ for $i = 1, 2$. The glueing $G_1 \odot G_2$ is the bi-interface graph obtained as follows: for the underlying graph of $G_1 \odot G_2$, take the disjoint union of the underlying graphs of $G_1$ and $G_2$, and identify the right interface of $G_1$ with the left interface of $G_2$, i.e. identify vertices $\rho_1(i)$ with $\lambda_2(i)$ whenever both are defined. Finally, take $\lambda_1$ and $\rho_2$ as left and right interface maps (see Figure 1).

<figure><img src="image_2.png" /><figcaption>Figure 1: Glueing of two bi-interface graphs. On the left two bi-interval graphs $G_1, G_2$ of arity 5. On the right their glueing. The numbers correspond to the preimages of the interface vertices by the interface maps.</figcaption></figure>

This glueing operation is associative, giving the set of bi-interface graphs of
arity $k$ the structure of a semigroup. The next lemma shows that decompos-
ing a bi-interface graph into a sequence of glueings is essentially the same as
decomposing its underlying graph with a path-decomposition.

**Lemma 4.3 (cf. [3, Lemma 4.6])**. For a graph $G$ and a family $X_1, \dots, X_m$ of subsets of vertices of $G$, the following are equivalent:
• $X_1, \dots, X_m$ (in that order) are the bags of a path-decomposition of $G$ with adhesion at most $k$.

• $G$ is the underlying graph of some glueing $\mathbf{G}_1 \odot \cdots \odot \mathbf{G}_m$ of bi-interface graphs with arity $k$, so that for each $i \in [m]$, $G[X_i]$ is the underlying graph of $\mathbf{G}_i$.

*Proof.* If $G$ is the underlying graph of $\mathbf{G}_1 \odot \cdots \odot \mathbf{G}_m$ and for each $i \in [m]$, $X_i$ is the set of vertices coming from $\mathbf{G}_i$, then it is easy to check that defining $X_i$ to be the bag of the $i$-th node gives a path-decomposition of $G$. The adhesion $X_i \cap X_{i+1}$ is contained within the right interface of $\mathbf{G}_i$ (and the left interface of $\mathbf{G}_{i+1}$), hence it has size at most $k$.

Conversely, assume that $X_1, \dots, X_m$ corresponds to the sequence of the bags of a path-decomposition of $G$, and that the adhesion $A_i := X_i \cap X_{i+1}$ has size at most $k$ for each $i \in [m-1]$. Observe that one can define injective maps $f_i : A_i \to [k]$ for each $i \in [m-1]$ so that whenever $x \in A_i \cap A_{i+1}$ for some $i \in [m-2]$, we have $f_i(x) = f_{i+1}(x)$. We also let $f_0, f_m$ denote the maps with signature $\emptyset \to [k]$. For each $i \in [m]$, define now the bi-interface graph $\mathbf{G}_i$ with underlying graph $G[\beta(t_i)]$, where the left and right interface maps are given by the partial inverses of $f_i$ and $f_{i+1}$ respectively. Then one may check that $G$ is the underlying graph of $\mathbf{G}_1 \odot \cdots \odot \mathbf{G}_m$. $\square$

In a bi-interface graph $G$ with underlying graph $G$ and interface maps $\lambda, \rho$, a vertex $v \in V(G)$ is called *persistent* if it is both a left and a right interface vertex, i.e. $\lambda(i) = \rho(i) = v$ for some $i \in [k]$. Observe that if $v$ is persistent in $G$ and $G = G_1 \odot G_2$, then $v$ is also persistent in $G_1, G_2$.

For every bi-interface graph $G$ with underlying subgraph $G$ and every $X \subseteq V(G)$, we let $G[X]$ denote the bi-interface graph with underlying subgraph $G[X]$, and whose interface maps are the restriction on the interface maps of $G$ on $X$. We also set $G-X := G[V(G) \setminus X]$. We denote by $\hat{G}$ the bi-interface graph $G-\Pi$, where $\Pi$ is the set of the persistent vertices of $G$.

**Connectivity abstraction** Given a bi-interface graph $G$ with underlying graph $G$ and interface maps $\lambda, \rho$, its abstraction $[[G]]$ is the bi-interface graph defined as follows. Denote by $I(G) := \lambda([k]) \cup \rho([k])$ the set of interface vertices of $G$. Then the underlying graph of $[[G]]$ is the graph with vertex set $I(G)$, where we add an edge $xy$ whenever $G$ contains an $xy$-path whose internal vertices are not in $I(G)$. The interface maps of $[[G]]$ are given by $\lambda, \rho$.

Let $G_1, G_2$ be two bi-interface graphs, and for each $i \in \{1, 2\}$, let $G_i, \lambda_i, \rho_i$ denote respectively the underlying graph and the interface maps of $G_i$. $G_1, G_2$ are *isomorphic* if $\lambda_1$ and $\lambda_2$ (resp. $\rho_1$ and $\rho_2$) are defined on the same values, and if there exists a graph isomorphism $f: G_1 \to G_2$ such that for each $i \in [k]$ such that $\lambda_1(i)$ is defined, $f(\lambda_1(i)) = \lambda_2(i)$ and for each $i \in [k]$ such that $\rho_1(i)$ is defined, $f(\rho_1(i)) = \rho_2(i)$.

We denote by $A_k$ the set of abstractions of bi-interface graphs of arity $k$, considered up to isomorphism. Observe that $|A_k| = 2^{O(k^2)}$. For $\alpha, \beta \in A_k$, we define their product

$$ \alpha \cdot \beta := [[\alpha \odot \beta]]. $$

It is routine to check that this product is associative, hence $(A_k, \cdot)$ is a semigroup, and that $[[\cdot]]$ is a semigroup homomorphism, i.e. for every bi-interface graphs
$G_1, G_2$ we have

$$ [[G_1 \odot G_2]] = [[G_1]] \cdot [[G_2]]. \qquad (4) $$

**Factorisation forests** A key idea of [3] is to use Simon's Factorisation Forests Theorem, a result from semigroup theory, in order to find some regular structure in a given path-decomposition. The setting is as follows. One considers a (possibly infinite) alphabet $\Sigma$, a finite semigroup $(S, \cdot)$, and a map $h : \Sigma \to S$. We denote by $\Sigma^+$ the set of finite non-empty sequences of elements of $\Sigma$, called words, and denote by $\cdot$ the concatenation operation, which makes $\Sigma^+$ a free semigroup. The map $h$ naturally extends to a semigroup homomorphism $(\Sigma^+, \cdot) \to (S, \cdot)$.

Given a word $w \in \Sigma^+$, the Factorisation Forests Theorem gives a way to split $w$ down to single letters in a bounded number of steps, subject to some regularity conditions over $h$. Two ways of splitting $w$ are considered:

**binary factorisation** $w = w_1 \cdot w_2$ for some $w_1, w_2 \in \Sigma^+$

**h-idempotent factorisation** $w = w_1 \dots w_m$ for some $w_1, \dots, w_m \in \Sigma^+$ such that all factors have the same image $e = h(w_i)$, which furthermore is idempotent, meaning $e \cdot e = e$.

The h-rank of a word $w \in \Sigma^+$ is defined recursively as follows: letters $a \in \Sigma$ have h-rank 0, and a word $w \in \Sigma^+ \setminus \Sigma$ has h-rank at most $d$ if there is either a binary or an h-idempotent factorisation $w = w_1 \dots w_m$ in which each factor $w_i$ has h-rank at most $d-1$. This can be rephrased in terms of factorisation trees of depth $d$, in which the leaves are letters, and each internal node corresponds to a binary or idempotent factorisation.

**Theorem 4.4 (Factorisation Forests Theorem [27, 14])**. Consider a finite semigroup $(S, \cdot)$, an alphabet $\Sigma$, and a semigroup homomorphism $h : (\Sigma^+, \cdot) \to (S, \cdot)$. Then any word $w \in \Sigma^+$ has h-rank at most $3|S|$.

We will apply Theorem 4.4 to glueings of bi-interface graphs, with the connectivity abstraction as homomorphism. More precisely, in what follows, we fix the alphabet $\Sigma$ as the set of all bi-interface graphs of parity $k$ (for arbitrary fixed $k$). Thus a word in $\Sigma^+$ is a sequence $G_1 \cdots G_m$, which thanks to Lemma 4.3 can be seen as a path-decomposition of $G_1 \odot \cdots \odot G_m$. The role of the finite semigroup $(S, \cdot)$ will be played by $(A_k, \cdot)$, and we fix the semigroup homomorphism $h : \Sigma^+ \to (A_k, \cdot)$ by setting $h(G) := [[G]]$ for every bi-interface graph $G$. Throughout the rest of this section, h-rank and idempotence conditions are understood relative to this specific homomorphism.

## 4.2 Proof of Theorem 4.1

Following the techniques of [3], we will prove Theorem 4.1 by induction on the h-rank of the word of $\Sigma^+$ associated to the given path-decomposition.

We first extend the definition of the basis number on bi-interface graphs, by setting $bn(G) := bn(G)$ for every bi-interface graph $G$ with underlying graph $G$. For brevity, throughout this section we adopt the convention that a bi-interface graph is denoted in bold-face as $G$, and the corresponding normal font $G$ refers to its underlying graph.
Recall that a vertex in $\mathbf{G}$ is persistent if it is present in both interfaces, and that $\hat{\mathbf{G}}$ is obtained from $\mathbf{G}$ after removing all persistent vertices. We show that binary and idempotent factorisations both preserve bounded basis number, when ignoring persistent vertices. The idempotent case is the core of this proof.

**Lemma 4.5 (Binary case).** Let $\mathbf{G}_1, \mathbf{G}_2$ be two bi-interface graphs of arity $k$, with $\text{bn}(\hat{\mathbf{G}}_1), \text{bn}(\hat{\mathbf{G}}_2) \le b$, and $\mathbf{G} = \mathbf{G}_1 \odot \mathbf{G}_2$. Then we have

$$ \text{bn}(\hat{\mathbf{G}}) \le 2b + O(k). $$

*Proof.* Let $\Pi$ denote the set of persistent vertices in $\mathbf{G}$, and for each $i \in \{1, 2\}$, define $\mathbf{G}'_i := \mathbf{G}_i - \Pi$. Note that every vertex in $\Pi$ is also persistent in both $\mathbf{G}_1$ and $\mathbf{G}_2$. Thus, for each $i \in \{1, 2\}$, the underlying graph $\mathbf{G}'_i$ contains $\hat{\mathbf{G}}_i$ as an induced subgraph. On the other hand, the vertices missing in $\hat{\mathbf{G}}_i$ compared to $\mathbf{G}'_i$ are persistent interface vertices of $\mathbf{G}'_i$, of which there are at most $k$. Thus one can obtain $\mathbf{G}'_i$ from $\hat{\mathbf{G}}_i$ by adding back at most $k$ vertices. It follows by Lemma 2.4 that for each $i \in \{1, 2\}$,

$$ \text{bn}(\mathbf{G}'_i) \le \text{bn}(\hat{\mathbf{G}}_i) + 2k \le b + 2k. $$

Finally, we have $\hat{\mathbf{G}} = \mathbf{G}'_1 \odot \mathbf{G}'_2$, which means that the underlying graph $\hat{\mathbf{G}}$ has a separation of order at most $k$ whose two sides are $\mathbf{G}'_1$ and $\mathbf{G}'_2$. By Lemma 2.7, we then obtain

$$ \begin{aligned} \text{bn}(\hat{\mathbf{G}}) &\le \text{bn}(\mathbf{G}'_1) + \text{bn}(\mathbf{G}'_2) + O(\log(k)^2) \\ &\le 2b + O(k). \end{aligned} \quad \square $$

**Lemma 4.6 (Idempotent case).** Consider bi-interface graphs $\mathbf{G}_1, \dots, \mathbf{G}_m$ of arity $k$, and $\mathbf{G} = \mathbf{G}_1 \odot \dots \odot \mathbf{G}_m$. Assume that all $\mathbf{G}_i$ have the same connectivity abstraction $[[\mathbf{G}_1]] = \dots = [[\mathbf{G}_m]]$, which furthermore is idempotent in $(\mathbb{A}_k, \cdot)$. Moreover, assume that $\text{bn}(\hat{\mathbf{G}}_i) \le b$ for each $i \in [m]$. Then

$$ \text{bn}(\hat{\mathbf{G}}) \le O(b \cdot k^2 \log(k)^2). $$

*Proof.* Assume that in $\mathbf{G}_i$, the $j$-th interface vertex, say $v$, is persistent (i.e. the $j$-th left and $j$-th right interface vertices are equal). Observe that this fact is encoded in the connectivity abstraction $[[\mathbf{G}_i]]$. Then by idempotence, the $j$-th interface vertices of all $\mathbf{G}_{i'}$ are also persistent. In turn, this implies that the $j$-th interface vertex of $\mathbf{G}$ is persistent, and corresponds to $v$. It follows from these remarks that

$$ \hat{\mathbf{G}} = \hat{\mathbf{G}}_1 \odot \dots \odot \hat{\mathbf{G}}_m. \quad (5) $$

In a sense, (5) tells us that we can reason entirely in the graphs $\hat{\mathbf{G}}_i$ without persistent vertices. Let $\Pi$ denote the set of persistent vertices of $\mathbf{G}$.

For each $i \in [m]$, we let $X_i$ be the vertex set of the underlying graph $G_i$, and for each $i \in \{2, \dots, m\}$, we set $I_i := X_{i-1} \cap X_i$. In the corresponding path-decompositions, $X_i$ is a bag and $I_i$ an adhesion. Further, let $\hat{X}_i, \hat{I}_i$ be the corresponding sets with persistent vertices $\Pi$ removed. Note that the subsets $\hat{I}_i$ are pairwise disjoint, and $\hat{X}_i, \hat{X}_j$ are disjoint unless $|i - j| \le 1$.

The following is the key fact, and the entire reason for using connectivity abstractions and Simon's idempotence condition.
**Claim 4.7** (Cf. [3, Lemma 4.10]). Let $i \in \{2, \dots, m\}$. If $x, y \in I_i$ are connected by a path $Q$ in $G$, then they are also connected by a path $Q'$ which is contained in $X_{i-1} \cup X_i$, and which furthermore satisfies $V(Q) \cap I_i = V(Q') \cap I_i$.

*Proof of the Claim.* Define $\mathbf{L} := \mathbf{G}_1 \odot \cdots \odot \mathbf{G}_{i-1}$ and $\mathbf{R} := \mathbf{G}_i \odot \cdots \odot \mathbf{G}_m$. The idempotence assumption implies that

$$ \llbracket \mathbf{L} \rrbracket = \llbracket \mathbf{R} \rrbracket = \llbracket \mathbf{G}_{i-1} \rrbracket = \llbracket \mathbf{G}_i \rrbracket. $$

It follows that, if two vertices $x, y \in I_i$ can be connected by a path in $\mathbf{L}$ (resp. $\mathbf{R}$), then they can also be connected by a path in $\mathbf{G}_{i-1}$ (resp. $\mathbf{G}_i$). The same remains true if these paths are forbidden to have internal vertices in $I_i$.

Consider now an $xy$-path $Q$. It can be split into a sequence of subpaths $P_1, \dots, P_t$ where each $P_j$ has its endpoints in $I_i$ and its internal vertices in either $\mathbf{L} \setminus I_i$ or $\mathbf{R} \setminus I_i$. Then, each $P_j$ can be replaced by an equivalent path in $G_{i-1}$ or $G_i$, giving a path with the desired properties. ■

We will use Claim 4.7 to construct a path family with low congestion capturing the adhesions of the given path-decomposition, so as to apply Theorem 3.1. Precisely, consider a connected component $C$ of the underlying graph $\hat{G}$. Using Lemma 4.3, we obtain a path-decomposition $(P, \beta)$ of $\hat{G}[C]$ with bags

$$ \widehat{X}_1 \cap C, \dots, \widehat{X}_m \cap C, \qquad (6) $$

and whose adhesions are the sets $\widehat{I}_i \cap C$ for $1 < i \le m$. In particular, all adhesions have size at most $k$.

Let $1 < i \le m$ and consider any pair $x, y \in \widehat{I}_i \cap C$ of distinct vertices. By definition, they are connected by a path $Q$ in $\hat{G}$, thus Claim 4.7 gives that they are also connected by a path $Q'$ in $X_{i-1} \cup X_i$ with $V(Q') \cap I_i = V(Q) \cap I_i$. Note that the persistent vertices of $\mathbf{G}$ are all contained in $I_i$. Thus, since $Q$ avoids all persistent vertices, so does $Q'$, meaning that $Q'$ is in fact contained in $\hat{G}$, and thus in the connected component $C$.

Therefore, for any $1 < i \le m$ and any $x, y$ in the adhesion $I_i \cap C$, there is a path $P_{i,x,y}$ connecting $x$ to $y$ in $\hat{G}$, which furthermore is contained in $\widehat{X}_{i-1} \cup \widehat{X}_i$. We let $\mathcal{P}$ denote the family of such paths $P_{i,x,y}$. Clearly, $\mathcal{P}$ captures the adhesions of $(P, \beta)$. Recall that $\widehat{X}_i, \widehat{X}_j$ are disjoint whenever $|i - j| \ge 2$. Thus, for every $1 \le j \le m$, the only paths of $\mathcal{P}$ that may intersect $\widehat{X}_j$ are of the form $P_{i,x,y}$ for some $j - 1 \le i \le j + 2$. As for each $1 < i \le m$, $\mathcal{P}$ contains at most $\binom{k}{2}$ paths of the form $P_{i,x,y}$, the edge congestion of $\mathcal{P}$ is then at most $4\binom{k}{2} \le 2k^2$.

In order to apply Theorem 3.1, it remains to bound the basis-number of the torsos of $(P, \beta)$. For this, we fix $i \in [m]$ and let $H_i$ denote the torso associated to the bag $\widehat{X}_i \cap C$ of $(P, \beta)$. First, note that $H_i$ is obtained from the graph $\widehat{G}_i[C]$ by adding at most $2\binom{k}{2} \le k^2$ edges between interface vertices. Moreover, since $C$ is a connected component of $\hat{G}$, the restriction $\widehat{G}_i[C]$ is the union of some connected components of $\widehat{G}_i$, which immediately gives

$$ \mathrm{bn}(\widehat{G}_i[C]) \le \mathrm{bn}(\widehat{G}_i) \le b. $$

Thus, by Lemma 2.4, after adding the $k^2$ edges between interface vertices we have $\mathrm{bn}(H_i) \le b + O(\log(k)^2)$.
We have thus shown that $(P, \beta)$ is a path-decomposition of $\hat{G}[C]$ whose torsos have basis number at most $b + O(\log(k)^2)$, and whose adhesions are captured by a path system of congestion $2k^2$. By Theorem 3.1, this implies that

$$ 
\begin{aligned}
\mathrm{bn}(\hat{G}[C]) &= (4k^2 + 1)(b + O(\log(k)^2)) \\
&= O(b \cdot k^2 \log(k)^2).
\end{aligned}
$$

Since this holds for each connected component $C$ of $\hat{G}$, we obtain the same bound for $\mathrm{bn}(\hat{G})$ itself. $\square$

With these two lemmas, we obtain a bound by induction on the $h$-rank.

**Lemma 4.8.** Consider $G = G_1 \odot \cdots \odot G_m$, where $G_1, \dots, G_m$ are bi-interface graphs with arity $k$, such that the word $G_1 \cdots G_m$ has $h$-rank at most $d$. Assume that for each $i$, $\mathrm{bn}(\hat{G}_i) \le b$, and $b \ge 1$. Then $\mathrm{bn}(\hat{G}) \le b \cdot 2^{O(d \log k)}$.

*Proof.* Let $f(k)$ denote the polynomial bound implicitly given by Lemmas 4.5 and 4.6. We prove by induction on $d$ that $\mathrm{bn}(\hat{G}) \le b \cdot (f(k))^d$. Since $f$ is polynomial, this gives $\mathrm{bn}(\hat{G}) \le b \cdot 2^{O(d \log k)}$. In the base case $d=0$, the word $G_1 \cdots G_m$ consists of a single letter, i.e. $m=1$ and $G = G_1$. We thus have $\mathrm{bn}(\hat{G}) \le b$ as desired.

Assume now that $d > 0$. By definition, the word $w := G_1 \cdots G_m$ has a factorisation $w = w_1 \cdots w_\ell$ that is either binary or $h$-idempotent, in which each $w_j$ has $h$-rank at most $d-1$. If $w_j = G_{ij} \cdots G_{i_{j+1}-1}$, consider the glueing $G'_j := G_{ij} \odot \cdots \odot G_{i_{j+1}-1}$. Note that $G = G'_1 \odot \cdots \odot G'_\ell$. Since $G'_j$ has $h$-rank at most $d-1$, the induction hypothesis gives $\mathrm{bn}(\hat{G}'_j) \le b \cdot (f(k))^{d-1}$ for each $j \in [\ell]$. By Lemmas 4.5 and 4.6 (for the appropriate choice of $f$), if $\mathrm{bn}(\hat{G}'_j) \le b'$ for all $j$, then $\mathrm{bn}(\hat{G}) \le b' \cdot f(k)$. Thus $\mathrm{bn}(\hat{G}) \le (f(k))^d$ as desired. $\square$

We finally obtain the main result of this section.

*Proof of Theorem 4.1.* Consider $G$ with a path-decomposition $(P, \beta)$, with adhesion at most $k$, and call $t_1, \dots, t_m$ the nodes of $P$, appearing in this order. Assume that for any $i$ and any subset $A \subseteq \beta(t_i)$, we have $\mathrm{bn}(G[A]) \le b$.

By Lemma 4.3, $G$ is the underlying graph of a glueing $G = G_1 \odot \cdots \odot G_m$ of bi-interface graphs with arity $k$, such that for each $i \in [m]$, the underlying graph of $G_i$ is $G[\beta(t_i)]$. In particular, for each $i \in [m]$, we have $\mathrm{bn}(\hat{G}_i) \le b$. Lemma 4.8 then gives $\mathrm{bn}(\hat{G}) \le b \cdot 2^{O(d \log k)}$, where $d$ denotes the $h$-rank of $G_1 \cdots G_m$. As $G$ has at most $k$ vertices which are persistent in $G$, adding them back using Lemma 2.4 increases the basis number by at most $2k$. Finally, by Theorem 4.4, we have $d \le 3|A_k| = 2^{O(k^2)}$, and thus

$$ \mathrm{bn}(G) \le b \cdot 2^{O(d \log k)} + 2k \le b \cdot 2^{2O(k^2)}. \square $$

# 5 The bounded treewidth case

This section proves that bounded treewidth graphs have bounded basis number.

**Theorem 1.5.** There exists a function $f_{1.5}: \mathbb{N} \to \mathbb{N}$ such that for every $k \ge 0$, every graph with treewidth $k$ has basis number at most $f_{1.5}(k)$.
The proof of Theorem 1.5 relies on a technical result of Bojańczyk and Pilipczuk, namely [3, Lemma 5.9], which implies that any bounded treewidth graph has a tree-decomposition satisfying condition 2 of Theorem 3.1, in which torsos have bounded pathwidth (see Lemma 5.1). Section 6 will prove technical generalisations of these results, needed to establish the more general Theorem 1.6.

Theorem 1.5 easily follows from the next result, combined with everything we proved so far (and Theorem 1.7 for a polynomial bound).

**Lemma 5.1.** Let $G$ be a connected graph with treewidth $k$. Then $G$ has a tree-decomposition $(T, \beta)$ whose torsos have pathwidth at most $3k + 1$, and whose adhesions are captured by a family $\mathcal{P}$ of paths with congestion $O(k^4)$.

*Proof of Theorem 1.5 using Lemma 5.1.* Let $(T, \beta)$ be the tree-decomposition given by Lemma 5.1. The torsos of $(T, \beta)$ have pathwidth at most $3k + 1$, hence basis number at most $12k + 4$ by Theorem 1.7. With the path system of congestion $O(k^4)$, Theorem 3.1 then gives $\text{bn}(G) = O(k^5)$. $\square$

The remainder of this section gives the precise statement of [3, Lemma 5.9], and shows through routine checks that it implies Lemma 5.1. As the statement is quite technical, we will faithfully reproduce it below. One definition is needed first.

Recall that the tree-decompositions we consider are rooted. Let $(T, \beta)$ be a tree-decomposition of a graph $G$, and let $X \subseteq V(T)$ be a subset of nodes that contains the root $r$ of $T$. The quotient tree $T/X$ is the tree with nodes $X$ such that the ancestor-descendant relation in $T/X$ is the same as in $T$, restricted to $X$. The *quotient* of the decomposition $(T, \beta)$ with respect to $X$ is the tree-decomposition $(T/X, \beta_X)$ of $G$, where for each $t \in X$, $\beta_X(t)$ is the union of all bags $\beta(s)$ from $(T, \beta)$ such that $s$ is a descendant of $t$ (including $t$ itself), and such that $t$ is the closest ancestor of $s$ in $X$ (see Figure 2). Observe that for any $x \in X$, the $T$-adhesion of $x$ and its $T/X$-adhesion are equal, and similarly the $T$-component and $T/X$-component are equal.

<figure><img src="image_3.png" /><figcaption>Figure 2: Left: In green, a tree-decomposition $(T, \beta)$, and in red, the bags corresponding to a subset $X \subseteq V(T)$. Right: In blue, the quotient $(T/X, \beta_X)$.</figcaption></figure>

**Lemma 5.2** ([3, Lemma 5.9]). Let $(T, \beta)$ be a width $k$ sane tree-decomposition of a connected graph $G$. Then one can find a set of nodes $X$ in $T$, which includes the root of $T$, and families of paths $\{\mathcal{P}_x\}_{x \in X}$, such that every $x \in X$ satisfies the following.
1. The $T/X$-marginal graph of $x$ has pathwidth at most $2k + 1$.

2. Every element $P \in \mathcal{P}_x$ is a path in $G$ that satisfies:

(a) except for its endpoints, $P$ visits only vertices in the $T$-component of $x$, and

(b) if $y \in X$ is a strict descendant of $x$, then the restriction of $P$ to the $T$-component of $y$ yields a subpath of $P$.

3. All paths in $\mathcal{P}_x$ have the same source, which belongs to the $T$-margin of $x$. Conversely, each vertex of the $T$-adhesion of $x$ is the target of some path from $\mathcal{P}_x$.

4. The following set has size at most $2k^3$:

$$ \text{load}_x := \{(P, y) : P \in \mathcal{P}_y, \\ \qquad y \in X \text{ is a strict ancestor of } x \\ \qquad \text{and } P \text{ intersects the } T\text{-component of } x\}. $$

*Proof of Lemma 5.1.* Consider $G$ a connected graph of treewidth $k$. Then by Lemma 2.11, $G$ has a sane tree-decomposition $(T, \beta)$ of width $k$. Applying Lemma 5.2 to $(T, \beta)$ yields a set of nodes $X$ and path families $\{\mathcal{P}_x\}_{x \in X}$. Without loss of generality, each $\mathcal{P}_x$ consists of at most $k$ paths $P_{x,u}$ where $u$ ranges over the adhesion of $x$, and the target of $P_{x,u}$ is $u$. Our goal is to show that $(T/X, \beta_X)$ satisfies the conclusion of Lemma 5.1.

First, recall that for every $x \in X$, the $T/X$-marginal graph of $x$ is obtained from its $T/X$-torso by removing the at most $k$ vertices from the adhesion of $x$. Lemma 5.2 gives that the marginal graph of $x$ has pathwidth at most $2k+1$, and thus after adding back the adhesion vertices, the $T/X$-torso of $x$ has pathwidth at most $3k+1$ as desired.

We now construct a family $\mathcal{P}$ of paths with bounded congestion that captures the adhesions of $(T/X, \beta_X)$. For every node $x \in X$, and every pair $u, v$ of distinct vertices in the $T/X$-adhesion of $x$, consider $P_{x,u}, P_{x,v} \in \mathcal{P}_x$ the two paths having respectively $u$ and $v$ as targets. By condition 3 of Lemma 5.2, $P_{x,u}$ and $P_{x,v}$ have the same source. Thus we can choose some $uv$-path $Q_{x,u,v}$ contained in $P_{x,u} \cup P_{x,v}$. We let $\mathcal{P}$ denote the family of all the paths $Q_{x,u,v}$ for each $x \in X$ and every pair $u, v$ of distinct vertices in the $T/X$-adhesion of $x$ (this family of paths is seen as a multiset, as in Section 3). Clearly, $\mathcal{P}$ captures the adhesions of $(T/X, \beta_X)$. We will now bound the congestion of $\mathcal{P}$.

**Claim 5.3.** For any vertex $v \in V(G)$, there are at most $2k^3 + k$ paths in $\bigcup_{y \in X} \mathcal{P}_y$ containing $v$ as a non-target vertex.

*Proof of the Claim.* Consider the subtree $T_v$ of $T/X$ consisting of all the nodes $z \in X$ whose bag $\beta(z)$ contains $v$, and call $x$ its root (i.e. its vertex that is closest to the root of $T/X$). Note that $v$ belongs to the $T/X$-margin of $x$, and that $v$ belongs to the adhesions of all strict descendants of $x$ in $T_v$. We claim that if for some $y \in X$, some path $P \in \mathcal{P}_y$ contains $v$ and $v$ is not the target of $P$, then $y$ is an ancestor of $x$ (with possibly $y = x$). Indeed, if $v$ is not the target of $P$, then Conditions 2a and 3 of Lemma 5.2 give that $v$ belongs to the component of $y$. This implies that every bag of $(T/X, \beta_X)$ that contains $v$ is a descendant of $y$, which is in particular the case of $x$.
Thus, if $P \in \mathcal{P}_y$ contains $v$ as a non-target vertex, either $x = y$ or $y$ is a strict ancestor of $x$, and in the latter case we have $(P, y) \in \text{load}_x$. As there are at most $2k^3$ pairs in $\text{load}_x$, and at most $k$ paths in $\mathcal{P}_x$, this proves the claim. ■

It follows from Claim 5.3 that each edge $uv \in E(G)$ is contained in at most $4k^3 + 2k$ paths in $\bigcup_{y \in X} \mathcal{P}_y$. Indeed, each path $P$ using the edge $uv$ contains either $u$ or $v$ as a non-target vertex.

Finally, observe that for each $x \in X$, each path $P_{x,u} \in \mathcal{P}_x$ is used by at most $k$ paths in $\mathcal{P}$, namely those of the form $Q_{x,u,v}$ with $v$ in the adhesion of $x$. It follows that each edge is used by at most $k \cdot (4k^3 + 2k)$ paths in $\mathcal{P}$, concluding the proof that $\mathcal{P}$ has congestion $O(k^4)$. □

# 6 Tree-decompositions with large bags

We now generalise the ideas of Section 5 to show that under appropriate hypotheses, tree-decompositions with bags of unbounded size (but bounded adhesions) preserve bounded basis number. Recall that a class of graphs $\mathcal{G}$ is monotone if it is closed under taking subgraphs.

**Theorem 1.6.** There exists a function $f_{1.6}: \mathbb{N}^2 \to \mathbb{N}$ such that the following holds. Let $\mathcal{G}$ be a monotone class of graphs such that each graph in $\mathcal{G}$ has basis number at most $b$, and let $\mathcal{G}$ be a graph with a tree-decomposition with adhesion at most $k$ and whose torsos are all in $\mathcal{G}$. Then

$$ \mathrm{bn}(\mathcal{G}) \le f_{1.6}(b, k). $$

In what follows, for a class of graphs $\mathcal{G}$ and some $k \ge 0$, we let $\mathcal{G}^{+k}$ denote the class of those graphs $\mathcal{G}$ for which there exists a subset $A$ of vertices (called apices) of size at most $k$, such that $\mathcal{G} - A \in \mathcal{G}$.

To prove Theorem 1.6, we want to generalise Lemma 5.1 by allowing bags of unbounded size, and thus also [3, Lemma 5.9]. Though technical, the proof is a fairly direct adaptation of the arguments of [3, Section 5], by replacing conditions of the form ‘the tree-decomposition $(T, \beta)$ has bounded width’ by ‘torsos of $(T, \beta)$ are in $\mathcal{G}^{+O(k)}$. Precisely, we generalise Lemma 5.1 as follows.

**Lemma 6.1.** Let $\mathcal{G}$ be a monotone class of graphs and $k \in \mathbb{N}$. Consider $\mathcal{G}$ a connected graph that admits a tree-decomposition with adhesion $k$ and whose torsos are all in $\mathcal{G}$. Then $\mathcal{G}$ has a tree-decomposition $(T, \beta)$ such that each torso has a path-decomposition with adhesion $3k$ and parts in $\mathcal{G}^{+2k}$, and such that the adhesions of $(T, \beta)$ are captured by a family $\mathcal{P}$ of paths with congestion $O(k^4)$.

*Proof of Theorem 1.6 using Lemma 6.1.* In the tree-decomposition $(T, \beta)$ given by Lemma 6.1, consider a torso $H$. It has a path-decomposition with parts in $\mathcal{G}^{+2k}$ and adhesion at most $3k$. By Lemma 2.4, graphs in $\mathcal{G}^{+2k}$ have basis number at most $b + 4k$, hence Theorem 1.9 gives

$$ \mathrm{bn}(H) \le b + 4k + O(k \log(k)^2) \le b + O(k \log(k)^2). $$

Thus $(T, \beta)$ is a path-decomposition with adhesions captured by a path system of congestion $O(k^4)$, and torsos of basis number $b + O(k \log(k)^2)$. Theorem 3.1 then gives $\mathrm{bn}(\mathcal{G}) = O((b + k \log(k)^2) \cdot k^4)$. □
Lemma 6.1 follows from the next technical lemma, which is a generalisation of [3, Lemma 5.9]. The statement requires a couple of simple definitions about set systems.

For a fixed ground set $V$, a family $\mathcal{V} \subseteq 2^V$ of subsets of $V$ is *downwards-closed* if it is closed under taking subsets. Moreover, for every integer $k \ge 0$, we let $\mathcal{V}^{+k}$ denote the set of subsets $U$ of $V$ for which there exists some subset $A \subseteq U$ of size at most $k$ such that $U \setminus A \in \mathcal{V}$.

**Lemma 6.2 (Generalisation of [3, Lemma 5.9]).** Let $(T, \beta)$ be a sane tree-decomposition of a connected graph $G$ with adhesion $k$, and let

$$ \mathcal{V} := \{U \subseteq V(G) : \exists t \in V(T), U \subseteq \beta(t)\} $$

denote the set of all subsets of bags of $(T, \beta)$. Then one can find a set of nodes $X$ in $T$ which includes the root of $T$, and families of paths $\{\mathcal{P}_x\}_{x \in X}$, such that for every $x \in X$, the family $\mathcal{P}_x$ satisfies properties 2a to 4 from Lemma 5.2, together with the following property.

1' The $T/X$-marginal graph of $x$ admits a path-decomposition of adhesion at most $2k$, in which every bag belongs to $\mathcal{V}^{+k}$.

*Proof of Lemma 6.1 using Lemma 6.2.* The proof is largely the same as that of Lemma 5.1, but there are a few subtleties that require additional care.

Firstly, we may assume that the given tree-decomposition is sane. Indeed, given any tree-decomposition $(T, \beta)$, Lemma 2.11 and Remark 2.12 give a sane tree-decomposition $(T', \beta')$ such that bags and adhesions of $(T', \beta')$ are subsets of bags and adhesions respectively of $(T, \beta)$. This implies that torsos of $(T', \beta')$ are subgraphs of torsos of $(T, \beta)$, hence are in $\mathcal{G}$.

Assuming now $(T, \beta)$ to be sane, we apply Lemma 6.2, yielding nodes $X \subseteq T$ and path systems $\{\mathcal{P}_x\}_{x \in X}$. Consider a $T/X$-marginal graph $H$. We claim that for any $A \in \mathcal{V}$, we have $H[A] \in \mathcal{G}$. First, by definition $A$ is contained in a bag $\beta(t)$ for some $t \in T$. Secondly, if $uv$ is an edge of $H[A]$ that is not in $G$, then the pair $\{u, v\}$ is contained in some adhesion of $(T/X, \beta_X)$, which is also an adhesion of $(T, \beta)$. Remark 2.10 then shows that $uv$ is also an edge in the $(T, \beta)$-torso of $t$. This proves that $H[A]$ is a subgraph of the torso of $t$, and is in $\mathcal{G}$. Now by assumption $H$ has a path-decomposition with bags in $\mathcal{V}^{+k}$, which means parts in $\mathcal{G}^{+k}$. Recall that $H$ is a $T/X$-marginal graph, i.e. a $T/X$-torso with the adhesion vertices removed. Adding back the $k$ adhesion vertices, we obtain that each $T/X$-torso has a path-decomposition with adhesion at most $3k$ and parts in $\mathcal{G}^{+2k}$, as desired.

It only remains to construct the path system $\mathcal{P}$; we omit this part of the proof as it is exactly the same as in the case of Lemma 5.1. □

The rest of this section is dedicated to the proof of Lemma 6.2. In Section 6.1, we introduce the general definitions and notations from [3] used in the proof, mainly related to hypergraphs. Section 6.2 explains how to generalise [3, Lemma 5.9], keeping the same conventions and proof structure as in [3]. We present the modified definitions and statements, but omit or only sketch many proofs, whenever they are the same as the original. A single important technical lemma requires additional care, namely Lemma 6.6 (corresponding to [3, Lemma 5.8]), in which careful modifications of path-decompositions occur. Section 6.3 is dedicated to the proof of the latter.
## 6.1 Definitions

**Hypergraphs** A hypergraph is a pair $H = (V(H), E(H))$, where $V(H)$ denote the vertices of $H$, and $E(H)$ is a multiset of subsets of $V(H)$, called the hyperedges of $H$. Note that in $E(H)$, we allow repetitions. We only consider finite hypergraphs here. An hypergraph $H$ is a subhypergraph of $H$ if $V(H') \subseteq V(H)$ and $E(H') \subseteq E(H)$. For a subset $X \subseteq V(H)$ of vertices, $H[X]$ denotes the sub-hypergraph induced by $X$, whose vertex set is $X$, and which contains all the hyperedges $e$ of $H$ such that $e \subseteq X$.

A path in $H$ is a sequence $P = (u_1, e_1, u_2, \dots, u_p, e_p, u_{p+1})$ such that the $u_i$'s are pairwise distinct vertices, the $e_i$'s are pairwise distinct hyperedges, and for every $i \in \{1, \dots, p\}$, we have $u_i, u_{i+1} \in e_i$. When such a path exists, we say that $u_1$ and $u_{p+1}$ are connected in $H$, and call $P$ a $u_1u_{p+1}$-path. The notions of connectedness and connected components naturally generalise in hypergraphs. Let $A, B$ be two subsets of vertices of a hypergraph $H$. We say that a subset $X$ of vertices of $H$ separates $A$ from $B$ if every path in $H$ connecting a vertex from $A \setminus X$ to a vertex from $B \setminus X$ contains a vertex in $X$.

Tree-decompositions are defined for hypergraphs in the same way as for graphs, except that we ask instead of Item (T2) that every hyperedge must be included in some bag. For a tree-decomposition $(T, \beta)$ of a hypergraph $H$, the part of a node $t \in V(T)$ is the induced sub-hypergraph $H[\beta(t)]$.

**Hypertorsos, prefixes** Let $(T, \beta)$ be a tree-decomposition of a graph (or hypergraph) $G$. For a node $t \in T$, the hypertorso of $t$ is defined as the hypergraph obtained from the part $G[\beta(t)]$ by adding one hyperedge $e_z$ equal to the adhesion of $z$ for each child $z$ of $t$ (recall that $T$ is rooted). Note that several children of $t$ can have the same adhesion set, hence the hypertorso can have multi-hyperedges. Also, the hypertorso of $t$ does not have an hyperedge for the adhesion of $t$, only for the adhesions of its children. The point is that, unlike the standard notion of torso, there is a one-to-one correspondence between hyperedges of the hypertorso that are not in $G$, and adhesions of children of $t$. This is the entire motivation for using hypergraphs in this proof.

A prefix of $T$ is a subset $Z$ of nodes of $T$ which is closed under taking ancestors. For a prefix $Z$ of $T$, let $\partial Z$ denote the set of nodes of $T-Z$ having their parent in $Z$. Let $\beta(Z) = \bigcup_{z \in Z} \beta(z)$ denote the union of bags of $Z$. We more generally define the hypertorso of the prefix $Z$ as the hypergraph hypertorso$(T, Z)$ obtained from the induced subgraph $G[\beta(Z)]$ by adding one hyperedge $e_z$ equal to the adhesion of $z$ in $(T, \beta)$ for each $z \in \partial Z$.

We denote by $\mathfrak{c}(T, \beta)$ the multiset of hyperedges $e \subseteq V(G)$ of all hypertorsos of $(T, \beta)$ that are not edges of $G$. In other words, $\mathfrak{c}(T, \beta)$ is the multiset of adhesions $e_z$ of $(T, \beta)$, seen as hyperedges.

## 6.2 Adapting Lemma 5.2

We sketch the proof of Lemma 6.2 in the remainder in this section, following closely [3, Section 5]. The first step is the following lemma, which allows to find two paths between two specified vertices while in a sense spreading out the path congestion between different subtrees.
**Lemma 6.3** (Generalisation of [3, Lemma 5.2]). Let $(T, \beta)$ be a sane tree-decomposition of a connected graph $G$ with adhesion at most $k$, and

$$ \mathcal{V} := \{U \subseteq V(G) : \exists t \in V(T), U \subseteq \beta(t)\} $$

be the set of all subsets of the bags of $(T, \beta)$. Let $u, v$ be vertices in the root bag of $(T, \beta)$. Then, there exists a non-empty prefix $Z$ of $T$ with the following properties.

1. **hypertorso**$(T, Z)$ has a path-decomposition with adhesion at most $2k$ whose bags are all in $\mathcal{V}^{+k}$, and

2. there are two uv-paths $P_1, P_2$ in hypertorso$(T, Z)$ such that no edge of $\mathcal{C}(T, \beta)$ belongs to both $P_1$ and $P_2$.

We note that the two paths from Condition 2 might be equal, in which case they must be paths from $G[Z]$. In particular, if $z$ is the root of $T$, observe that if $u$ and $v$ are already connected by a path included in $G[\beta(z)]$, then the set $Z := \{z\}$ satisfies trivially the properties of Lemma 6.3.

**Networks, cutedges** As in [3], a network $\mathbb{H}$ is defined as a connected hypergraph $H$ with two distinguished vertices: a source $s$ and a sink $t$. A cutedge in $\mathbb{H}$ is an hyperedge $e \in E(H)$ appearing in every st-path. Note that every cutedge must have multiplicity 1 in $E(H)$.

The following is a simple consequence of Menger's theorem.

**Lemma 6.4** ([3, Lemma 5.5]). In a network $\mathbb{H}$ with source $s$ and sink $t$, there are two st-paths $P_1, P_2$ such that an edge $e$ is a cutedge of $\mathbb{H}$ if and only if both $P_1$ and $P_2$ use $e$.

By [3, Lemma 5.3], for every network $\mathbb{H}$, there is an ordering $e_1, \dots, e_p$ of its cutedges such that for every st-path $P$, the cutedges appear in $P$ in this order. Then $(e_1, \dots, e_p)$ is called the *cutedge sequence* of $\mathbb{H}$.

Let $\mathbb{H}$ be a network with hypergraph $H$, cutedge sequence $(e_1, \dots, e_p)$, source $s$ and sink $t$, and denote $e_0 := \{s\}$ and $e_{p+1} := \{t\}$. By [3, Lemma 5.4], every component $C$ of $H - \{e_1, \dots, e_p\} := (V(H), E(H) \setminus \{e_1, \dots, e_p\})$ is of exactly one of the following two types:

(1) either $C$ intersects exactly two of the hyperedges $e_0, \dots, e_{p+1}$, in which case there exists some $i \in \{0, \dots, p\}$ such that these two hyperedges are $e_i, e_{i+1}$. Such a component is called an $(e_i, e_{i+1})$-bridge.

(2) or $C$ intersects exactly one of the hyperedges $e_0, \dots, e_{p+1}$, in which case it must be one of the cutedges $e_i$ for some $i \in \{1, \dots, p\}$. Such components are called $e_i$-appendices.

**Thin networks** Let us now generalise the key invariant used in the proof of [3, Lemma 5.2], called $k$-thinness (cf. [3, Definition 5.6]). Let $U$ be a fixed ground set, $\mathcal{V}$ be a family of subsets of $U$, and $\mathbb{H}$ be a network with hypergraph $H$, cutedge sequence $(e_1, \dots, e_p)$, source $s$ and sink $t$. We also set $e_0 := \{s\}$ and $e_{p+1} := \{t\}$. For each $i \in \{0, \dots, k\}$, let $V_i$ be the union of the vertex sets of all $(e_i, e_{i+1})$-bridges, and for each $i \in \{1, \dots, p\}$, let $W_i$ be the union of the vertex sets of all the $e_i$-appendices.
We say that $\mathbb{H}$ is $(\mathcal{V}, k)$-thin if $V(H) \subseteq U$, all the hyperedges of $H$ have size at most $k$, and:

(a) for each $i \in \{0, \dots, p\}$, the hypergraph $H[V_i]$ has a path-decomposition of adhesion at most $2k$, whose leftmost bag contains $V_i \cap e_i$, whose rightmost bag contains $V_i \cap e_{i+1}$, and whose bags all belong to $\mathcal{V}^{+k}$;

(b) for each $i \in \{1, \dots, p\}$, the hypergraph $H[W_i]$ has a path-decomposition of adhesion at most $k$, whose leftmost bag contains $W_i \cap e_i$, and whose bags all belong to $\mathcal{V}$.

The next lemma shows that thinness implies the path-decomposition condition of Lemma 6.3.

**Lemma 6.5 (Generalisation of [3, Lemma 5.7]).** *Consider a ground set $U$, a family $\mathcal{V}$ of subsets of $U$ such that $\emptyset \in \mathcal{V}$, and a $(\mathcal{V}, k)$-thin network $\mathbb{H}$. Then $\mathbb{H}$ has a path-decomposition of adhesion at most $2k$ whose bags all belong to $\mathcal{V}^{+k}$.*

We omit the proof, which immediately generalises the one of [3, Lemma 5.7], and simply consists in properly concatenating the path-decompositions of the hypergraphs $H[V_i]$ with the ones of the hypergraphs $H[W_i \cup e_i]$. The hypothesis that $\emptyset \in \mathcal{V}$ is required in order to allow using any set of size at most $k$ (and in particular any cutedge) as bag in the path-decomposition.

**Substitution** Let $H, K$ be hypergraphs and $e$ be an hyperedge of $H$, such that $V(H) \cap V(K) = e$. Define $H[e \to K]$ to be the hypergraph with vertex set $V(K) \cup V(H)$, whose hyperedges are all hyperedges of $H$ and $K$, except $e$ (if $e$ occurs multiple times in $E(H) \cup E(K)$, then we only remove one of its occurrences). When $\mathbb{H}$ is a network with underlying hypergraph $H$, we also write $\mathbb{H}[e \to K]$ for the network with hypergraph $H[e \to K]$ and with the same source and sink as $\mathbb{H}$.

The most technical part of the proof is the following lemma, showing that under appropriate conditions, substitution preserves thinness.

**Lemma 6.6 (Generalisation of [3, Lemma 5.8]).** Let $\mathcal{V}$ be a downwards-closed family of subsets of a fixed ground set $U$. Let $\mathbb{H}$ be a $(\mathcal{V}, k)$-thin network with underlying hypergraph $H$, and $K$ a hypergraph such that $V(K) \in \mathcal{V}$, whose hyperedges all have order at most $k$. Moreover, assume that there exists a cutedge $e$ of $\mathbb{H}$ such that $V(H) \cap V(K) = e$. Then, $\mathbb{H}[e \to K]$ is also $(\mathcal{V}, k)$-thin.

We will detail the proof of Lemma 6.6 in Section 6.3, as it requires some minor modifications compared to the bounded treewidth case. For now, we sketch how to use it to prove Lemma 6.3. The proof is essentially the same as the one of [3, Lemma 5.2].

*Proof of Lemma 6.3.* Recall that we are given a sane tree-decomposition $(T, \beta)$ with adhesions of size $k$, and two vertices $u, v$ in its root bag. Further, $\mathcal{V}$ is the set of all subsets of the bags of $(T, \beta)$.

To any non-empty prefix $Z$ of $T$, one associates the network $\mathbb{H}_Z$ with underlying hypergraph *hypertorso$(T, Z)$*, source $u$, and sink $v$. Note that $u, v$ are indeed vertices of $\mathbb{H}_Z$ since the root of $T$ belongs to $Z$. The construction incrementally builds a non-empty prefix $Z$ of $T$, maintaining the invariant that $\mathbb{H}_Z$
is $(V, k)$-thin. By Lemma 6.5, this implies that hypertorso$(T, Z)$ has a path-decomposition satisfying Condition (1) in the statement.

Initially, $Z := \{r\}$ contains only the root $r$ of $T$. Thus the vertex set of hypertorso$(T, Z)$ is $\beta(r)$, which is in $V$, so $\mathbb{H}_Z$ is trivially $(V, k)$-thin. Given now any prefix $Z$ satisfying the previous conditions, one can apply Lemma 6.4 to the associated network to find two uv-paths $P_1, P_2$ such that the only edges used by both $P_1$ and $P_2$ are the cutedges. If no edge of $\mathfrak{e}(T, \beta)$ is used by both $P_1$ and $P_2$, then Condition (2) holds, and we are done.

We now assume that this is not the case, meaning that there is some hyperedge $e \in \mathfrak{e}(T, \beta)$ which is a cutedge of $\mathbb{H}_Z$. By definition of $\mathfrak{e}(T, \beta)$, this hyperedge $e$ corresponds to the adhesion of some node $z \in \partial Z$. Consider then $Z' := Z \cup \{z\}$, which is still a prefix of $T$. Also, let $K$ denote the hypertorso of $z$ in $(T, \beta)$. One may then check that the network $\mathbb{H}_{Z'}$ is exactly $\mathbb{H}_Z[e \to K]$. It follows by Lemma 6.6 that $\mathbb{H}_{Z'}$ is also $(V, k)$-thin, allowing to continue with $Z'$. As $T$ is finite, this process must eventually halt with a prefix $Z$ satisfying Condition (2), proving the result. $\square$

Finally, the proof of Lemma 6.2 using Lemma 6.3, while highly non-trivial, is exactly the same as the proof of [3, Lemma 5.9]. We thus omit it.

## 6.3 Substitutions in thin networks

This section proves Lemma 6.6, which we restate here.

**Lemma 6.6 (Generalisation of [3, Lemma 5.8]).** Let $V$ be a downwards-closed family of subsets of a fixed ground set $U$. Let $\mathbb{H}$ be a $(V, k)$-thin network with underlying hypergraph $H$, and $K$ a hypergraph such that $V(K) \in V$, whose hyperedges all have order at most $k$. Moreover, assume that there exists a cutedge $e$ of $\mathbb{H}$ such that $V(H) \cap V(K) = e$. Then, $\mathbb{H}[e \to K]$ is also $(V, k)$-thin.

The proof is similar to [3, Lemma 5.8], the only significant difference being that $K$ no longer has bounded size. In some cases, their proof added all of $K$ to all bags of some path-decomposition, which for us would break the condition that bags are in $\mathbb{H}^{+O(k)}$. In these cases, we will instead add $K$ in a new bag, and add some fixed-size subset of $K$ to all other bags.

*Proof.* In the network $\mathbb{H}$, denote by $s, t$ the source and sink, and by $(e_1, \dots, e_p)$ the cutedge sequence, as well as $e_0 := \{s\}$ and $e_{p+1} := \{t\}$. Let $\ell \in \{1, \dots, p\}$ be the index of $e$, i.e. $e = e_\ell$. Call $\hat{H} := H[e \to K]$ the substitution we are interested in, and $\hat{\mathbb{H}} := \mathbb{H}[e \to K]$ the corresponding network (i.e. the network with hypergraph $\hat{H}$, source $s$, and sink $t$). As in the definition of thinness, for each $i \in \{0, \dots, p\}$, let $V_i$ denote the union of the vertex sets of all $(e_i, e_{i+1})$-bridges in $\mathbb{H}$, and for each $i \in \{1, \dots, p\}$, let $W_i$ denote the union of the vertex sets of all $e_i$-appendices in $\mathbb{H}$.

As shown in [3], the cutedge sequence of $\hat{\mathbb{H}}$ is of the form

$$(e_1, \dots, e_{\ell-1}, f_1, \dots, f_q, e_{\ell+1}, \dots, e_p),$$

where $f_1, \dots, f_q$ are hyperedges of $K$ (with potentially $q = 0$ if there is no such cutedge). We treat separately the special case $q = 0$ at the end of the proof. The proof from [3, Lemma 5.8] gives that for any $i \in \{0, \dots, p\} \setminus \{\ell - 1, \ell\}$,
the $(e_i, e_{i+1})$ bridges of $\hat{\mathbb{H}}$ are exactly the $(e_i, e_{i+1})$-bridges of $\mathbb{H}$, and that for each $i \in \{1, \dots, p\} \setminus \{\ell\}$, the $e_i$-appendices of $\hat{\mathbb{H}}$ are exactly the $e_i$-appendices of $\mathbb{H}$. Furthermore, the only other possible cutedge components of $\hat{\mathbb{H}}$ are of the following types (see Figure 3):

* for each $j \in \{1, \dots, q-1\}$, all $(f_j, f_{j+1})$-bridges of $\hat{\mathbb{H}}$ are included in $W_\ell \cup V(K)$;

* for each $j \in \{1, \dots, q\}$, all $f_j$-appendices of $\hat{\mathbb{H}}$ are included in $W_\ell \cup V(K)$;

* all $(e_{\ell-1}, f_1)$-bridges are included in $V_{\ell-1} \cup W_\ell \cup V(K)$, and conversely all of $V_{\ell-1}$ is covered by $(e_{\ell-1}, f_1)$-bridges;

* all $(f_q, e_{\ell+1})$-bridges are included in $V_\ell \cup W_\ell \cup V(K)$, and conversely all of $V_\ell$ is covered by $(f_q, e_{\ell+1})$-bridges.

For each $j \in \{0, \dots, q\}$, let $X_j$ denote the union of the vertex sets of the $(f_j, f_{j+1})$-bridges in $\hat{\mathbb{H}}$, where we set $f_0 := e_{\ell-1}$, and $f_{q+1} := e_{\ell+1}$, and for each $j \in \{1, \dots, q\}$, let $Y_j$ denote the union of the vertex sets of the $f_j$-appendices in $\hat{\mathbb{H}}$ (see Figure 3).

Let us now check that these sets satisfy the thinness conditions. First note that $\hat{\mathbb{H}}$ has no hyperedge of order more than $k$, since neither $\mathbb{H}$ nor $K$ do. For any $i \in \{0, \dots, p\} \setminus \{\ell-1, \ell\}$, since the union of all $(e_i, e_{i+1})$-bridges is the same in $\mathbb{H}$ and $\hat{\mathbb{H}}$, and since $\mathbb{H}$ is $(\mathcal{V}, k)$-thin, the subhypergraph induced by this union also has a path-decomposition satisfying Property (a) of thinness. For the same reason, the union of $e_i$-appendices of $\hat{\mathbb{H}}$ for $i \in \{1, \dots, p\} \setminus \{\ell\}$ has a path-decomposition with Property (b).

It remains to exhibit path-decompositions of the hypergraphs $\hat{\mathbb{H}}[X_j], \hat{\mathbb{H}}[Y_j]$ satisfying the properties from the definition of $(\mathcal{V}, k)$-thin hypergraphs.

<figure><img src="image_4.png" /><figcaption>Figure 3: Configuration in the proof of Lemma 6.6. The dotted rectangle represents $e_\ell$, the region in light blue represents the vertices of $K$, and the purple regions represent $W_\ell$. Note that the hyperedges $f_j$ are not necessarily disjoint in general.</figcaption></figure>

We start by considering some $j \in \{1, \dots, q-1\}$, and show that $\hat{\mathbb{H}}[X_j]$ has a path-decomposition satisfying (a). Since $\mathbb{H}$ is $(\mathcal{V}, k)$-thin, there is a path-
decomposition $P$ of $H[W_\ell]$ of adhesion at most $k$, whose leftmost bag contains $W_\ell \cap e_\ell$, and whose bags all belong to $\mathcal{V}$. As $V(K) \cap V(H) = e_\ell$, the set $e_\ell$ separates $V(K)$ from $W_\ell$ in $\hat{H}$ (since $W_\ell \subseteq V(H)$), so we can add $V(K)$ as a bag to the left of $P$ to obtain a path-decomposition $P'$ of $\hat{H}[W_\ell \cup V(K)]$. This first bag $V(K)$ is in $\mathcal{V}$ by assumption, and its adhesion is $e_\ell \cap W_\ell$, which has size at most $k$. Finally, since $X_j$ is contained in $W_\ell \cup V(K)$, we can restrict each bag of $P'$ to its intersection with $X_j$, yielding a path-decomposition $P''$ of $\hat{H}[X_j]$, with adhesion at most $k$ and bags in $\mathcal{V}$ (we use here that $\mathcal{V}$ is downwards-closed). By construction, the leftmost bag of $P''$ is $V(K) \cap X_j$, which contains $f_j \cap X_j$. Finally, we add $f_{j+1} \cap X_j$, which has size at most $k$, to all bags of $P''$. The resulting decomposition of $\hat{H}[X_j]$ has adhesion at most $2k$, bags in $\mathcal{V}^{+k}$, and contains $f_j \cap X_j$ in the leftmost bag and $f_{j+1} \cap X_j$ in the rightmost one, as required by (a).

Next we show that $\hat{H}[X_0]$ (and symmetrically $\hat{H}[X_q]$) admits a path-decomposition satisfying (a). Recall that we have $X_0 \subseteq V_{\ell-1} \cup W_\ell \cup V(K)$, and $V_{\ell-1} \subseteq X_0$. Since $\mathbb{H}$ is $(\mathcal{V}, k)$-thin, there is a path-decomposition $P_1$ of $H[V_{\ell-1}]$ with adhesion at most $2k$, bags in $\mathcal{V}^{+k}$, and containing $e_{\ell-1} \cap V_{\ell-1}$ and $e_\ell \cap V_{\ell-1}$ in the leftmost and rightmost bags respectively. This is also a decomposition of $\hat{H}[V_{\ell-1}]$, since the latter and $H[V_{\ell-1}]$ can only differ by hyperedges contained in $e_\ell$, and $e_\ell \cap V_{\ell-1}$ appears in a bag of the decomposition. Next, we consider the path-decomposition $P'$ of $\hat{H}[W_\ell \cup V(K)]$ with adhesion $k$ and bags in $\mathcal{V}$ from the previous paragraph, whose leftmost bag is $V(K)$, and thus contains $e_\ell$. We let $P_2$ be the path-decomposition of $\hat{H}[W_\ell \cup V(K)]$ obtained after adding $f_1$ in every bag of $P'$. Then $P_2$ as adhesion at most $2k$, bags in $\mathcal{V}^{+k}$, its leftmost bag is $V(K)$, and its rightmost bag contains $f_1$. Since the vertex set of $e_\ell$ separates $V_{\ell-1}$ from $W_\ell \cup V(K)$ in $\hat{H}$, and the rightmost bag of $P_1$ contains $V_{\ell-1} \cap e_\ell$, it follows that concatenating $P_1$ with $P_2$ yields a path-decomposition $P$ of $\hat{H}[V_{\ell-1} \cup W_\ell \cup V(K)]$. Clearly, the bags of $P$ are all in $\mathcal{V}^{+k}$, and the leftmost and rightmost bags contain $e_{\ell-1} \cap V_{\ell-1}$ and $f_1$ respectively. The adhesion between $P_1$ and $P_2$ is contained in $e_\ell$, so all adhesions of $P$ have size at most $2k$. Finally, if we restrict the decomposition $P$ by keeping for each bag its intersection with $X_0$, we obtain a path-decomposition that satisfies condition (a) (note that the fact that the leftmost bag contains $e_{\ell-1} \cap X_0$ follows from the equality $e_{\ell-1} \cap X_0 = e_{\ell-1} \cap V_{\ell-1}$).

Finally, for $j \in \{1, \dots, q\}$, we show that $\hat{H}[Y_j]$ has a path-decomposition satisfying (b). Once again, consider the path-decomposition $P'$ of $\hat{H}[V(K) \cup W_\ell]$ defined two paragraphs ago, with adhesion $k$, bags in $\mathcal{V}$, and the leftmost bag being $V(K)$, which in particular contains $f_j$. Restricting each bag of $P'$ to its intersection with $Y_j$ yields a path-decomposition of $\hat{H}[Y_j]$ satisfying (b).

Combining the previous three paragraphs, we conclude that when $q > 0$, then $\mathbb{H}$ is indeed $(\mathcal{V}, k)$-thin. It remains to prove that it is also the case when $q = 0$. For this special case, we can conclude in a similar way as in previous paragraph: assume that $q = 0$, and let $X_0$ denote the union of all $(e_{\ell-1}, e_{\ell+1})$-bridges in $\hat{H}$. As $\mathbb{H}$ is $(\mathcal{V}, k)$-thin, we only have to show that $\hat{H}[X_0]$ has a path-decomposition satisfying (a). As $\mathbb{H}$ is $(\mathcal{V}, k)$-thin, there exist respectively some path-decompositions $P_1, P_2, P_3$ of $H[V_{\ell-1}], H[W_\ell]$ and $H[V_\ell]$, such that $P_1, P_3$ satisfy (a), and $P_2$ satisfies (b). We let $P_2'$ be the path-decomposition obtained from $P_2$ after adding the vertices of $e_\ell$ in all bags, and now consider the path-
decomposition of $\hat{H}[X_0]$ obtained by concatenating $P_1$, then $P'_2$, then one bag equal to $V(K)$, and finally $P_3$. As $V(K)$ belongs to $\mathcal{V}$, and $e_\ell = V(K) \cap V(H)$, this path-decomposition indeed satisfies (a). $\square$

This completes the proof of Lemma 6.6, and with it Theorem 1.6.

# 7 Graphs excluding a minor

In this section, we prove our main result that graphs excluding a fixed graph as a minor have bounded basis number.

**Theorem 1.3.** There exists a function $f_{1.3}: \mathbb{N} \to \mathbb{N}$ such that for any graph $H$, any $H$-minor free graph $G$ satisfies $\text{bn}(G) \le f_{1.3}(|H|)$.

Using [20] to obtain polynomial bounds in Theorem 1.6, as well as the recent polynomial bounds for the Graph Minor Structure Theorem of Gorsky, Seweryn and Wiederrecht [10], we obtain that the bound $f_{1.3}$ is a polynomial

$$f_{1.3}(t) = O(t^c)$$

for some constant $c \le 32210$.

**Overview** The proof of Theorem 1.3 consists of a combination of the Graph Minor Structure Theorem of Robertson and Seymour [24] (see Theorem 7.13) together with Theorem 1.6. For every fixed graph $H$, the Graph Minor Structure Theorem allows to find a tree-decomposition of any $H$-minor free graph $G$ with bounded adhesion, whose torsos are almost-embeddable in some surface of bounded genus (see Subsection 7.2 for definitions). Since almost-embeddability is a monotone property, by Theorem 1.6, we only need to prove that these almost-embeddable graphs have bounded basis number; this is Theorem 7.7.

Let us sketch a false but enlightening proof of this fact. Roughly speaking, a graph $G$ is almost-embeddable in a surface $\mathcal{S}$ if it can be constructed as follows. First take a graph $G_0$ embedded in $\mathcal{S}$. Pick a bounded number of faces $F_1, \dots, F_k$ of $G_0$, and for each of them add a vortex $G_i$, i.e. a graph with bounded pathwidth whose intersection with $G_0$ is exactly the cycle boundary of $F_i$. Finally, add a bounded number of apices, i.e. vertices with arbitrary edges to the rest of the graph. The base graph $G_0$ has bounded basis number by Theorem 1.2. Since the vortices $G_i$ have bounded pathwidth, they have bounded basis number by Theorem 1.7, and since $G_i$ is glued to $G_0$ on the cycle boundary of $F_i$, Lemma 2.6 shows that $G_0 \cup G_1 \cup \dots \cup G_k$ still has bounded basis number. Finally, adding apices preserves bounded basis number by Lemma 2.4, proving that $\text{bn}(G)$ is bounded.

The mistake here is to implicitly assume that the embedding of $G_0$ is cellular (i.e. that each face is homeomorphic to a disc), and thus that its face boundaries are cycles, or even connected. When $G_0$ is connected, one can always find a cellular embedding of $G_0$ on a surface with genus no larger than that of $\mathcal{S}$, but the faces of this new embedding may be different, and might not allow constructing the desired vortices. Moreover, $G_0$ might not even be connected. It is also always possible to replace $G$ and $G_0$ by some supergraphs $G'$ and $G'_0$ in the construction so that the desired embedding of $G'_0$ is cellular, but since basis number is not monotone under taking subgraphs, proving that $\text{bn}(G')$ is
bounded is not sufficient. We thus need the more formal and general definition of almost-embeddability, allowing a non-cellular embedding of $G_0$, and vortices in faces that are not homeomorphic to disks, see Section 7.2. In particular, the subgraphs $G_0 \cap G_i$ on which vortices are glued are not necessarily connected in this definition, preventing us from applying Lemma 2.6. This is the main source of technicalities in the proof of Theorem 7.7. To overcome this issue, we will use in particular the fact that any graph embedded in a surface of bounded genus whose dual has bounded diameter has bounded treewidth [6, 19], which we observe still holds for non-cellular embeddings (see Corollary 7.6).

We give in Subsection 7.1 basic definitions and results concerning graphs embedded in surfaces, as well as the aforementioned Corollary 7.6. Subsection 7.2 then presents the definition of almost-embeddability, and proves Theorem 7.7. Finally, we conclude the proof of Theorem 1.3 in Subsection 7.3, combining the Graph Minor Structure Theorem together with Theorems 1.6 and 7.7.

## 7.1 Graphs embedded in surfaces

We gather in this section some known results about graphs embeddable in surfaces of bounded genus, which we will need later in our proof of Theorem 1.3, when dealing with graphs almost embeddable in surfaces of bounded genus.

We allow graphs in this section to have loops and multi-edges (with finite multiplicities). Note that removing multi-edges or loops to make a graph simple changes neither its treewidth, its diameter, nor its embeddability in a given surface.

### 7.1.1 Topological embeddings in surfaces

We briefly introduce here some basic concepts related to graphs embedded in surfaces, which will be used in our proofs, and refer to [21] for a more comprehensive treatment of the topic. We work in compact arc-connected surfaces $\mathcal{S}$ without boundary. A simple *curve* on $\mathcal{S}$ is an injective continuous mapping $\gamma : [0, 1] \to \mathcal{S}$. The curve $\gamma$ and its image $\gamma([0, 1])$ in $\mathcal{S}$ are implicitly identified. An open (resp. closed) *disk* in $\mathcal{S}$ is a subspace homeomorphic to the open (resp. closed) unit disk in $\mathbb{R}^2$.

Given a fixed surface $\mathcal{S}$, an *embedding* of a graph $G$ in $\mathcal{S}$ is an injective mapping $\varphi$ sending vertices of $G$ to points of $\mathcal{S}$, and edges of $G$ to simple curves in $\mathcal{S}$ whose extremities are the images of the endpoints of each edge. In particular, the (topological) interiors of the images of edges must be pairwise disjoint, and also disjoint from the images of the vertices. When we are given a pair $(G, \varphi)$, where $G$ is a graph and $\varphi$ is an embedding of $G$ in $\mathcal{S}$, we say that $G$ is *embedded* in $\mathcal{S}$. We usually leave the embedding $\varphi$ implicit, and whenever a graph is embedded in $\mathcal{S}$, we identify it with its image $\varphi(V(G) \cup E(G))$ in $\mathcal{S}$.

If $G$ is a (finite) graph embedded via $\varphi$ in $\mathcal{S}$, then $\mathcal{S} \setminus G$ is a finite collection of open disjoint arc-connected components, called the *faces* of $G$. The topological boundary of a face $F$ is denoted by $\partial F$. The boundary $\partial F$ coincides with the image $\varphi(H)$ of some subgraph $H \subseteq G$, and we also use $\partial F$ to denote this subgraph. The edges and vertices in $\partial F$ are said to be *incident* to $F$. A graph embedding in which all faces are open disks is called a *cellular embedding*. We stress out that we will need to consider non-cellular embeddings too.
Let $G$ be embedded in $\mathbb{S}$ via $\varphi$, and $H$ a subgraph of $G$ implicitly embedded by the restriction of $\varphi$. Then every face of $G$ is contained in some face of $H$. If an embedded graph has at least one edge, then all its face boundaries contain at least one edge.

### 7.1.2 Facial walks

This subsection is dedicated to the proofs of Lemmas 7.1 and 7.2 below, which are very basic results on graphs embedded in surfaces. To prove them, we will first need some more notions about facial walks on surfaces, and use for this the formalism from [21].

**Combinatorial embeddings** A central concept introduced by Mohar and Thomassen [21, Section 4] when working on graphs in surfaces is the notion of *combinatorial embedding*, which allows to describe topological embeddings of graphs on a surface in a purely combinatorial way, up to homeomorphism. We stress out that [21] focuses on cellular embeddings of graphs on surfaces, while our proof will require to consider general embeddings. However, the notions and results we will use here also hold in this settings, and we refer to [12] for a more complete and formal treatment of general embeddings.

A *combinatorial embedding* of a graph $G$ is a pair $(\Pi, \varepsilon)$, where:

* $\Pi = (\pi_v)_{v \in V(G)}$ is a *rotation system*, i.e. for each vertex $v \in V(G)$, $\pi_v : E(G) \to E(G)$ is a cyclic permutation of the edges from $E(G)$ incident to $v$;

* $\varepsilon : E(G) \to \{-1, +1\}$ is a *signature mapping*.

For each vertex $v \in V(G)$ and edge $e \in E(G)$ incident to $v$, we call the cyclic sequence $(e, \pi_v(e), \pi_v^2(e), \dots)$ the *clockwise ordering* around $v$ in $(\Pi, \varepsilon)$, and its inverse sequence the *anticlockwise ordering* around $v$ in $(\Pi, \varepsilon)$. Intuitively, if $G$ is a graph embedded in a surface $\mathbb{S}$ and $v$ a vertex of $G$, then the circular ordering $\pi_v$ correspond to the clockwise/anticlockwise ordering induced in a small neighbourhood of $v$ on $\mathbb{S}$ on the edges incident to $v$, and for each edge $e \in E(G)$, the sign $\varepsilon(e)$ indicates whether when travelling through the edge $e$ on $\mathbb{S}$, the “left and right” sides around $e$ are twisted or not. Each graph $G$ embedded in a surface $\mathbb{S}$ induces a natural canonical combinatorial embedding, which is unique, up to performing the following operation an arbitrary number of times: choose a vertex $v \in V(G)$, replace $\pi_v$ by $\pi_v^{-1}$ and all signatures of edges $e$ incident to $v$ by their inverse $-\varepsilon(e)$.

**Facial walks** Given a combinatorial embedding $(\Pi, \varepsilon)$ as above of a graph $G$, the *face traversal procedure* is a way to produce (closed) walks starting from a vertex $v$ as follows. For this definition, we consider edges as bi-oriented, i.e. if $e = uv \in E(G)$, the edge $e' = vu$ is also an edge of $E(G)$, distinct from $e$. We always start the procedure in the “clockwise mode”. Choose an initial edge $e = vu$ incident to $v$, and traverse $e$ from $v$ to $u$. If $\varepsilon(e) = 1$, then choose $\pi_u(e)$ to be the next edge to traverse starting from $u$. If $\varepsilon(e) = -1$, then switch to the “anticlockwise mode” and choose $\pi_u^{-1}(e)$ to be the next edge to traverse starting from $u$. Repeat then this procedure with the rule that traversing any edge $e$ with signature $\varepsilon(e) = -1$ switches the mode between clockwise and anti-clockwise,
and the next edge to be traversed after $e$ is the successor of $e$ in the clockwise ordering $\pi_v$ or the anticlockwise ordering $\pi_v^{-1}$, depending on the mode. The procedure stops when the initial configuration is reproduced, i.e. as soon as we traverse a second time the initial edge $e$, in the same direction and in clockwise mode. This procedure is easily reversible, hence we never repeat twice the same configuration (i.e. we never traverse a given oriented edge in the same mode twice) before looping back to the initial configuration.

A facial walk in $(\Pi, \varepsilon)$ is a walk $L = e_1 \dots e_k$ obtained after starting a face traversal from an initial edge $e_1$ (recall that the edges $e_i$ are oriented here). As facial walks are by definition of the procedure closed walks, we consider them up to inverse, and cyclic rotations, i.e. for every $m \ge 1$, $L$ is the same walk than the walks $e_k \dots e_1$ and $e_{1+m} \dots e_{k+m}$ (where indices are taken modulo $k$). We also follow the convention that an isolated vertex in the graph gives rise to a trivial facial walk.

The crucial property that we will use is that if $G$ is a graph embedded on a surface $S$, and if $(\Pi, \varepsilon)$ denotes its associated canonical embedding, then every face boundary (in the topological sense) of $G$ is a disjoint union of facial walks (with respect to the above definition). In the special case of cellular embeddings, the boundary of a face is a single facial walk instead (and in particular is connected). Moreover, every edge $e$ of $G$, when considered as unoriented, appears twice in the collection of all facial walks of $G$, corresponding to the two sides of $e$. Precisely, one of the following three cases occurs:

* Either $e$ appears exactly once in two face boundaries $\partial F, \partial F'$ for two distinct faces $F, F'$,

* or $e$ appears in two disjoint facial walks inside the boundary $\partial F$ of a unique face $F$,

* or $e$ appears twice (but in different orientations) within a single facial walk of a unique face $F$. In this last case, $e$ is called *singular*.

With this correspondence between facial walks and face boundaries in mind, the proofs of the next two lemmas will follow easily.

**Lemma 7.1.** Let $G$ be a graph embedded in a surface $S$ with connected components $G_1, \dots, G_m$. Then the set of facial walks in $G$ is exactly the union of sets of facial walks of the embedded subgraphs $G_i$.

*Proof.* For a given topological embedding of $G$, the corresponding combinatorial embedding $(\Pi, \varepsilon)$ of $G$ is the disjoint union $\Pi = \bigsqcup_{i=1}^m \Pi_i$ and $\varepsilon = \bigsqcup_{i=1}^m \varepsilon_i$ of the corresponding sub-embeddings $(\Pi_i, \varepsilon_i)$ of $G_i$ for each $i \in [m]$. The statement then easily follows from the combinatorial description of facial walks. $\square$

**Lemma 7.2.** Consider a graph $G$ embedded in $S$, a face $F$ of $G$, and two distinct facial walks $W_1, W_2$ in $\partial F$. If $\gamma$ is a simple curve connecting a vertex $x \in V(W_1)$ to a vertex $y \in V(W_2)$, such that the topological interior of $\gamma$ is included in $F$, then $\gamma$ does not disconnect $F$. This implies that each facial walk of $G \cup \gamma$ contains as subset a facial walk of $G$.

*Proof.* We set $e := xy$ and consider the graph $G' := (V(G), E(G) \cup \{e\})$. We consider the embedding of $G'$ on $S$, obtained from the one of $G$, and where
<figure><img src="image_5.png" /><figcaption>Figure 4: Configuration of Lemma 7.2.</figcaption></figure>

we map $e$ to $\gamma$, and let $(\Pi', \varepsilon')$ be a some associated canonical combinatorial embedding of $G'$. We claim that $e$ is a singular edge in $G'$.

Indeed, let $W = e_1 \dots e_k$ be the closed facial walk in $G'$ obtained when starting by traversing $e$ from $x$ to $y$ (i.e. $e_1 = e$). Suppose for a contradiction $e$ is not singular, i.e. appears only once in $W$. Then one may check the subwalk $W' := e_2 \dots e_k$ is also a subwalk of a facial walk from $\partial F$ in $G$ connecting $y$ to $x$, contradicting the assumption that $x, y$ belong to distinct components of $\partial F$.

Thus $e$ is singular, meaning that its two sides still belong to the same face $F$, i.e. adding $e$ did not disconnect $F$. Finally, since the facial walk $W$ in $G'$ contains both occurrences of $e$, it is simple to check that any facial walk of $G'$ other than $W$ is also a facial walk of $G$. Since $W$ intersects the facial walks $W_1$ and $W_2$ of $G$, this implies that $W_1$ and $W_2$ are in fact fully contained in $W$. Combining these two facts, each facial walk of $G'$ contains a facial walk of $G$, as claimed. $\square$

### 7.1.3 Dual and diameter

Given a graph $G$ embedded in a surface $S$, its dual is the graph $G^*$ whose vertices are the faces of $G$, and where for every edge $e \in E(G)$, if $F, F'$ denote the at most two faces of $G$ incident to $e$, we add an edge $e^*$ between $F$ and $F'$. The graph $G^*$ also admits a natural embedding in $S$. Since $S$ is arc-connected, $G^*$ is always connected. Note that while duals are usually considered only for cellular embeddings, the definition remains meaningful for non-cellular embeddings. In this general setting, we may however have $(G^*)^* \neq G$.

One can however extend a graph to obtain a cellular embedding without changing the dual graph. We would like to thank Louis Esperet for this suggestion.

**Lemma 7.3.** Let $G$ be embedded via $\varphi$ on a surface $S$ of genus $g$. Then there is a supergraph $G'$ of $G$, and a cellular embedding $\varphi' : G' \to S'$ for some surface $S'$ of genus at most $g$, such that the dual of $G'$ with respect to $\varphi'$ is isomorphic to the dual of $G$ with respect to $\varphi$, plus some loops.

*Proof.* Consider a face $F$ of $G$ with facial walks $W_1, \dots, W_m$. In $S$, one can always replace the face $F$ by a copy of the 2-dimensional sphere with $m$ holes, where the holes are glued to the walks $W_1, \dots, W_m$ respectively — in general $F$ will be this sphere with holes, plus possibly some handles or crosscaps added.
Call $\mathcal{S}'$ and $\varphi'$ the surface and embedding of $G$ obtained after performing this replacement for all faces. Then $\mathcal{S}'$ has genus at most $g$, and the dual of $G$ with respect to $\varphi$ and to $\varphi'$ are isomorphic.

Assuming now that all faces are homeomorphic to spheres with holes, we construct $G'$ as follows: for each face $F$ of $G$ with respect to $\varphi'$ whose boundary is not connected, we draw in $F$ a forest $T_F$ such that $F \setminus T_F$ is arcwise connected, that the union of $T_F$ with the facial walks of $F$ is connected, and such that the leaves of $T_F$ belong pairwise to distinct components of $\partial F$. Such a forest can be constructed after iteratively applying Lemma 7.2. After adding this forest to $G'$, the face $F$ becomes homeomorphic to a disk, and the dual only changes in that a loop is added to $F$ for each edge of $T_F$. Repeating this for all faces, we obtain $G'$ embedded cellularly in $\mathcal{S}'$, whose dual is isomorphic to the dual of $G$ except for the additional loops. $\square$

We can now state the two important results we will use on treewidth of graphs embedded in surfaces. The first one was proved by Eppstein, based on Baker's technique, and states that graphs with bounded diameter and bounded genus have bounded treewidth.

**Theorem 7.4 ([6]).** If $G$ is a graph embedded in a surface of genus $g$, then

$$ \mathrm{tw}(G) = O(g \cdot \mathrm{diam}(G)). $$

The second is due to Mazoit, and relates the treewidth of a graph and its dual, in the case of cellular embeddings.

**Theorem 7.5 ([19]).** Let $G$ be a graph cellularly embedded in a surface $\mathcal{S}$ of genus at most $g$. Then

$$ \mathrm{tw}(G^*) \le \mathrm{tw}(G) + g + 1. $$

Combining the previous three results, we obtain the following statement, which will be used in the next section.

**Corollary 7.6.** Let $G$ be a graph embedded in a surface $\mathcal{S}$ of genus $g$. Then

$$ \mathrm{tw}(G) = O(g \cdot \mathrm{diam}(G^*)). $$

*Proof.* Let $G'$ and $\mathcal{S}'$ be given by Lemma 7.3. Then

$$ \mathrm{tw}(G) \le \mathrm{tw}(G') \le \mathrm{tw}(G'^*) + g + 1 = O(g \cdot \mathrm{diam}(G'^*)) = O(g \cdot \mathrm{diam}(G^*)). $$

where the first inequality holds as $G$ is a subgraph of $G'$, and the second and third follow from Theorems 7.5 and 7.4 respectively. $\square$

## 7.2 Almost embeddability

In this section, we give a formal definition of the notion of almost embeddability in a surface, which plays a central role in the Graph Minor series of papers. Our main result is Theorem 7.7, which states that graphs almost embeddable in surfaces of bounded genus have bounded basis-number. Our proof of Theorem 1.3 will then immediately follows from a combination of this result with the Graph Minor Structure Theorem (see Theorem 7.13) and Theorem 1.6.
**Apices** We recall the definition of apices, which was already given in Section 6.1. For class of graphs $\mathcal{G}$ and every $k \ge 0$, we let $\mathcal{G}^{+k}$ denote the class of those graphs $\mathcal{G}$ for which there exists a subset $A$ of vertices (called *apices*) of size at most $k$, such that $\mathcal{G} - A \in \mathcal{G}$.

**Vortices** Let $G_0$ be a graph embedded in a surface $\mathcal{S}$, let $F$ be a face of $G_0$, and $D$ a closed disk contained in $\bar{F}$, such that $D$ and $G_0$ only intersect in points of $\partial D \cap V(G_0)$. Denote by $U := \partial D \cap V(G_0)$ these intersection points, and order them as $U := \{u_1, \dots, u_n\}$ following one of the two cyclic orderings $\le_D$ induced by $\partial D$. A *vortex* attached to $U$ is any graph $G_U$ that intersects $G_0$ only in $U$. There are many ways to define the *width* of a vortex that are equivalent up to constant factors, and we choose here to use the one related to pathwidth: the width of the vortex $G_U$ is the smallest $k$ such that $G_U$ has a path-decomposition of width $k$, with bags $B_1, \dots, B_n$ such that $u_i \in B_i$ for each $i \in [n]$, with again $u_1, \dots, u_n$ the vertices of $U$ ordered cyclically along $D$ (the choice of the first vertex $u_1$ may affect the width with this definition, but only by a multiplicative factor of at most 2).

Let $U_1, \dots, U_k$ be subsets of $V(G_0)$, and $D_1, \dots, D_k$ be pairwise disjoint closed disks on $\mathcal{S}$ such that for each $i \in [k]$, there exists a face $F_i$ of $(G_0, \varphi)$, such that $D_i \subseteq \bar{F}_i$, and $\partial D_i \cap V(G) = U_i$. If $G_{U_1}, \dots, G_{U_k}$ are vortices such that each $G_{U_i}$ attaches to $U_i$, then we similarly say that the graph $G := G_0 \cup G_{U_1} \cup \dots \cup G_{U_k}$ is obtained after attaching to $G_0$ the vortices $G_{U_1}, \dots, G_{U_k}$.

**Almost embeddability** Let $\mathcal{S}$ be a surface and $a, k \in \mathbb{N}$. A graph $G$ is $(a, k)$-almost embeddable in $\mathcal{S}$ if $G$ if there exists some subset $A \subseteq V(G)$ of vertices (apices) of size at most $a$, and some subgraphs $G_0, \dots, G_k$ such that $V(G) \setminus A = G_0 \cup \dots \cup G_k$, and such that:

(a) $G_0$ admits an embedding $\varphi$ in $\mathcal{S}$;

(b) the graphs $G_1, \dots, G_k$ are pairwise vertex disjoint;

(c) for each $i \in [k]$, there exists a face $F_i$ of $(G_0, \varphi)$, and a closed disk $D_i \subseteq \bar{F}_i$ such that the disks $D_i$ are pairwise disjoint, each disk $D_i$ intersects $G$ only in $U_i := \partial D_i \cap V(G_0)$, and $G_i$ is a vortex of width at most $k$ attached to $U_i$.

For each $a, k, g \in \mathbb{N}$, we let $\mathcal{G}_{a,k,g}$ denote the class of graphs which are $(a, k)$-almost embeddable in a surface of genus at most $g$. Note that $\mathcal{G}_{a,k,g}$ is monotone. The Graph Minor Structure Theorem (see Theorem 7.13 later) states that for every fixed graph $H$, there exist $a, k, g$ such that every graph $G$ excluding $H$ as a minor can be decomposed using the graphs of $\mathcal{G}_{a,k,g}$ as basic bricks. We prove that $\mathcal{G}_{a,k,g}$ has bounded basis number:

**Theorem 7.7.** Let $a, k, g \in \mathbb{N}$ and $G \in \mathcal{G}_{a,k,g}$. Then

$$ \mathrm{bn}(G) = f_{1.5}(\alpha_{7.6} \cdot (g+1) \cdot (6k^2 + 5k - 1)) + O(\log(g)^2) + 2a, $$

where $\alpha_{7.6}$ denotes the multiplicative constant from Corollary 7.6.

The rest of this section is dedicated to the proof of this result.
Firstly, by Lemma 2.4, adding a apices increases the basis number by at most 2a. We can thus focus on the case a = 0. Throughout this section, we fix a graph G ∈ G0,k,g, obtained from a graph G0 embedded in a surface S of genus at most g after adding vortices G1, ..., Gk of width at most k. Furthermore, we denote by Fı, Dı the face and disk containing Gı, and Uı := V(G0) ∩ V(Gı) for each i ∈ [k]. We will also assume that G0 has at least one edge, as otherwise G consists in the disjoint union of the vortices Gı. As each of the graphs Gı has pathwidth at most k, Theorem 1.7 then implies that in this special case, bn(G) = O(k).

The first step of the proof is to apply Lemma 2.8 for two subgraphs G<sub>X</sub>, G<sub>Y</sub>
with G = G<sub>X</sub> ∪ G<sub>Y</sub>, where G<sub>X</sub> := G<sub>0</sub>, and G<sub>Y</sub> is a supergraph of G<sub>1</sub> ∪ · · · ∪ G<sub>k</sub>
that we will now define.

Let $\mathcal{C}_0$ denote the set of connected components of $G_0$, seen as vertex subsets.
For each component $W \in \mathcal{C}_0$, and each face $F_i$ containing a vortex, we define
the (possibly empty) subgraph $\Theta_{W,i} := G_0[W] \cap \partial F_i$, i.e. the union of those
facial walks of $F_i$ that are contained in $W$. Note that $\Theta_{W,i}$ is not necessarily
connected, and that $U_i \cap W \subseteq V(\Theta_{W,i})$ for each $i \in [k]$ and $W \in \mathcal{C}_0$. Next,
taking the union over all vortex faces, we define $\Theta_W := \bigcup_{i \in [k]} \Theta_{W,i}$ for each
$W \in \mathcal{C}_0$. Choose now a connecting subforest $T_W$ in $G_0[W]$ for the family of
connected components of $\Theta_W$, given by Remark 2.1 (with $T_W$ being possibly
empty, when $\Theta_W$ is already connected). Finally, we define $\Gamma_W := \Theta_W \cup T_W$,
which is a connected subgraph of $G_0[W]$, and

$$
\Gamma := \bigcup_{W \in \mathcal{C}_0} \Gamma_W.
$$

See Figure 5 for an illustration. Clearly, $\Gamma$ is an embedded subgraph of $G_0$, whose connected components are the $\Gamma_W$'s. Observe that by construction, for each $i \in [k]$, the boundary $\partial F_i$, when considered as a subgraph of $G_0$, is a subgraph of $\Gamma$. In particular $U_i \subseteq V(\Gamma)$.

We call a connected component, respectively a facial walk *trivial* if it consists
only of a single vertex.

**Claim 7.8.** For any $W \in C_0$, any non-trivial facial walk of $\Gamma_W$ contains an edge incident to one of the faces $F_1, \dots, F_k$.

Proof of the Claim. First note that $G_0[W]$ is non-trivial, since we consider a non-trivial walk in it. It follows that any facial walk of $G_0[W]$ is non-trivial, which is in particular the case of the facial walks constituting $\Theta_W$. Thus $\Theta_W$ has no isolated vertices, and by definition consists solely of edges incident to $F_1, \dots, F_k$.

Observe now that the connecting forest $T_W$ is obtained by starting from $\Theta_W$, choosing iteratively two distinct components of a subgraph $H$ of $\Gamma$, and connecting them with a path of $G_0[W]$, whose associated simple curve $\gamma$ in $S$ is internally disjoint from $H$. By repeated applications of Lemma 7.2, it follows that each facial walk of $\Gamma_W$ contains as a subset a facial walk of $\Theta_W$, which itself contains an edge incident to one of $F_1, \dots, F_k$, proving the result. ■

**Claim 7.9.** For each face *F* of *Γ*, there is an edge in the face boundary ∂*F* which is incident to one of the faces *F*<sub>1</sub>, ..., *F*<sub>*k*</sub>.
<figure><img src="image_6.png" /><figcaption>Figure 5: Top: In dark green, a graph $G_0$ embedded in the orientable surface of genus 2. In orange a collection of pairwise disjoint closed disks which only intersect $G_0$ in $V(G_0)$. Note that $D_1, D_3$ and $D_4$ are contained in the same face of $G_0$. Bottom: The graph $\Gamma$ constructed with respect to the disks $D_1, D_2, D_3, D_4$ is represented in thick, magenta. The graph $H_{\Gamma}$ defined later in the proof corresponds to the union of the magenta graph and the orange cycles.</figcaption></figure>
*Proof of the Claim.* Recall that we assumed $G_0$ to be non-trivial, hence the face boundary $\partial F$ must contain some edge from some non-trivial component $W \in C_0$. In particular, by Lemma 7.1, $\partial F$ also contains a non-trivial facial walk of $\Gamma_W$. The result follows by Claim 7.8. ■

We now set $G_X := G_0$, and $G_Y := \Gamma \cup \bigcup_{i=1}^k G_i$, and claim that $(G_X, G_Y)$ satisfies the assumptions of Lemma 2.8.

**Claim 7.10.** For each connected component $W$ of $G_X$, the graph $G_X[W] \cap G_Y$ is connected.

*Proof of the Claim.* Let $W$ be a connected component of $G_X = G_0$, i.e. $W \in C_0$. Clearly $G_X[W] \cap G_Y$ contains the graph $\Gamma_W$, which is connected by construction. Secondly, any vertex shared by $G_0$ and $G_i$ is in $U_i$, which is contained in $V(\Gamma)$, thus any vertex shared by $G_X$ and $G_Y$ is in $V(\Gamma)$. It follows that all vertices of $G_X[W] \cap G_Y$ belong to the subgraph $\Gamma[W] = \Gamma_W$. This proves that $\Gamma_W$ is a spanning subgraph of $G_X[W] \cap G_Y$, which is therefore connected. ■

As $G_X = G_0$ is embeddable in $\mathbb{S}$, Theorem 1.2 gives $\text{bn}(G_X) = O(\log(g)^2)$. To conclude the proof of Theorem 7.7, it thus remains to bound the basis number of the graph $G_Y$. We will show that $G_Y$ has bounded treewidth, which, by Theorem 1.5 will allow us to conclude. In fact, it will be more convenient to bound the treewidth of the supergraph $H_Y$ of $G_Y$, which we define as follows.

For each $i \in [k]$, we let $C_i$ be a cycle with vertex set $U_i$, which cyclically connects the vertices of $U_i$ according to the cyclic order induced by the disk $D_i$. We let $H_0 := G_0 \cup C_1 \cup \cdots \cup C_k$. As the disks $D_i$ have pairwise disjoint interiors, and as they only intersect $G_0$ in the vertex sets $U_i$, we can extend the embedding of $G_0$ to an embedding of $H_0$ in $\mathbb{S}$ such that each $C_i$ corresponds to the boundary $\partial D_i$ (note that by doing so, some edges of $H_Y$ might have multiplicity more than 1). We now define $H_Y := G_Y \cup C_1 \cup \cdots \cup C_k$, as well as $H_\Gamma := \Gamma \cup C_1 \cup \cdots \cup C_k$, which is a subgraph of both $H_Y$ and $H_0$, and thus we will consider it as an embedded subgraph in $\mathbb{S}$ (see Figure 5).

We stress out that while the basis number of $G \cup C_1 \cup \cdots \cup C_k$ can easily be bounded using Lemma 2.6 (this is exactly the false proof presented in the introduction of this section), this does not imply a bound on the basis number of $G$. The point of the first half of the proof was to replace this goal with bounding the treewidth of $G_Y$, for which it is of course sufficient to bound the treewidth of $H_Y$. We will show that $H_\Gamma$ has bounded treewidth using Corollary 7.6, and that a tree-decomposition of $H_\Gamma$ combines with the path-decompositions of the vortices to prove that $H_Y$ has bounded treewidth. Adding the cycles $C_i$ helps with the latter step.

**Claim 7.11.** We have

$$ \mathrm{tw}(H_Y) + 1 \le (k+1)(\mathrm{tw}(H_\Gamma) + 1). $$

*Proof of the Claim.* Let $(T, \beta)$ be a tree-decomposition of $H_\Gamma$ of optimal width. Furthermore, for each vortex $G_i$, denote by $u_i^1, \dots, u_{m_i}^i$ the vertices of $U_i$ ordered cyclically along the boundary of $D_i$. Since $G_i$ has width at most $k$, there is a path-decomposition of width $k$ of $G_i$ with bags $B_1^i, \dots, B_{m_i}^i$ of size at most $k+1$, such that $u_j^i \in B_j^i$.
We now define a mapping $\beta' : V(T) \to 2^{V(H_Y)}$ by setting for each $t \in V(T)$

$$ \beta'(t) := \beta(t) \cup \bigcup_{u_j^i \in \beta(t)} B_j^i. $$

In other words, $\beta'(t)$ is obtained from $\beta(t)$ by replacing each occurrence of a vertex $u_j^i \in U_i$ by the corresponding bag $B_j^i$ in the decomposition of $G_i$. Since $B_j^i$ itself contains $u_j^i$, we have $\beta'(t) \supseteq \beta(t)$. Also, $\beta(t)$ has size at most $\mathrm{tw}(H_\Gamma) + 1$, and each $B_j^i$ has size at most $k+1$, hence we have $|\beta'(t)| \le (k+1)(\mathrm{tw}(H_\Gamma) + 1)$ as desired. It only remains to prove that $(T, \beta')$ is a tree-decomposition of $H_Y$. Let us check the three conditions from the definition.

Condition (T1) states that each vertex of $H_Y$ is contained in some bag $\beta'(t)$. For vertices of $H_\Gamma$, this is immediate from the same condition on $(T, \beta)$, since $\beta(t) \subseteq \beta'(t)$ for all nodes $t$. For a vertex $v \in G_i$, we have $v \in B_j^i$ for some $j$, and $u_j^i \in \beta(t)$ for some $t \in V(T)$ since $u_j^i$ is a vertex of $H_Y$, hence $v \in \beta'(t)$.

Next (T2) requires each edge to be contained in some bag. Once again, this is immediate for edges of $H_\Gamma$ since $\beta(t) \subseteq \beta'(t)$, and for any edge $e$ in $G_i$, there is some bag $B_j^i$ containing $e$, and some $t \in V(T)$ such that $u_j^i \in \beta(t)$, hence $e \subseteq B_j^i \subseteq \beta'(t)$.

It remains to prove (T3), i.e. that for each vertex $x \in V(H_Y)$, the set $T_x = \{t \in V(T) : x \in \beta'(t)\}$ of bags containing $x$ induces a connected subtree of $T$. When $x$ is a vertex of $V(H_\Gamma) \setminus (U_1 \cup \cdots \cup U_k)$ (i.e. one which is not shared with any vortex $G_i$), this is immediate as the bags containing $x$ correspond to the exact same nodes in $T$, both with respect to $\beta$ and $\beta'$. Assume now $x \in V(G_i)$. Condition (T3) on the path-decomposition $B_1^i, \dots, B_{m_i}^i$ of $G_i$ gives that there is an interval $[a, b]$ in $[m_i]$ such that the bags $B_j^i$ that contain $x$ are exactly the ones with $j \in [a, b]$. Let us denote by $A = \{u_j^i : j \in [a, b]\}$ the corresponding interval of vertices in $A$. Due to the cycle $C_i$, the subgraph $H_\Gamma[A]$ is connected. Let $T_A := T[\{t \in V(T) : \beta(t) \cap A \ne \emptyset\}]$ be the subtree of $T$ induced by the set of nodes that contain some vertex of $A$. From the definition of $\beta'$, it is clear that $T_x = T_A$, and Remark 2.9 applied to $(T, \beta)$ gives that $T_A$ is a connected subgraph of $T$. ■

By Claim 7.11, it suffices to bound the treewidth of $H_\Gamma$ in order to conclude the proof. This follows from Corollary 7.6 and the next claim.

**Claim 7.12.** The dual of the graph $H_\Gamma$ has diameter at most $6k - 2$.

*Proof of the Claim.* First, let us point out that this claim only considers subgraphs of $H_0$, whose embedding in $\mathbb{S}$ is fixed, and extends the given embedding of $G_0$. There is thus no ambiguity regarding the choice of embeddings.

Recall that $H_\Gamma$ consists of $\Gamma$, plus the cycles $C_i$ corresponding to the boundary of each disk $D_i$. Furthermore, $\Gamma$ was constructed so that $\partial F_i \subseteq \Gamma$ for each $i \in [k]$. In particular, this implies that for every $i \in [k]$ and every face $F$ of $\Gamma$, either $F$ is disjoint from $F_i$, or $F \subseteq F_i$ (with in fact $F = F_i$ in the latter case since $\Gamma$ is a subgraph of $G_0$). Finally, since $\Gamma$ is a subgraph of $H_\Gamma$, each face of $H_\Gamma$ is included in some face of $\Gamma$. Combining these remarks, each face of $H_\Gamma$ is either disjoint from or contained in $F_i$ for each $i \in [k]$.

With this in mind, we now distinguish three different types of faces in $H$:

(1) the interiors of the $k$ disks $D_1, \dots, D_k$ with cycle boundaries $C_1, \dots, C_k$,
(2) the faces $F$ distinct from the disks $D_1, \dots, D_k$, but contained in $F_i$ for some $i \in [k]$,

(3) and the faces $F$ whose interior is disjoint from all the $F_i$.

We now show the following.

* Every face of type (2) is adjacent in the dual $H^*$ to a face of type (1). Indeed, for each $i \in [k]$, if we let $D_{i_1}, \dots, D_{i_m}$ denote all disks $D_j$ that are included in $F_i$ (of which there is at least one), then the faces of type (2) contained in $F_i$ are exactly the arcwise-connected components of $F_i \setminus (\overline{D_{i_1}} \cup \dots \cup \overline{D_{i_m}})$. Then, as $F$ is arcwise-connected, we conclude that all such components must be incident to at least one edge of some boundary $\partial D_{i_j} = C_{i_j}$.

* Every face $F$ of type (3) is a face of $\Gamma$. Observe first that $F$ cannot be incident to an edge of some $C_i$. Indeed, since the disk $D_i$ is contained in the interior of $F_i$ except for the boundary points $U_i$, and since $C_i$ is embedded as the boundary of $D_i$, any face incident to an edge of $C_i$ must intersect $F_i$. Now $F$ is a face of the supergraph $H_\Gamma$ of $\Gamma$, which immediately implies $F \subseteq F'$ for some face $F'$ of $\Gamma$, but also its boundary $\partial F$ is fully contained in $\Gamma$, hence we actually have $F = F'$, as claimed.

Then, Claim 7.9 implies that $\partial F$ contains an edge incident to one of the faces $F_1, \dots, F_k$. Thus $F$ is adjacent in $H^*$ to some face of type (1) or (2). By previous item, $F$ is then at distance at most 2 from some face of type (1) in $H^*$.

We thus proved that every face of $H$ is at distance at most 2 in $H^*$ from some face of type (1). In other words, the set $\mathcal{D} := \{D_1, \dots, D_k\}$ is a dominating set in the square $(H^*)^2$ of $H^*$. In particular, as $H^*$ (and thus also $(H^*)^2$) is connected, Remark 2.2 then gives $\text{diam}(H) \le 2 \cdot \text{diam}((H^*)^2) \le 6k - 2$. ■

The proof of Theorem 7.7 now immediately follows from all previous claims: by Claim 7.12 and Corollary 7.6, we have

$$ \mathrm{tw}(H_\Gamma) \le \alpha_{7.6} \cdot (g+1) \cdot (6k-2), $$

where $\alpha_{7.6}$ denotes the constant implicit in Corollary 7.6. Then by Claim 7.11, and because $G_Y$ is a subgraph of $H_Y$, we have

$$ \begin{aligned} \mathrm{tw}(G_Y) &\le \mathrm{tw}(H_Y) \\ &\le (\alpha_{7.6} \cdot (g+1) \cdot (6k-2) + 1)(k+1) \\ &\le \alpha_{7.6} \cdot (g+1) \cdot (6k^2 + 5k - 1). \end{aligned} $$

Applying Theorem 1.5 then gives $\mathrm{bn}(G_Y) \le f_{1.5}(\alpha \cdot (g+1) \cdot (6k^2 + 4k - 2))$. Finally, recall that since $G_X = G_0$ is embedded in $\mathbb{S}$, it has basis number at most $O(\log(g)^2)$ by Theorem 1.2. Claim 7.10 and Lemma 2.8 give that $\mathrm{bn}(G) \le \mathrm{bn}(G_X) + \mathrm{bn}(G_Y)$, and thus

$$ \mathrm{bn}(G) = f_{1.5}(\alpha_{7.6} \cdot (g+1) \cdot (6k^2 + 5k - 1)) + O(\log(g)^2). $$

This completes the proof of Theorem 7.7.
## 7.3 Structure theorem and proof of Theorem 1.3

The Graph Minor Structure Theorem states that graphs almost embeddable in a surface of bounded genus are the base bricks from which we can construct all graphs excluding a fixed minor.

**Theorem 7.13 (Graph Minor Structure Theorem [24]).** For every graph $H$, there exist some constants $a, k, g \in \mathbb{N}$ such that every graph $G$ excluding $H$ as a minor has a tree-decomposition of adhesion at most $k$, whose torsos all belong to $G_{a,k,g}$.

Theorem 7.13 is commonly considered as one of the deepest results from graph theory, and some efforts have been spent in trying to make explicit and as good as possible the relation between the parameters $a, k, g$ and the order $|H|$ of the excluded minor $H$ [13]. Gorsky, Seweryn and Wiederrecht [10] recently managed to make all these bounds polynomial, namely, they proved that the parameters $a, k$ can be chosen with value $O(|H|^{2300})$, while it follows from the original version of the Graph Minor Structure Theorem that $g$ can be chosen with value $O(|H|^2)$.

The proof of Theorem 1.3 now follows from the previous results.

*Proof of Theorem 1.3.* We set $t := |H|$. Let $a, g, k$ and $(T, \beta)$ be given by Theorem 7.13. The torsos of $(T, \beta)$ are by assumption in $G_{a,k,g}$, which is a monotone graph class. By Theorem 7.7, graphs in $G_{a,k,g}$ have basis-number at most

$$b' := f_{1.5}(\alpha_{7.6} \cdot g \cdot (6k^2 + 4k - 2)) + 2a + O(\log(g)^2).$$

Applying Theorem 1.6 thus gives us

$$\mathrm{bn}(G) \le f_{1.6}(b', k) = O((b' + k \log(k)^2) \cdot k^4).$$

Using the polynomial bounds of Gorsky, Seweryn and Wiederrecht [10], we can choose $a, k = O(t^{2300})$ and $g = O(t^2)$. Moreover, Corollary 1.8 gives the bound $f_{1.5}(\ell) \le O(\ell^5)$. We thus obtain

$$\begin{aligned} b' &= O((gk^2 + 2a + \log(g^2))^5) \\ &= O((gk^2)^5) \\ &= O(t^{(2+2 \times 2300) \times 5}) = O(t^{23010}). \end{aligned}$$

and therefore, $k \log(k^2)$ being small compared to $b'$,

$$\mathrm{bn}(G) = O(b' \cdot k^4) = O(t^{23010+4 \times 2300}) = O(t^{32210}). \quad \square$$

# 8 Further discussion

## 8.1 Graphs with unbounded basis-number

In this short subsection, we give, using an observation of Schmeichel [26], some examples of graph constructions with unbounded basis numbers and additional interesting properties. In particular, we show that using the known constructions of Ramanujan expanders, one can choose these graphs to be *Cayley graphs*.
We omit the definition of Cayley graphs, as we will only need here the property that every Cayley graph is regular

The next result, even though not stated explicitly, follows directly from the proof of [26, Theorem 3].

**Lemma 8.1** ([26]). For any graph $G$ with average degree $d := \frac{2|E(G)|}{|V(G)|}$ and girth $\gamma$, we have

$$ \mathrm{bn}(G) \geq (1 - 2/d) \cdot \gamma. $$

As the proof of Lemma 8.1 is simple and self-contained, we reproduce it here.

*Proof.* Let $n, m, k$ be the number of vertices, edges, and connected components in $G$ respectively. Recall that the cycle space of $G$ has dimension $m - n + k$. Let $\mathcal{B} = \{C_1, \dots, C_{m-n+k}\}$ be a cycle basis of $G$ with edge-congestion $\mathrm{bn}(G)$. Then

$$ (m-n)\gamma \leq \sum_{i=1}^{m-n+k} |E(C_i)| \leq \mathrm{bn}(G) \cdot m, $$

where the first inequality holds as each $C_i$ has length at least $\gamma$, and the second inequality holds since each edge of $G$ appears in at most $\mathrm{bn}(G)$ cycles $C_i$. Thus, we have

$$ \mathrm{bn}(G) \geq \frac{m-n}{m} \gamma = (1 - n/m) \cdot \gamma = (1 - 2/d) \cdot \gamma. \quad \square $$

Lemma 8.1 implies in particular that any family of graphs with minimum degree 3 and unbounded girth has unbounded basis number. Such graph classes can be obtained using the probabilist method [7], or with some more explicit constructions [25] (see [23, Theorem 2.13] for a simple proof). Another way of obtaining explicit constructions, is to consider *Ramanujan expanders*, which moreover are Cayley graphs, and thus enjoy stronger algebraic properties. The first known constructions of Ramanujan expanders are due to Lubotzky, Phillips, Sarnak and independently Margulis [16, 18]. In particular, a characteristic of these constructions is that they produce graphs with girth $\Omega(\log(n))$. Next Theorem sums up some properties of such families, enabling to apply Lemma 8.1. The constructions from next theorem were provided by Morgenstern [22], and generalise the aforementioned ones to obtain infinite families of Ramanujan graphs which are $(q+1)$-regular for any arbitrary prime power $q$ (see also [4] for the case $q=2$).

**Theorem 8.2** ([22]). For every odd prime power $q$, there exists an infinite subset $I_q \subseteq \mathbb{N}$ such that for each $d \in I_q$, there exists a $(q+1)$-regular Cayley graph $G_{q,d}$ with order at least $\frac{q^{3d}-q^d}{2}$, and girth at least $\frac{2}{3}\log_q(|V(G_{q,d})|) + 1$.

Combining Lemma 8.1 with Theorem 8.2, we immediately obtain the following.

**Proposition 8.3.** There exists families $G_1, G_2$ of Cayley graphs with unbounded basis number and girth, such that

1. $G_1$ contains only cubic graphs,

2. $G_2$ contains graphs of arbitrarily large degree, and thus also of arbitrarily large connectivity.
Proof. We let $q$ be a prime power, and let $\mathcal{H}_q$ denotes the infinite family $\{G_{q,d}: d \in I_q\}$ given by Theorem 8.2. We check that for each $q$, graphs in $\mathcal{H}_q$ have unbounded basis number. Fix $q$ a prime power and let $d \in I_q$. We let $n_{q,d} := |V(G_{q,d})|$. As $G_{q,d}$ is $(q+1)$-regular, we have $\Delta(G_{q,d}) \cdot n_{q,d} = (q+1) \cdot n_{q,d} = 2|E(G_{q,d})|$. In particular, Lemma 8.1 then gives

$$ 
\begin{aligned}
\mathrm{bn}(G_{q,d}) &\ge \frac{(q+1)n_{q,d} - 2n_{q,d} + 2}{(q+1)n_{q,d}} \gamma(G_{q,d}) \\
&\ge \left( q - 1 + \frac{2}{(q+1)n_{q,d}} \right) \left( \frac{2}{3}(\log_q(q^{3d} - q^d) - \log_q(2)) + 1 \right).
\end{aligned}
$$

Thus, when $d \in I_q$ tends to infinity, we also obtain that $\mathrm{bn}(G_{q,d})$ tends to infinity.

To conclude the proof, we set $\mathcal{G}_1 := \mathcal{H}_2$ and $\mathcal{G}_2 := \bigcup_q \mathcal{H}_q$, where the union is taken over all prime powers $q$. Clearly, $\mathcal{G}_1$ and $\mathcal{G}_2$ have unbounded basis number. Moreover, a result of Godsil and Royle [9, Theorem 3.4.2] states that for every $d \ge 0$, every finite vertex-transitive $d$-regular is $\lceil \frac{2}{3}(d+1) \rceil$-connected. This implies in particular that $\mathcal{G}_2$ contains graphs of arbitrary large connectivity. $\square$

## 8.2 Future directions

A first obvious question left open by our work concerns the optimality of the bound from Theorem 1.3. Clearly, it is quite unlikely that $O(t^{32210})$ is optimal. In particular, a proof that $H$-minor-free graphs have bounded basis number without relying on the Graph Minor Structure Theorem would be very interesting in its own and could lead to improvements of our bound. Note also that to our knowledge, it is not excluded that a bound in $\log(t)^{O(1)}$ could hold.

As pointed out in Corollary 1.4, excluding minors characterises bounded basis number for subgraph closed graph classes. To go beyond this, it seems natural to consider graph classes that are closed only under taking induced subgraphs — or equivalently closed under *induced minors*, as edge contractions do not increase the basis number. A full characterisation of induced-minor closed classes with bounded basis number seems well beyond reach, but it would be interesting to find examples or establish properties of such classes. For instance, generalising Theorem 1.5, one may ask whether basis number can be upper-bounded by a function of other classical graph parameters such as *clique-width*. Let us point out that such a bound cannot exist for the more general parameter *twin-width*, as subdividing all edges sufficiently many times decreases the twin-width of any graph to $4$ $[2]$ without affecting its basis number.

A question that occurred to us during this work is whether in Theorem 1.6, one can weaken the hypothesis that the family $\mathcal{G}$ of graphs is monotone, by only assuming instead $\mathcal{G}$ to be hereditary. This does not seem out of reach, and would allow to consider significantly more general classes of graphs constructed through tree-decompositions, as for example the cliques and the complete bipartite graphs are known to have basis numbers at most 4 (see [26]).

Finally, basis number can be generalised to infinite graphs. Thomassen [28, Theorem 7.4] generalised MacLane's planarity criterion, by proving that the infinite graphs having basis number at most 2 are exactly those graphs admitting a *vertex accumulation free* planar embedding, that is, an embedding in $\mathbb{R}^2$ such that every point of $\mathbb{R}^2$ has an open neighbourhood containing only finitely many
vertices. However, it is not clear whether in the infinite setting, arbitrary planar graphs, graphs embedded in a fixed surface, bounded treewidth graph, or graphs excluding a fixed minor have bounded basis number. As a side remark, observe that every Cayley graph of a *finitely presented group* has finite basis number. In particular, as planar and more generally minor-excluded finitely generated groups are finitely presented [5, 8], this question admits a positive answer when restricted to Cayley graphs (and more generally locally finite quasi-transitive graphs).

## Acknowledgements

We are deeply grateful to Babak Miraftab, Pat Morin and Lena Yuditsky for very instructive exchanges, and for sharing with us their results once we learned that part of our respective works overlapped. Moreover, we thank Pat Morin for pointing to us a bound for Lemma 2.7 simplifying our original bound. We also thank Louis Esperet for some useful discussion, that lead in particular to a simplification of our initial proof of Corollary 7.6.

## References

[1] Saman Bazargani, Therese Biedl, Prosenjit Bose, Anil Maheshwari, and Babak Miraftab. The basis number of 1-planar graphs, 2024. arXiv: 2412.18595.

[2] Pierre Bergé, Édouard Bonnet, and Hugues Déprés. Deciding Twin-Width at Most 4 Is NP-Complete. In Mikołaj Bojańczyk, Emanuela Merelli, and David P. Woodruff, editors, *49th International Colloquium on Automata, Languages, and Programming (ICALP 2022)*, volume 229 of Leibniz International Proceedings in Informatics (LIPIcs), pages 18:1–18:20, Dagstuhl, Germany, 2022. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. URL: https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ICALP.2022.18, doi:10.4230/LIPIcs.ICALP.2022.18.

[3] Mikołaj Bojańczyk and Michał Pilipczuk. Definability equals recognizability for graphs of bounded treewidth. In *Proceedings of the 31st Annual ACM/IEEE Symposium on Logic in Computer Science*, LICS '16, pages 407–416, 2016. doi:10.1145/2933575.2934508.

[4] Patrick Chiu. Cubic Ramanujan graphs. *Combinatorica*, 12(3):275–285, 1992. doi:10.1007/BF01285816.

[5] Carl Droms. Infinite-ended groups with planar Cayley graphs. *Journal of Group Theory*, 9(4):487–496, 2006. URL: https://doi.org/10.1515/JGT.2006.032 [cited 2022-12-08], doi:doi:10.1515/JGT.2006.032.

[6] David Eppstein. Diameter and treewidth in minor-closed graph families. *Algorithmica*, 27(3-4):275–291, 2000. doi:10.1007/s004530010020.

[7] P. Erdös. Graph theory and probability. *Canadian Journal of Mathematics*, 11:34–38, 1959. doi:10.4153/CJM-1959-003-9.
[8] Louis Esperet, Ugo Giocanti, and Clément Legrand-Duchesne. The structure of quasi-transitive graphs avoiding a minor with applications to the domino problem. *Journal of Combinatorial Theory, Series B*, 169:561–613, 2024. doi:10.1016/j.jctb.2024.08.002.

[9] Chris Godsil and Gordon Royle. *Algebraic graph theory*, volume 207 of *Graduate Texts in Mathematics*. New York, NY: Springer, 2001.

[10] Maximilian Gorsky, Michał T. Seweryn, and Sebastian Wiederrecht. Polynomial Bounds for the Graph Minor Structure Theorem, 2025. arXiv: 2504.02532.

[11] Matthias Hamann. Planar transitive graphs. *The Electronic Journal of Combinatorics*, 25(4):p4.8, 2018. doi:10.37236/7888.

[12] Peter Hoffman and Bruce Richter. Embedding graphs in surfaces. *Journal of Combinatorial Theory, Series B*, 36(1):65–84, 1984. doi:10.1016/0095-8956(84)90014-5.

[13] Ken-ichi Kawarabayashi, Robin Thomas, and Paul Wollan. Quickly excluding a non-planar graph, 2020. arXiv:2010.12397.

[14] Manfred Kufleitner. The height of factorization forests. In Edward Ochmański and Jerzy Tyszkiewicz, editors, *Mathematical Foundations of Computer Science 2008*, pages 443–454, Berlin, Heidelberg, 2008. Springer Berlin Heidelberg. doi:10.1007/978-3-540-85238-4_36.

[15] Florian Lehner and Babak Miraftab. Basis number of bounded genus graphs, 2024. arXiv:2410.10566.

[16] Alexander Lubotzky, R. Phillips, and P. Sarnak. Ramanujan graphs. *Combinatorica*, 8:261–277, 1988. doi:10.1007/BF02126799.

[17] Saunders Mac Lane. A combinatorial condition for planar graphs. *Fundamenta Mathematicae*, 28:22–32, 1937. doi:10.4064/fm-28-1-22-32.

[18] Grigorii Aleksandrovich Margulis. Explicit group-theoretical constructions of combinatorial schemes and their application to the design of expanders and concentrators. *Problemy peredachi informatsii*, 24(1):51–60, 1988.

[19] Frédéric Mazoit. Tree-width of hypergraphs and surface duality. *Journal of Combinatorial Theory, Series B*, 102(3):671–687, 2012. doi:10.1016/j.jctb.2011.11.002.

[20] Babak Miraftab, Pat Morin, and Lena Yuditsky. Basis number and path-width, 2026. To appear.

[21] Bojan Mohar and Carsten Thomassen. *Graphs on surfaces*. Baltimore, MD: Johns Hopkins University Press, 2001.

[22] M. Morgenstern. Existence and explicit constructions of $q+1$ regular ramanujan graphs for every prime power $q$. *Journal of Combinatorial Theory, Series B*, 62(1):44–62, 1994. doi:10.1006/jctb.1994.1054.

[23] Christian Reiher. Graphs of large girth, 2024. arXiv:2403.13571.
[24] Neil Robertson and Paul Seymour. Graph minors. XVI. Excluding a non-planar graph. *Journal of Combinatorial Theory, Series B*, 89(1):43-76, 2003. doi:10.1016/S0095-8956(03)00042-X.

[25] H. Sachs. Regular graphs with given girth and restricted circuits. *Journal of the London Mathematical Society*, s1-38(1):423-429, 1963. doi:10.1112/jlms/s1-38.1.423.

[26] Edward F Schmeichel. The basis number of a graph. *Journal of Combinatorial Theory, Series B*, 30(2):123-129, 1981. doi:10.1016/0095-8956(81)90057-5.

[27] Imre Simon. Factorization forests of finite height. *Theoretical Computer Science*, 72(1):65-94, 1990. doi:10.1016/0304-3975(90)90047-L.

[28] Carsten Thomassen. Planarity and duality of finite and infinite graphs. *Journal of Combinatorial Theory, Series B*, 29:244-271, 1980. doi:10.1016/0095-8956(80)90083-0.