TOPICS
Search

Lexicographic Breadth-First Search


Lexicographic breadth-first search (LexBFS) is a graph search that selects the unselected graph vertex with the largest label in lexicographic order. For a finite simple graph with n vertices, each label starts as an empty sequence. At selection i=1, ..., n, append n-i+1 to the label of every unselected neighbor of the chosen graph vertex. A proper extension of a label ranks above that label, and ties among equal labels can be broken arbitrarily (Rose et al. 1976). Thus, among two candidates with different labels, the first selected graph vertex adjacent to just one candidate gives that candidate priority. Maximum cardinality search instead compares just the numbers of selected neighbors.

The reverse of a LexBFS selection order is a perfect elimination ordering iff the graph is chordal (Rose et al. 1976). For a general input graph, the search order must be tested to decide chordality.

A linear time implementation represents equal labels as blocks in a list ordered from largest to smallest label. After selecting a graph vertex from the first block, split each block containing its unselected neighbors into those neighbors followed by the other members, retaining the old order of the blocks. Processing only affected blocks via adjacency lists gives time linear in the total numbers of vertices and edges. The subsequent ordering test also takes linear time (Rose et al. 1976).

Corneil et al. (1999) used lexicographic breadth-first search to find a dominating pair in an asteroidal triple-free graph that is a connected graph with at least two vertices. Their algorithm takes linear time.


See also

Breadth-First Traversal, Chordal Graph, Lexicographic Order, Maximum Cardinality Search, Perfect Elimination Ordering

Explore with Wolfram|Alpha

References

Corneil, D. G.; Olariu, S.; and Stewart, L. "Linear Time Algorithms for Dominating Pairs in Asteroidal Triple-Free Graphs." SIAM J. Comput. 28, 1284-1297, 1999. https://doi.org/10.1137/S0097539795282377.Rose, D. J.; Tarjan, R. E.; and Lueker, G. S. "Algorithmic Aspects of Vertex Elimination on Graphs." SIAM J. Comput. 5, 266-283, 1976. https://doi.org/10.1137/0205021.

Cite this as:

Weisstein, Eric W. "Lexicographic Breadth-First Search." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/LexicographicBreadth-FirstSearch.html

Subject classifications