K-Shortest Paths Algorithm Handling Multiple Edges via Virtual Nodes
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The K-shortest paths algorithm is ineffective in scenarios with multiple edges between adjacent nodes, as it neglects extra edges and fails to calculate true paths, due to prerequisites such as undirected or directed topologies with specific edge weight conditions and restrictions on ring formation.
Innovation Solution
The method involves adding virtual nodes to split original edges into sub-segments, allowing each edge to participate in the calculation by modifying the topology structure, and recalculating K-shortest paths using the Dijkstra algorithm, ensuring all edges contribute to the path calculation.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If traditional K-shortest paths algorithm is used with standard topology prerequisites, then algorithm execution efficiency is maintained, but the algorithm cannot correctly handle multiple edges between adjacent nodes and produces inaccurate paths
Solution Approach 1:
The patent segments the complex topology with multiple edges between adjacent nodes by introducing virtual nodes that split these multi-edges into separate single-edges. Each virtual node acts as an intermediate point, dividing the direct connection between two nodes into multiple distinct path segments. This segmentation allows the standard Dijkstra algorithm to process each edge individually while preserving the original multi-edge topology's path calculation accuracy.
Solution Approach 2:
The patent introduces virtual nodes as intermediary elements between actual network nodes. These virtual nodes serve as mediators that enable the algorithm to distinguish and process multiple edges between the same pair of nodes. By placing virtual nodes at strategic positions in the topology, the algorithm can traverse different edges separately while maintaining the logical connection to the original nodes, thus resolving the contradiction between handling complex topologies and maintaining algorithm efficiency.
2Productivity
If multiple edges between adjacent nodes are neglected to satisfy algorithm prerequisites, then algorithm execution is simplified, but the calculated paths are not true K-shortest paths
Solution Approach 1:
The patent creates copies of the original topology structure by introducing virtual nodes that replicate the multi-edge relationships. Instead of modifying the fundamental algorithm, the approach copies the topology into a form that the algorithm can process, where each virtual node represents a specific edge instance. This copying mechanism preserves all original edges for calculation while maintaining compatibility with standard algorithm prerequisites, thus achieving both execution efficiency and calculation accuracy.
3Measurement precision
If virtual nodes are introduced to split original edges, then all edges can participate in path calculation, but the topology structure becomes more complex
Solution Approach 1:
The patent segments the complex topology with multiple edges between adjacent nodes by introducing virtual nodes that split these multi-edges into separate single-edges. Each virtual node acts as an intermediate point, dividing the direct connection between two nodes into multiple distinct path segments. This segmentation allows the standard Dijkstra algorithm to process each edge individually while preserving the original multi-edge topology's path calculation accuracy.
Solution Approach 2:
The patent changes the topological parameters by transforming the network representation from one where multiple edges exist between nodes to one where virtual nodes mediate these connections. This parameter change involves modifying the adjacency relationships and edge weights in the topology, converting multi-edge structures into sequences of single-edges through virtual node insertion. The transformation maintains the essential path properties while making the topology compatible with standard algorithm requirements.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
The present invention discloses a method and apparatus for implementing a K-shortest paths algorithm in a condition of multiple sides between adjacent nodes. The implementing method comprises: recording original topology information into a topology structure; adding one virtual node into each of the original sides other than the one with the shortest weight between the two nodes respectively to divide each of the original sides except for the original side with the shortest weight into two new sides, a weight of the new side being obtained by splitting a weight of the original edge where the new side locates; according to new topology information after adding virtual nodes, calculating K-shortest paths between designated nodes; and checking each path in the calculated K-shortest paths in sequence: reinstituting hops which belong to virtual nodes and new sides in each path into the original topology information recoded in said topology structure. The method enables each side to participate in the calculation of K-shortest paths algorithm, not simply making neglecting processing, which makes the results of the K-shortest paths algorithm be correct and reliable, and the true K-shortest paths in the topology can be calculated.