find_asteroidal_triple

find_asteroidal_triple#

graph_tool.structure.find_asteroidal_triple(g)[git][source]#

Return an asteroidal triple of a graph, if there is one.

Parameters:
gGraph

Graph to be used. Edge directions are ignored.

Returns:
tripletuple of int or None

Three vertices forming an asteroidal triple, or None if the graph is AT-free.

See also

is_chordal

Test for chordal graphs

Notes

An asteroidal triple is a set of three pairwise non-adjacent vertices such that every two of them are joined by a path that avoids the neighborhood of the third. Graphs without them ( AT-free graphs) include the interval, permutation, and cocomparability graphs. For every vertex, the connected components of the graph without its closed neighborhood are found (in parallel), in time \(O(V(V+E))\) and memory \(O(V^2)\), and then the triples of non-adjacent vertices are checked against them, in time \(O(V^3)\) in the worst case [kohler-recognizing-2004]. AT-free graphs are characterized in [corneil-asteroidal-1997].

References

[kohler-recognizing-2004]

Ekkehard Köhler, “Recognizing graphs without asteroidal triples”, Journal of Discrete Algorithms 2, 439-452 (2004), DOI: 10.1016/j.jda.2004.04.005 [sci-hub, @tor]

[corneil-asteroidal-1997]

Derek G. Corneil, Stephan Olariu and Lorna Stewart, “Asteroidal triple-free graphs”, SIAM Journal on Discrete Mathematics 10, 399-430 (1997), DOI: 10.1137/S0895480193250125 [sci-hub, @tor]

Examples

>>> g = gt.circular_graph(6)
>>> print(gt.find_asteroidal_triple(g))
(0, 2, 4)
>>> print(gt.find_asteroidal_triple(gt.lattice([2, 4])))
None