An efficient characterization of submodular spanning tree games

Cooperative games form an important class of problems in game theory, where a key goal is to distribute a value among a set of players who are allowed to cooperate by forming coalitions. An outcome of the game is given by an allocation vector that assigns a value share to each player. A crucial aspect of such games is submodularity (or convexity). Indeed, convex instances of cooperative games exhibit several nice properties, e.g. regarding the existence and computation of allocations realizing some of the most important solution concepts proposed in the literature. For this reason, a relevant question is whether one can give a polynomial-time characterization of submodular instances, for prominent cooperative games that are in general non-convex. In this paper, we focus on a fundamental and widely studied cooperative game, namely the spanning tree game. An efficient recognition of submodular instances of this game was not known so far, and explicitly mentioned as an open question in the literature. We here settle this open problem by giving a polynomial-time characterization of submodular spanning tree games.


Introduction
Cooperative games are among the most studied classes of problems in game theory, with plenty of applications in economics, mathematics, and computer science.In such games, a central question is how to distribute cost (or revenue) among a set of participants, usually called players, who are allowed to cooperate.Formally, we are given a set N of players, and a characteristic function ν : 2 N → R, with ν(∅) = 0. Here, ν(S) represents the cost paid (revenue received) by the subset S of players if they choose to form a coalition.An outcome of the game is given by an allocation y ∈ R N such that v∈N y v = ν(N ), which assigns a cost (revenue) share to each player.Of course, there are a number of criteria for evaluating how "good" an allocation is, such as stability, fairness, and so on.
Probably the most popular solution concept for cooperative games is the core.It is the set of stable outcomes where no subset of players has an incentive to form a coalition to deviate.In a cooperative cost game, this translates naturally to the following constraint: v∈S y v ≤ ν(S), for all S ⊆ N .Intuitively, if this constraint is violated for some set S, the total cost currently paid by the players in S is more than the total cost ν(S) they would have to pay if they form a coalition-this incentivizes these players to deviate from the current allocation.Besides the core, there are several other crucial solution concepts which have been defined in the literature, e.g. the Shapley value, the nucleolus, the kernel, the bargaining set, and the von Neumann-Morgenstern solution sets (we refer to [2] for details).Many fundamental questions involving such solution concepts have been investigated in the past few decades: Which cooperative game instances admit an allocation realizing a particular solution concept?Can we efficiently compute it?Can we test whether a given allocation belongs to such sets?Submodularity (or convexity) is a crucial property which yields interesting answers to some of the questions above.An instance of a cooperative cost game is called submodular if the characteristic function ν is submodular, meaning that Submodular games exhibit a large number of desirable properties.In particular, (1) the core is always non-empty and an allocation in the core can be computed in polynomial time [13]; (2) testing whether an allocation belongs to the core is equivalent to separating over the extended polymatroid of ν, which can be performed efficiently [8]; (3) computing the nucleolus can be done efficiently [10]; (4) there is a nice "snowballing" effect that arises when the game is played cooperatively, meaning that joining a coalition becomes more attractive as the coalition grows, and so the value of the so-called grand coalition ν(N ) is always reached [13].We refer to [11,13] for other interesting properties of submodular games involving other crucial solution concepts.Given these observations, it is not surprising that some researchers have investigated whether it is possible to give an efficient characterization of submodular instances, for prominent cooperative games that are in general non-convex.Such characterizations are known, for example, for the minimum coloring game and the minimum vertex cover game [12], as well as for some communication games [15].This paper focuses on one of the most fundamental cooperative games, namely the spanning tree game.This game was introduced more than 40 years ago [1,3], and since then it has been widely studied in the literature.To get an intuition about the problem, consider the following setting.A set N of clients would like to be connected to a central source r which can provide a service to them.The clients wish to build a network connecting them to the source r , at minimum cost.An obvious way to solve this problem is to compute a minimum spanning tree connecting N ∪ {r }.But how should the clients fairly split the cost of the tree among them?Formally, an instance of the spanning tree game is described by an edge-weighted complete graph G = (V , E) where V = N ∪ {r }.The set of players is given by N , and the value ν(S) of the characteristic function is equal to the cost of a minimum spanning tree in the subgraph induced by S ∪ {r }.
Despite being one of the most studied cooperative games, the existence of an efficient characterization of submodularity for the spanning tree game has remained elusive so far.Granot and Huberman [7] proved that spanning tree games are permutationally convex (which is a generalization of submodularity).Their result implies that the core is always non-empty for such games, despite being non-convex in general (this was first proven by the same authors in [6]).However, other nice properties of submodular games do not generalize: for general spanning tree games, testing core membership is coNP-hard [4], and computing the nucleolus is NP-hard [5].Trudeau [14] gave a sufficient condition for an instance of the game to be submodular.An important step forward was made by Kobayashi and Okamoto [9], who gave a characterization of submodularity for instances of the spanning tree game where the edge weights are restricted to take only two values.For general weights, they stated some necessary (but not always sufficient) as well as some sufficient (but not always necessary) conditions for an instance to be submodular.Whether a polynomial-time characterization of submodularity exists for spanning tree games is left as an open question.In fact, they stated twice in their paper: "We feel that recognizing a submodular minimum-cost spanning tree game is coNPcomplete, but we are still far from proving such a result." Our results and techniques.In this paper, we finally settle this open question: we give a polynomial-time characterization of submodular spanning tree games.
Our characterization uses combinatorial techniques and it is based on two main ingredients.The first one, described in Sect.3, is a generalization of Kobayashi and Okamoto's result [9].When the edges can have only two distinct weights, they proved that the only obstruction to submodularity comes from the presence of certain cycles in the graph induced by the cheaper edges.When dealing with more weight values, say w 1 < w 2 < • • • < w k , things become necessarily more complicated.We can still prove that an obstruction to submodularity is given by certain cycles, which we call violated, but (a) our definition of violated cycles is more involved than the one in [9], and (b) we have to look for such cycles not just in one induced graph, but in each graph induced by the edges of weight at most w i , for all i < k.
Furthermore, the presence of violated cycles is not anymore the only obstruction to submodularity.Roughly speaking, violated cycles capture how the edges of a certain weight should relate to the cheaper ones, but we still need a condition that takes into account the "magnitude" of distinct weight values, when k > 2. This leads to the second main ingredient of our characterization, described in Sect. 4. We show that, under the assumption of not having violated cycles, we can identify polynomially many subsets of vertices which could yield the highest possible violation to the submodularity inequality ( * ).We can then efficiently test the submodularity of our instance by checking whether the inequality ( * ) is satisfied on this family of subsets of vertices.Combining these two ingredients yields a polynomial-time characterization of submodularity for spanning tree games, as described in Sect. 5.
We conclude our paper with an additional result.As previously mentioned, the authors of [9] gave a necessary condition for submodularity of the spanning tree game.They also stated that they do not know whether their condition can be verified in polynomial time.We answer this question affirmatively in Sect.6.

Preliminaries and notation
For a subset S ⊆ V , denote mst(S) as the weight of a minimum spanning tree in G[S], where G[S] is the subgraph of G induced by S. For a subset F ⊆ E, denote w(F) as the sum of edge weights in F, i.e. w(F) := e∈F w(e).Let H be a subgraph of G.For a vertex u ∈ V and an edge e ∈ E, the subgraphs H \u and H \e are defined as is the neighborhood of u in H , while δ H (u) is the set of edges incident to u in H .Note that u / ∈ N H (u). For any positive integer k, [k] represents the set {1, 2, . . ., k}.Given a pair of vertices u, v ∈ N , let S uv denote the family of vertex subsets which contain r but not u or v, i.e. S uv := {S ⊆ V : r ∈ S and u, v / ∈ S}.Define the function f uv : S uv → R as It is easy to see that the spanning tree game on G is submodular if and only if f uv (S) ≥ 0 for all u, v ∈ N and S ∈ S uv .Let For an edge uv ∈ E, define the neighborhood of uv in G i as It represents the set of vertices whose edges to u and v have weight at most w i .Notice that u, v / ∈ N i (uv).We will also need the following graph theory terminology.A hole is an induced cycle with at least four vertices.A diamond is the complete graph K 4 minus one edge.We will refer to the vertices of degree 2 in a diamond as tips.Lastly, the following property of minimum spanning trees will be useful to us.

Violated cycles
In this section, we will prove that a submodular spanning tree game does not contain violated cycles, which will be defined later.First, we need to introduce the concept of well-covered cycles.
Definition 1 Given a cycle C and a chord f = uv, let P 1 and P 2 denote the two u-v paths in C. The cycles P 1 + f and P 2 + f are called the subcycles of C formed by f .We say that f covers C if w( f ) ≥ w(e) for all e ∈ E(P 1 ) or for all e ∈ E(P 2 ).If C is covered by all of its chords, then it is well-covered.
Next, we define the following two simple structures (see Fig. 1 for some examples).We then proceed to show that a submodular spanning tree game does not contain either of them.
Definition 2 A hole is bad if at least one of its vertices is not adjacent to r .An induced diamond is bad if its Hamiltonian cycle is well-covered but at least one of its tips is not adjacent to r .

Lemma 2 If the spanning tree game on G is submodular, then there are no (a) bad holes or (b) bad induced diamonds in G i for any i < k.
The lemma will be proved via contrapositive separately for (a) and (b).Before jumping into the details, it is instructive to have an overview of the arguments, as they revolve around the same idea.The proof starts by assuming the existence of a bad hole or a bad induced diamond in G i for some i < k.Then, from this bad structure, a subset of vertices S r and two additional vertices u, v will be identified such that they violate the submodularity inequality, i.e. f uv (S) < 0.

Proof of Lemma 2(a)
Let C be a bad hole in G i for some i < k.Consider the following two cases.
Case 1: C contains r .Let u, v be the vertices adjacent to r in C. Define the set S := V (C)\ {u, v}.To prove that the instance is not submodular, it suffices to show that f uv (S) < 0. Let P be the path obtained by deleting r , u, v from C. Let u , v be the endpoints of P where uu , vv ∈ E(C) (see Fig. 2).Note that u = v if P is a singleton.It is easy to see that Next, deleting the most expensive edge from C creates a minimum spanning tree of G[S ∪ {u, v}].Since this edge has weight at most w i , we obtain Combining the equations and inequalities above yields Case 2: C does not contain r .We first show that if r is adjacent in G i to two nonadjacent vertices of C, then we are done.Since C is a bad hole in G i , there exists a vertex t ∈ V (C) such that rt / ∈ E i .Starting from t, traverse the hole C in both directions until we encounter the first vertices p and q such that r p, rq ∈ E i respectively.Since r is adjacent to two non-adjacent vertices of C, we have p = q and pq / ∈ E(C).Let Q be the p-q path in C which contains t.Then, by our choice of p and q, the cycle Q + r p + rq is a bad hole in G i which contains r .It follows that the instance is not submodular by Case 1.
Thus, we may assume that r can only be adjacent to adjacent vertices of C. Pick a vertex s ∈ V (C) with the cheapest edge to r , i.e. w(rs) ≤ w(r x) for all x ∈ V (C).
Let u, v be the vertices adjacent to s in C. Define the set S := (V (C) ∪ r )\ {u, v}.As with the previous case, it suffices to show that f uv (S) < 0. Let P be the path obtained by deleting s, u, v from C. Let u , v be the endpoints of P where uu , vv ∈ E(C) (see Fig. 2).We are left with the following two subcases.Combining the equations and inequalities above yields Subcase 2.2: r is adjacent to two vertices of C. Since we assumed that r can only be adjacent to adjacent vertices of C, it follows that r is adjacent to s and either u or v in G i .Without loss of generality, suppose that rs, ru ∈ E i .Since s was chosen to be the vertex in C with the cheapest edge to r , we have mst(S) ≥ w(P) + w(rs) + w i+1 , mst(S ∪ u) = w(P) + w(rs) + min {w(ru), w(su)} + w(uu ), mst(S ∪ v) = w(P) + w(rs) + w(sv) + w(vv ).
Next, deleting the most expensive edge from the triangle {rs, ru, su} does not increase the weight of a minimum spanning tree in G[S ∪ {u, v}].In fact, a minimum spanning tree can be obtained by deleting one more edge from Combining the equations and inequalities above yields

Proof of Lemma 2(b)
Let D be a bad induced diamond in G i for some i < k.Consider the following two cases.
Case 1: D contains r .Observe that r is a tip of D. Let s be the other tip and u, v be the non-tip vertices of D. Define the set S := {r , s} (see Fig. 3).To prove that the instance is not submodular, it suffices to show that f uv (S) < 0. It is easy to see that Since the Hamiltonian cycle of D is well-covered, its chord uv can be deleted without increasing the weight of a minimum spanning tree in G[S ∪ {u, v}].We are now left with the Hamiltonian cycle of D, so a minimum spanning tree can be obtained by removing the most expensive edge.This gives mst(S ∪ {u, v}) ≥ w(ru) + w(su) + w(r v) + w(sv) − w i .
Then, combining the equations and inequalities above yields Case 2: D does not contain r .Let s and t be the tips of D where w(rs) ≤ w(rt).Note that rt / ∈ E i because D is a bad induced diamond in G i .Let u and v be the non-tip vertices of D where w(ru) ≤ w(r v).Define the set S := {r , s, t} (see Fig. 3).As with the previous case, it suffices to show that f uv (S) < 0. Consider the following three subcases.
Subcase 2.1: r is adjacent to at most one vertex of D. Note that r v / ∈ E i .It is also easy to see that Next, observe that we can delete uv and the most expensive edge in the Hamiltonian cycle of D without increasing the weight of a minimum spanning tree in G[S ∪{u, v}].Therefore, mst(S ∪ {u, v}) ≥ min {w(rs), w(ru)} + w(su) + w(tu) + w(sv) + w(tv) − w i .
Then, combining the equations and inequalities above yields Subcase 2.2: r is adjacent to two vertices of D. We claim that if ru, r v ∈ E i , then we are done.Note that this implies rs, rt / Since both diamonds contain r , the instance is not submodular by Case 1.Thus, we may assume that rs, ru ∈ E i .Additionally, we may assume that w(su) < max {w(rs), w(ru)}.Otherwise, G[{r , s, u, v}] is a bad induced diamond in G i , and we are done again by Case 1.With these two assumptions, it is then easy to see that mst(S) ≥ w(rs) + w i+1 , mst(S ∪ u) = min {w(rs), w(ru)} + w(su) + w(tu), mst(S ∪ v) = w(rs) + w(sv) + w(tv).
Since argmax {w(rs), w(ru)} is the most expensive edge in the cycle {rs, ru, su} by our assumption, it can be deleted without increasing the weight of a minimum spanning tree in G[S ∪ {u, v}].By a similar reasoning, uv and the most expensive edge in the Hamiltonian cycle of D can also be deleted.Therefore, mst(S ∪ {u, v}) ≥ min {w(rs), w(ru)} + w(su) + w(tu) + w(sv) + w(tv) − w i .
Finally, combining the equations and inequalities above yields Subcase 2.3: r is adjacent to three vertices of D. Let w(r v) = w j for some j ≤ i, and consider the induced diamond G[{r , t, u, v}].If its Hamiltonian cycle is well-covered, then we are done by Case 1 because rt / ∈ E i .So we may assume that max {w(su), w(sv)} ≤ w(uv) < w(r v).Additionally, we may assume that w(su) < max {w(rs), w(ru)}.Otherwise, from the previous assumption, the five edges {rs, ru, su, sv, uv} have strictly smaller weights than w(r v) = w j .Thus, G[{r , s, u, v}] is a bad induced diamond in G j−1 , and we are done again by Case 1.With these two assumptions, it is then easy to see that mst(S) ≥ w(rs) + w i+1 , mst(S ∪ u) = min {w(rs), w(ru)} + w(su) + w(tu), mst(S ∪ v) = min {w(rs), w(r v)} + w(sv) + w(tv).
Since r v is the most expensive edge in the cycle {ru, r v, su, sv} by our assumption, it can be deleted without increasing the weight of a minimum spanning tree in G[S ∪ {u, v}].By a similar reasoning, argmax {rs, ru}, uv and the most expensive edge in the Hamiltonian cycle of D can also be deleted.Hence, mst(S ∪ {u, v}) ≥ min {w(rs), w(ru)} + w(su) + w(tu) + w(sv) + w(tv) − w i .
Finally, combining the equations and inequalities above yields We are now ready to define the main object of study in this section.Definition 3 A violated cycle is a well-covered cycle which contains at least one pair of non-adjacent vertices u, v ∈ V and at least one vertex w ∈ N not adjacent to r .
In the definition above, w can be equal to u or v.For example, if r ∈ V (C), then the pair {r , w} already certifies that C is a violated cycle because it can be used to satisfy both conditions.Observe that bad holes and Hamiltonian cycles of bad induced diamonds are examples of violated cycles (we consider a hole to be well-covered).The next lemma extends the scope of Lemma 2 to include violated cycles.When k = 2, this coincides with the condition given by Kobayashi and Okamoto [9] because every cycle in G 1 is well-covered.

Lemma 3
If the spanning tree game on G is submodular, then there are no violated cycles in G i for any i < k.Proof We will prove the contrapositive.Let j be the smallest integer such that G j contains a violated cycle.By our choice of j, there are no violated cycles in G i for all i < j.Let C be a smallest violated cycle in G j .Then, max e∈E(C) w(e) = w j .We first prove the following claim.

Claim 1 For any chord f , the subcycles of C formed by f are well-covered.
Proof Let C 1 and C 2 denote the subcycles of C formed by f .For the purpose of contradiction, suppose that C 2 is not well-covered.Let g = uv be the cheapest chord in C 2 such that w(g) < w( f ) and w(g) < w(h) for some edge h ∈ E(C 2 ), where f and h lie in different subcycles of C 2 formed by g (see Fig. 4 for an example).This chord exists because C is well-covered but C 2 is not.Consider the subcycles C 3 and C 4 of C formed by g, where f is a chord of the former.Observe that any chord of C 3 covers C 3 because C is well-covered and w(g) < w(h).So, the subcycle C 3 is well-covered.In addition, the subcycle C 4 is well-covered because g was chosen to be the cheapest chord preventing C 2 from being well-covered.Let w(g) = w for some < j.We claim that the subcycle C 3 is present in G .To see this, recall that C is well-covered and w(g) < w(h).Hence, it follows that w(g) ≥ w(e) for all e ∈ E(C 3 ), which proves the claim.On the other hand, notice that the chord f is absent from G because w( f ) > w(g).Since the subcycle C 3 is wellcovered, its vertices are adjacent to r in G because there are no violated cycles in G .Next, recall that C is a violated cycle in G j , so there exists a vertex s ∈ V (C 4 )\V (C 3 ) such that rs / ∈ E j .Since the subcycle C 4 is well-covered, its vertices are pairwise adjacent in G j , as otherwise it is a smaller violated cycle than C. Note that this also implies r / ∈ V (C 4 ).Thus, we have ru, r v ∈ E and su, sv ∈ E j .Now, consider the 4-cycle D defined by E(D) := {ru, r v, su, sv}.It is wellcovered because w(g) = w and ru, r v ∈ E .Since rs / ∈ E j , it is also a violated cycle in G j .However, it is smaller than C. Indeed, C has at least 5 vertices because f is a chord in C 3 while g is a chord in C 2 .We have arrived at a contradiction.
Our goal is to show the existence of a bad hole or a bad induced diamond in G j .Then, we can invoke Lemma 2 to conclude that the game is not submodular.We may assume that C has a chord, otherwise it is trivially a bad hole.First, consider the case when r ∈ V (C).Let s ∈ V (C) where rs / ∈ E j .For any chord f in C, observe that r and s lie in different subcycles of C formed by f .This is because the subcycles are well-covered by the previous claim, so the one which contains both r and s will contradict the minimality of C. Now, let g be a chord of C. Let C r and C s denote the subcycles of C formed by g where r ∈ V (C r ) and s ∈ V (C s ).Observe that the vertices of C r are adjacent to r due to the minimality of C. Thus, C r is a triangle.Otherwise, there is a chord in C r incident to r , and it forms a subcycle of C which contains both r and s.On the other hand, the vertices of C s are pairwise adjacent due to the minimality of C. Hence, C s is also a triangle.Otherwise, there exists a chord in C s incident to s, and it forms a subcycle of C which contains both r and s.Therefore, C is a bad induced diamond in G j .
Next, consider the case when r / ∈ V (C).From this point forward, we may assume that every smallest violated cycle in G j does not contain r .Otherwise, we are back in the first case again.With this additional assumption, non-adjacency within C implies non-adjacency with r , as shown by the following claim.

Claim 2 For any pair of vertices u, v ∈ V (C) such that uv /
∈ E j , we have r u / ∈ E j or r v / ∈ E j .such that rs / ∈ E j .Let P su and P sv denote the edge-disjoint s-u and s-v paths in C respectively.Let u and v be the closest vertex to s on P su and P sv respectively such that ru , r v ∈ E j (see Fig. 5 for an example).Without loss of generality, let w(ru ) ≥ w(r v ).Denote P su and P sv as the s-u and s-v subpaths of P su and P sv respectively.Now, consider the cycle D := P su + P sv + ru + r v .Observe that it contains r and is no bigger than C. Furthermore, it does not contain a chord incident to r by our choice of u and v .To arrive at a contradiction, it is left to show that D is well-covered, as this would imply D is violated.Suppose for a contradiction, that D is not well-covered.Then, there exists a chord g in D such that w(g) < w(ru ) and w(g) < w(h) for some h ∈ E(D), where ru and h lie in different subcycles of D formed by g.This chord exists because C is well-covered but D is not.Let C 1 and C 2 denote the subcycles of C formed by g, where h ∈ E(C 2 ).Note that any chord of C 1 covers C 1 because C is well-covered and w(g) < w(h).Hence, the subcycle C 1 is well-covered.Moreover, we also have w(g) ≥ w(e) for all e ∈ E(C 1 ) because C is well-covered and w(g) < w(h).Let w(g) = w for some < j.Then, C 1 is still present in G but ru is not.Since C 1 also contains u and v but uv / ∈ E because uv / ∈ E j , it is a violated cycle in G .However, this is a contradiction because there are no violated cycles in G .
The remaining proof proceeds in a similar fashion to the first case.Let u, v ∈ V (C) be such that uv / ∈ E j .By the claim above, we know that ru / ∈ E j or r v / ∈ E j .For any chord f in C, observe that u and v lie in different subcycles of C formed by f .This is because the subcycles are well-covered by Claim 1, so the one which contains both u and v will contradict the minimality of C. Now, let g be a chord of C. Let C u and C v denote the subcycles of C formed by g where u ∈ V (C u ) and v ∈ V (C v ).The vertices of C u are pairwise adjacent due to the minimality of C. Thus, C u is a triangle.Otherwise, there exists a chord in C u incident to u, and it forms a subcycle of C which contains both u and v.By an analogous argument, C v is also a triangle.Therefore, C is a bad induced diamond in G j .
Notice that we have proven something stronger.Namely, if G j contains a violated cycle, then there exists an index i ≤ j such that G i contains a bad hole or a bad induced diamond.Moreover, as mentioned earlier, bad holes and Hamiltonian cycles of bad induced diamonds are violated cycles themselves.Thus, we obtain the following corollary.
Corollary 1 There are no bad holes or bad induced diamonds in G i for any i < k if and only if there are no violated cycles in G i for any i < k.

Candidate edges and expensive neighborhood
In the previous section, we showed that violated cycles are an obstruction to submodularity.In light of this fact, we now focus on graphs G whose subgraphs G i do not contain violated cycles.The goal of this section is to study the behaviour of f uv on these graphs.As a first step, the following lemma sheds light on how a minimum spanning tree changes under vertex removal.

Lemma 4
Assume that there are no violated cycles in G i for any i < k.Let T be a minimum spanning tree of G[S] where r ∈ S ⊆ V .For any s = r , there exists a minimum spanning tree of G [S\s] which contains E(T \s) and additionally, only uses Proof Pick a vertex s ∈ S\r .By Lemma 1, there exists a minimum spanning tree of G[S\s] which contains E(T \s).Let T be such a tree which uses the most edges from G[N T (s)∪r ].We will show that T is our desired tree.For the purpose of contradiction, suppose T has an edge uv such that uv / ∈ E(T ) and u / ∈ N T (s) ∪ r .Note that u and v lie in different components of T \s.Let P su and P sv denote the unique s-u and s-v paths in T respectively.We claim that C := P su + P sv + uv is a well-covered cycle in G i , where w i = w(uv).First, observe that uv is the most expensive edge in C because P su + P sv is part of the minimum spanning tree T .Hence, the cycle C is present in G i .Let f = x y be any chord of C in G i , and denote P xy as the unique x-y path in T .Then, P xy + f is a subcycle of C formed by f .Moreover, we have w( f ) ≥ w(e) for all e ∈ E(P xy ) because P xy is part of the minimum spanning tree T .Hence, the chord f covers C, which proves the claim.
Let u and v be the vertices adjacent to s in P su and P sv respectively.By our choice of T , we have w(u v ) > w(uv) = w i , which implies that u and v are not adjacent in G i .Since there are no violated cycles in G i , it follows that the vertices of C are adjacent to r in G i .However, note that adding ru or r v to T creates a fundamental cycle which uses the edge uv.Swapping it with uv creates another minimum spanning tree of G[S\s] which contains E(T \s) and uses more edges from G[N T (s) ∪ r ].We have arrived at a contradiction.
Given a pair of vertices u, v ∈ N where w(uv) = w i , the following definition distinguishes the neighbours of u, v in G from the neighbours of u, v in G i .

Definition 4
For an edge uv ∈ E, if w(uv) = w i , the expensive neighborhood of uv is defined as In other words, the expensive neighborhood of an edge uv is the set of vertices s / ∈ {u, v} such that max {w(su), w(sv)} > w(uv).It turns out that the function f uv always returns zero when evaluated on a set which does not lie entirely in the expensive neighborhood of uv.First, we show that we can assume uv / ∈ E(T ).Since S N (uv), there exists a vertex s ∈ S such that max {w(su), w(sv)} ≤ w(uv).If uv ∈ E(T ), then by rooting T at s, u is either a child or a parent of v. Adding su to T in the former and sv in the latter creates a fundamental cycle which contains uv.Thus, we can replace uv with this new edge to obtain the desired tree.
Since there are no violated cycles in G i for any i < k, by Lemma 4, there exists a minimum spanning tree T of G[S ∪ v] which contains E(T \u) and additionally, only uses edges from G[N T (u) ∪ r ].Recall that we assumed uv / ∈ E(T ), or equivalently, v / ∈ N T (u).Therefore, the neighborhood of v is identical in both trees, i.e.N T (v) = N T (v).
Consider the forest T \v.Let p ∈ N T (v) such that p and r lie in the same component of T \v (see Fig. 6 for an example).Note that p = r if r ∈ N T (v).We claim that p and r also lie in the same component of the forest T \v.We may assume that p = r , as otherwise the claim is trivially true.Moreover, we may assume that u lies on the unique p-r path in T .Otherwise, we are done because the same path is present in T \v.Let C r denote the component of T \v which contains p, r and u.By Lemma 4, the endpoints of every edge in E(T )\E(T \u) lie in C r .This proves the claim.
Using Lemma 4, we can construct a minimum spanning tree of G[S ∪u] by deleting v from T and adding a set F of edges from G[N T (v) ∪ r ].Note that pr / ∈ F as p and r lie in the same component of T \v.Since p and r also lie in the same component of T \v and N T (v) = N T (v), deleting v from T and adding the same set F of edges produces a minimum spanning tree of G[S].Thus, we get We can now focus solely on vertex sets which lie entirely in the expensive neighborhood of uv.Observe that if r / ∈ N (uv), then S N (uv) for all S ∈ S uv .Thus, we do not have to check these edges uv as f uv (S) = 0 for all S ∈ S uv by the previous lemma.This motivates the following definition.
Definition 5 An edge uv ∈ E is called a candidate edge if r ∈ N (uv).
With a mild assumption, we can show that the function f uv is inclusion-wise nonincreasing in the expensive neighborhood of uv.Lemma 6 Assume that there are no violated cycles in G i for any i < k.Let uv be a candidate edge and S ∈ S uv such that S ⊆ N (uv).If f xy ( N (x y)) ≥ 0 for every candidate edge x y, then f uv (S) ≤ f uv (S\s) for any s = r.
Proof Pick a vertex s ∈ S\r .Without loss of generality, assume w(su) ≥ w(sv).Then, w(su) > w(uv) because s ∈ N (uv).However, these two inequalities also imply that v / ∈ N (su).It follows that the set (S\s)∪v is not contained in the expensive neighborhood of su.By Lemma 5, Rearranging yields Since uv is a candidate edge, let w(uv) = w i for some i < k.We will proceed by induction on i. Rearranging yields Adding ( 1) and ( 2) gives f uv (S) = f uv (S\s).Now, suppose the lemma is true for all i ≥ j for some j < k.For the inductive step, let w(uv) = w j−1 .We may assume that S\s ⊆ N (su), as otherwise we obtain equality again.This implies that su is a candidate edge because r ∈ S\s.Since w(su) > w(uv) = w j−1 , we get where the first inequality is due to our assumption while the second inequality is due to the induction hypothesis.Then, rearranging and adding it to (1) yields f uv (S) ≤ f uv (S\s) as desired.

Characterization of submodularity
We are finally ready to give an efficient characterization of submodular spanning tree games.

Theorem 1
The spanning tree game on G is submodular if and only if the following two conditions are satisfied.
(i) There are no violated cycles in G i for any i < k. (ii) For every candidate edge uv, f uv ( N (uv)) ≥ 0.
Furthermore, these conditions can be verified in polynomial time.
Therefore, the game is submodular.
Checking Condition (ii) can clearly be done in polynomial time.Using Corollary 1, verifying Condition (i) reduces to searching for bad holes and bad induced diamonds in each G i , which can be done efficiently.To look for bad holes, one could check if there exists a hole through a given vertex v for all v ∈ N where r v / ∈ E i .To look for bad induced diamonds, a naive implementation would involve examining all vertex subsets of size 4, which still runs in polynomial time.

S-wide spanning trees
In this section, we answer another question posed in [9].There the authors stated a necessary condition for submodularity of the spanning tree game, and left open whether their condition can be verified in polynomial time.We here show that this is indeed the case.While this is not that relevant anymore in order to characterize submodularity (since we have provided Theorem 1), it shows a nice connection with matroid intersection that might still be of interest.
Theorem 2 (Theorem 1.2 in [9]).If the spanning tree game on G is submodular, then every minimum spanning tree T of G possesses the following two properties.V \r 1 be a given set of terminals.We say that a spanning tree T of G is S-wide if every component of T \r 1 contains at most one terminal.Equivalently, T is S-wide if for every i, j ∈ [k] where i = j, the unique s i -s j path on T contains the root r 1 .We are interested in the following problem: Given (G, w, r 1 , S), compute an S-wide spanning tree of minimum weight.
Before solving the problem above, let us explain how one can use it to efficiently test Conditions (a) and (b) of Theorem 2. To check Condition (a), consider all pairs of vertices u, v ∈ N with w(r v) < w(ru), and do the following.Set r 1 := u and S := {v, r }.Compute an S-wide spanning tree T * of minimum weight in G.If the weight of T * is equal to the weight of a minimum spanning tree in G, then T * is a minimum spanning tree of G violating Condition (a), since u is on the unique path from r to v in T * .It is not difficult to see that this procedure will eventually find a minimum spanning tree violating Condition (a), if one exists.
Condition (b) can be checked in a similar way.Consider all ordered pairs of vertices u, v ∈ N with w(uv) < w(r v), and do the following.Set r 1 := r and S := {u, v}.Compute an S-wide spanning tree T * of minimum weight in G.If the weight of T * is equal to the weight of a minimum spanning tree in G, then T * is a minimum spanning tree of G violating Condition (b), since adding uv to T * yields a cycle containing r .Once again, it is not difficult to see that this procedure will eventually find a minimum spanning tree violating Condition (b), if one exists.
We will now demonstrate how to compute an S-wide spanning tree of minimum weight using matroid intersection.Let (G, w, r 1 , S) be a given instance.Without loss of generality, we may assume that there are no edges between any pair of terminals, as every S-wide tree does not use them.We also assume k ≥ 2, otherwise this reduces trivially to computing an arbitrary minimum spanning tree.
First, construct an auxiliary graph G = (V , E ) from G as follows.Create k − 1 copies of the root vertex r 2 , . . ., r k , including its incident edges.Next, let G 1 denote the multigraph obtained from G by identifying r 1 , . . ., r k into a single vertex r .Note that parallel edges are kept.In order to distinguish the k parallel edges between r and some vertex v, they will be denoted r i v for all i ∈ [k], just like in the graph G .Similarly, let G 2 denote the multigraph obtained from G by identifying s 1 , . . ., s k into a single vertex s.See Fig. 7 for an example.Now, consider the graphic matroids on G 1 and G 2 , denoted M 1 = (E , I 1 ) and M 2 = (E , I 2 ) respectively.Observe that the matroids M 1 and M 2 share the same ground set E due to our notation of the parallel edges, but their independent sets are different.We would like to establish a correspondence between S-wide spanning trees in G and common bases of M 1 and M 2 .Let T be the set of S-wide spanning trees in G.Moreover, let B 1 and B 2 be the set of bases of M 1 and M 2 respectively.Construct the function g : Proof Let J ∈ B 1 ∩ B 2 .Then, it induces a spanning tree in the multigraphs G 1 and G 2 .Note that g(J ) also induces a spanning tree in the multigraph G 1 .Since the input graph G can be obtained from the multigraph G 1 by removing parallel edges, and g(J ) ⊆ E, it follows that g(J ) induces a spanning tree T in G.It is left to show that T is S-wide.For the purpose of contradiction, suppose there exist distinct indices i, j ∈ [k] such that the unique s i -s j path P in T does not contain the root r 1 .From the definition of h, we know that E(P) ⊆ J .However, E(P) induces a non-simple walk in G 2 , which implies that J / ∈ I 2 .We have reached a contradiction.

Lemma 8
For every T ∈ T , there exists a set J ∈ B 1 ∩ B 2 such that g(J ) = E(T ).
Proof Let T be an S-wide spanning tree in G.For every i ∈ [k], let r 1 v i be the first edge of the r 1 -s i path on T .Replace each r 1 v i with r i v i and call the resulting edge set J .Then, J induces a forest F with k components in the auxiliary graph G , each of which contains r i and s i .Since δ F (v) ≥ 1 for all v ∈ V , J induces a spanning tree in the multigraph G 1 , as well as a spanning tree in the multigraph G 2 .Thus, J ∈ B 1 ∩B 2 .Moreover, g(J ) = E(T ).
The last two lemmas imply that g is a surjective mapping from B 1 ∩ B 2 to T .It is also cost-preserving because |J | = |g(J )| for all J ∈ B 1 .Therefore, we can efficiently compute a minimum-weight S-wide spanning tree by computing a minimum-weight common basis of M 1 and M 2 .

Fig. 1 Lemma 1
Fig. 1 The first two graphs are examples of bad holes, whereas the last two graphs are examples of bad induced diamonds.The tips of the diamonds are shaded.Every edge here has the same weight

Fig. 2
Fig. 2 An example of the subgraph G i [S ∪ {u, v}] in Case 1 and Subcases 2.1-2.2respectively.The shaded region represents the set S Subcase 2.1: r is adjacent to at most one vertex of C. Since s was chosen to be the vertex in C with the cheapest edge to r , we have mst(S) ≥ w(P) + w(rs) + w i+1 , mst(S ∪ u) = w(P) + w(rs) + w(su) + w(uu ), mst(S ∪ v) = w(P) + w(rs) + w(sv) + w(vv ).Next, deleting the most expensive edge from C and adding rs creates a minimum spanning tree of G[S ∪ {u, v}].Since the deleted edge has weight at most w i , we obtain mst(S ∪ {u, v}) ≥ w(P) + w(rs) + w(su) + w(uu ) + w(sv) + w(vv ) − w i .

Fig. 3
Fig.3 An example of the subgraph G i [S ∪ {u, v}] in Case 1 and Subcases 2.1-2.3 respectively.The shaded region represents the set S. For Subcase 2.1, the picture assumes that w(rs) < w(ru)

Fig. 4
Fig. 4 The ellipse represents the violated cycle C in Claim 1.The shaded region highlights the smaller violated cycle D.The dashed edge indicates rs / ∈ E j

Fig. 5 Proof
Fig. 5 The ellipse represents the violated cycle C in Claim 2. The shaded region highlights the violated cycle D.The dashed edges indicate non-adjacency in G j .In this example, u = u and v = v

Lemma 5 Fig. 6
Fig. 6 The left image depicts an example of the minimum spanning tree T in G[S ∪ {u, v}].The right image depicts an example of the minimum spanning tree T in G[S ∪ v].The solid edges belong to the trees while dashed edges belong to the edge set F For the base case i = k − 1, we have w k−1 = w(uv) < w(su) = w k .Since N (su) = ∅, the set S\s is not contained in the expensive neighborhood of su because r ∈ S\s.By Lemma 5, 0 = f su (S\s) = mst(S) + mst((S\s) ∪ u) − mst(S\s) − mst(S ∪ u).

Fig. 7
Fig.7 The graph G and multigraphs G 1 , G 2 respectively for the input graph K 5 with 2 terminals
Proof For necessity, assume the game is submodular.Then, Condition (i) is satisfied by Lemma 3 while Condition (ii) is satisfied trivially.For sufficiency, assume Conditions (i) and (ii) hold.Let u, v ∈ N and S ∈ S uv .If S N (uv), then f uv (S) = 0 by Lemma 5. On the other hand, if S ⊆ N (uv), then uv is a candidate edge.By Lemma 6,