NP-Completeness of the Minimum Spanning Tree Problem of a Multiple Graph of Multiplicity k ≥ 3

Undirected multiple graphs of any natural multiplicity k > 1 are studied. There are edges of three types: ordinary edges, multiple edges, and multi-edges. Each edge of the last two types is a union of k linked edges, which connect 2 or (k + 1) vertices correspondingly. The linked edges should be used simultaneously. If a vertex is incident to a multiple edge, it can be also incident to other multiple edges and it can be the common end of k linked edges of some multi-edge. If a vertex is the common end of some multi-edge, it cannot be the common edge of another multi-edge. A multiple tree is a connected multiple graph with no cycles. Unlike ordinary trees, the number of edges in a multiple tree is not fixed. The problem of finding the spanning tree can be set for a multiple graph. Complete spanning trees form a special class of spanning trees of a multiple graph. Their peculiarity is that a multiple path joining any two selected vertices exists in the tree if and only if such a path exists in the initial graph. If the multiple graph is weighted, the minimum spanning tree problem and the minimum complete spanning tree problem can be set. As well, it is possible to formulate the problems of recognition of the spanning tree and complete spanning tree of the limited weight. The main result of this article is the proof of NP-completeness of such recognition problems for arbitrary multiple graphs as well as for divisible multiple graphs in the case when multiplicity k ≥ 3. The corresponding optimization problems are NP-hard.


INTRODUCTION
In this work we consider the problem of the minimum spanning tree of a multiple graph in its various statements. The definitions of a multiple graph of multiplicity k > 1 and a divisible multiple graph were formulated in paper [1]. In this paper we also considered the problem of the shortest path joining two vertices. Multiple graphs contain three types of edges (ordinary edges, multiple edges, and multi-edges) and are a generalization of ordinary graphs; in fact, an ordinary graph has multiplicity k = 1. The concepts of spanning and complete spanning tree in a multiple graph were introduced in [2]. In this paper we also set the problem of the minimum spanning tree in a multiple graph and the minimum complete spanning tree and proposed the heuristic algorithm for the latter problem that generalizes the well-known Kruskal's algorithm (see [3]).
Among other known generalization of graphs, the concepts closest to ours are multigraphs, hypergraphs (see, e.g., [4,5]), and metagraphs (see [6,7]). Indeed, like multigraphs, multiple graphs allow the presence of a number of edges joining a pair of vertices (the set of such edges is called a multiple edge below). But this number should be equal only to k in the case of a multiple graph. In multiple graphs there exist multi-edges connecting (k + 1) vertices. However, in contrast to hyperedges of a hypergraph, a multiedge is a set of k linked edges that have one common end and all these k edges must be used in an adjusted manner. In fact, the concept of a multi-edge is close to the concept of an edge joining a vertex and a metavertex in a metagraph. We recall that a metapath joining two metavertices in a metagraph in fact models the cause-effect relationships in some subject domain. However, the approach of defining a path in a multiple graph is essentially different: a multiple path should consist of exactly k ordinary paths, which pass through ordinary edges and also through linked edges of multiple and multi-edges; all paths should be adjusted (equal) on multiple and multi-edges. That is why the multiple graph cannot be considered as a special case of a metagraph.
We note also that a special case of a multiple graph is a multiple network (see [8,9]). The problem of the maximum flow in a multiple network generalizes the classical problem (see [10]) and has several applications in economics, management, and finance. In particular, multiple networks and flows are used to find the solution to the NP-complete problem of integer balancing of a three-and four-dimensional matrix (see, e.g., [11,12]).
In this paper we consider the complexity of the problem of the minimum spanning tree of a multiple graph and prove that for multiplicity k ≥ 3 the corresponding recognition problem is NP-complete and the initial optimization problem is NP-hard. This result is valid both for complete and arbitrary spanning trees.

MULTIPLE GRAPHS AND TREES. NECESSARY DEFINITIONS
Let us recall several definitions on multiple graphs and trees that were earlier formulated in papers [1,2]. Definition 1. A multiple graph G of any natural multiplicity k > 1 is a graph whose vertices are connected by edges of three types: (1) An ordinary edge e o ; denote the set of all ordinary edges by E o .
(2) A multiple edge e k joining two vertices, which consists of k equal linked edges; the linked edges of a multiple edge can be used only in an adjusted manner; denote the set of all multiple edges by E k .
(3) A linked edge e joining two vertices, which has one common end with other (k -1) edges (only one end of any two of k linked edges is common); the set of edges linked by the common vertex is called a multiedge e m ; linked edges of a multi-edge can be used only in an adjusted manner; denote the set of all multiedges by E m .
If a vertex is incident to some multiple edge, it can be incident to other multiple edges and can also be the common end of some multi-edge.
If a vertex is the common end of some multi-edge, it cannot be the common end of another multi-edge. If a vertex is a separate end of a multi-edge or is incident to an ordinary edge, it cannot be the common end of a multi-edge and cannot be incident to a multiple edge.
Denote the vertex and edge sets of the graph G by V and E, correspondingly.
In this paper, we consider only undirected multiple graphs. Figures 1 and 2 illustrate Definition 1. In the left part of Fig. 1 the multiple edge is represented as a union of k equal edges joining two vertices, which is shown by dashes. Equality (or adjustment) of linked edges means that all characteristics of these edges (e.g., their weight) are equal and these edges can be used only simultaneously. So, if some traversal through one of linked edges is performed, the same traversal should be performed simultaneously through all other linked edges. A multiple edge can be included into any new structure only as a whole. Further, we denote multiple edges by bold lines as in the right part of Fig. 1.
In the left part of Fig. 2 a multi-edge {x 0 , {x 1 , ..., x k }} is represented as a union of k equal edges connecting a common vertex x 0 with k different vertices x 1 , ..., x k . As at Fig. 1, the equality of edges is shown by  x 0 x 0 x 1 x k x 1 x k dashes. Adjustment of linked edges has the same meaning as that for multiple edges. Below, we depict multi-edges using fork lines splitting into k parts, as in the right part of Fig. 2.
An ordinary vertex is a vertex that is incident to an ordinary edge or is a separate end of a multi-edge.
A multiple vertex is a vertex that is incident to a multiple edge or is the common end of a multi-edge. It follows from Definition 1 that the sets of ordinary and multiple vertices do not intersect. A multiple vertex can be joined with ordinary ones only by a multi-edge. Definition 3. A divisible multiple graph is a graph in which exists no path joining two ends of a single multi-edge that passes only through ordinary edges.
Deletion of all multi-edges partitions a divisible graph into n connected components (connectedness is understood here in the same sense as for ordinary graphs) each of which contains only multiple edges or only ordinary edges. Here, the linked edges of each multi-edge can be enumerated from 1 to k so that each connected component containing only ordinary edges corresponds only to the linked edges of multiedges with equal numbers, which are incident to this component.
is a subgraph containing linked edges with number i of all multiple edges and multi-edges, as well as connected components consisting of ordinary edges and incident to ith linked edges of all multi-edges.
Each part G i is an ordinary graph. The capability of selecting parts G i is a peculiarity of divisible graphs. In the general case, we cannot obtain the parts G i . Example 1. We consider a multiple graph of multiplicity 2, depicted at Fig. 3. This graph contains 3 ordinary edges, 3 multiple edges, and 4 multi-edges: In this graph there exists no path passing only through ordinary edges that join the vertices x 3 and x 5 , x 4 and x 6 , x 3 and x 9 , or x 4 and x 10 . Consequently, the graph is divisible. Let us relate the ordinary vertices x 3 and x 4 and all ordinary and linked edges incident to these vertices to the part G 1 of the graph and let us relate the vertices x 5 , x 6 , x 9 , and x 10 and all ordinary and linked edges incident to them to the part G 2 . As a result, we obtain the partition of the graph into two parts shown at Fig. 4. Linked edges of multiple edges and multi-edges are denoted in this figure by dashed lines. Now define a multiple path. The main difference of a multiple path from a path in an ordinary graph is that the linked edges of each multiple edge and multi-edge must be passed in this path in an adjusted order.   Fig. 3. Divisible graph of multiplicity 2.
x 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x 10 x 11 x 12 (2) Any ordinary vertex may be visited in S i (x, y) several times, so S i (x, y) can contain cycles.
(3) No multiple vertex can be visited in S i (x, y) twice. (4) Any ordinary edge can be passed in S i (x, y) several times, and the directions in which it is passed in different inclusions can be different.
(5) An ordinary edge from S i (x, y) can be also included in any S j (x, y), j ≠ i. (6) All paths S i (x, y) are adjusted (equal) on the common part. This condition means that, if a linked edge of some multiple edge or multi-edge is included in some path S i (x, y), all other linked edges should be included in all S j (x, y), j ≠ i (one linked edge for each S j (x, y)). The order of entry of all multiple edges and multi-edges is equal for all S i (x, y).
In fact, this means that, if e 1 and e 2 are two edges of the path S(x, y) each of which is either a multiple edge or a multi-edge, and in the projection S i (x, y) the linked edge from e 1 is passed earlier than the linked edge from e 2 , then in all other projections S j (x, y) the linked edges from e 2 can be passed only after the linked edges from e 1 .
(7) If S(x, y) contains a multi-edge {x 0 , {x 1 , ..., x k }} passed in the direction from the common end, it cannot contain any other multi-edge {y 0 , {x 1 , ..., x k }} passed in the same direction. The similar condition is met also for a pass to the common end.
Let us illustrate the definition of the multiple path. For this purpose, we consider a graph shown at Fig. 3. We search the path S 1 (x 1 , x 12 ) in this graph. Note that the part G 2 of the graph (the right side of Fig. 4) is in fact an ordinary (non-multiple) path from x 1 to x 12 : All edges, except for the underlined ones, are linked edges of multiple edges or multi-edges. Therefore, a path in the part G 1 must pass these multiple edges and multi-edges in the same order. It is not hard to see that the path (x 1 , x 12 ) can be constructed in the single way: 12 ). Note that the ordinary edge {x 3 , x 4 } is passed in the projection (x 1 , x 12 ) twice, but this does not contradict our definition of the multiple path. Now, we slightly change the graph by adding the edge {x 3 , x 9 } (Fig. 5). This edge joins the ordinary vertices, the ends of the multi-edge {x 8 , {x 3 , x 9 }}. Consequently, this graph stops being divisible.
Let us analyze the possible multiple paths from x 1 to x 12 . We note that in the new graph the path S 1 (x 1 , x 12 ) remains the same. Also, the path S 2 (x 1 , x 12 ) is added and it consists of two ordinary paths: Here, the ordinary edge {x 3 , x 9 } is passed once in each projection, in opposite directions, and the edge {x 3 , x 4 } is also passed once in each projection, but in the same direction.
x 1 x 2 x 3 x 4 x 7 x 8 x 11 x 12 x 1 x 2 x 5 x 10 x 6 x 9 x 7 x 8 (2) It is impossible to select a subgraph G ' ⊂ G, which contains only ordinary edges, where the subgraphs G ' and G\G ' are not connected by any edge (ordinary edge or linked edge of a multi-edge).
In contrast to ordinary graphs, the connectedness of a multiple graph does not mean the presence of multiple paths joining each pair of vertices. In fact, in the connected multiple graph, there should exist an ordinary (non-multiple) path joining each pair of vertices, which uses the linked edges of multiple edges and multi-edges in an unadjusted manner. Multiple paths must exist only for pairs of multiple vertices.
For a divisible multiple graph, the definition of connectedness may be rewritten in a simpler form, which is caused by the graph structure.
Definition 8. A divisible multiple graph G(V, E) is connected if two conditions are met simultaneously: (1) A multiple path S(x, y) exists for any two multiple vertices x ∈ V, y ∈ V.
(2) Each of the parts G i is a connected (non-multiple) graph.

Definition 9.
A multiple tree is a connected multiple graph with no cycles. We note that both graphs from Examples 1 and 2 are multiple trees. In a multiple tree the number of edges can be different, which is shown in these examples. We discussed this issue in details in [2]. There we also provided an example of a multiple tree that has no leaves.

THE MINIMUM SPANNING TREE OF A MULTIPLE GRAPH
Set several minimum spanning trees problems for a multiple graph. First, we formulate the definitions of the spanning and complete spanning tree of a multiple graph (see [2] for details). Note that a complete spanning tree exists in any multiple graph. Definition 12. Integer function l(e), which is defined for all edges e ∈ E, is the length (weight) of an edge in a multiple graph G(V, E) if the following is true: (1) l(e) > 0 for any edge e.  x 1 x 2 x 3 x 4 x 7 x 8 x 11 x 12 x 5 x 10 x 6 x 9 Problem 2 (the minimum complete spanning tree). It is required to find a complete spanning tree of the multiple graph G(V, E) such that the condition is met for any other complete spanning tree T complete (V, E'').
It is convenient to denote Problems 1 and 2 by ST and CST, correspondingly. Juxtapose the optimization problems ST and CST with two recognition problems. Further, we denote these two recognition problems by STR and CSTR, correspondingly.

Lemma 1. The problem CSTR ∈ NP.
Proof. First, note that the volume of input data of any individual CSTR problem is finite. In fact, each individual problem is defined by a finite vertex set of a multiple graph, a finite edge set with integer weights, and a number K ≤ w(G).
It means that, to prove CSTR ∈ NP, it is enough to show that checking the answer "yes" in any individual CSTR problem is carried out in polynomial time.
To prove that some graph T(V, E') provides the answer "yes" to an individual problem CSTR, we need to perform the following steps: (1) Check that E' ⊆ E (no more than |E'| · |E| steps).
(3) Check that the graph T(V, E') contains no cycles. For this purpose, we need to insignificantly modify the algorithm of the graph connectedness check from the previous step.
Recall that the algorithm first finds all ordinary edges reachability sets (the sets of ordinary vertices such that there are paths joining them that consist of ordinary edges only) and all multiple edges reachability sets (the sets of multiple vertices such that there are paths joining them that consist of multiple edges only). At this step, we should additionally require that an acyclic graph (ordinary tree) is obtained in the graph T for each such set. For this purpose, it is sufficient to count the number of edges.
At the next step of the algorithm of connectedness check, the list of pairs of adjacent multiple edges reachability sets is found (there is a multiple path joining these sets, which contains multi-edges). Obviously, if the acyclicity condition for the reachability sets is met, a multiple cycle in the graph exists if and only if the list of pairs contains duplicates or the elements in some pair are equal. Search for duplicates in this list is a procedure with quadratic complexity respective to the length of the list, and the length of the list is definitely less than |V|. Searching the pairs of equal elements in the list is a procedure linear respective to the length of the list.
(4) Check that a multiple path S G (x, y) exists for each pair of vertices x ∈ V, y ∈ V if and only if there exists a multiple path S T (x, y) (for this, we need to perform the polynomial algorithm of checking the existence of a path from article [1] no more than |V| · |V -1| times).
(5) Sum the weights of all edges from E' to check w(T) ≤ K. All steps of the described procedure are polynomial. Consequently, CSTR ∈ NP. Lemma 1 is proved.
The proof is similar. The only difference is that we do not need step 4 of the check procedure, because it checks the completeness of the spanning tree.
To prove the NP-completeness of the CSTR and STR problems, we perform the polynomial reduction of the NP-complete problem of three-dimensional matching (see, e.g., [13,14]) to these problems.
Problem 5 (three-dimensional matching). CONDITION. Given is a set M ⊆ I × J × P, where I, J, and P are pairwise nonintersecting sets, and |I| = |J| = |P| = q.
QUESTION. Is it true that there exists a set M' ⊆ M such that |M'| = q and each value of each coordinate is met in M' exactly once?
We denote this problem in the following by 3M.

NP-COMPLETENESS OF THE PROBLEM OF THE MINIMUM SPANNING TREE OF A MULTIPLE GRAPH WITH k ≥ 3
Theorem 1. The CSTR problem is NP-complete for a divisible multiple graph G(V, E) of multiplicity k ≥ 3.
Consider the 3M problem. Without loss of generality of our reasoning, we can consider that each value of each coordinate is met at least once in M. In fact, if this is false, the 3M problem definitely has the answer "no", which can be obtained by trivial linear check.
Fix the graph multiplicity k ≥ 3. Now, consider an arbitrary individual problem 3MM ∈ 3M with the set M of the stated form and perform its polynomial reduction to the individual problem CSTRM ∈ CSTR.
From the set M, obtain the graph G(V, E) and the number K ≤ w(G): (1) Juxtapose each element i s ∈ I (s ∈ ) to the ordinary vertex I s ∈ V.
(2) Juxtapose each element j s ∈ J (s ∈ ) to the ordinary vertex J s ∈ V.
(3) Juxtapose each element p s ∈ P (s ∈ ) to the ordinary vertex P s ∈ V. (4) Juxtapose each element (i s , j t , p u ) ∈ M to the multiple vertex x stu ∈ V. (8) Set K = k|M| + kq(|M| + 1) = k|M|(q + 1) + k. It is clear that steps 1-8 implement a polynomial procedure. The divisibility of the graph is also obvious. The part G 1 consists of all multiple vertices, the ordinary vertices I 1 , ..., I q , and the corresponding linked edges joining them. The part G 2 consists of all multiple vertices, the ordinary vertices J 1 , ..., J q , and the corresponding linked edges joining them. The part G 3 consists of all multiple vertices, the ordinary vertices P 1 , ..., P q , and the corresponding linked edges joining them. The parts G r (r ∈ ) consist of all multiple vertices, the ordinary vertex y r , and the corresponding linked edges joining them (if k > 3).
There exist paths joining each pair of multiple vertices, which passes only through multiple edges (step 6 of the reduction algorithm). At the same time, E o = ∅; therefore, there exist no path joining the ordinary vertices. However, each ordinary vertex is incident to at least one multi-edge (this follows from the fact that in the set M each value of each coordinate is met at least once and from step 7 of the reduction algorithm). Consequently, the graph is connected.
|E k | = |M| and l(e) = k for all e ∈ E k (steps 4 and 6 of the reduction algorithm); hence, .
|E m | ≥ q and l(e) = k(|M| + 1) for all e ∈ E m (steps 1-3 and 7 of the reduction algorithm and the above condition for the set M); hence, .
Assembling the obtained relations, we get Thus, as a result of steps 1-8, we have obtained the correct individual CSTRM problem for a divisible graph of chosen multiplicity k ≥ 3. Now, we show that any individual 3MM problem has the answer "yes" if and only if the corresponding individual CSTRM problem has the answer "yes".
First, suppose that the individual 3MM problem has the answer "yes". Take M' ⊆ M that provides the answer "yes" in the 3MM problem. From M' we get the complete spanning tree T(V, E'), E' ⊆ E in the graph G(V, E) as follows: (1) E k ⊆ E', so all multiple edges are included in E'.
Note that each of the vertices I s (s ∈ ), J t (t ∈ ), and P u (u ∈ ) is incident to exactly one multiedge, because |M'| = q and s ≠ s', t ≠ t', and u ≠ u' for each pair of sets (i s , j t , Each of the vertices y 4 , ..., y k (if exists) is incident to exactly q multi-edges. Let us prove that w(T) ≤ K.
As it was already mentioned, .
Finally, and the required inequality is met. Now, suppose that the individual CSTRM problem got from the set M has the answer "yes". Take a complete spanning tree T(V, E'), which leads to the answer "yes", and show that from this tree we can get the set M' giving the answer "yes" to the 3MM problem.
First, note that the initial graph G(V, E) is a tree. In fact, there exists a unique multiple path joining each pair of vertices. It passes only through multiple edges and necessarily contains the vertex x 0 . At the same time, there exists no multiple path containing a multi-edge, because there necessarily exists a pair of nonequal separate ends for any two multi-edges (due to the construction of the graph), and there exists no path through ordinary edges joining these nonequal ends, because E o = ∅.
Because G(V, E) is a multiple tree, any its connected subgraph is a spanning tree of G(V, E), and, because E o = ∅ and G(V, E) is a divisible graph, this tree is necessarily complete (the criterion of completeness of a spanning tree from paper [2]).
Consider the tree T(V, E') giving the answer "yes" to this problem. The set E k is necessarily included into E'; otherwise, T is not a tree (when the multiple edge {x 0 , x stu } is excluded, the only path joining these multiple vertices is removed). Hence, Let us show that the exact equality | | = q is fulfilled in the last relation. Note that the connectedness of the graph T(V, E') requires that each of the vertices I 1 , ..., I q , J 1 , ..., J q , and P 1 , ..., P q is reachable through at least one multi-edge. Because each of the multi-edges of the set E m Comparing with the previous example, we have changed the value of the third coordinate in the last triple. Set k = 3 and obtain the graph of multiplicity 3. First, obtain the vertex set (steps 1-5 of the reduction procedure): Then add the multiple edges (step 6): and set the weights of these edges to 3. Then, add the multi-edges (step 7): and set their weights to 18. Finally, as in the previous example, set K = 69 (step 8). The obtained graph is shown at Fig. 8.
It is easy to show that the minimum spanning tree in this graph is obtained by exclusion of a single edge from E m , for instance, the edge {x 221 , {I 2 , J 2 , P 1 }} (Fig. 9). The weight of this tree is 87, which is larger than K, and this tree has ordinary vertices incident to more than one edge (these are the vertices I 1 , J 1 , and P 2 ). However, the 3MM problem has no solution.  111  1 1 1  132  1 3 2  213  2 1 3  221  2 2 1  322  3 2 2 , , , , x 111 x 0 x 132 x 213 x 221 x 321 Fig. 7. Spanning tree.
x 111 x 0 x 132 x 213 x 221 x 321 AUTOMATIC CONTROL AND COMPUTER SCIENCES Vol. 56 No. 7 2022 SMIRNOV CONCLUSIONS In this paper we considered the problem of the minimum spanning tree of a multiple graph in different variants of its statement. We proved that the recognition problem of a spanning tree of the bounded weight is NP-complete for multiplicity k ≥ 3 and the corresponding optimization problem is NP-hard.
When k = 1, a multiple graph turns into an ordinary one and the problem of the minimum spanning tree is solvable is polynomial time. Only the question about the complexity of the problem for graph multiplicity k = 2 remains open.  x 111 x 0 x 132 x 213 x 221 x 322 Fig. 9. Spanning tree.