Jump to content

Colour refinement algorithm

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Fschwarzentruber (talk | contribs) at 12:53, 12 September 2022 (Complexity). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In graph theory and theoretical computer science, the colour refinement algorithm also known as the naive vertex classification, or the 1-dimensional version of the Weisfeiler-Leman algorithm, is a routine used for testing whether two graphs are isomorphic or not[1].

History

Description

We define a sequence of vertex colourings defined as follows:

  • is the initial colouring. If the graph is unlabeled, the initial colouring assigns a trivial color to each vertex . If the graph is labeled, is the label of vertex .
  • For all vertices , we set . In other words, the new color of the vertex is the pair formed from the previous color and the multiset of the colors of its neighbors.

This algorithm keeps refining the current colouring. At some point, before n steps, where n is the number of vertices, it stabilises: does not change anymore when t increases. This final colouring is called the stable colouring.

Expressivity

This algorithm does not distinguish a cycle of length 6 from a pair of triangles (example V.1 in [2]).

Complexity

The stable colouring is computable in O((n+m)log n) where n is the number of vertices and m the number of edges[3]. This complexity has been proven to be optimal for some class of graphs[4].

  1. ^ direct.mit.edu https://direct.mit.edu/books/edited-volume/5150/chapter-abstract/3403134/Color-Refinement-and-Its-Applications?redirectedFrom=fulltext. Retrieved 2022-09-12. {{cite web}}: Missing or empty |title= (help)
  2. ^ Grohe, Martin (2021-06-29). "The logic of graph neural networks". Proceedings of the 36th Annual ACM/IEEE Symposium on Logic in Computer Science. LICS '21. New York, NY, USA: Association for Computing Machinery: 1–17. doi:10.1109/LICS52264.2021.9470677. ISBN 978-1-6654-4895-6.
  3. ^ Cardon, A.; Crochemore, M. (1982-07-01). "Partitioning a graph in O(¦A¦log2¦V¦)". Theoretical Computer Science. 19 (1): 85–98. doi:10.1016/0304-3975(82)90016-0. ISSN 0304-3975.
  4. ^ Berkholz, Christoph; Bonsma, Paul; Grohe, Martin (2017-05-01). "Tight Lower and Upper Bounds for the Complexity of Canonical Colour Refinement". Theory of Computing Systems. 60 (4): 581–614. doi:10.1007/s00224-016-9686-0. ISSN 1433-0490.