The Algorithms for the Eulerian Cycle and Eulerian Trail Problems for a Multiple Graph - Smirnov, A. V. (Automatic control and computer sciences, 2024)
In this article, we consider undirected multiple graphs of any natural multiplicity k > 1. A multiple graph contains edges of three types: ordinary edges, multiple edges, and multiedges. Each edge of the last two types is a union of k linked edges that connect 2 or ( k + 1) vertices, correspondingly. The linked edges should be used simultaneously. If a vertex is incident to a multiple edge, then it can be incident to other multiple edges, and it can also be the common end of k linked edges of a multiedge. If a vertex is the common end of a multiedge, then it cannot be the common end of another multiedge. We set the problem of finding the Eulerian walk (the cycle or the trail) in a multiple graph, which generalizes the classical problem for an ordinary graph. The necessary conditions of existence of an Eulerian walk in a multiple graph are formulated; it is shown that these conditions are not sufficient. In addition, it is shown that the necessary conditions of existence of an Eulerian cycle and an Eulerian trail are not mutually exclusive for an arbitrary multiple graph; therefore, it is possible to construct a multiple graph in which two types of Eulerian walks exist simultaneously. Any multiple graph can be juxtaposed to the ordinary graph with quasi-vertices, which represents the structure of the initial graph in a simpler form. In particular, each Eulerian walk in the multiple graph corresponds to the Eulerian walk in the graph with quasi-vertices. The algorithm for constructing such a graph is formulated. The auxiliary problem of finding the covering trails with the given endpoints in an ordinary graph is also considered, and two algorithms for solving it are obtained. We elaborate the algorithm for finding the Eulerian walk in a multiple graph, which has exponential complexity. For the special case of a multiple graph, a polynomial algorithm is proposed; it is shown that in this special case the necessary conditions of existence of an Eulerian walk are sufficient.