Conversation
| Label="for a digraph"/> | ||
| <Returns>A list of lists of integers.</Returns> | ||
| <Description> | ||
| Colour Refinement is a method of colouring a digraph such that for a colour, every |
There was a problem hiding this comment.
Inappropriate capitalisation.
| <Description> | ||
| Colour Refinement is a method of colouring a digraph such that for a colour, every | ||
| node with that colouring has an identical configuration of coloured neighbours. That is, | ||
| all nodes of colour <A>q</A> have the same number of neighbours of colour <A>x</A>, and colour y</A>, etc. |
There was a problem hiding this comment.
| all nodes of colour <A>q</A> have the same number of neighbours of colour <A>x</A>, and colour y</A>, etc. | |
| all nodes of colour <A>q</A> have the same number of neighbours of colour <A>x</A>, and colour <A>y</A>, etc. |
but also this should probably say: "all nodes with the same colour have equal numbers of nodes of every colour"
| Colour Refinement is a method of colouring a digraph such that for a colour, every | ||
| node with that colouring has an identical configuration of coloured neighbours. That is, | ||
| all nodes of colour <A>q</A> have the same number of neighbours of colour <A>x</A>, and colour y</A>, etc. | ||
| <C>DigraphColourRefinement</C> considers the out neighbours and in neighbours of a node separately. |
There was a problem hiding this comment.
This should be expanded to say exactly how they are considered separately.
| all nodes of colour <A>q</A> have the same number of neighbours of colour <A>x</A>, and colour y</A>, etc. | ||
| <C>DigraphColourRefinement</C> considers the out neighbours and in neighbours of a node separately. | ||
| <P/> | ||
| This involves recolouring the digraph each iteration until it is 'refined'. It returns the colouring as a |
There was a problem hiding this comment.
What is This? What iterations are you referring to? What does 'refined' mean in this context? This is too imprecise.
| <P/> | ||
| This involves recolouring the digraph each iteration until it is 'refined'. It returns the colouring as a | ||
| list where the value at the ith position is the colour of node i. For two digraphs with different colourings, | ||
| we can be sure that they are not isomorphic. However, identical colourings for two digraphs does not necessarily |
There was a problem hiding this comment.
I'm not sure I believe this, the colouring as returned by this function depends on the order the vertices appear in the digraph, but isomorphism does not.
| j, P, v, Out, In, Sets, pair, current, currentPair, newSet, colour; | ||
|
|
||
| # Or just remove loops? | ||
| if not DigraphNrLoops(D) = 0 then |
There was a problem hiding this comment.
| if not DigraphNrLoops(D) = 0 then | |
| if DigraphHasLoops(D) then |
| See also | ||
| <Ref Oper="DigraphColouring" | ||
| Label="for a digraph and a number of colours"/>. | ||
| <P/> |
There was a problem hiding this comment.
The documentation should say something about the complexity of the algorithm and its implementation too.
| C := []; | ||
| for v in DigraphVertices(D) do | ||
| C[v] := 1; | ||
| od; |
There was a problem hiding this comment.
| C := []; | |
| for v in DigraphVertices(D) do | |
| C[v] := 1; | |
| od; | |
| C := List(DigraphNrVertices(D), x -> 1); |
Implementation of DigraphColourRefinement. Takes a digraph and returns a colouring (A list where value at ith position is the colour of the ith node), such that all nodes with the same colour have the same configuration of coloured neighbours. That is, if two nodes have the same colour, they will have the same number of neighbours of colour x, and colour y, etc. DigraphColourRefinement considers out and in neighbours separately.
To be used for testing isomorphism between digraphs. If two digraphs produce two different colouring under Colour Refinement, we can know that they are not isomorphic.
Doesn't currently include optimisation steps.