Faster Algorithms for Mining Shortest-Path Distances from Massive Time-Evolving Graphs
<p>A sample graph and a corresponding 2-<span class="html-small-caps">hop</span>-<span class="html-small-caps">cover</span> labeling is shown. Vertex ordering is <math display="inline"><semantics> <mrow> <mo>{</mo> <mn>4</mn> <mo>,</mo> <mn>0</mn> <mo>,</mo> <mn>3</mn> <mo>,</mo> <mn>1</mn> <mo>,</mo> <mn>2</mn> <mo>,</mo> <mn>5</mn> <mo>,</mo> <mn>6</mn> <mo>}</mo> </mrow> </semantics></math>.</p> "> Figure 2
<p>Consider the graph of <a href="#algorithms-13-00191-f001" class="html-fig">Figure 1</a> (<b>left</b>) and the corresponding labeling (<b>right</b>). Assume arc <math display="inline"><semantics> <mrow> <mo>(</mo> <mn>4</mn> <mo>,</mo> <mn>0</mn> <mo>)</mo> </mrow> </semantics></math> is removed. If Algorithm <span class="html-small-caps">bidir–2hc</span> is executed, vertices <math display="inline"><semantics> <mrow> <mn>3</mn> <mo>,</mo> <mn>5</mn> <mo>,</mo> <mn>6</mn> </mrow> </semantics></math> have their label sets scanned twice, once during the detection of affected vertices and once during the removal phase, since hub vertex for pairs <math display="inline"><semantics> <mrow> <mo>(</mo> <mn>3</mn> <mo>,</mo> <mn>0</mn> <mo>)</mo> </mrow> </semantics></math>, <math display="inline"><semantics> <mrow> <mo>(</mo> <mn>5</mn> <mo>,</mo> <mn>0</mn> <mo>)</mo> </mrow> </semantics></math> and <math display="inline"><semantics> <mrow> <mo>(</mo> <mn>6</mn> <mo>,</mo> <mn>0</mn> <mo>)</mo> </mrow> </semantics></math> is vertex 4. However, no label entry is removed from <math display="inline"><semantics> <mrow> <msub> <mi mathvariant="sans-serif">L</mi> <mrow> <mi mathvariant="sans-serif">i</mi> <mi mathvariant="sans-serif">n</mi> </mrow> </msub> <mrow> <mo>(</mo> <mn>3</mn> <mo>)</mo> </mrow> </mrow> </semantics></math> nor from <math display="inline"><semantics> <mrow> <msub> <mi mathvariant="sans-serif">L</mi> <mrow> <mi mathvariant="sans-serif">o</mi> <mi mathvariant="sans-serif">u</mi> <mi mathvariant="sans-serif">t</mi> </mrow> </msub> <mrow> <mo>(</mo> <mn>3</mn> <mo>)</mo> </mrow> </mrow> </semantics></math> (the same hold for label sets of <math display="inline"><semantics> <mrow> <msub> <mi mathvariant="sans-serif">L</mi> <mrow> <mi mathvariant="sans-serif">i</mi> <mi mathvariant="sans-serif">n</mi> </mrow> </msub> <mrow> <mo>(</mo> <mn>5</mn> <mo>)</mo> </mrow> </mrow> </semantics></math>, <math display="inline"><semantics> <mrow> <msub> <mi mathvariant="sans-serif">L</mi> <mrow> <mi mathvariant="sans-serif">o</mi> <mi mathvariant="sans-serif">u</mi> <mi mathvariant="sans-serif">t</mi> </mrow> </msub> <mrow> <mo>(</mo> <mn>5</mn> <mo>)</mo> </mrow> </mrow> </semantics></math>, <math display="inline"><semantics> <mrow> <msub> <mi mathvariant="sans-serif">L</mi> <mrow> <mi mathvariant="sans-serif">i</mi> <mi mathvariant="sans-serif">n</mi> </mrow> </msub> <mrow> <mo>(</mo> <mn>3</mn> <mo>)</mo> </mrow> </mrow> </semantics></math>, <math display="inline"><semantics> <mrow> <msub> <mi mathvariant="sans-serif">L</mi> <mrow> <mi mathvariant="sans-serif">o</mi> <mi mathvariant="sans-serif">u</mi> <mi mathvariant="sans-serif">t</mi> </mrow> </msub> <mrow> <mo>(</mo> <mn>3</mn> <mo>)</mo> </mrow> </mrow> </semantics></math>). Our algorithm instead scans these label sets only once.</p> "> Figure 3
<p>(<b>a</b>): assume all arcs in this example have unitary weight and the vertex ordering is <math display="inline"><semantics> <mrow> <mo>{</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>0</mn> </msub> <mo>,</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>1</mn> </msub> <mo>,</mo> <mo>⋯</mo> <mo>,</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>4</mn> </msub> <mo>}</mo> </mrow> </semantics></math>. Both <math display="inline"><semantics> <msub> <mi mathvariant="sans-serif">x</mi> <mn>4</mn> </msub> </semantics></math> and <math display="inline"><semantics> <msub> <mi mathvariant="sans-serif">x</mi> <mn>3</mn> </msub> </semantics></math> are in <math display="inline"><semantics> <mrow> <msubsup> <mi mathvariant="sans-serif">F</mi> <mrow> <mi mathvariant="sans-serif">G</mi> </mrow> <mi mathvariant="sans-serif">L</mi> </msubsup> <mrow> <mo>(</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>1</mn> </msub> <mo>,</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>0</mn> </msub> <mo>)</mo> </mrow> </mrow> </semantics></math> since the hub vertex for pairs <math display="inline"><semantics> <mrow> <msub> <mi mathvariant="sans-serif">x</mi> <mn>4</mn> </msub> <mo>,</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>0</mn> </msub> </mrow> </semantics></math> and <math display="inline"><semantics> <mrow> <msub> <mi mathvariant="sans-serif">x</mi> <mn>3</mn> </msub> <mo>,</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>0</mn> </msub> </mrow> </semantics></math>, in the labeling L induced by the above ordering, is vertex <math display="inline"><semantics> <msub> <mi mathvariant="sans-serif">x</mi> <mn>0</mn> </msub> </semantics></math>. However, if arc <math display="inline"><semantics> <mrow> <mo>(</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>1</mn> </msub> <mo>,</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>0</mn> </msub> <mo>)</mo> </mrow> </semantics></math> is removed then <math display="inline"><semantics> <mrow> <msub> <mi mathvariant="sans-serif">d</mi> <mi mathvariant="sans-serif">G</mi> </msub> <mrow> <mo>(</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>4</mn> </msub> <mo>,</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>0</mn> </msub> <mo>)</mo> </mrow> </mrow> </semantics></math> changes while <math display="inline"><semantics> <mrow> <msub> <mi mathvariant="sans-serif">d</mi> <mi mathvariant="sans-serif">G</mi> </msub> <mrow> <mo>(</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>3</mn> </msub> <mo>,</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>0</mn> </msub> <mo>)</mo> </mrow> </mrow> </semantics></math> does not, since <math display="inline"><semantics> <msub> <mi mathvariant="sans-serif">x</mi> <mn>3</mn> </msub> </semantics></math> has two shortest paths of the same weight to <math display="inline"><semantics> <msub> <mi mathvariant="sans-serif">x</mi> <mn>0</mn> </msub> </semantics></math>. (<b>b</b>): In the toy graph G shown here the only shortest path from x to h passes through arc <math display="inline"><semantics> <mrow> <mo>(</mo> <mi mathvariant="sans-serif">x</mi> <mo>,</mo> <mi mathvariant="sans-serif">y</mi> <mo>)</mo> </mrow> </semantics></math>. Therefore, if <math display="inline"><semantics> <mrow> <mo>(</mo> <mi mathvariant="sans-serif">x</mi> <mo>,</mo> <mi mathvariant="sans-serif">y</mi> <mo>)</mo> </mrow> </semantics></math> undergoes a decremental update, we have that <math display="inline"><semantics> <mrow> <mi mathvariant="sans-serif">x</mi> <mo>,</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>1</mn> </msub> </mrow> </semantics></math>, and all vertices that are connected to <math display="inline"><semantics> <msub> <mi mathvariant="sans-serif">x</mi> <mn>1</mn> </msub> </semantics></math>, are in the forward cover graph (in blue). Symmetrically, <span class="html-italic">r</span> and h are in the backward cover graph (in red) while <math display="inline"><semantics> <msub> <mi mathvariant="sans-serif">k</mi> <mn>1</mn> </msub> </semantics></math> and <math display="inline"><semantics> <msub> <mi mathvariant="sans-serif">k</mi> <mn>2</mn> </msub> </semantics></math> are in neither of the two cover graphs.</p> "> Figure 4
<p>Consider again the graph of <a href="#algorithms-13-00191-f001" class="html-fig">Figure 1</a> and a corresponding 2-<span class="html-small-caps">hop</span>-<span class="html-small-caps">cover</span> labeling. Assume arc <math display="inline"><semantics> <mrow> <mo>(</mo> <mn>4</mn> <mo>,</mo> <mn>0</mn> <mo>)</mo> </mrow> </semantics></math> is removed. We have that vertex 3 is in <math display="inline"><semantics> <mrow> <msubsup> <mi mathvariant="sans-serif">F</mi> <mrow> <mi mathvariant="sans-serif">G</mi> </mrow> <mi mathvariant="sans-serif">L</mi> </msubsup> <mrow> <mo>(</mo> <mn>0</mn> <mo>,</mo> <mn>1</mn> <mo>)</mo> </mrow> </mrow> </semantics></math> and vertex 0 is in <math display="inline"><semantics> <mrow> <msubsup> <mi mathvariant="sans-serif">B</mi> <mrow> <mi mathvariant="sans-serif">G</mi> </mrow> <mi mathvariant="sans-serif">L</mi> </msubsup> <mrow> <mo>(</mo> <mn>0</mn> <mo>,</mo> <mn>1</mn> <mo>)</mo> </mrow> </mrow> </semantics></math>. However, there is no outdated label entry in <math display="inline"><semantics> <mrow> <msub> <mi mathvariant="sans-serif">L</mi> <mrow> <mi mathvariant="sans-serif">o</mi> <mi mathvariant="sans-serif">u</mi> <mi mathvariant="sans-serif">t</mi> </mrow> </msub> <mrow> <mo>(</mo> <mn>3</mn> <mo>)</mo> </mrow> </mrow> </semantics></math> but the decremental operation on arc <math display="inline"><semantics> <mrow> <mo>(</mo> <mn>4</mn> <mo>,</mo> <mn>0</mn> <mo>)</mo> </mrow> </semantics></math> causes the cover property to be broken for pair <math display="inline"><semantics> <mrow> <mo>(</mo> <mn>3</mn> <mo>,</mo> <mn>0</mn> <mo>)</mo> </mrow> </semantics></math>.</p> "> Figure 5
<p>(<b>a</b>): an example of the contradiction reached in the proof of Property 3. Suppose vertex ordering is <math display="inline"><semantics> <mrow> <mo>{</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>0</mn> </msub> <mo>,</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>1</mn> </msub> <mo>,</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>2</mn> </msub> <mo>,</mo> <mo>⋯</mo> <mo>,</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>5</mn> </msub> <mo>}</mo> </mrow> </semantics></math> and all arcs weight 1 for the sake of the example. Therefore, in any minimal well-ordered 2-<span class="html-small-caps">hop</span>-<span class="html-small-caps">cover</span> labeling entry <math display="inline"><semantics> <mrow> <mo>(</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>1</mn> </msub> <mo>,</mo> <msub> <mi mathvariant="sans-serif">δ</mi> <mrow> <msub> <mi mathvariant="sans-serif">x</mi> <mn>4</mn> </msub> <msub> <mi mathvariant="sans-serif">x</mi> <mn>1</mn> </msub> </mrow> </msub> <mo>)</mo> </mrow> </semantics></math> cannot belong to <math display="inline"><semantics> <mrow> <msub> <mi mathvariant="sans-serif">L</mi> <mrow> <mi mathvariant="sans-serif">o</mi> <mi mathvariant="sans-serif">u</mi> <mi mathvariant="sans-serif">t</mi> </mrow> </msub> <mrow> <mo>(</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>4</mn> </msub> <mo>)</mo> </mrow> </mrow> </semantics></math>. This allows Algorithm <span class="html-small-caps">clean</span> to avoid removing correct entries. (<b>b</b>): a case where a correct entry is preserved by Algorithm <span class="html-small-caps">clean</span>. Suppose the vertex ordering is <math display="inline"><semantics> <mrow> <mo>{</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>0</mn> </msub> <mo>,</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>1</mn> </msub> <mo>,</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>2</mn> </msub> <mo>,</mo> <mo>⋯</mo> <mo>,</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>7</mn> </msub> <mo>}</mo> </mrow> </semantics></math> and all arcs weight 1 for the sake of the example. Therefore in any minimal well-ordered 2-<span class="html-small-caps">hop</span>-<span class="html-small-caps">cover</span> labeling, <math display="inline"><semantics> <mrow> <msub> <mi mathvariant="sans-serif">L</mi> <mrow> <mi mathvariant="sans-serif">o</mi> <mi mathvariant="sans-serif">u</mi> <mi mathvariant="sans-serif">t</mi> </mrow> </msub> <mrow> <mo>(</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>4</mn> </msub> <mo>)</mo> </mrow> </mrow> </semantics></math> will contain <math display="inline"><semantics> <mrow> <mo>(</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>0</mn> </msub> <mo>,</mo> <msub> <mi mathvariant="sans-serif">δ</mi> <mrow> <msub> <mi mathvariant="sans-serif">x</mi> <mn>4</mn> </msub> <msub> <mi mathvariant="sans-serif">x</mi> <mn>0</mn> </msub> </mrow> </msub> <mo>)</mo> </mrow> </semantics></math> with <math display="inline"><semantics> <mrow> <msub> <mi mathvariant="sans-serif">δ</mi> <mrow> <msub> <mi mathvariant="sans-serif">x</mi> <mn>4</mn> </msub> <msub> <mi mathvariant="sans-serif">x</mi> <mn>0</mn> </msub> </mrow> </msub> <mo>=</mo> <mi mathvariant="sans-serif">d</mi> <mrow> <mo>(</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>4</mn> </msub> <mo>,</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>0</mn> </msub> <mo>)</mo> </mrow> <mo>=</mo> <mn>4</mn> </mrow> </semantics></math>. Clearly, also <math display="inline"><semantics> <mrow> <msub> <mi mathvariant="sans-serif">L</mi> <mrow> <mi mathvariant="sans-serif">o</mi> <mi mathvariant="sans-serif">u</mi> <mi mathvariant="sans-serif">t</mi> </mrow> </msub> <mrow> <mo>(</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>1</mn> </msub> <mo>)</mo> </mrow> </mrow> </semantics></math> and <math display="inline"><semantics> <mrow> <msub> <mi mathvariant="sans-serif">L</mi> <mrow> <mi mathvariant="sans-serif">o</mi> <mi mathvariant="sans-serif">u</mi> <mi mathvariant="sans-serif">t</mi> </mrow> </msub> <mrow> <mo>(</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>2</mn> </msub> <mo>)</mo> </mrow> </mrow> </semantics></math> will contain. similarly, entries <math display="inline"><semantics> <mrow> <mo>(</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>0</mn> </msub> <mo>,</mo> <mn>3</mn> <mo>)</mo> </mrow> </semantics></math> and <math display="inline"><semantics> <mrow> <mo>(</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>0</mn> </msub> <mo>,</mo> <mn>3</mn> <mo>)</mo> </mrow> </semantics></math>, respectively. If arc <math display="inline"><semantics> <mrow> <mo>(</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>2</mn> </msub> <mo>,</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>5</mn> </msub> <mo>)</mo> </mrow> </semantics></math> undergoes some decremental update, the (correct) entry in <math display="inline"><semantics> <mrow> <msub> <mi mathvariant="sans-serif">L</mi> <mrow> <mi mathvariant="sans-serif">o</mi> <mi mathvariant="sans-serif">u</mi> <mi mathvariant="sans-serif">t</mi> </mrow> </msub> <mrow> <mo>(</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>4</mn> </msub> <mo>)</mo> </mrow> </mrow> </semantics></math> is not removed thanks to the presence of the alternative shortest path through <math display="inline"><semantics> <msub> <mi mathvariant="sans-serif">x</mi> <mn>1</mn> </msub> </semantics></math> with the same weight as that through <math display="inline"><semantics> <msub> <mi mathvariant="sans-serif">x</mi> <mn>2</mn> </msub> </semantics></math>.</p> "> Figure 6
<p>(<b>a</b>): an example of the contradiction reached in the proof of Lemma 3. Suppose vertex ordering is <math display="inline"><semantics> <mrow> <mo>{</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>0</mn> </msub> <mo>,</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>1</mn> </msub> <mo>,</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>2</mn> </msub> <mo>,</mo> <mo>⋯</mo> <mo>,</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>5</mn> </msub> <mo>}</mo> </mrow> </semantics></math> and all arcs weight 1. Therefore, in any minimal well-ordered 2-<span class="html-small-caps">hop</span>-<span class="html-small-caps">cover</span> labeling, entry <math display="inline"><semantics> <mrow> <mo>(</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>1</mn> </msub> <mo>,</mo> <msub> <mi mathvariant="sans-serif">δ</mi> <mrow> <msub> <mi mathvariant="sans-serif">x</mi> <mn>4</mn> </msub> <msub> <mi mathvariant="sans-serif">x</mi> <mn>1</mn> </msub> </mrow> </msub> </mrow> </semantics></math> cannot belong to <math display="inline"><semantics> <mrow> <msub> <mi mathvariant="sans-serif">L</mi> <mrow> <mi mathvariant="sans-serif">o</mi> <mi mathvariant="sans-serif">u</mi> <mi mathvariant="sans-serif">t</mi> </mrow> </msub> <mrow> <mo>(</mo> <msub> <mi mathvariant="sans-serif">x</mi> <mn>4</mn> </msub> <mo>)</mo> </mrow> </mrow> </semantics></math>, due to the pruning test succeeding because of <math display="inline"><semantics> <msub> <mi mathvariant="sans-serif">x</mi> <mn>0</mn> </msub> </semantics></math>. Also, in this case no correct entry is removed by Algorithm <span class="html-small-caps">clean</span>. (<b>b</b>): restore phase for vertex <span class="html-italic">r</span>.</p> "> Figure 7
<p>Running times of <span class="html-small-caps">fs–2hc</span>, <span class="html-small-caps">bidir–2hc</span> and <span class="html-small-caps">queue–2hc</span> on some of the considered inputs. The y-axis is log-scaled to magnify the differences.</p> ">
Abstract
:1. Introduction
1.1. Our Contribution
1.2. Structure of the Paper
2. Notation and Background
2.1. 2-hop-cover Labeling
- either contains (at least) a vertex lying on a shortest path between s and t in G, and therefore (s and t are connected in G);
- or and hence (when s and t are not connected in G).
- ;
- and .
Algorithm 1: Query algorithm for minimal well-ordered labelings |
2.2. Dynamic Algorithms for Updating 2-hop-cover Labelings
3. A New Algorithm: queue–2hc
3.1. Profiling of Algorithm bidir–2hc
- the first two phases require typically small fractions of the time taken by bidir–2hc, even in very large instances. However, some “computational redundancy” is observed. In particular, there can be some vertices whose label sets do not contain any outdated entry and yet such sets are scanned twice, once during the detection phase and once during the removal phase (within the computed set of affected vertices, see [26] or Section 2.2). This is clearly an undesired behavior that we aim at removing by designing a new algorithm for the purpose. An example of this scenario is shown in Figure 2.
- the largest fraction of the entire computational effort to update a labeling, as a consequence of a decremental update, is spent by bidir–2hc on testing whether the cover property is satisfied and in restoring it when it is not, i.e., on the third phase. During this step, a number of shortest-path driven visits of the graph is performed, each rooted at one of the mentioned affected vertices and pruned according to a policy that is similar to that of fs–2hc. Unfortunately, however, the pruning conditions are less restrictive with respect to those of fs–2hc. Specifically, during the search started at , whenever a vertex u is settled with a distance of , the algorithm checks whether and prunes the search in the affirmative case, since this implies that labeling contains a hub vertex for and for all pairs such that there exists a shortest path between and x passing through node u. On the contrary, bidir–2hc must consider the fact that new paths, connecting pairs of affected vertices, can pass through non-affected vertices. Hence, to guarantee that the cover property is restored for all pairs of vertices, the search is pruned only if and u is affected. A consequence of this strategy is that many vertices of the graph, whose label sets do not change, are visited and tested for pruning by the searches of the third phase. This is, again, an undesired behavior we aim at avoiding by our new solution.
Algorithm 2: Algorithm queue–2hc |
Input: Graph G, 2-hop-cover labeling L of G, arc subject to decremental update. Output: Resulting graph , 2-hop-cover labeling of .
|
3.2. clean Phase
- determining two sets of vertices, named forward invalid hubs and backward invalid hubs, respectively, that are hubs for some pair in G but might stop being hubs in , due to the operation on , so to remove from L the incorrect entries associated with such vertices;
- identifying and exploring two (virtual) subgraphs of the input graph, named forward cover graph and backward cover graph, respectively, and denoted by and , respectively
- a vertex u is in if and there exist two pairs and such that (that is a shortest path from u to y includes and h is a hub vertex for pair );
- an arc is in if and (hence ).
- a vertex u is in if and there exist two pairs and such that (that is a shortest path from x to u includes and h is a hub vertex for pair );
- an arc is in if and (hence ).
- a label entry in the outgoing label of a vertex is outdated if and only if and there is no vertex such that: (i) ; (ii) ; (iii) ;
- a label entry in the incoming label of a vertex is outdated if and only if and there is no vertex such that: (i) ; (ii) ; (iii) .
- ;
- and there is a vertex such that: (i) ; (ii) ; (iii) .
- either ;
- or but h is not hub vertex (that is h does not belong to ) since precedes both h and x in the vertex ordering ( and ) and since L is well-ordered.
Algorithm 3: Algorithm clean |
Algorithm 4: Algorithm recover |
Algorithm 5: Procedure fclean |
Algorithm 6: Procedure bclean |
Algorithm 7: Sub-Procedure RELAX used in Procedures fclean and bclean |
3.3. recover Phase
Algorithm 8: Procedure used by Algorithm recover |
3.4. Complexity of queue–2hc
4. Experimentation
5. Conclusions and Future Work
Funding
Conflicts of Interest
References
- Vieira, M.V.; Fonseca, B.M.; Damazio, R.; Golgher, P.B.; Reis, D.C.; Ribeiro-Neto, B.A. Efficient search ranking in social networks. In Proceedings of the 16th ACM Conference on Conference on Information and Knowledge Management (CIKM 2007), Lisbon, Portugal, 6–10 November 2007; pp. 563–572. [Google Scholar]
- Abraham, I.; Delling, D.; Goldberg, A.V.; Werneck, R.F. Hierarchical Hub Labelings for Shortest Paths. In European Symposium on Algorithms; Springer: Berlin/Heidelberg, Germany, 2012; Volume 7501, pp. 24–35. [Google Scholar]
- Delling, D.; Goldberg, A.V.; Pajor, T.; Werneck, R.F. Robust Distance Queries on Massive Networks. In Proceedings of the 22st European Symposium on Algorithms (ESA 2004), Wroclaw, Poland, 8–10 September 2014; Springer: Berlin/Heidelberg, Germany, 2014; Volume 8737, pp. 321–333. [Google Scholar]
- Cionini, A.; D’Angelo, G.; D’Emidio, M.; Frigioni, D.; Giannakopoulou, K.; Paraskevopoulos, A.; Zaroliagis, C. Engineering Graph-Based Models for Dynamic Timetable Information Systems. J. Discret. Algorithms 2017, 46–47, 40–58. [Google Scholar] [CrossRef]
- Bonchi, F. Distance-Based Community Search. In Proceedings of the 45th International Conference on Current Trends in Theory and Practice of Computer Science (SOFSEM), Novy Smokovec, Slovakia, 27–30 January 2019; Catania, B., Královic, R., Nawrocki, J.R., Pighizzini, G., Eds.; Springer: Berlin/Heidelberg, Germany, 2019; Volume 11376, pp. 21–27. [Google Scholar] [CrossRef]
- Wei, H.; Yu, J.X.; Lu, C.; Jin, R. Reachability Querying: An Independent Permutation Labeling Approach. VLDB J. 2018, 27, 1–26. [Google Scholar] [CrossRef]
- Akiba, T.; Iwata, Y.; Yoshida, Y. Fast exact shortest-path distance queries on large networks by pruned landmark labeling. In Proceedings of the International Conference on Management of Data (SIGMOD 2013), New York, NY, USA, 22–27 June 2013; pp. 349–360. [Google Scholar]
- Akiba, T.; Iwata, Y.; Yoshida, Y. Dynamic and historical shortest-path distance queries on large evolving networks by pruned landmark labeling. In Proceedings of the 23rd Int. World Wide Web Conference (WWW 2014), Seoul, Korea, 7–11 April 2014; pp. 237–248. [Google Scholar]
- Cheng, J.; Yu, J.X. On-line exact shortest distance query processing. In Proceedings of the 12th International Conference on Extending Database Technology (EDBT 2009), Saint-Petersburg, Russia, 23–26 March 2009; pp. 481–492. [Google Scholar]
- Jiang, M.; Fu, A.W.C.; Wong, R.C.W. Exact Top-k Nearest Keyword Search in Large Networks. In Proceedings of the 2015 ACM SIGMOD International Conference on Management of Data (SIGMOD 2015), Melbourne, Australia, 31 May–4 June 2015; ACM: New York, NY, USA, 2015; pp. 393–404. [Google Scholar] [CrossRef]
- Borassi, M.; Crescenzi, P.; Habib, M.; Kosters, W.A.; Marino, A.; Takes, F.W. Fast diameter and radius BFS-based computation in (weakly connected) real-world graphs: With an application to the six degrees of separation games. Theor. Comput. Sci. 2015, 586, 59–80. [Google Scholar] [CrossRef]
- Uras, T.; Koenig, S. Subgoal graphs for fast optimal pathfinding. Game AI Pro 2015, 2, 145–159. [Google Scholar]
- D’Emidio, M.; Forlizzi, L.; Frigioni, D.; Leucci, S.; Proietti, G. Hardness, approximability, and fixed-parameter tractability of the clustered shortest-path tree problem. J. Comb. Optim. 2019, 38, 165–184. [Google Scholar] [CrossRef] [Green Version]
- D’Angelo, G.; D’Emidio, M.; Frigioni, D. Fully dynamic update of arc-flags. Networks 2014, 63, 243–259. [Google Scholar] [CrossRef]
- D’Angelo, G.; D’Emidio, M.; Frigioni, D.; Vitale, C. Fully Dynamic Maintenance of Arc-Flags in Road Networks. In Proceedings of the 11th International Symposium on Experimental Algorithms (SEA 2012), Bordeaux, France, 7–9 June 2012; Springer: Berlin/Heidelberg, Germany, 2012; Volume 7276, pp. 135–147. [Google Scholar]
- Bauer, R.; Wagner, D. Batch Dynamic Single-Source Shortest-Path Algorithms: An Experimental Study. In Proceedings of the 8th International Symposium on Experimental Algorithms (SEA 2009), Dortmund, Germany, 4–6 June 2009; Springer: Berlin/Heidelberg, Germany, 2009; Volume 5526, pp. 51–62. [Google Scholar]
- Bast, H.; Delling, D.; Goldberg, A.V.; Müller-Hannemann, M.; Pajor, T.; Sanders, P.; Wagner, D.; Werneck, R.F. Route Planning in Transportation Networks. In Algorithm Engineering; Springer: Cham, Switzerland, 2016; Volume 9220, pp. 19–80. [Google Scholar]
- Cohen, E.; Halperin, E.; Kaplan, H.; Zwick, U. Reachability and Distance Queries via 2-Hop Labels. SIAM J. Comput. 2003, 32, 1338–1355. [Google Scholar] [CrossRef]
- Fu, A.W.C.; Wu, H.; Cheng, J.; Wong, R.C.W. IS-Label: An Independent-set Based Labeling Scheme for Point-to-point Distance Querying. Proc. VLDB 2013 2013, 6, 457–468. [Google Scholar] [CrossRef]
- Jin, R.; Ruan, N.; Xiang, Y.; Lee, V.E. A highway-centric labeling approach for answering distance queries on large sparse graphs. In Proceedings of the International Conference on Management of Data (SIGMOD 2012), Scottsdale, AZ, USA, 20–24 May 2012; pp. 445–456. [Google Scholar]
- Delling, D.; Dibbelt, J.; Pajor, T.; Werneck, R.F. Public Transit Labeling. In Experimental Algorithms; Bampis, E., Ed.; Springer International Publishing: Cham, Switzerland, 2015; pp. 273–285. [Google Scholar]
- Qin, Y.; Sheng, Q.Z.; Zhang, W.E. SIEF: Efficiently Answering Distance Queries for Failure Prone Graphs. In Proceedings of the 18th Int. Conference on Extending Database Technology (EDBT 2015), Brussels, Belgium, 23–27 March 2015; pp. 145–156. [Google Scholar]
- Wei, F. TEDI: Efficient Shortest Path Query Answering on Graphs. In Proceedings of the ACM SIGMOD International Conference on Management of Data (SIGMOD 2010), Indianapolis, IN, USA, 6–11 June 2010; pp. 99–110. [Google Scholar]
- Delling, D.; Goldberg, A.V.; Pajor, T.; Werneck, R.F. Customizable route planning. In Proceedings of the 10th Symposium on Experimental Algorithms (SEA 2011), Kolimpari, Chania, Crete, Greece, 5–7 May 2011; Springer: Berlin/Heidelberg, Germany, 2011; Volume 6630, pp. 376–387. [Google Scholar]
- D’Emidio, M.; Khan, I. Dynamic Public Transit Labeling. In Proceedings of the Computational Science and Its Applications (ICCSA 2019), 19th International Conference, Saint Petersburg, Russia, 1–4 July 2019; Misra, S., Gervasi, O., Murgante, B., Stankova, E.N., Korkhov, V., Torre, C.M., Rocha, A.M.A.C., Taniar, D., Apduhan, B.O., Tarantino, E., Eds.; Proceedings, Part I. Springer: Cham, Switzerland, 2019; Volume 11619, pp. 103–117. [Google Scholar] [CrossRef]
- D’Angelo, G.; D’Emidio, M.; Frigioni, D. Fully Dynamic 2-Hop Cover Labeling. J. Exp. Algorithmics 2019, 24, 1.6:1–1.6:36. [Google Scholar] [CrossRef] [Green Version]
- D’Angelo, G.; D’Emidio, M.; Frigioni, D. Distance Queries in Large-Scale Fully Dynamic Complex Networks. In Proceedings of the 27th International Workshop on Combinatorial Algorithms (IWOCA 2016), Helsinki, Finland, 17–19 August 2016; Springer: Cham, Switzerland, 2016; Volume 9843, pp. 109–121. [Google Scholar]
- Weller, M. Optimal Hub Labeling is NP-complete. arXiv, 2014; arXiv:1407.8373. [Google Scholar]
- Cicerone, S.; D’Emidio, M.; Frigioni, D. On Mining Distances in Large-Scale Dynamic Graphs. In Proceedings of the 19th Italian Conference on Theoretical Computer Science, Urbino, Italy, 18–20 September 2018; Volume 2243, pp. 77–81. [Google Scholar]
- Bergamini, E.; Meyerhenke, H. Fully-dynamic Approximation of Betweenness Centrality. In Algorithms-ESA; Springer: Berlin/Heidelberg, Germany, 2015. [Google Scholar]
- Hayashi, T.; Akiba, T.; Kawarabayashi, K. Fully Dynamic Shortest-Path Distance Query Acceleration on Massive Networks. In Proceedings of the 25th ACM International on Conference on Information and Knowledge Management (CIKM 2016), Indianapolis, IN, USA, 24–28 October 2016; pp. 1533–1542. [Google Scholar]
- D’Andrea, A.; D’Emidio, M.; Frigioni, D.; Leucci, S.; Proietti, G. Experimental Evaluation of Dynamic Shortest Path Tree Algorithms on Homogeneous Batches. In Proceedings of the 13th International Symposium on Experimental Algorithms (SEA 2014), Copenhagen, Denmark, 29 June–1 July 2014; Springer: Cham, Switzerland, 2014; Volume 8504, pp. 283–294. [Google Scholar]
- Henzinger, M.; Krinninger, S.; Nanongkai, D. Decremental Single-Source Shortest Paths on Undirected Graphs in Near-Linear Total Update Time. J. ACM 2018, 65. [Google Scholar] [CrossRef]
- Chuzhoy, J.; Khanna, S. A New Algorithm for Decremental Single-Source Shortest Paths with Applications to Vertex-Capacitated Flow and Cut Problems. In Proceedings of the 51st Annual ACM SIGACT Symposium on Theory of Computing, Phoenix, AZ, USA, 26 June 2019; Association for Computing Machinery: New York, NY, USA, 2019; pp. 389–400. [Google Scholar] [CrossRef] [Green Version]
- Staudt, C.L.; Sazonovs, A.; Meyerhenke, H. NetworKit: A tool suite for large-scale complex network analysis. Netw. Sci. 2016, 4, 508–530. [Google Scholar] [CrossRef] [Green Version]
- Delling, D.; Goldberg, A.V.; Savchenko, R.; Werneck, R.F. Hub Labels: Theory and Practice. In Proceedings of the 13th Symposium on Experimental Algorithms (SEA 2014), Copenhagen, Denmark, 29 June–1 July 2014; Springer: Cham, Switzerland, 2014; Volume 8504, pp. 259–270. [Google Scholar]
- Leskovec, J.; Krevl, A. SNAP Datasets: Stanford Large Network Dataset Collection. 2014. Available online: http://snap.stanford.edu/data (accessed on 11 February 2020).
- Rossi, R.A.; Ahmed, N.K. The Network Data Repository with Interactive Graph Analytics and Visualization. In Proceedings of the 29th AAAI Conference on Artificial Intelligence (AAAI 2015), Austin, TX, USA, 25–30 January 2015. [Google Scholar]
- Kunegis, J. KONECT: The Koblenz Network Collection. 2013. Available online: http://konect.uni-koblenz.de/ (accessed on 11 February 2020).
- Bollobás, B. Random Graphs; Cambridge University Press: Cambridge, UK, 2001. [Google Scholar]
- Albert, R.; Barabási, A.L. Statistical mechanics of complex network. Rev. Mod. Phys. 2002, 74, 47–97. [Google Scholar] [CrossRef] [Green Version]
- D’Andrea, A.; D’Emidio, M.; Frigioni, D.; Leucci, S.; Proietti, G. Dynamic Maintenance of a Shortest-Path Tree on Homogeneous Batches of Updates: New Algorithms and Experiments. ACM J. Exp. Algorithmics 2015, 20, 1.5:1.1–1.5:1.33. [Google Scholar] [CrossRef]
- Jamour, F.; Skiadopoulos, S.; Kalnis, P. Parallel Algorithm for Incremental Betweenness Centrality on Large Graphs. IEEE Trans. Parallel Distrib. Syst. 2018, 29, 659–672. [Google Scholar] [CrossRef] [Green Version]
Dataset | Network Type | |V| | |E| | avg deg | S | D | W |
---|---|---|---|---|---|---|---|
Caida (cai) | Ethernet | 3.20 × 10 | 4.01 × 10 | 2.51 | ⚬ | ⚬ | • |
Luxembourg (lux) | Road | 3.06 × 10 | 7.55 × 10 | 4.11 | ⚬ | • | • |
wgtGnutella (gnu) | Peer2Peer | 6.26 × 10 | 1.48 × 10 | 4.73 | ⚬ | • | • |
Brightkite (bkt) | Location-based | 5.82 × 10 | 2.14 × 10 | 7.35 | ⚬ | ⚬ | ⚬ |
Efz (Efz) | Railway | 1.25 × 10 | 4.02 × 10 | 6.43 | ⚬ | • | • |
Eu-All (eua) | 2.65 × 10 | 4.19 × 10 | 2.77 | ⚬ | • | ⚬ | |
Epinions (epn) | Social | 1.32 × 10 | 8.41 × 10 | 12.76 | ⚬ | • | ⚬ |
Barabási-A. (baa) | Synthetic (Power-Law) | 6.32 × 10 | 1.00 × 10 | 3.17 | • | ⚬ | • |
web-NotreDame (ntr) | HyperLinks | 3.26 × 10 | 1.09 × 10 | 6.69 | ⚬ | ⚬ | ⚬ |
Netherlands (nld) | Road | 8.92 × 10 | 2.28 × 10 | 5.11 | ⚬ | • | • |
YouTube (ytb) | Social | 1.13 × 10 | 2.99 × 10 | 5.26 | ⚬ | ⚬ | ⚬ |
WikiTalk (wtk) | Communication | 2.39 × 10 | 5.02 × 10 | 4.19 | ⚬ | • | ⚬ |
Human-Genome (bio) | Biological | 1.43 × 10 | 9.03 × 10 | 1262.94 | ⚬ | ⚬ | • |
AS-Skitter (ski) | Computer | 1.70 × 10 | 1.11 × 10 | 13.08 | ⚬ | ⚬ | ⚬ |
DBPedia (dbp) | Knowledge | 3.97 × 10 | 1.29 × 10 | 6.97 | ⚬ | • | ⚬ |
Erdős-Rényi (erd) | Synthetic (Uniform) | 1.00 × 10 | 2.50 × 10 | 2499.11 | • | ⚬ | • |
Dataset | Average Update Time per Graph Mod (s) | ||||||
---|---|---|---|---|---|---|---|
fs–2hc | bidir–2hc | queue–2hc | |||||
parallel | mean | median | mean | median | mean | median | |
cai | ⚬ | 4.89 × 10 | 4.75 × 10 | 2.14 × 10 | 2.46 × 10 | 3.77 × 10 | 4.18 × 10 |
lux | ⚬ | 4.99 × 10 | 4.99 × 10 | 9.46 × 10 | 1.05 × 10 | 2.24 × 10 | 9.36 × 10 |
gnu | ⚬ | 7.83 × 10 | 7.84 × 10 | 1.30 × 10 | 7.82 × 10 | 4.64 × 10 | 1.43 × 10 |
bkt | • | 1.23 × 10 | 1.23 × 10 | 2.28 × 10 | 3.06 × 10 | 3.90 × 10 | 2.68 × 10 |
efz | ⚬ | 3.97 × 10 | 3.96 × 10 | 4.83 × 10 | 3.65 × 10 | 3.30 × 10 | 1.58 × 10 |
eua | • | 1.25 × 10 | 1.25 × 10 | 1.18 × 10 | 1.56 × 10 | 1.51 × 10 | 9.34 × 10 |
epn | • | 8.28 × 10 | 8.28 × 10 | 7.67 × 10 | 9.30 × 10 | 3.34 × 10 | 5.69 × 10 |
baa | ⚬ | 1.56 × 10 | 1.56 × 10 | 9.42 × 10 | 1.28 × 10 | 4.11 × 10 | 3.27 × 10 |
ntr | • | 1.23 × 10 | 1.23 × 10 | 1.37 × 10 | 1.93 × 10 | 1.33 × 10 | 5.16 × 10 |
nld | ⚬ | 7.73 × 10 | 7.76 × 10 | 1.55 × 10 | 1.81 × 10 | 3.06 × 10 | 7.22 × 10 |
ytb | • | 6.94 × 10 | 6.94 × 10 | 1.43 × 10 | 1.57 × 10 | 1.58 × 10 | 7.19 × 10 |
wtk | • | 7.48 × 10 | 7.48 × 10 | 3.61 × 10 | 2.84 × 10 | 2.14 × 10 | 7.60 × 10 |
bio | ⚬ | 3.05 × 10 | 3.05 × 10 | 1.60 × 10 | 5.28 × 10 | 7.36 × 10 | 1.59 × 10 |
ski | • | 2.21 × 10 | 2.21 × 10 | 3.67 × 10 | 4.01 × 10 | 1.23 × 10 | 3.02 × 10 |
dbp | • | 2.44 × 10 | 2.44 × 10 | 7.65 × 10 | 6.18 × 10 | 3.19 × 10 | 1.56 × 10 |
erd | ⚬ | 9.48 × 10 | 9.47 × 10 | 1.83 × 10 | 1.02 × 10 | 5.08 × 10 | 5.36 × 10 |
© 2020 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
D’Emidio, M. Faster Algorithms for Mining Shortest-Path Distances from Massive Time-Evolving Graphs. Algorithms 2020, 13, 191. https://doi.org/10.3390/a13080191
D’Emidio M. Faster Algorithms for Mining Shortest-Path Distances from Massive Time-Evolving Graphs. Algorithms. 2020; 13(8):191. https://doi.org/10.3390/a13080191
Chicago/Turabian StyleD’Emidio, Mattia. 2020. "Faster Algorithms for Mining Shortest-Path Distances from Massive Time-Evolving Graphs" Algorithms 13, no. 8: 191. https://doi.org/10.3390/a13080191