Reference Work Entry

Encyclopedia of Algorithms

pp 932-938


Hub Labeling (2-Hop Labeling)

  • Daniel DellingAffiliated withMicrosoft Email author 
  • , Andrew V. GoldbergAffiliated withMicrosoft Research – Silicon Valley
  • , Renato F. WerneckAffiliated withMicrosoft Research Silicon Valley


Distance oracles Labeling algorithms Shortest paths

Years and Authors of Summarized Original Work

  • 2003; Cohen, Halperin, Kaplan, Zwick

  • 2012; Abraham, Delling, Goldberg, Werneck

  • 2013; Akiba, Iwata, Yoshida

  • 2014; Delling, Goldberg, Pajor, Werneck

  • 2014; Delling, Goldberg, Savchenko, Werneck

Problem Definition

Given a directed graph G = (V, A) (with n =| V | and m =| A | ) with a length function : AR+ and a pair of vertices s, t, a distance oracle returns the distance dist(s, t) from s to t. A labeling algorithm [18] implements distance oracles in two stages. The preprocessing stage computes a label for each vertex of the input graph. Then, given s and t, the query stage computes dist(s, t) using only the labels of s and t; the query does not explicitly use G and .

Hub labeling (HL) (or 2-hop labeling) is a special kind of labeling algorithm. The label L(v) of a vertex v consists of two parts: the forward label Lf(v) is a collection of vertices w with their distances dist(v, w) from v, while the backward label Lb(v) is a collection of vertice ...

This is an excerpt from the content