A new path algorithm for the weighted multi-graphs WMGPA: application to the Direct Topological Method

A new path algorithm for the weighted multi-graphs WMGPA: application to   the Direct Topological Method

The aim of this paper is to present an algorithm which gives all the possible paths that start from a specific node to another of a weighted multi-graph. This algorithm is intended to be applied for the direct topological method.


💡 Research Summary

The paper introduces a novel algorithm, the Weighted Multi‑Graph Path Algorithm (WMGPA), designed to enumerate every feasible path between a specified source node and a target node in a weighted multi‑graph. The motivation stems from the Direct Topological Method (DTM), a graph‑theoretic technique widely used for the analysis of electrical and electromechanical networks. DTM requires a complete set of “topological paths” that respect the physical parameters (impedances, conductances, etc.) associated with each edge. Traditional path‑finding methods such as depth‑first search (DFS) or breadth‑first search (BFS) are ill‑suited for this task because they either collapse multiple parallel edges into a single abstract connection or ignore the cumulative weight constraints that DTM imposes.

WMGPA addresses these shortcomings through several key design choices. First, it treats each parallel edge as an independent entity, preserving its individual weight. Second, it incorporates a pruning mechanism that tracks the accumulated weight along a partial path and aborts the extension of any branch whose total exceeds a user‑defined threshold L (often derived from physical feasibility criteria). Third, it manages cycle detection at the edge level rather than the vertex level, allowing a vertex to be revisited provided that no edge is reused, which is essential for correctly handling loops in complex circuits. The algorithm employs a stack‑based depth‑first traversal, but each stack frame stores not only the current vertex but also the list of edges already used and the current sum of weights. When the target vertex is reached, the complete node sequence and its total weight are recorded as a valid path.

The authors provide a formal description of the algorithm, followed by a complexity analysis. In the worst case the time complexity is O(V·E), slightly higher than plain DFS (O(V+E)), but empirical results show that the pruning and edge‑level bookkeeping dramatically reduce the number of explored branches. On a suite of 1,000 randomly generated weighted multi‑graphs (10–100 vertices, average degree 4–8), WMGPA achieved an average runtime reduction of about 35 % and a memory footprint reduction of roughly 20 % compared with a naïve DFS that treats parallel edges as separate but does not prune by weight.

To demonstrate practical relevance, the paper presents two application studies. The first applies WMGPA to a set of power‑electronic circuits, including a full‑bridge inverter and a high‑voltage DC‑DC converter. By extracting all admissible paths, the authors construct the topological matrix and the conductance matrix required by DTM, then solve for node voltages and branch currents. The results match those obtained by conventional matrix‑based methods, yet the computational time is cut by more than half. The second study involves a coupled electrical‑thermal network where edges carry complex impedances and thermal conductances. Here, WMGPA’s ability to handle complex weights and multiple constraints is highlighted; the algorithm successfully filters out physically impossible paths (e.g., those exceeding thermal limits) while preserving all viable electrical routes.

The paper also discusses extensions and future work. Although the current implementation assumes a single scalar weight limit, the authors note that the framework can be generalized to handle vector‑valued constraints (voltage, current, temperature) and to operate on complex‑valued weights directly. Parallelization opportunities are identified, suggesting that a GPU‑accelerated version could handle networks with millions of edges. Moreover, the authors propose integrating WMGPA with machine‑learning models that predict the most promising path subsets, thereby further reducing computational effort for extremely large systems.

Finally, the authors release an open‑source library implementing WMGPA, complete with documentation and example scripts for DTM‑based analysis. By filling a gap in graph‑theoretic tools for weighted multi‑graphs, WMGPA expands the applicability of the Direct Topological Method to more intricate and realistic network models, offering researchers and engineers a practical, efficient means to generate the exhaustive path sets required for accurate topological analysis.