-
Notifications
You must be signed in to change notification settings - Fork 20
Description
Minimal illustration of the problem

(classic graph vs multi-graph)
Assume G is a binary tree with a root and 2 levels if bifurcation resulting in
Assume that all search starts at the root and ends by identifying the route to a leaf using BFS to determine the shortest path.
Problem: Due to the symmetric nature of the graph, shortest path BFS will practically visit every node every time a search is performed.
Proposition 1: If (!) G is redesigned such that the graph is holds information about what can be found below each bifurcation point, only 10 nodes need to be visited. This is ideal from a search perspective, but the memory overhead is problematic as it requires the graph to store all leaves at all bifurcation levels: ~10x more memory. A second problem with this approach is that it only works for DAGs.
Proposition 2: If a partition of G can be declared as a another graph G' and BFS and shortest-path search can query G' to whether or not it contains or has a route to the target node, then the search can be accelerated:
- If the target node is in G' and BFS sees G' as a single node in G, then the destination node has been found.
- If the target node is NOT in G', BFS can eliminate the search through G' all together.
For the binary tree this means that G defined as
The reason for 2*10 is because at each recursive step the binary partition will have at least one failure.
Edges cases:
For non-trees, such as road networks, which may be partitioned using the "AA", "A", "B", ... road network classification, each branch will lead to a