On the Simultaneous Minimum Spanning Trees Problem

On the Simultaneous Minimum Spanning Trees Problem

Matěj Konečný Department of Applied Mathematics, Faculty of Mathematics and Physics, Charles University, Prague, Czech Republic,
11email: matejkon@gmail.com, stanislav.kucera@outlook.com, janca@kam.mff.cuni.cz, edalegos@gmail.com, smolik.ma@gmail.com, j.tetek@gmail.com, mtopfer@gmail.com
   Stanislav Kučera Department of Applied Mathematics, Faculty of Mathematics and Physics, Charles University, Prague, Czech Republic,
11email: matejkon@gmail.com, stanislav.kucera@outlook.com, janca@kam.mff.cuni.cz, edalegos@gmail.com, smolik.ma@gmail.com, j.tetek@gmail.com, mtopfer@gmail.com
   Jana Novotná Department of Applied Mathematics, Faculty of Mathematics and Physics, Charles University, Prague, Czech Republic,
11email: matejkon@gmail.com, stanislav.kucera@outlook.com, janca@kam.mff.cuni.cz, edalegos@gmail.com, smolik.ma@gmail.com, j.tetek@gmail.com, mtopfer@gmail.com
   Jakub Pekárek Department of Applied Mathematics, Faculty of Mathematics and Physics, Charles University, Prague, Czech Republic,
11email: matejkon@gmail.com, stanislav.kucera@outlook.com, janca@kam.mff.cuni.cz, edalegos@gmail.com, smolik.ma@gmail.com, j.tetek@gmail.com, mtopfer@gmail.com
   Martin Smolík Department of Applied Mathematics, Faculty of Mathematics and Physics, Charles University, Prague, Czech Republic,
11email: matejkon@gmail.com, stanislav.kucera@outlook.com, janca@kam.mff.cuni.cz, edalegos@gmail.com, smolik.ma@gmail.com, j.tetek@gmail.com, mtopfer@gmail.com
   Jakub Tětek Department of Applied Mathematics, Faculty of Mathematics and Physics, Charles University, Prague, Czech Republic,
11email: matejkon@gmail.com, stanislav.kucera@outlook.com, janca@kam.mff.cuni.cz, edalegos@gmail.com, smolik.ma@gmail.com, j.tetek@gmail.com, mtopfer@gmail.com
   Martin Töpfer Department of Applied Mathematics, Faculty of Mathematics and Physics, Charles University, Prague, Czech Republic,
11email: matejkon@gmail.com, stanislav.kucera@outlook.com, janca@kam.mff.cuni.cz, edalegos@gmail.com, smolik.ma@gmail.com, j.tetek@gmail.com, mtopfer@gmail.com
Abstract

Simultaneous Embedding with Fixed Edges (SEFE) [1] is a problem where given planar graphs we ask whether they can be simultaneously embedded so that the embedding of each graph is planar and common edges are drawn the same. Problems of SEFE type have inspired questions of Simultaneous Geometrical Representations and further derivations. Based on this motivation we investigate the generalization of the simultaneous paradigm on the classical combinatorial problem of minimum spanning trees. Given graphs with weighted edges, such that they have a common intersection, are there minimum spanning trees of the respective graphs such that they agree on the intersection? We show that the unweighted case is polynomial-time solvable while the weighted case is only polynomial-time solvable for and it is -complete for .

1 Introduction

The problem of finding a minimum spanning tree is one of the most important and most well-studied problems in graph algorithms. We consider a variant of this problem inspired by the following motivation.

In a Sunflower land, there is a capital city and several smaller cities around it. In the past, there was a telecommunication company based in the capital city, but it is now bankrupt. The inhabitants of each of the small cities want to establish their own telecommunication company that would connect all of the houses in their city as well as all of the houses in the capital. The representatives of each city meet to coordinate their soon-to-be networks so that they all agree on the capital and can split the cost of covering the capital evenly. However, all of the companies are so afraid of bankruptcy that none of them would accept a solution that would cost them a single dollar more than necessary. Is it always possible to plan all of the networks so that all of the companies reach their goal simultaneously while each of the individual costs is minimized? How hard is it to find such a plan, if it exists, or recognize that it does not exist?

Problem 1 (Simultaneous Minimum Spanning Trees)

Let be a positive integer and let be graphs and a non-negative weight function of all of their edges () such that there is a graph satisfying that for any from 1 to , where for any from 1 to (i.e. the graphs together form a “sunflower” shape with no lateral edges). Find minimum spanning trees , such that they all coincide on , or answer if there are no such spanning trees. We shall abbreviate this problem as .

Note that the ’s do not have to induce a spanning tree on , nor does the union of ’s have to be acyclic on the union of all of the ’s. Indeed both of these situations necessarily happen in solutions of some instances of the problem. Unlike the minimum spanning tree problem, the problem does not always have a solution.

As an example, let be a triangle , let be a triangle and let be the heavies edge. Although induces a connected graph (edge ), we have a unique solution which is not connected on and is not acyclic on . Furthermore, if we remove any light edge, e.g. , then there is no solution.

We show that is an -complete problem already for a fairly small number of graphs (more than 2) and even when limited to simplified instances. We present a scheme that allows us to solve any for two graphs in polynomial time using a tandem of reductions and multiple runs of matroid intersection algorithm.

1.1 Preliminaries

The problem of finding a minimum spanning tree for a single graph has been studied thoroughly since Borůvka [2], Jarník-Prim [3][4] and Kruskal [5]. See [6] for more details. Currently, the optimal algorithm is known [7], but its asymptotics is still an open problem.

We do not distinguish instances where the input graph is connected from instances where it is disconnected. The inclusion of disconnected instances is natural as many constructions work just as well under such circumstances. Furthermore, usual incremental and iterative approaches typically work on subsets of the input graph and it is therefore not strictly clear whether they maintain a spanning tree or a spanning forest. For convenience, we define the usual term spanning tree as a maximal acyclic subgraph. In doing so we include the disconnected case, where the more proper term would be spanning forest.

We focus mainly on the Kruskal’s algorithm and use its known properties. Kruskal’s algorithm starts by sorting the edges in a non-decreasing order (by weight) or obtains the edges in a non-decreasing order on input. Then it processes all the edges one by one in sorted order while greedily maintaining maximum acyclic subgraph which we refer to as partial spanning tree.

Definition 1

Consider the run of Kruskal’s algorithm. A stage is a collection of steps in which the algorithm processes edges of the same weight.

Fact 1.1

Let be a graph with weighted edges. Then all of the following holds for Kruskal’s algorithm applied to graph and a non-decreasing order of edges :

  • Kruskal’s algorithm is complete (finishes) and correct (answers correctly) for any non-decreasing , although the created spanning trees might be different.

  • Let be a minimum spanning tree of and let be the non-decreasing order such that all edges from are ordered before all edges of the same weight that are not from . Then Kruskal’s algorithm using outputs exactly .

  • After every stage, components of the partial spanning tree span across the same vertices for all non-decreasing .

  • Edges added to the partial spanning tree in each stage depend only on their ordering, not on the edges chosen in the previous stages.

  • Kruskal’s algorithm accesses in a read-once fashion, accepting or refusing each edge before accessing the next one.

2 Simultaneous Kruskal’s algorithm

Consider a task for a given and graphs . Let us denote the union of all s as and their intersection as . Suppose we order all the edges of in a non-decreasing order which we call a universal order and denote the restrictions of to edges in for every . For a set of edges , we also say that a universal order is F-preferring if all the edges from are ordered before any other edges of the same weight.

Consider the following construction. First, we fix an arbitrary non-decreasing universal order . We simulate independent instances of Kruskal’s algorithm, where the job of each is to find a minimum spanning tree of using the order , not considering the other instances. In parallel with the instances of the Kruskal’s algorithm we try to incrementally build a simultaneous minimum spanning tree.

In the beginning, we start with an empty simultaneous spanning tree and process all the edges one by one according to the universal order. We present each edge to all instances such that . If we assume a sunflower intersection, we can rephrase this in the following way: if then we present to all instances and if then for some unique and we present only to one instance . If every invoked adds to its local , we also add to . If every invoked instance refuses to add to its local , we also throw away. If the invoked instances do not agree, we fail. If the algorithm processes all edges without failing, we output as a solution.

We call this construction Simultaneous Kruskal’s algorithm or SKA in short. There are two natural versions of the SKA. If SKA expects the universal order on input, then it is a deterministic algorithm. Alternatively, SKA may be formulated as a non-deterministic algorithm which guesses a correct universal order which avoids failure (if any such order exists), then we speak of a non-deterministic simultaneous Kruskal’s algorithm or NSKA in short. We naturally extend the definition of a stage from Kruskal’s algorithm to the (N)SKA as the collection of steps in which the algorithm processes edges of the same weight.

Lemma 1

Let be an instance of the problem. Then all of the following holds for simultaneous Kruskal’s algorithm:

  • NSKA is complete (finishes) and correct (answers correctly).

  • Let be a solution of and a let be a -preferring universal order. Then SKA using outputs exactly .

  • After every successful stage of SKA and NSKA, components of the partial simultaneous spanning tree after restriction to any span across the same vertices for all choices of universal order .

  • Edges added to the partial simultaneous spanning tree in each stage depend only on their ordering, not on the edges chosen in the previous stages.

  • SKA accesses in a read-once fashion, accepting or refusing each edge before accessing the next one.

Proof

Let us first prove the second point. Suppose we run the SKA using the -preferring universal order. Let us analyze the behavior of an arbitrary . Let denote the restriction of to . By definition is a minimum spanning tree of and is a -preferring order. From the properties of the Kruskal’s algorithm (fact 1.1) we know that constructs exactly . Since every would construct exactly should it run on its own, we observe that all the invoked instances accept each edge if and only if it belongs to , and the whole algorithm never fails. At the end of the computation the algorithm gives exactly as a solution.

To prove correctness, let us first suppose that the NSKA terminates with success. Then the set on output is a union of the local spanning trees from all algorithms. Since each algorithm processes all the edges from in a non-decreasing order of weight and Kruskal’s algorithm is sound, each of the local spanning trees is a minimum spanning tree. Thus, is a solution of the problem. If NSKA terminates with a failure, then from the second point it follows that there was no solution , as otherwise NSKA guesses a -preferring universal order and terminates successfully.

The last three points are simple observations extending the facts 1.1 into simultaneous setting using the previous two points.∎

3 Cases and variants

Lemma 2

Let be a feasible instance of the problem. Then any solution of restricted to edges of weight at most can be extended to a solution of the whole by adding some edges of weight greater than . Furthermore, this extension does not depend on .

Proof

Let be a solution of the problem. We choose any and split the edges into a set of light edges of weight at most and a set of heavy edges with weight strictly greater than .

Consider running SKA on the instance restricted to edges from using any -preferring universal order. Since SKA does not look ahead, it cannot distinguish whether it runs on a restricted instance or the full instance and therefore it does not fail and outputs restricted to (denoted ), which is a solution of the restricted instance. Since is also a solution of the restricted instance, both and define the same components on all individual graphs and have the same weight. Let us define . Clearly is acyclic on each graph and has the same weight as . Therefore is a solution of the full instance, extending (any) . ∎

Observation 3.1

Let us have an instance where denotes the number of edges and denotes the maximum number of repeats of any weight. If , in other words is asymptotically very small, then can be solved in a polynomial time.

Proof

Suppose we implement the NSKA deterministically and use backtracking to guess the next edge in the universal order. The previous lemma shows that it is sufficient to consider only backtracks within the current stage. If we ever need to backtrack into the previous stage, then the solution of the previous stage cannot be extended and therefore no solution exists.

If all of the weights in our instance of the are either distinct, or the number of repeats of each value is asymptotically very small, then we can try all possible orders within each stage in polynomial time. More precisely whenever we have at most polynomially many orderings in each stage and the algorithm finishes in polynomial time. If then there are at most linearly many possible orderings and the algorithm’s running time differs by only a factor of from the NSKA’s running time on a non-deterministic machine. ∎

Definition 2

A Simultaneous Minimum Spanning Tree problem, or in short, is an instance of where we restrict all the edge weights to be either 0 or 1.

We show an equivalence of the general and up to a polynomial factor of complexity.

Lemma 3

Any algorithm solving in polynomial time can be used to solve general problem in polynomial time.

Proof

First let us consider an instance of using at most two distinct values for weights. Then we can replace these by 0 and 1. From the point of view of the individual graphs, each subset of edges is a minimum spanning tree after the modification if and only if the same holds before the modification; and so the same applies to the simultaneous minimum spanning trees.

We continue via induction. Let us have an algorithm based on any algorithm that solves any instance with at most distinct values of weight. We will extend this algorithm to values. Let us have an instance that uses values and let denote the highest one. We restrict to by restricting to edges lighter than . We already know how to solve for , acquiring a partial solution or showing that no solution exists in which case the original has no solution. If we have the solution , then according to lemma 2 can be extended by some edges of weight to a full solution.

We once again modify into as follows. We restrict to edges from and edges of weight . We set the weight of all edges from to 0 and the weight of the remaining edges to 1. We now have an instance of such that any solution contains all the edges from as they form a partial simultaneous spanning tree and the SKA would accept all of the edges regardless of the universal order used. Let be a solution of the problem on , then is also a solution of the original problem and the algorithm outputs , otherwise we answer ”no”.

To show completeness, suppose that there exists a solution . Then we necessarily obtain in the first step and can be extended to a solution of the whole problem (not necessarily ) and thus the on has a solution . ∎

Definition 3

An Intersection-Heavy Simultaneous Minimum Spanning Tree problem, or in short, is an instance of where we restrict all the edge weights to be either 0 or 1. Furthermore all the edges of weight 1 are only in the intersection of all the individual graphs.

The motivation behind this restriction comes from a simple observation.

Observation 3.2

Let be an instance of (for any number of graphs) where no edges of weight 1 appear in the intersection. Then after solving the first stage, the SKA algorithm always finishes for any universal order

Proof

This is easy to see as each edge of weight 1 will be presented by the SKA to a single instance of the Kruskal’s algorithm and therefore in no step can the algorithm fail (get two opposite answers). Furthermore, one can see that the order of edges of weight 1 no longer matters, though different orders may give different solutions. ∎

This observation formalizes an intuition that it is in some sense harder to deal with weight 1 edges in the intersection than in the exclusive parts.

It might therefore seem that to solve a problem, one might first greedily find a subset of edges from the intersection and then extend it to the exclusive parts. This approach fails on a simple example. Let us have exactly four vertices in the intersection. Let contain four weight 0 edges , and let contain two weight 0 paths connecting and for both values of . Finally let , and be weight 1 edges where the last one is exclusive for . Clearly the only solution takes exactly the weight-1 edges and . However if the graphs contains rather than then picking the edge is not correct. Therefore an algorithm may not be oblivious to the exclusive parts.

It seems logical to also consider the opposite approach, that is to first solve the exclusive parts where the solution seems rather fixed and then exploit the information from exclusive parts to extend the partial solution to the intersection. It is no surprise that this approach is flawed as well. As an example, let us have two graphs and where is only one edge and is a triangle . If we were to first find a maximum acyclic set of each exclusive part, we would get the subset . However now we cannot extend this subset into a solution as there are only two solutions and .

Both of these greedy approaches to a are flawed, even under the assumption that we are able to solve the first stage correctly in polynomial time. However according to the observation 3.2 limiting all of the edges of weight 1 to the intersection gives instances that are in some sense easier, as the hardness of the problem is focused in the intersection which can be solved without considering exclusive weight 1 edges, as there are none. Later we show that is actually equivalent to , which will be a key step in solving the problem.

Definition 4

A Simultaneous Spanning Tree problem, in short, is an unweighted version of the problem, in other words a problem using only one weight.

The is clearly at most as hard problem as all of the previous versions of the and is an interesting problem on its own. We use the as a simple base case in our construction later on.

Observation 3.3

4 Case is -complete

Problem 2 (3D matching)

Let be disjoint finite sets such that and let be a subset of . Is there a set with , such that for any there is exactly one hyperedge such that .

Fact 4.1 ([8])

3D matching is -complete.

Theorem 4.2

The problem of 3D matching can be polynomially reduced to problem for 3 graphs.

Proof

Without loss of generality we assume that every element of and is element of at least one hyperedge in , otherwise the original 3D matching trivially has no solution.

We define graphs and where forming a ”sunflower” intersection, that is for each . We associate with , with and with .

First put a central vertex in . For each hyperedge , put a vertex and connect it to by an edge in of weight 1. For each element , put a vertex into the exclusive part of () and for every such that , connect and by an edge of weight 0. Do the same for and with graphs and respectively. By construction these graphs form the required ”sunflower” configuration.

The structure of the graph can be alternatively described as follows. The intersection contains exactly a star with center and all edges of weight 1 where each ray represents a different element from .

Let us focus on and , for the other graphs and sets the arguments are symmetrical. The graph is composed of the central star and exclusive vertices representing elements of the associated set . Every vertex representing an element is connected via edges of weight 0 to all vertices representing the hyperedges that contain . So for every element , is a center of a weight-0 star in . All of these weight-0 stars are disjoint as in each hyperedge there is at most one element from . Since all the edges of weight 0 form an acyclic subgraph of , every solution of this instance must contain all of them. Let be a solution of the problem. As for each , the is in the same component as in , it must also be in the same component of and therefore at least one edge for some hyperedge such that . If it happened that for some other hyperedge with , then form a cycle in and we get a contradiction.

This means that the hyperedges represented by the edges (where is represented by edge ) of weight 1 in are a solution of the 3D-matching. This is true as each belongs to exactly one of the hyperedges from and the same applies to every and every .

On the other hand, let be a solution of the 3D-matching. Then we can construct a solution of the by simply picking all the edges of weight 0 and all the edges of weight 1 that represent the hyperedgesedges from . As previously, we observe that everything in is connected into a single component. If we only consider the edges of weigh 0 on the other hand, then for each the vertices and are in distinct components and can only be connected via the central star. Therefore any solution must connect into a single component using at least edges of weight 1. Since , the solution of the constructed from is clearly minimal. ∎

Corollary 1

The problem and its variants and are -complete for 3 and more graphs.

5 Case is in

In this section we show that the general problem is polynomially solvable. We progress via a tandem of reductions. We already know that the general can be solved using an algorithm for for a cost of some polynomial factor. We further reduce instances of to tasks that are more orderly and symmetrical in some sense. We then use this to reduce the task to . Finally, we show that solving can be reduced to a problem of intersection of two matroids, which is a polynomial problem for two graphs. As an intermediate step, we will also solve the problem by reduction to a matroid intersection problem.

Definition 5

Let and be two graphs intersecting in a common induced subgraph and let be a subset of edges of and . We say that is simultaneously acyclic if restricted to each of the two graphs and forms an acyclic subgraph.

5.1 Reduction of 2-graph to 2-graph

For technical reasons we first want to get rid of all edges of weight 1 that cross the boundary in between the intersection and one of the exclusive parts.

Observation 5.1

Every instance can be transformed to an instance where all of the edges of weight 1 have either both ends in the intersection or both ends in an exclusive part of one graph. This transformation at most doubles the number of edges and vertices.

Proof

This can be achieved by a simple operation that shifts the edges into the exclusive parts. We take each edge of weight 1 such that is in the intersection and in the exclusive part of one of the two graphs. We subdivide into two edges and where the vertex lies in the exclusive part of the relevant graph. We set the weight of to 0 and the weight of to 1. Since the vertex has degree two, the 0-weight edge is an element of each solution of the new . It is now easy to see that we can construct the solution of the original instance from any solution of the new instance by removing and substitution of with (if it is part of the solution). ∎

Another issue is that each of the two graphs may require a different number of edges of weight 1, while each edge from the intersection would increase the size of both solutions.

Observation 5.2

Every instance of with two graphs and can be transformed into an instance where every minimum spanning tree of and every minimum spanning tree of contain the same number of edges of weight 1. This transformation at most doubles the number of edges and vertices.

Proof

Let denote the union of and and let denote their intersection. From the properties of the SKA (lemma 1) we know that we can determine beforehand the components of and after all the edges of weight 0 are processed and after all the edges of weight 1 are processed. We also know that in order to compute the restriction of the solution to the edges of weight 1 we do not need to know the exact choice of edges of weight 0, they are in fact independent. By considering the number of components of and just after processing all the edges of weight 0 and after processing all edges, we deduce how many edges of weight 1 must be added into the minimum spanning tree of each graph, which is equal to the difference of the two values.

Suppose that the solution of must contain edges of weight 1 from the graph and edges of weight 1 from the graph . If then we do not need to modify the instance, otherwise without loss of generality . We pick an arbitrary vertex from the exclusive part of and extend by leaves attached to . All the leaves are new vertices and lie in the exclusive part of ; and all of the new edges have weight 1. Every spanning tree of must now contain all of these edges, while every solution of the original instance can be extended by exactly these edges. After this modification, where denotes the new number of weight-one edges in the graph after modification. Note that this construction also works for the case , although this can be solved directly using SKA. ∎

Lemma 4

The problem for is polynomially reducible to problem for of asymptotically at most quadratic size. Furthermore if the set of edges of weight 0 of the original instance is simultaneously acyclic, then the same is true for the new instance.

Proof

Let us have an instance of and let denote the two graphs and their intersection. Using the previous observation we can assume without loss of generality that all of the weight-1 edges have either both ends contained in or both ends contained in the exclusive part of one of the two graphs; and that there exists a positive integer such that every solution of the constrained to both or has exactly edges of weight 1. This increases the size of the problem by a small multiplicative constant.

We modify the problem so that all of the edges from the exclusive parts are removed and equivalently modeled by gadgets that have edges of weight 1 only in . To do this, we consider all pairs of edges of weight 1 such that is from the exclusive part of and is from the exclusive part of . We create two new vertices in and add edges of weight 0 and an edge of weight 1. After processing all pairs, we delete all the edges of weight 1 from the exclusive parts.

Let be a solution of the modified instance of (which is in fact ). First we observe that whenever for some removed edges and then for any as otherwise forms a cycle in . To get a solution of the original instance, we remove all the extra edges of weight 0 and replace each edge by edges and . Let us denote the resulting set of edges . Consider the graph and the components defined by restricted to . It is easy to see that the components are the same as in with the exception of the new vertices which are now isolated. Also, the total weight of restricted to each graph (of the original instance) is the same as the total weight of restricted to each graph (of the modified instance). We conclude that is a minimum simultaneous spanning tree.

Figure 1: Gadget replacing pairs of edges

On the other hand, let be a solution of the original instance. Since there is the same amount of edges of weight 1 in restricted to and , we can pair all of the edges from of weight 1 that are in the exclusive parts of and . We can now replace each pair of edges and by . After adding all the new edges of weight 0, we get a solution of the modified instance. Therefore the total cost of is at most a total cost of the given solution.

Supposing that the original edges of weight 0 form a simultaneously acyclic set, we observe that the same is true after the reduction, as each new cycle contains an edge of weight 1. Furthermore we added at most a constant number of edges and vertices for all of the pairs of original edges, obtaining a problem of asymptotically at most quadratic size compared to the input problem. ∎

5.2 Matroids

Definition 6

A matroid is a pair where is a set of elements and is a family of independent sets (subsets of ) satisfying the following properties:

  1. s.t. and :

  2. s.t. : s.t.

Definition 7

Let be a graph with a set of edges and be a set of all acyclic subsets of . Then is a graphic matroid of .

Fact 5.3

For any graph (possibly multigraph with loops), the graphic matroid of is a matroid and maximal independent sets of this matroid are exactly all possible spanning trees of .

Definition 8

A matroid intersection problem of two matroids and on the same set of elements is the problem of finding a maximum subset of s.t. it is independent in both matroids.

Fact 5.4 ([9])

For a set and two matroids and given as independence oracles, the matroid intersection problem is solvable in polynomial time and polynomially many oracle queries.

Fact 5.5 ([10])

There are specialized algorithms for graphic matroid intersection problem.

Lemma 5

Let be a graph with edges divided into two disjoint subsets and where is acyclic and . Let be a set of all subsets of such that is an acyclic subgraph of . Then is a graphic matroid.

Proof

Let denote with all edges from contracted; we keep all the parallel edges and loops. We observe that the graphic matroid of is exactly . ∎

5.3 Polynomiality

Theorem 5.6

for any number of graphs.

Proof

To solve , it suffices to use Kruskal’s algorithm (or any other MST algorithm) to first take a minimum spanning tree of the intersection, and then extend this partial solution to each individual graph using only exclusive edges. Clearly each exclusive edge may only create a cycle in its respective graph. On the other hand we are never forced to take an exclusive edge closing a cycle (in fact, Kruskal’s algorithm refuses such edges by definition). ∎

Lemma 6

Let be an instance of for two graphs such that the edges of weight 0 form a simultaneously acyclic set. Then can be solved in polynomial time using a matroid intersection algorithm.

Proof

For each of the two graphs for we define as the set containing all edges of weight 0 and the set of all edges of weight 1. Let be a set of all subsets of such that is acyclic in and let denote the pair . According to Lemma 5 each is a matroid. Furthermore, both of the matroids are defined on the same ground set .

Let be all the edges of weight 0. By lemma 2, can be extended to a solution of the by a suitable subset of . We can now use a (graphic) matroid intersection algorithm to find a set which is a maximum subset of independent in both matroids and . Therefore is the maximum subset of that extends so that is simultaneously acyclic. If restricted to and spans all components, we output , otherwise we answer ”no”. This is the same as to compare the size of to the size it should have.

Clearly if there exists a solution of the given instance, then according to Lemma 2 there exists a solution extending the set . The set of edges is an independent set in both matroids and and therefore exists and is of size . This means that is a simultaneous spanning tree and the algorithm answers correctly. On the other hand, if no solution exists, then the set restricted to either or is acyclic but does not connect all the vertices connected in the original graph. We recognize this case and answer ”no” correctly. ∎

Lemma 7

for two graphs.

Proof

Let be an instance of the problem. We show that we can solve using a (graphic) matroid intersection algorithm.

First suppose that the edges of weight 0 are not simultaneously acyclic. We simply restrict to edges of weight 0, which gives us an instance of . We can solve this instance in polynomial time according to Theorem 5.6. If we obtain answer ”no”, then according to Lemma 2 there is no solution and we also answer ”no”.

Suppose we get a solution . Then, by Lemma 2, we may delete all the edges of weight 0 except the edges from and further assume that the edges of weight 0 are simultaneously acyclic. We use Lemma 6 to solve this reduced instance in polynomial time. ∎

Theorem 5.7

for two graphs.

Proof

Let us have an instance of the problem. According to Lemma 3, every instance of can be solved by solving at most problems, where denotes the number of edges on input.

Any can be polynomially reduced to as shown in Lemma 4; and according to Lemma 7, each instance can be solved in polynomial time. ∎

5.4 Complexity

Let us have an instance of and let denote the number of vertices, the number of edges and the number of weights in the given instance. We proceed according to Theorem 5.7.

The problem is first decomposed into subproblems. We observe that each edge in these subproblems is either already fixed as a part of the solution of or appears for the first time. The first kind of edges can be bound as at most per subproblem, as they must form a simultaneously acyclic set. The second kind can be bound as at most over all of the subproblems.

Each of the subproblems is reduced to a problem of asymptotically at most quadratic size (by Lemma 4). Using the simultaneous acyclicity of edges of weight 0 we can use the approach of Lemma 6 in all but the first subproblem, and use the Lemma 7 to solve the first subproblem. Therefore we solve at most (graphic) matroid intersection problems during the whole process and one instance of problem. The final complexity depends on the choice of algorithms used to solve the matroid intersection problems and the .

Furthermore, if asymptotically approaches , then some weight values have few representatives and more direct methods from Observation 3.1 and Observation 3.2 using SKA may be applied to reduce the complexity.

6 Acknowledgements

This paper is the output of the 2017 Problem Seminar of Charles University. At this seminar undergraduate students attempt to solve open problems and learn to do research. We would like to thank Jan Kratochvíl and Pavel Valtr for their guidance, help and tea.

The work was supported by the grant SVV–2017–260452 and grant CE-ITI P202/12/G061 of GA ČR

References

  • [1] Thomas Bläsius, Stephen G. Kobourov, Ignaz Rutter. ”Simultaneous Embedding of Planar Graphs” arxiv.org:1204.5853 or arxiv.org:1204.5853v3 (2015).
  • [2] Borůvka, Otakar. ”O jistém problému minimílním (About a certain minimal problem)”, Práce mor. přírodověd. spol. v Brně III (3) (1926) 37–58 (Czech, German summary).
  • [3] Jarník, Vojtěch: ”O jistém problému minimálním”, Práce Moravské Přírodovědecké Společnosti, 6, 1930, pp. 57-63.
  • [4] Prim, Robert Clay. ”Shortest connection networks and some generalizations.” Bell Labs Technical Journal 36.6 (1957): 1389-1401.
  • [5] Kruskal, Joseph B. ”On the shortest spanning subtree of a graph and the traveling salesman problem.” Proceedings of the American Mathematical society 7.1 (1956): 48-50.
  • [6] Graham, Ronald L., and Pavol Hell. ”On the history of the minimum spanning tree problem.” Annals of the History of Computing 7.1 (1985): 43-57.
  • [7] Pettie, Seth, and Vijaya Ramachandran. ”An optimal minimum spanning tree algorithm.” Journal of the ACM (JACM) 49.1 (2002): 16-34.
  • [8] Karp, Richard M. ”Reducibility among combinatorial problems.” Complexity of computer computations. springer US, 1972. 85-103.
  • [9] Edmonds, Jack. ”Submodular functions, matroids, and certain polyhedra.” Combinatorial Structures and Their Applications (Gordon and Breach, New York, 1970) 68-87.
  • [10] Gabow, Harold N., and Matthias Stallmann. ”Efficient algorithms for graphic matroid intersection and parity.” International Colloquium on Automata, Languages, and Programming. Springer Berlin Heidelberg, 1985.
Comments 0
Request Comment
You are adding the first comment!
How to quickly get a good reply:
  • Give credit where it’s due by listing out the positive aspects of a paper before getting into which changes should be made.
  • Be specific in your critique, and provide supporting evidence with appropriate references to substantiate general statements.
  • Your comment should inspire ideas to flow and help the author improves the paper.

The better we are at sharing our knowledge with each other, the faster we move forward.
""
The feedback must be of minimum 40 characters and the title a minimum of 5 characters
   
Add comment
Cancel
Loading ...
17554
This is a comment super asjknd jkasnjk adsnkj
Upvote
Downvote
""
The feedback must be of minumum 40 characters
The feedback must be of minumum 40 characters
Submit
Cancel

You are asking your first question!
How to quickly get a good answer:
  • Keep your question short and to the point
  • Check for grammar or spelling errors.
  • Phrase it like a question
Test
Test description