Shortest-path algorithms using a space-time trade-off?

Problem: finding the shortest paths in an unweighted, undirected graph.

A width search in the first place can find the shortest path between two nodes, but it can take O (| V | + | E |). A pre-computed lookup table allows you to respond to queries within O (1), but at the expense of the space O (| V | ^ 2).

What interests me is: Is there an algorithm that offers a space-time tradeoff finer-grained? In other words, is there an algorithm that:

  • Finds shortest paths in a time exceeding O (1), but faster than bidirectional width search
  • Uses pre-computed data taking up less space than O (| V | ^ 2)?

On the practical side: The schedule is 800,000 nodes and is considered a small world network. The table of shortest paths for all pairs will have the order of gigabytes - this is not outrageous these days, but it does not meet our requirements.

However, I ask my question out of curiosity. That supporting me at night is not how I can reduce cache misses for the lookup table of all pairs? "But" Is there a completely different algorithm that I have never heard of? "

The answer may be negative, and everything is in order.

+3
source share
2 answers

. a * , , node (, ). .

+1

, , . , , , , , . , space == time, .

, , , . . : , , , .

Edit:

() , , , V ^ 2. , . , . , . .

, , , . :

1 2    1   2  5  6
3 4    3   4  7  8
       9  10 13 14
       11 12 15 16

.

, Floyd-Warshall, . , .

+1

Source: https://habr.com/ru/post/1743068/


All Articles