1 Introduction

In this paper, we investigate the relation between well-studied graph parameters: treewidth and divisorial gonality. In particular, we give a constructive proof that the treewidth of a graph is at most its divisorial gonality.

Treewidth is a graph parameter with a long history. Its first appearance was under the name of dimension, in 1972, by  Bertele and Brioschi (1972). It was rediscovered several times since, under different names (see e.g. Bodlaender 1998). Robertson and Seymour introduced the notions of treewidth and tree decompositions in their fundamental work on graph minors; these notions became the dominant terminology.

The notion of divisorial gonality finds its origin in algebraic geometry.  Baker and Norine (2007) developed a divisor theory on graphs in analogy with divisor theory on curves, proving a Riemann–Roch theorem for graphs. The graph analog of gonality for curves was introduced by  Baker (2008). To distinguish it from other notions of gonality (which we discuss briefly in Sect. 5), we denote the version we study by divisorial gonality. Divisorial gonality can be described in terms of a chip firing game. A placement of k chips on the vertices of a graph (where vertices can have 0 or more chips) is called an effective divisor of degree k. Under certain rules (see Sect. 2), sets of vertices can fire, causing some of the chips to move to different vertices. The divisorial gonality of a graph is the minimum degree of an effective divisor such that for each vertex v, there is a firing sequence ending with a configuration with at least one chip at v.

The treewidth of a graph is never larger than its divisorial gonality.Footnote 1 A non-constructive proof of this fact was given by  van Dobben de Bruyn and Gijswijt (2020). Their proof is based on the characterization of treewidth in terms of brambles, due to  Seymour and Thomas (1993). In this paper, we give a constructive proof of the same fact. We formulate our proof in terms of a search game characterization of treewidth, but with small modifications, we can also obtain a corresponding tree decomposition. The proof also yields a polynomial time algorithm that, when given an effective divisor of degree k, constructs a search strategy with at most \(k+1\) searchers and a tree decomposition of width at most k of the input graph.

This paper is organized as follows. Some preliminaries are given in Sect. 2. In Sect. 3, we prove the main result with help of a characterization of treewidth in terms of a search game and discuss that we also can obtain a tree decomposition of width equal to the degree of a given effective divisor that reaches all vertices. An example is given in Sect. 4. In Sect. 5, we give constructive proofs that bound the treewidth of a graph in terms of two related other notions of gonality. Some conclusions are given in Sect. 6.

2 Preliminaries

2.1 Graphs

In this paper, all graphs are assumed to be finite. We allow multiple edges, but no loops. Let \(G=(V,E)\) be a graph. For disjoint \(U,W\subseteq V\) we denote by E(UW) the set of edges with one end in U and one end in W, and use the shorthand \(\delta (U)=E(U,V\setminus U)\). The degree of a vertex \(v\in V\) is \(\deg (v)=|\delta (\{v\})|\), and given \(v\in U\subseteq V\) we denote by \({{\,\mathrm{outdeg}\,}}_U(v)=|E(\{v\},V\setminus U)|\) the number of edges from v to \(V\setminus U\). By N(U) we denote the set of vertices in \(V\setminus U\) that have a neighbor in U. The Laplacian of G is the matrix \(Q(G)\in \mathbb {R}^{V\times V}\) given by

$$\begin{aligned} Q_{uv}={\left\{ \begin{array}{ll} \deg (u)&{}\text {if u=v},\\ -|E(\{u\},\{v\})|&{}\text {otherwise}. \end{array}\right. } \end{aligned}$$

2.2 Divisors and gonality

Let \(G=(V,E)\) be a connected graph with Laplacian matrix \(Q=Q(G)\). A divisor on G is an integer vector \(D\in \mathbb {Z}^V\). The degree of D is \(\deg (D)=\sum _{v\in V}D(v)\). We say that a divisor D is effective if \(D\ge 0\), i.e., \(D(v)\ge 0\) for all \(v\in V\). We will denote by \({{\,\mathrm{supp}\,}}(D)=\{v\in V\mid D(v)\ne 0\}\) the support of D.

The divisorial gonality can be defined in a number of equivalent ways. Most intuitive is the definition in terms of a chip firing game. An effective divisor D can be viewed as a chip configuration with D(v) chips on vertex v. If \(U\subset V\) is such that \({{\,\mathrm{outdeg}\,}}_U(v)\le D(v)\) for every \(v\in U\) (i.e., each vertex has at least as many chips as it has edges to vertices outside U), then we say that U can be fired. If this is the case, then firing U means that every vertex in U gives chips to each of its neighbors outside U, one chip for every edge connecting to that neighbor. The resulting chip configuration is the divisor \(D' = D - Q\mathbf {1}_U\). The assumption \({{\,\mathrm{outdeg}\,}}_U(v) \le D(v)\) guarantees that the number of chips on each vertex remains nonnegative, i.e. that \(D'\) is effective. Now, the divisorial gonality of a graph is the minimum number k such that there is a starting configuration (divisor) with k chips, such that for each vertex \(x\in V\) there is a sequence of sets we can fire such that x receives a chip.

We now give the more formal definition, that is needed in our proofs. Two divisors D and \(D'\) are equivalent (notation: \(D\sim D'\)) if \(D'=D-Qx\) for some \(x\in \mathbb {Z}^V\). Note that equivalent divisors have the same degree since \(Q^\mathsf {T}\mathbf {1}=0\). If D and \(D'\) are equivalent, then, since the null space of Q consists of all scalar multiples of \(\mathbf {1}\), \(D'=D-Qx\) has a unique solution \(x\in \mathbb {Z}^V\) that is nonnegative and has \(x_v=0\) for at least one vertex v. We denote this x by \({{\,\mathrm{script}\,}}(D,D')\) and write \({{\,\mathrm{dist}\,}}(D,D')=\max \{x_v\mid v\in V\}\). Note that if \(t={{\,\mathrm{dist}\,}}(D,D')\), then \({{\,\mathrm{script}\,}}(D',D)=t\mathbf {1}-x\) and thus \({{\,\mathrm{dist}\,}}(D',D)={{\,\mathrm{dist}\,}}(D,D')\). If \(D,D',D''\) are pairwise equivalent, then we have the triangle inequality \({{\,\mathrm{dist}\,}}(D,D'')\le {{\,\mathrm{dist}\,}}(D,D')+{{\,\mathrm{dist}\,}}(D',D'')\) as \({{\,\mathrm{script}\,}}(D,D'')={{\,\mathrm{script}\,}}(D,D')+{{\,\mathrm{script}\,}}(D',D'')-c\mathbf {1}\) for some nonnegative integer c.

Let D be a divisor. If D is equivalent to an effective divisor, then we define

$$\begin{aligned} {{\,\mathrm{rank}\,}}(D)= & {} \max \{k\in \mathbb {Z}_{\ge 0}\mid D-E \text { is equivalent to an effective divisor}\}\\&\qquad \qquad \text {for every effective divisor } \hbox {E} \text { of degree at most } \hbox {k}. \end{aligned}$$

If D is not equivalent to an effective divisor, we set \({{\,\mathrm{rank}\,}}(D)=-1\). The divisorial gonality of a graph G is defined as

$$\begin{aligned} {{\,\mathrm{dgon}\,}}(G)=\min \{\deg (D) \mid {{\,\mathrm{rank}\,}}(D)\ge 1\}. \end{aligned}$$

In the remainder of the paper, we will only consider effective divisors. If we can go from D to \(D'\) by sequentially firing a number of subsets, then clearly \(D\sim D'\). The converse is also true (part (i) of the next lemma) as was shown in van Dobben de Bruyn and Gijswijt (2020, Lemma 2.3).

Lemma 1

Let D and \(D'\) be equivalent effective divisors.

  1. (i)

    There is a unique increasing chain \(\emptyset \subsetneq U_1\subseteq U_2\subseteq \cdots \subseteq U_t\subsetneq V\) of subsets on which we can fire in sequence to obtain \(D'\) from D. That is, setting \(D_0=D\) and \(D_i=D_{i-1}-Q\mathbf {1}_{U_i}\) for \(i=1,\ldots , t\) we have \(D_t=D'\) and \(D_i\) is effective for all \(i=0,\ldots , t\).

  2. (ii)

    We have \(t={{\,\mathrm{dist}\,}}(D,D')\le \deg (D)\cdot |V|\).

Proof

For part (i), let \(x={{\,\mathrm{script}\,}}(D,D')\) and let \(t={{\,\mathrm{dist}\,}}(D,D')=\max \{x(v)\mid v\in V\}\). We let \(U_1\subseteq \cdots \subseteq U_t\) be the level set decomposition of x, i.e. let

$$\begin{aligned} U_i=\{v\in V\mid x(v)\ge t+1-i\}\qquad (i=1,\ldots , t). \end{aligned}$$

Note \(x=\sum _{i=1}^t \mathbf {1}_{U_i}\). To conclude the proof of the existence part of (i), it suffices to show that the divisors \(D_0,D_1,\ldots , D_t\) are indeed effective. By assumption, this is true for \(D_0=D\) and \(D_t=D'\). Consider any \(v\in V\). If \(v\not \in U_t\), then \(0\le D_0(v)\le D_1(v)\le \cdots \le D_t(v)\) since chips can only be added to v when firing a subset not containing v. Otherwise, let i be the smallest index for which \(v\in U_i\). Then

$$\begin{aligned} 0\le D_0(v)\le D_1(v)\le \cdots \le D_{i-1}(v) \end{aligned}$$

and

$$\begin{aligned} D_{i-1}(v)\ge D_i(v)\ge D_{i+1}(v)\ge \cdots \ge D_t(v)\ge 0. \end{aligned}$$

Hence, \(D_i(v)\ge 0\) for all \(i=0,\ldots , t\).

Uniqueness in part (i) follows directly from the fact that \(x={{\,\mathrm{script}\,}}(D,D')\) is the unique solution to \(D'=D-Qx\) with the additional property that x is nonnegative with at least one entry equal to zero, together with the uniqueness of the level set decomposition of x.

For part (ii), we note that a set U can occur at most \(\deg (D)\) times in the chain \(U_1\subseteq \cdots \subseteq U_t\), since each time we fire the set U at least one chip leaves U. It follows that \(t\le \deg (D)\cdot |V|\). \(\square \)

We see that the two definitions of divisorial gonality are equivalent. Lemma 1 shows that we can even require the sets of vertices that are fired to be increasing.

For a given vertex q, a divisor \(D\ge 0\) is called q-reduced if there is no nonempty set \(U\subseteq V\setminus \{q\}\) such that \(D-Q\mathbf {1}_U\ge 0\).

Lemma 2

(Baker and Norine 2007, Proposition 3.1) Let D be an effective divisor and let q be a vertex. There is a unique q-reduced divisor equivalent to D.

A divisor D has positive rank if and only if for every \(q\in V\) the q-reduced divisor has at least one chip on q. The ‘if’ part is clear. The ‘only if’ part follows from the following lemma.

Lemma 3

Let D be an effective divisor, let \(q\in V\) and let \(D_q\) be the q-reduced divisor equivalent to D. Then \(D_q(q)\ge D(q)\). In particular, if D has positive rank, then \(D_q(q)\ge 1\).

Proof

We may assume that \(D\ne D_q\). By Lemma 1 we obtain \(D_q\) from D by firing on a chain of sets \(U_1\subseteq \cdots \subseteq U_t\) and, conversely, we obtain D from \(D_q\) by firing on the complements of \(U_t,\ldots , U_1\). Since \(D_q\) is q-reduced, it follows that q is in the complement of \(U_t\), and hence \(q\not \in U_i\) for \(i=1,\ldots , t\). It follows that \(x={{\,\mathrm{script}\,}}(D,D_q)\) satisfies \(x_q=0\) and \(D_q(q)\ge D(q)\). \(\square \)

Given an effective divisor D and a vertex q, Dhar’s algorithm (Dhar 1990) (see Algorithm 1) finds in polynomial time a nonempty subset \(U\subseteq V\setminus \{q\}\) on which we can fire, or concludes that D is q-reduced.

figure a

Lemma 4

Dhar’s algorithm is correct, and the output is the unique inclusionwise maximal subset \(U\subseteq V\setminus \{q\}\) that can be fired.

Proof

The set returned by Algorithm 1 can be fired, as it satisfies the requirement \({{\,\mathrm{outdeg}\,}}_U(v)\le D(v)\) for every \(v\in U\). To complete the proof it therefore suffices to show that U contains every subset \(W\subseteq V\setminus \{q\}\) that can be fired.

Let \(W\subseteq V\setminus \{q\}\) be any such subset. At the start of the algorithm \(U=V\setminus \{q\}\) contains W. While \(U\supseteq W\), we have \({{\,\mathrm{outdeg}\,}}_U(v)\le {{\,\mathrm{outdeg}\,}}_W(v)\le D(v)\) for any \(v\in W\), so the algorithm never removes a vertex \(v\in W\) from U. \(\square \)

Note: in particular, Lemma 4 shows that the output of Algorithm 1 does not depend on the order in which vertices are selected for removal.

If throughout the algorithm we keep for every vertex v the number \({{\,\mathrm{outdeg}\,}}_U(v)\) and a list of vertices for which \({{\,\mathrm{outdeg}\,}}_U(v)>D(v)\), then we need only O(|E|) updates, and we can implement the algorithm to run in time O(|E|).

Lemma 5

Let D be an effective divisor on the graph \(G=(V,E)\), let \(q\in V\), and let \(D_q\) be the q-reduced divisor equivalent to D. Let U be the set returned by Dhar’s algorithm when applied to D and q, and suppose that \(U\ne \emptyset \). Let \(D'=D-Q\mathbf {1}_U\). Then \({{\,\mathrm{dist}\,}}(D',D_q)={{\,\mathrm{dist}\,}}(D,D_q)-1\).

Proof

Let \(x={{\,\mathrm{script}\,}}(D,D_q)\). Since \(D_q\) is q-reduced, we have \(x_q=0\). On the other hand, since \(D\ne D_q\) (as we can fire on U), the number \(t=\max \{x_v\mid v\in V\}\) is positive. Let \(W=\{v\in V \mid x_v=t\}\). By Lemma 1, we can fire on W, so by Lemma 4 we have \(W\subseteq U\).

Let \(x'={{\,\mathrm{script}\,}}(D',D_q)\) and let \(t'=\max \{x'_v\mid v\in V\}\). As \(D_q\) is q-reduced, we have \(x'_q=0\). Since there is a unique nonnegative \(y\in \mathbb {Z}^V\) with \(y_q=0\) and \(D_q=D-Qy\), and we have \(D-Qx=D_q=(D-Q\mathbf {1}_U)-Qx'\), it follows that \(x=x'+\mathbf {1}_U\). Since \(U\supseteq W\), it follows that \(x-\mathbf {1}_W\ge x'\), and hence \(t-1\ge t'\). We find that \({{\,\mathrm{dist}\,}}(D',D_q)\le {{\,\mathrm{dist}\,}}(D,D_q)-1\). Since \({{\,\mathrm{dist}\,}}(D,D')=1\), equality follows by the triangle inequality. \(\square \)

Since \({{\,\mathrm{dist}\,}}(D,D_q)\le \deg (D)\cdot |V|\), we can find a q-reduced divisor equivalent to D using no more than \(\deg (D)\cdot |V|\) applications of Dhar’s algorithm.

2.3 Treewidth and tree decompositions

The notions of treewidth and tree decomposition were introduced by  Robertson and Seymour (1986) in their fundamental work on graph minors.

Let \(G=(V,E)\) be a graph, let \(T=(I,F)\) be a tree, and let \(X_i\subseteq V\) be a set of vertices (called bags) associated to i for every node \(i\in I\). The pair \((T,(X_i)_{i\in I})\) is a tree decomposition of G if it satisfies the following conditions:

  1. 1.

    \(\bigcup _{i\in I} X_i = V\);

  2. 2.

    for all \(e=vw\in E\), there is an \(i\in I\) with \(v,w\in X_i\);

  3. 3.

    for all \(v\in V\), the set of nodes \(I_v = \{i\in I ~|~ v\in X_i\}\) is connected (it induces a subtree of T).

The width of the tree decomposition is \(\max _{i\in I} |X_i|-1\). The treewidth of G is the minimum width of a tree decomposition of G. Note that the treewidth of a multigraph is equal to the treewidth of the underlying simple graph.

There are several notions that are equivalent to treewidth. We will use a notion that is based on a Cops and Robbers game, introduced by  Seymour and Thomas (1993). Here, a number of searchers need to catch a fugitive. Searchers can move from a vertex in the graph to a ‘helicopter’, or from a helicopter to any vertex in the graph. Between moves of searchers, the fugitive can move with infinite speed in the graph, but may not move over or to vertices with a searcher. The fugitive is captured when a searcher moves to the vertex with the fugitive, and there is no other vertex without a searcher that the fugitive can move to. The location of the fugitive is known to the searchers at all times. We say that k searchers can capture a fugitive in a graph G, if there is a strategy for k searchers on G that guarantees that the fugitive is captured. In the initial configuration, the fugitive can choose a vertex, and all searchers are in a helicopter. A search strategy is monotone if it is never possible for the fugitive to move to a vertex that had been unreachable before. In particular, in a monotone search strategy, there is never a path without searchers from the location of the fugitive to a vertex previously occupied by a searcher.

Theorem 1

(Seymour and Thomas 1993) Let G be a graph and k a positive integer. The following statements are equivalent.

  1. 1.

    The treewidth of G is at most k.

  2. 2.

    \(k+1\) searchers can capture a fugitive in G.

  3. 3.

    \(k+1\) searchers can capture a fugitive in G with a monotone search strategy.

3 Construction of a search strategy

In this section, we present a polynomial time algorithm that, given a positive rank effective divisor D of degree k as input, constructs a monotone search strategy with \(k+1\) searchers to capture the fugitive.

We start by providing a way to encode monotone search strategies. Let G be a graph. For \(X\subseteq V(G)\), the vertex set of a component of \(G-X\) is called an X-flap. A position is a pair (XR), where \(X\subseteq V(G)\) and R is a unionFootnote 2 of X-flaps (we allow \(R=\emptyset \)).

The set X represents the vertices occupied by searchers, and the fugitive can move freely within some X-flap contained in R (if \(R=\emptyset \), then the fugitive has been captured). In a monotone search strategy, the fugitive will remain confined to R, so placing searchers on vertices other than R is of no use. Therefore, it suffices to consider three types of moves for the searchers: (a) remove searchers that are not necessary to confine the fugitive to R; (b) add searchers to R; (c) if R consists of more than one X-flap, restrict attention to the X-flap \(R_i\subset R\) containing the fugitive. This leads us to the following definition.

Definition 1

Let G be a graph and let k be a positive integer. A monotone search strategy (MSS) with k searchers for G is a directed tree \(T=(\mathcal {P},F)\) where \(\mathcal {P}\) is a set of positions with \(|X|\le k\) for every \((X,R)\in \mathcal {P}\), and the following hold:

  1. (i)

    The root of T is \((\emptyset ,V)\).

  2. (ii)

    If (XR) is a leaf of T, then \(R=\emptyset \).

  3. (iii)

    Let (XR) be a non-leaf of T. Then \(R\ne \emptyset \) and there is a set \(X'\subseteq X\cup R\) such that exactly one of the following applies:

    1. (a)

      \(X'\subset X\) and position \((X',R)\) is the unique out-neighbor of (XR).

    2. (b)

      \(X'\supset X\) and position \((X',R')\) is the unique out-neighbor of (XR), where \(R'=R\setminus X'\).

    3. (c)

      \(X'=X\) and the out-neighbors of (XR) are the positions \((X,R_1),\ldots , (X,R_t)\) where \(t\ge 2\) and \(R_1,\ldots , R_t\) are the X-flaps contained in R.

If condition (ii) does not necessarily hold, we say that T is a partial MSS. Note that we do not consider the root node to be a leaf even if it has degree 1.

It is clear that if T is an MSS for k searchers, then, as the name suggests, k searchers can capture the fugitive, the fugitive can never reach a vertex that it could not reach before, and a searcher is never placed on a vertex from which a searcher was previously removed.

We should point out that Definition 1 is slightly different from existing (formal or informal) definitions of a monotone search strategy in the literature. Compared to Seymour and Thomas (1993), we also allow a position to consist of zero X-flaps or more than one X-flap. At the end of this section, we will show that an MSS with k searchers yields a tree decomposition of width at most \(k - 1\) in a relatively straightforward fashion.

First we focus on constructing an MSS in polynomial time. For this we use the following lemmas.

Lemma 6

Let G be a graph on n vertices and let T be a (partial) MSS with k searchers for G. Then T has no more than \(n^2+1\) nodes.

Proof

For any position (XR), define \(f(X,R)=|R|(|X|+|R|)\). For any leaf node (XR) we have \(f(X,R) = 0\). For any non-leaf node (XR), the value f(XR) is at least the sum of the values of its children plus the number of children. Indeed, in case (a) and (b) we have \(f(X,R)\ge f(X',R')+1\), and in case (c) we have \(f(X,R)\ge f(X,R_1)+\cdots +f(X,R_t)+t\) since

$$\begin{aligned}&f(X,R)-(f(X,R_1)+\cdots +f(X,R_t))\\&\qquad =\sum _{1\le i<j\le t} 2|R_i|\cdot |R_j| \ge 2|R_1|\cdot (|R_2|+\cdots +|R_t|)\ge 2(t-1)\ge t. \end{aligned}$$

It follows that f(XR) is an upper bound on the number of descendants of (XR) in T. Since every non-root node is a descendant of the root, it follows that the total number of nodes is at most \(1+f(\emptyset ,V)=1+n^2\). \(\square \)

Lemma 7

Let R be an X-flap. Let D be a positive rank effective divisor such that \(X\subseteq {{\,\mathrm{supp}\,}}(D)\) and \(R\cap {{\,\mathrm{supp}\,}}(D)=\emptyset \). Then we can find in polynomial time an effective divisor \(D'\sim D\) such that \(X\subseteq {{\,\mathrm{supp}\,}}(D')\), \(R\cap {{\,\mathrm{supp}\,}}(D')=\emptyset \), and such that from \(D'\) we can fire a subset U with \(U\cap R=\emptyset \) and \(U\cap X\not =\emptyset \).

Proof

Let \(q\in R\). Since \(D(q)=0\) and D has positive rank, it follows by Lemma 3 that D is not q-reduced. Let U be the set found by Dhar’s algorithm (with respect to q). Since R is connected and U does not contain R, it follows that \(U\cap R=\emptyset \) (otherwise \({{\,\mathrm{outdeg}\,}}_U(r)\ge 1>D(r)\) for some \(r\in U\cap R\)). If \(U\cap X\) is nonempty, we set \(D':= D\) and we are done. Otherwise, we set \(D:= D-Q\mathbf {1}_U\). Then \(X\subseteq {{\,\mathrm{supp}\,}}(D)\), \(R\cap {{\,\mathrm{supp}\,}}(D)=\emptyset \) and we iterate. We must finish in no more than \(\deg (D)\cdot |V(G)|\) iterations by Lemma 1 and Lemma 5. Hence, we can find the required \(D'\) and U in time \(|E(G)|\cdot |V(G)|\deg (D)\). \(\square \)

Construction of a monotone search strategy Let G be a connected graph and let D be an effective divisor on G of positive rank. Let \(k=\deg (D)\). We will construct an MSS for \(k+1\) searchers on G. We do this by keeping a partial MSS, starting with only the root node \((\emptyset , V)\) and an edge to the node \((X,V\setminus X)\), where \(X={{\,\mathrm{supp}\,}}(D)\). Then, we iteratively grow T at the leaves (XR) with \(R\ne \emptyset \) until T is an MSS. At each step, we also keep, for every leaf (XR) of T, an effective divisor \(D'\sim D\) such that \(X\subseteq {{\,\mathrm{supp}\,}}(D')\) and \(R\cap {{\,\mathrm{supp}\,}}(D')=\emptyset \). We now describe the iterative procedure.

While T has a leaf (XR) with \(R\ne \emptyset \), let \(D'\) be the divisor associated to (XR) and perform one of the following steps.

I.:

If R consists of multiple X-flaps \(R_1,\ldots , R_t\), then we add nodes \((X,R_1),\ldots , (X,R_t)\) as children of (XR) and associate \(D'\) to each. Iterate.

II.:

If \(X':=N(R)\) is a strict subset of X, then add the node \((X',R)\) as a child of (XR), associate \(D'\) to this node and iterate.

III.:

The remaining case is that \(N(R)=X\) and R is a single X-flap. By Lemma 7 we can find an effective divisor \(D''\sim D'\) such that \(X\subseteq {{\,\mathrm{supp}\,}}(D'')\), \(R\cap {{\,\mathrm{supp}\,}}(D'')=\emptyset \) and from \(D''\) we can fire on a set U such that \(U\cap R=\emptyset \), and \(U\cap X\ne \emptyset \). We set \(U\cap X=\{s_1,s_2,\ldots , s_t\}\). That we can fire on U implies that

$$\begin{aligned} D''(s_i)\ge |N(s_i)\cap R|\quad \text {for} i=1,\ldots , t. \end{aligned}$$
(1)

For \(i=1,\ldots , t\) we define positions \((X_i,R_i)\) and \((X'_i,R_i)\) as follows:

$$\begin{aligned} X_i=X'_{i-1}\cup (N(s_i)\cap R),\quad R_i=R\setminus X_i,\qquad \text {and}\qquad X'_i=X_i\setminus \{s_i\}, \end{aligned}$$

where we set \(X'_0=X\). Using (1) and the fact that \(X\subseteq {{\,\mathrm{supp}\,}}(D'')\), we see that

$$\begin{aligned} |X_i'|= & {} |X\setminus \{s_1,\ldots , s_i\}|+|(N(s_1)\cap R)\cup \cdots \cup (N(s_i)\cap R)|\\\le & {} |X\setminus \{s_1,\ldots , s_i\}|+|N(s_1)\cap R|+\cdots +|N(s_i)\cap R)|\\\le & {} \sum _{v\in X\setminus \{s_1,\ldots , s_i\}} D''(v)+\sum _{v\in \{s_1,\ldots , s_i\}} D''(v)\\= & {} \sum _{v\in X} D''(v) \end{aligned}$$

for \(i=0,\ldots , t\). Hence, \(|X_i'|\le k\) and \(|X_i|\le k+1\) for every i. Since every edge in \(\delta (R)\) has at least one endpoint in every \(X'_i\), it follows that indeed \(R_i\) is a union of \(X'_i\)-flaps (and of \(X_i\)-flaps). We add the path \((X,R)\rightarrow (X_1,R_1)\rightarrow (X'_1,R_1)\rightarrow \cdots \rightarrow (X_t,R_t)\rightarrow (X'_t,R_t)\) to T (it may happen that \((X_i,R_i)=(X_{i-1}',R_{i-1})\) in which case we leave out one of the two). We associate \(D''-Q\mathbf {1}_U\) to the leaf \((X'_t,R_t)\).

By Lemma 6, we are done in at most \(|V(G)|^2\) steps. This completes the construction.

Construction of a tree decomposition. By combining the construction described above with that of Lemma 8, we obtain Theorem 2 below. Note that so far only a non-constructive proof was known of the fact that the divisorial gonality of a graph is an upper bound for the treewidth (van Dobben de Bruyn and Gijswijt 2020).

Lemma 8

Let \(T'=(\mathcal {P},F)\) be a monotone search strategy for k searchers in the connected graph G and let T be the undirected tree obtained by ignoring the orientation of edges in \(T'\). Then \((T, \{X\}_{(X,R)\in \mathcal {P}})\) is a tree decomposition of G of width at most \(k-1\).

Proof

Let \(v\in V\). We first show that \(v\in X\) for some \((X,R)\in \mathcal {P}\). Let \(\mathcal {P}':=\{(X,R)\in \mathcal {P}: v\in R\}\). Note that \(\mathcal {P}'\) contains the root node \((\emptyset , V)\). Let \((X,R)\in \mathcal {P}'\) have maximum distance from the root. Since \(v\in R\), it follows from the definition of MSS that (XR) has a child \((X',R')\) with \(v\in X'\cup R'\). Hence, by the maximality assumption, we have \(v\in X'\).

Next, we show that the set of nodes \(\{(X,R)\in \mathcal {P}\mid v\in X\}\) is a subtree of T. Equivalently, we must show that if node \((X_2,R_2)\) lies on a path from \((X_1,R_1)\) to \((X_3,R_3)\) in T, then \(X_1\cap X_3\subseteq X_2\). It suffices to check this in two cases: the case that \((X_3,R_3)\) is a descendant of \((X_1,R_1)\) in \(T'\), and the case that \((X_2,R_2)\) is the last common ancestor of \((X_1,R_1)\) and \((X_3,R_3)\). In the first case, it is easy to see that \(X_3\subset X_2\cup R_2\) and \(R_2\subseteq R_1\) hold. It follows that

$$\begin{aligned} X_1\cap X_3\subseteq X_1\cap (X_2\cup R_2)\subseteq X_1\cap (X_2\cup R_1)\subseteq X_2 \end{aligned}$$

since \(X_1\) and \(R_1\) are disjoint. In the second case, node \((X_2,R_2)\) has more than one out-neighbor, so its out-neighbors are positions \((X_2,R)\), where R runs over the \(X_2\)-flaps contained in \(R_2\). It follows that \(X_1\subseteq X_2\cup R'\) and \(X_3\subseteq X_2\cup R''\) for distinct \(X_2\)-flaps \(R'\) and \(R''\). Hence, \(X_1\cap X_3\subset X_2\).

To complete the proof, it suffices to show that for every edge \(\{u,v\}\in E(G)\) there is some node (XR) of T with \(u,v\in X\). Suppose for contradiction that this is not the case for edge \(\{u,v\}\).

We first show that there is a node (XR) such that \(u\in X\) and \(v\in R\) (or vice versa). To this end, consider the nodes (XR) of T with \(u,v\in R\) (e.g. the root node), and take such a node that has maximum distance from the root. This node cannot be a leaf since \(R\ni v\) is non-empty. Since u and v belong to the same X-flap, it follows by the maximality assumption that (XR) has a child \((X',R')\) with \(u\in X'\) and \(v\in R'\) (or vice versa).

Now consider all nodes (XR) with \(u\in X\) and \(v\in R\) and take such a node for which the distance to the root is maximised. This node cannot be a leaf (since \(R\ni v\) is non-empty). Consider a child \((X',R')\) of (XR). If we are in case (iii)(a) then \(v\in R'\) and we must have \(u\in X'\) since otherwise \(R'\) is not a union of \(X'\)-flaps as \(\{u,v\}\) is an edge. This contradicts the maximality assumption. If we are in case (iii)(b), then \(u\in X'\) and \(v\in R'\) contradicting the maximality assumption. If we are in case (iii)(c), we may assume that \(R'\) is the X-flap containing v and again this contradicts the maximality assumption. \(\square \)

Theorem 2

There is a polynomial time algorithm that, when given a graph G and an effective divisor of degree k, finds a tree decomposition of G of width at most k.

4 An example

We apply the constructions of the previous section to a relatively small example. Let \(G=(V,E)\) be the graph depicted in Fig. 1 and letFootnote 3\(D=3a\) be the divisor on G that has value 3 on vertex a and value 0 elsewhere.

Fig. 1
figure 1

An example graph G. The divisor \(D = 3a\) has positive rank. (It is not optimal, as \({{\,\mathrm{dgon}\,}}(G) = 2\), since the divisor \(b + f\) also has positive rank)

Fig. 2
figure 2

The monotone search strategy obtained from G with divisor \(D=3a\). Each node shows the corresponding pair (XR) with the root being \((\emptyset , \{a,b,c,d,e,f,g\})\). The labels I–III refer to the steps in the construction

If we follow the construction of Sect. 3, we will end up with the monotone search strategy found in Fig. 2. Recall that every node of the search tree is a pair (XR) of subsets of V such that R is a union of X-flaps in G. For every node, the sets X and R are indicated in the figure. The three ways of growing the tree (steps I, II, III of the construction) at a node with \(R\ne \emptyset \) are indicated by downward arrows. Steps of type I are the only steps that involve branching of the tree. Steps of type III are the most involved: a path of nodes is added to the tree (depicted horizontally) and the divisor \(D'\) changes. For reference, the four steps of type III are labelled (1)–(4). Below, we will elaborate on the construction.

Root:

The initial partial MSS consists of a root \((X,R)=(\emptyset ,V)\) connected to a leaf node \(({{\,\mathrm{supp}\,}}(D), V\setminus {{\,\mathrm{supp}\,}}(D))=(\{a\},\{b,c,d,e,f,g\})\). The divisor associated to the leaf node is \(D'=3a\).

Step III(1):

For the leaf node \((X,R)=(\{a\},\{b,c,d,e,f,g\})\), the set R is a single X-flap and \(N(R)=X\), so we apply step III. Dhar’s algorithm applied to divisor \(D'=3a\) (and an arbitrary vertex in R) gives the set \(U=\{a\}\) to fire on. We have \(U\cap X=\{s_1\}\) with \(s_1=a\). We obtain

$$\begin{aligned} \qquad \qquad \qquad X_1=X\cup (N(s_1)\cap R)=\{a,b,c\},\quad R_1=R\setminus X_1=\{d,e,f,g\},\quad X_1'=\{b,c\}. \end{aligned}$$

The path \((X_1,R_1)\rightarrow (X_1',R_1)\) is attached to leaf node (XR). The divisor \(D'-Q\mathbf {1}_U=a+b+c\) is associated to the new leaf node \((X_1',R_1)\).

Step I:

For the leaf node \((X,R)=(\{b,c\},\{defg\})\), the set R is the union of two X-flaps: \(R=\{d\}\cup \{e,f,g\}\). Hence, we apply step I to obtain two new leaf nodes \((\{b,c\},\{d\})\) and \((\{b,c\}, \{e,f,g\}\).

Step II:

In the left-hand leaf node \((X,R)=(\{b,c\},\{d\})\) we have \(N(R)=\{b\}\subset X\), so we apply step II and add a new leaf node \((\{b\},\{d\})\).

Step III(2–4):

The remaining steps in the construction of the MSS are of type III. We summarise the details below.

(2):

Divisor \(D'\) is equal to \(a+b+c\). Applying Dhar’s algorithm to \(D'\) and the vertex d, we obtain the set \(U=\{a,b,c,e,f,g\}\). Firing on U, we obtain the new divisor \(a+c+d\).

(3):

Divisor \(D'\) is equal to \(a+b+c\). Applying Dhar’s algorithm to \(D'\) and any of the vertices in \(R=\{e,f,g\}\) we obtain the set \(U=\{a,c\}\). Firing on U, we obtain the new divisor \(2b+g\).

(4):

Divisor \(D'\) is equal to \(2b+g\). Applying Dhar’s algorithm to \(D'\) and the vertex e (or equivalently f) we obtain the set \(U=\{a,b,c,d,g\}\). Firing on U, we obtain the new divisor \(e+2f\).

From the search tree, we obtain a tree-decomposition of width \(\deg (D)=3\) by labeling each node (XR) by the set X and ignoring arc directions. Removing nodes with label \(\emptyset \) and contracting edges of the tree between nodes with equal labels, we obtain the following tree decomposition (Fig. 3).

Fig. 3
figure 3

Tree decomposition of G derived from the MSS

5 Other notions of gonality

5.1 Stable divisorial gonality

The stable divisorial gonality of a graph G is the minimum of \({{\,\mathrm{dgon}\,}}(H)\) over all subdivisions H of G (i.e., graphs H that can be obtained by subdividing zero or more edges of G). The bound for divisorial gonality can easily be transferred to one for stable divisorial gonality. If G is simple, then the treewidth of G equals the treewidth of any of its subdivisions. (This is well known.) If G is not simple, then either the treewidth of G equals the treewidth of all its subdivisions, or G is obtained by adding parallel edges to a forest (i.e., the treewidth of G equals 1), and we subdivide at least one of these parallel edges (thus creating a graph with a cycle; the treewidth will be equal to 2 in this case.) In the latter case, the (stable) divisorial gonality will be at least two. Thus, we have the following easy corollary.

Corollary 1

The treewidth of a graph G is at most the stable divisorial gonality of G.

Standard treewidth techniques allow us to transform a tree decomposition of a subdivision of G into a tree decomposition of G of the same width. (For each subdivided edge \(\{v,w\}\) replace each occurrence of a vertex representing a subdivision of this edge by v in each bag.)

5.2 Stable gonality

Related to (stable) divisiorial gonality is the notion of stable gonality; see Cornelissen et al. (2015). This notion is defined using finite harmonic morphisms to trees.

Let G and H be undirected nonempty graphs. We allow G and H to have parallel edges but not loops. A graph homomorphism from G to H is a map \(f:V(G)\cup E(G)\rightarrow V(H)\cup E(H)\) that maps vertices to vertices, edges to edges, and preserves incidences of vertices and edges:

  • \(f(V(G))\subseteq V(H)\),

  • if e is an edge between vertices u and v, then f(e) is an edge between f(u) and f(v).

A finite morphism from G to H (notation: \(f:G\rightarrow H\)) is graph homomorphism f from G to H together with an index function \(r_f: E(G) \rightarrow \mathbb {Z}_{>0}\). A finite morphism \(f:G\rightarrow H\) with index function \(r_f\) is harmonic if for every vertex \(v\in V(G)\), there is a constant \(m_f(v)\) such that for each edge \(e \in E(H)\) incident to f(v), we have

$$\begin{aligned} \sum _{e' \,\text {incident to } v; f(e')=e} r_f(e') = m_f(v) \end{aligned}$$

If H is connected and \(|E(G)| \ge 1\), then there is a positive integer \(\deg (f)\), the degree of f, such that for all vertices \(w\in V(H)\) and edges \(e\in E(H)\), we have

$$\begin{aligned} \deg (f)= \sum _{v\in V(G); f(v)=w} m_f(v) = \sum _{e' \in E(G); f(e')=e} r_f(e'); \end{aligned}$$

see Urakawa (2000, Lemma 2.12) and Baker and Norine (2009, Lemma 2.3). In particular, f is surjective in this case.

A refinement of a graph G is a graph \(G'\) that can be obtained from G by zero or more of the following two operations: subdivide an edge; add a leaf (i.e., add one new vertex and an edge from that vertex to an existing vertex).

The stable gonality of a connected non-empty graph G is the minimum degree of a finite harmonic morphism of a refinement of G to a tree.

Fig. 4
figure 4

A graph G with tree H and harmonic morphism f given by projecting the edges and vertices of G downward to H. The degree of f equals 3. The value of \(r_f\) resp. \(m_f\) is displayed at every edge resp. vertex of G

Fig. 5
figure 5

A refinement \(G'\) of G and a harmonic morphism \(f'\) to a tree \(H'\) given by projecting the edges and vertices of \(G'\) to the right. The degree of \(f'\) equals 2. The values of \(r_{f'}\) resp. \(m_{f'}\) are displayed at every edge resp. vertex of \(G'\)

Example 1

We look at an example that illustrates the above definition and shows how taking refinements might lead to harmonic morphisms of low degree. Consider Fig. 4. Here the map \(f :G \rightarrow H\) is given by projecting each edge and vertex downward. The value of the index function \(r_f\) is given at every edge and the value of \(m_f\) is given at every vertex. One can check that for every edge in H, the sum of the indices of the pre-images equals 3, and that the sum of the values of \(m_f\) also equals 3. The degree of f equals 3.

By refining G one obtains a harmonic morphism of degree 2, see Fig. 5. The map \(f'\) is given by projecting to the right, and again the values of the index function are given at every edge. The two horizontal edges in G are mapped to the horizontal edge in \(H'\). This map has degree 2. As G is not a tree, the stable gonality of G is greater than 1, hence we conclude that the stable gonality of G is 2.

Lemma 9

Let G be an undirected connected graph without loops and at least one edge. Given a tree T and a finite harmonic morphism \(f:G\rightarrow T\) of degree k, a tree decomposition of G of width at most k can be constructed in \(O(k^2|V(G)|)\) time.

Before proving the lemma, we make some simple observations. Recall that indices \(r_f(e)\) are positive integers. We thus have for each edge \(e\in E(T)\):

$$\begin{aligned} | \{e'\in E(G) \mid f(e')=e \} | \le \sum _{e' \in E(G); f(e')=e} r_f(e') = \deg (f). \end{aligned}$$

Since G is connected and has at least one edge, it follows that \(m_f(v)\ge 1\) for every \(v\in V(G)\). Hence, for each vertex \(i\in V(T)\):

$$\begin{aligned} | \{v \in V(G) \mid f(v)=i \}| \le \sum _{v\in V(G); f(v)=i} m_f(v) = \deg (f). \end{aligned}$$

Proof

(of Lemma 9) We build a tree decomposition of G in the following way. For each edge \(e \in E(T)\), we have that \(| \{ e'\in E(G) \mid f(e')=e \} | \le k\). Call this number \(\ell (e)\). We subdivide e precisely \(\ell (e)\) times; that is, we add \(\ell (e)\) new vertices on this edge. Let \(T'\) be the tree that is obtained in this way.

To the nodes i of \(T'\), we associate sets \(X_i\) in the following way. If i is a node of T (i.e., not a node resulting from the subdivisions), then \(X_i = f^{-1}(i)\), i.e., all vertices mapped by the morphism to i. By the observation above, we have that \(|X_i|\le \deg (f) = k\).

Consider an edge \(\{i,j\}\) in T. Write \(k' = \ell (\{i,j\})\). Recall that there are \(k' \le k\) edges of G that are mapped to \(\{i,j\}\). Suppose these are \(e_1 = \{v_1,w_1\}, \ldots , e_{k'} = \{v_{k'},w_{k'}\}\) with \(f(v_1)=f(v_2)=\cdots =f(v_{k'})= i\) and \(f(w_1)=f(w_2)=\cdots =f(w_{k'})= j\). Let \(i_1, i_2, \ldots , i_{k'}\) be the subdivision nodes of the edge \(\{i,j\}\), with \(i_1\) incident to i and \(i_{k'}\) incident to j. Set \(X_{i_r} = \{v_s \mid r\le s \le k'\} \cup \{w_t \mid 1 \le t \le r\}\) for \(r \in \{1, \ldots , k'\}\). The construction is illustrated in Fig. 6. We claim that this yields a tree decomposition of G of width at most k.

For all edges \(\{v,w\}\in E(G)\), we have \(\{f(v),f(w)\}\in E(T)\). Suppose without loss of generality that f(v) has the role of i, f(v) the role of j, \(v=v_r\) and \(w=w_r\) in the construction above. Then \(v, w \in X_{i_r}\).

Finally, for all \(v\in V\), the sets \(X_i\) to which v belongs are the following: v is in \(X_{f(v)}\), and for each edge incident to \(f(v)\in T\), v is in zero or more successive bags of subdivision nodes of this edge, with the first one (if existing), incident to f(v). Thus, the bags to which v belongs form a connected subtree.

The first condition of tree decompositions follows from the second and the fact that G is connected. Hence \(T'\), with bags as defined above, yields a tree decomposition of G.

Finally, note that each set \(X_i\) is of size at most \(k+1\): vertices in T have a bag of size k and subdivision vertices have a bag of size \(k'+1 \le k+1\). So, we have a tree decomposition of G of width at most k.

It is straightforward to see that the construction in the proof can be carried out in \(O(k^2|V(G)|)\) time. (Use that \(|V(T)| \le |V(G)|\), since f is surjective.) \(\square \)

Fig. 6
figure 6

Example of a step in the proof of Lemma 9. Here \(k'=4\). Left: four edges are mapped to the edge \(\{i,j\}\) by the finite harmonic morphism. Right: the corresponding bags in the tree decomposition

Theorem 3

Let G be an undirected connected graph without loops. Suppose that G has stable gonality k. Then G has treewidth at most k. Given a refinement \(G'\) of G and a finite harmonic morphism \(f:G'\rightarrow T\) of degree k, a tree decomposition of G of width at most k can be constructed in \(O(k^2|V(G')|)\) time.

Proof

The degenerate case that G has no edges must be handled separately; here we have that the treewidth of G is 0, which is equal to its stable gonality.

Suppose G has at least one edge. By Lemma 9, we obtain a tree-decomposition of \(G'\) of width k in \(O(k^2|V(G')|)\) time. Standard treewidth techniques allow us to transform a tree decomposition of a refinement of G into a tree decomposition of G of the same or smaller width. Added leaves can just be removed from all bags where they occur. For each subdivided edge \(\{v,w\}\), replace each occurrence of a vertex representing a subdivision of this edge by v in each bag. \(\square \)

5.3 Comparison of the tree decompositions

Divisorial gonality and stable gonality are unbounded in one another (Gijswijt et al. 2020, Sect. 5). In particular, the existence of a harmonic morphism \(G \rightarrow T\) of degree k does not imply the existence of a positive rank divisor of degree k on G and vice versa. Thus one cannot expect the minimal width of the tree decompositions of a graph G obtained through harmonic morphisms to be equal to the minimal width obtained through positive rank divisors, let alone that the tree decompositions themselves are equal.

However, we can relate the two constructions as follows. Given a graph G and a harmonic morphism \(f:G \rightarrow T\) of degree k one can obtain a positive rank divisor on a graph \(G'\) with \(V(G) = V(G')\): replace every edge e of G by \(r_f(e)\) parallel edges to obtain \(G'\). Choose any vertex \(t \in T\) and let \(D_t\) be the divisor with \(m_f(v)\) chips on every vertex \(v \in f^{-1}(t)\) and no chips on the other vertices. Then \(D_t\) is a positive rank divisor on \(G'\) of degree k. Indeed, given a neighbor \(t' \in T\) of t, let \(T_{t, t'}\) be the vertex set of the connected component of \(T-\{t,t'\}\) that contains t. We can fire the set \(f^{-1}(T_{t, t'})\), which moves all chips from vertices in \(f^{-1}(t)\) to vertices in \(f^{-1}(t')\). As \(v \in f^{-1}(t)\) has exactly \(m_f(v)\) edges to vertices in \(f^{-1}(t')\) and \(v' \in f^{-1}(t')\) has exactly \(m_f(v')\) edges to vertices in \(f^{-1}(t)\), we find that the resulting divisor has \(m_f(v')\) chips on every vertex \(v' \in f^{-1}(t')\) and no chips on other vertices. That is, it is precisely the divisor \(D_{t'}\). Repeating this process shows that \(D_t\) is a positive rank divisor.

We can use the divisors \(D_t\) and firing sets \(T_{t, t'}\) to construct a monotone search strategy as in Sect. 3. Indeed, suppose we are in Step III of the construction of a monotone search strategy, and \(D'=D_t\) for some node \(t\in T\). Let \(r\in R\cap N(X)\). Then \(t'=f(r)\) is a neighbor of t in T. Since R is connected, \(f(R)=T_{t',t}=V(T)\setminus T_{t,t'}\). Hence, we can take \(D''=D_t\) and fire on \(U=T_{t,t'}\).

In this way we obtain a decomposition that is basically the same as the tree decomposition obtained from the harmonic morphism f. Indeed, if t and \(t'\) are neighbors in T, we let \(f^{-1}(t) = \{v_1, \dots , v_n\}\) and denote the neighbors of \(v_i\) in \(f^{-1}(t')\) by \(v'_{i, 1}, \dots , v'_{i, a_i}\). Then the tree decomposition obtained from \(D_t\) will have a path of bags

$$\begin{aligned} f^{-1}(t) = \{v_1, \dots , v_n\}&\rightarrow \{v_1, \dots , v_n, v_{1,1}, \dots , v_{1, a_1}\} \\&\rightarrow \{v_2, \dots , v_n, v_{1,1}, \dots , v_{1, a_1}\} \\&\rightarrow \{v_2,\dots , v_n, v_{1,1},\dots , v_{1,a_1},v_{2,1},\dots , v_{2,a_2}\} \\&\rightarrow \dots \\&\rightarrow \{v_{1,1},\dots , v_{1,a_1},\dots , v_{n,1},\dots , v_{n,a_n}\} = f^{-1}(t'). \end{aligned}$$

Numbering the edgesFootnote 4\(\{v_i,v_{i,j}\}=:e_{a_1+\cdots +a_{i-1}+j}\), the tree decomposition obtained from f will have a path of bags

$$\begin{aligned} f^{-1}(t) = \{v_1, \dots , v_n\}&\rightarrow \{v_1, \dots , v_n, v_{1,1}\} \\ {}&\rightarrow \dots \\ {}&\rightarrow \{v_1,\dots , v_n, v_{1,1}, \dots , v_{1, a_1}\} \\ {}&\rightarrow \{v_2,\dots , v_n, v_{1,1},\dots , v_{1,a_1}, v_{2,1}\} \\ {}&\rightarrow \dots \\ {}&\rightarrow \{v_2,\dots , v_n, v_{1,1},\dots , v_{1,a_1}, v_{2,1},\dots , v_{2,a_2}\} \\ {}&\rightarrow \dots \\ {}&\rightarrow \{v_{1,1},\dots , v_{1,a_1},\dots , v_{n,1},\dots , v_{n,a_n}\}= f^{-1}(t'). \end{aligned}$$

The second sequence of bags can be easily contracted to obtain the first. Hence, a tree decomposition constructed from a harmonic morphism can also be obtained from a positive rank divisor on an associated graph.

It is unknown to the authors whether or not any tree decomposition obtained from a positive rank divisor can be obtained from a finite harmonic morphism on some associated graph, as it is unclear how to obtain a harmonic morphism from a positive rank divisor.

6 Conclusions

In this paper, we gave a constructive proof that the divisorial gonality of a graph is an upper bound for its treewidth. Before this, only a non-constructive proof was known (van Dobben de Bruyn and Gijswijt 2020). There are several graph theoretic notions with the property that they give an upper bound for treewidth; see e.g. Bodlaender (1998) for an older overview. One consequence of our result is that problems which can be solved efficiently (e.g., in linear time) on graphs of bounded treewidth (e.g., when they can be formulated in Monadic Second Order Logic (see Courcelle (1990) or Cygan et al. (2015, Chapter 7)) also can be solved efficiently on graphs of bounded divisorial gonality. It is a natural question to ask whether there are problems that are intractable even when the treewidth is small, but become tractable for small divisiorial gonality; however, it appears hard to come with natural examples for this. The same applies to the notions stable divisorial gonality

An interesting open problem is to establish the parameterized complexity of divisorial gonality, and the other gonality notions. It is known that the Divisorial Gonality problem (i.e., given a graph G, and an integer k, decide if \({{\,\mathrm{dgon}\,}}(G)\le k\)) is in XP (Baker and Shokrieh 2013; Dobben de Bruyn 2012), but it is unkown if the problem is in FPT, i.e., if there is an algorithm with running time of the form \(O(f(k)\cdot n^c)\) for constant c. Likewise, are Stable Divisorial Gonality or Stable Gonality in XP or even in FPT? (See e.g. Cygan et al. (2015)) for an introduction to parameterized complexity.)