Presenting a Mathematical Programming Model for Discovering Eulerian Paths (EP) in Certain Specific Graphs

In the modern era, graph theory is considered a useful tool for quantification and simplification of various dynamic components in complex systems. By representing elements as nodes and their connections as edges, graph theory can transform anything from urban planning to computer data into a meaningful mathematical language. Nowadays, numerous practical applications have been designed and developed based on graph theory. Graph theory is a branch of discrete mathematics that aims to describe and solve problems with discrete structures using points and edges. One of the problems concerning graphs is the Eulerian path problem. This research demonstrates that this problem can also be investigated from the perspective of Operations Research (OR). In a more general sense, the Eulerian path problem is a routing problem. This paper presents a pure mathematical model to describe the relationship between the variables of the Eulerian path problem. One of the features of the proposed mathematical model is its solvability by most optimization software. Finally, several numerical examples are provided to enhance the understanding of this model, and they are solved using the proposed approach. All the analyses in this research are conducted using one of the most advanced optimization software, MATLAB. The proposed mathematical model provides a systematic and efficient approach to discover Eulerian paths in specific graphs, contributing to the advancement of graph theory and its practical applications .


Introduction
Mathematics is an essential science in various fields such as natural sciences, engineering, medicine, economics, and social sciences (Jafari and Jafari, 2017).Graph theory is a branch of mathematics that deals with graphs (Jafari and Sheykhan, 2021).This subject is, in fact, a branch of topology that has strong connections with algebra and matrix theory.Unlike other branches of mathematics, graph theory has a specific starting point, which is the publication of a paper by Leonhard Euler, the Swiss mathematician, in 1736, solving the problem of the Seven Bridges of Königsberg (Wu et al., 2022).Recent advancements in mathematics, particularly in its applications, have led to a remarkable expansion of graph theory.Nowadays, graph theory has become a highly suitable tool for research in various fields such as coding theory, operations research, statistics, electrical networks, computer science, chemistry, biology, social sciences, and others (Newman, 2010).The evolution of graph theory can be traced back to the problem of the Seven Bridges of Königsberg, which was solved by Leonhard Euler in 1736.In 1752, Euler's theorem for planar graphs was presented.However, for nearly a century, there was little activity in this field (Biggs et al., 1986).In 1847, Gustav Kirchhoff examined a special type of graphs called trees.Kirchhoff employed this concept when generalizing the fundamental laws for electric current flow in applications involving electrical networks.Ten years later, Arthur Cayley utilized the same type of graph for counting distinct isomers of saturated hydrocarbons (Mashaghi, 2004) During this period, two other important ideas emerged.The first idea was the four-color conjecture, which was initially investigated by Francis Guthrie around 1850.This problem was finally resolved in 1976 by Kenneth Appel and Wolfgang Haken, using a complex computer-based analysis (Grandjean, 2016).The second important idea was Hamiltonian cycles.This cycle is named after Sir William Rowan Hamilton.In 1859, he employed this idea to solve an interesting puzzle involving the edges of a regular dodecahedron (Hamiltonian graphs).Finding a solution to this puzzle is not particularly difficult, but mathematicians are still pursuing the necessary and sufficient conditions that determine graphs beyond those containing Hamiltonian paths or cycles (Alspach, 1985).After these endeavors, there was little activity in this field until after 1920.Kazimierz Kuratowski, a Polish mathematician, solved the problem of characterizing planar graphs in 1930.The first book on graph theory was published in 1936, written by DénesKőnig, a prominent researcher in this field.Since then, numerous activities have taken place in this area, with computers assisting these endeavors in the past four decades (Biggs, 1981).
In the graph theory, an Eulerian path is a path that starts from a vertex, traverses each edge exactly once, and ends at a destination vertex (Pevzner, 2001).This path is only possible if the graph is connected and each vertex, except for the starting and ending vertices, has an even degree (Roy, 2007).The degree of a vertex refers to the number of edges incident to it.The starting and ending vertices, however, must have an odd degree for the existence of an Eulerian path.

Problem Statement
A more precise definition of a graph is that it is a set of vertices connected by a collection of ordered pairs, which are the edges.The edges can be either undirected or directed, each serving various purposes (Watkins, 2004).As mentioned earlier, the origin of graph theory dates back to the 18th century.Leonard Euler, a great mathematician, introduced the concept of graphs to solve the Seven Bridges of Königsberg problem, but the growth and dynamism of this theory have mainly been associated with the last century and the advancement of computer science (Euler, 1736).Today, this problem has evolved and is known as the Eulerian path.In simpler terms, given a complete graph (excluding the starting and ending vertices), we are looking for an Eulerian path within this graph.Although various approaches have been proposed to solve this problem, in this study, we aim to examine it from the perspective of operations research.In other words, we model this problem using mathematical modeling techniques and ultimately solve the presented model using relevant software.This approach is further explained in the following sections.
Mathematical modeling was employed in this paper to find the Eulerian Path in complete graphs.This is the first study of its kind.For this purpose, a method is proposed to turn "finding the Eulerian Path" into an optimization mathematical model (MM).The model uses a path finding approach (i.e., the longest spanning path) to solve the problem.

Mathematical Model for Finding Eulerian Path
If the matrix ( ) represents the adjacency matrix of a complete graph with distinct vertices, where only two vertices are not complete and have odd degrees, then the following mathematical model can be used to find an Eulerian path from vertex to vertex : Subject to: (5) ( 6) In the previous mathematical model, the objective function aims to maximize the coverage of edges in designing a path from vertex to vertex .
The first constraint states that the outgoing edges from the starting vertex ( ) must be one more than the incoming edges to it.
The second constraint states that the incoming edges to the destination vertex ( ) must be one more than the outgoing edges from it.
The third constraint states that the number of outgoing edges from vertex must be equal to the number of incoming edges to it ( ).
The fourth constraint tells us that vertex can be connected to vertex only if .
The fifth constraint states that each edge must be traversed exactly once.
The sixth constraint states that if we go from vertex to vertex , then ; otherwise, .
The previous mathematical model is an integer linear programming model.

The previous mathematical model is a pure integer programming model
Traversal Method for the Solution Matrix obtained from the proposed mathematical model: Let's designate the starting vertex ( ) as the current vertex and begin traversing the edges from the current vertex.Next, choose one of the edges connected to the current vertex arbitrarily (as much as possible, defer selecting the destination vertex ( ) to future steps).After traversing each edge, remove it from the graph (set the corresponding values in the solution matrix to zero) and replace the current vertex with the end vertex of the traversed edge.Continue this process until all elements of the matrix become zero.

 Numerical Example (1)
Consider a graph with the diagram shown in Fig. 1.An Eulerian path discovered using the proposed approach, from vertex one to five, is depicted in Fig. 2 using MATLAB software.As observed in Fig. 2, the traversal of graph starts from vertex number one and sequentially traverses all edges of the graph, ultimately returning to the destination vertex (five).

Fig. 2. Eulerian Path of Graph
The solution matrix is

Fig. 3. Graph
As observed in Fig. 4, the traversal of graph starts from vertex number one and sequentially traverses all edges of the graph, ultimately returning to the destination vertex (seven).

Fig. 4. Eulerian Cycle of Graph
The solution matrix is

Conclusion
Operations research is a branch of mathematics that uses methodologies such as mathematical programming, statistics, and algorithm design to find optimal solutions in optimization problems.Finding an optimal solution varies based on the problem type and is utilized in decision-making processes.
Research problems in operations research focus on maximization (e.g., maximizing profit, increasing production line speed, or maximizing bandwidth) or minimization (e.g., minimizing cost or reducing risk) with the use of one or multiple constraints.The main idea behind operations research is to find the best solutions for complex problems that are modeled using mathematical language and improve or optimize the performance of a system.One widely studied branch in operations research is routing problems.The goal of routing problems is to optimize routes (or design optimal routes) using techniques available in operations research.One such problem is finding an Eulerian path, which can be transformed into an optimization problem through different literature.This research demonstrates that this problem can also be examined from the perspective of operations research.In a broader sense, finding an Eulerian path is a routing problem.In this paper, a pure integer mathematical model is presented to describe the relationship between the variables in finding an Eulerian path problem.Furthermore, it is shown that the modeled problem can be easily solved using software tools like MATLAB.
It is recommended for future researchers to explore the use of artificial intelligence algorithms to find Eulerian paths and compare their results with more precise methods.