|
|
|
|
Quelle chap7.html
Sprache: HTML
|
|
| products/Sources/formale Sprachen/GAP/pkg/digraphs/doc/chap7.html |
 |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>GAP (Digraphs) - Chapter 7: Homomorphisms</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="generator" content="GAPDoc2HTML" />
<link rel="stylesheet" type="text/css" href="manual.css" />
<script src="manual.js" type="text/javascript"></script>
<script type="text/javascript">overwriteStyle();</script>
</head>
<body class="chap7" onload="jscontent()">
<div class="chlinktop"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a> <a href="chap1.html">1</a> <a href="chap2.html">2</a> <a href="chap3.html">3</a> <a href="chap4.html">4</a> <a href="chap5.html">5</a> <a href="chap6.html">6</a> <a href="chap7.html">7</a> <a href="chap8.html">8</a> <a href="chap9.html">9</a> <a href="chapA.html">A</a> <a href="chapB.html">B</a> <a href="chapBib.html">Bib</a> <a href="chapInd.html">Ind</a> </div>
<div class="chlinkprevnexttop"> <a href="chap0.html">[Top of Book]</a> <a href="chap0.html#contents">[Contents]</a> <a href="chap6.html">[Previous Chapter]</a> <a href="chap8.html">[Next Chapter]</a> </div>
<p id="mathjaxlink" class="pcenter"><a href="chap7_mj.html">[MathJax on]</a></p>
<p><a id="X84975388859F203D" name="X84975388859F203D"></a></p>
<div class="ChapSects"><a href="chap7.html#X84975388859F203D">7 <span class="Heading">Homomorphisms</span></a>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap7.html#X8200192B80AD2071">7.1 <span class="Heading">Acting on digraphs</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X808972017C486F1F">7.1-1 OnDigraphs</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X7AFBA7608498F9CE">7.1-2 OnMultiDigraphs</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X7F6A97E6870CDDA3">7.1-3 OnTuplesDigraphs</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap7.html#X7E48B9F87A0F22D4">7.2 <span class="Heading">Isomorphisms and canonical labellings</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X83E593F3855B122E">7.2-1 DigraphsUseNauty</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X858C32127A190175">7.2-2 AutomorphismGroup</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X7E7B0D88865A89F6">7.2-3 BlissAutomorphismGroup</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X857758B18144C0CD">7.2-4 NautyAutomorphismGroup</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X877732B1783C391B">7.2-5 AutomorphismGroup</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X7DA2C4FE837FFE01">7.2-6 AutomorphismGroup</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X7D676FE67A6684FF">7.2-7 BlissCanonicalLabelling</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X87DA265D803DB337">7.2-8 BlissCanonicalLabelling</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X877B1D377EC197D7">7.2-9 BlissCanonicalDigraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X803ACEDA7BBAC5B3">7.2-10 DigraphGroup</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X8096C5287E459279">7.2-11 DigraphOrbits</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X8386028782F2D3FF">7.2-12 DigraphOrbitReps</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X8657604E87A25E5F">7.2-13 DigraphSchreierVector</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X78913684795FB256">7.2-14 DigraphStabilizer</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X7B4F24B283C9EE28">7.2-15 IsIsomorphicDigraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X7D4A1FA8868DA930">7.2-16 IsIsomorphicDigraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X8219FE6C839D9457">7.2-17 IsomorphismDigraphs</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X7ED93C0F86D9D34F">7.2-18 IsomorphismDigraphs</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X7E1C806D81DFE15E">7.2-19 RepresentativeOutNeighbours</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X80183D4A7C51365A">7.2-20 IsDigraphIsomorphism</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X7F16B8B3825A627A">7.2-21 IsDigraphColouring</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X7D4378F27B49C9AC">7.2-22 MaximalCommonSubdigraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X7B99C75B8021FCDA">7.2-23 MinimalCommonSuperdigraph</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap7.html#X7E1A02FE8384C03C">7.3 <span class="Heading">Homomorphisms of digraphs</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X79ABF0E783FD67C7">7.3-1 HomomorphismDigraphsFinder</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X85E9B019877AD7FE">7.3-2 DigraphHomomorphism</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X8653EDA183E06D05">7.3-3 HomomorphismsDigraphs</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X82D0FCD87D47ACA8">7.3-4 DigraphMonomorphism</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X84B4BDB984C2A9A8">7.3-5 MonomorphismsDigraphs</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X7CB5AD9F861684FD">7.3-6 DigraphEpimorphism</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X7DFB1F5D873937B3">7.3-7 EpimorphismsDigraphs</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X7AD04CC186E86CCA">7.3-8 DigraphEmbedding</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X82EBDF137EEDC5FD">7.3-9 EmbeddingsDigraphs</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X80FE9FCB79718A61">7.3-10 IsDigraphHomomorphism</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X7D6B5A0887903810">7.3-11 IsDigraphEmbedding</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X87E60FB17BC444EF">7.3-12 SubdigraphsMonomorphisms</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X7F80709A80CBFA98">7.3-13 DigraphsRespectsColouring</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X7E93B268823F6478">7.3-14 GeneratorsOfEndomorphismMonoid</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X86D0A74B83D6B9A7">7.3-15 DigraphColouring</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X7AB7200D831013C1">7.3-16 DigraphGreedyColouring</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X7F9CB3B27B9590DB">7.3-17 DigraphWelshPowellOrder</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X807D49358529A37C">7.3-18 ChromaticNumber</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X863487EF7D64EF56">7.3-19 DigraphCore</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X7EEA340C81FCA52D">7.3-20 LatticeDigraphEmbedding</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap7.html#X7E183D4979D324EF">7.3-21 IsLatticeHomomorphism</a></span>
</div></div>
</div>
<h3>7 <span class="Heading">Homomorphisms</span></h3>
<p><a id="X8200192B80AD2071" name="X8200192B80AD2071"></a></p>
<h4>7.1 <span class="Heading">Acting on digraphs</span></h4>
<p><a id="X808972017C486F1F" name="X808972017C486F1F"></a></p>
<h5>7.1-1 OnDigraphs</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ OnDigraphs</code>( <var class="Arg">digraph</var>, <var class="Arg">perm</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ OnDigraphs</code>( <var class="Arg">digraph</var>, <var class="Arg">trans</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: A digraph.</p>
<p>If <var class="Arg">digraph</var> is a digraph, and the second argument <var class="Arg">perm</var> is a <em>permutation</em> of the vertices of <var class="Arg">digraph</var>, then this operation returns a digraph constructed by relabelling the vertices of <var class="Arg">digraph</var> according to <var class="Arg">perm</var>. Note that for an automorphism <code class="code">f</code> of a digraph, we have <code class="code">OnDigraphs(<var class="Arg">digraph</var>, f) = </code><var class="Arg">digraph</var>.</p>
<p>If the second argument is a <em>transformation</em> <var class="Arg">trans</var> of the vertices of <var class="Arg">digraph</var>, then this operation returns a digraph constructed by transforming the source and range of each edge according to <var class="Arg">trans</var>. Thus a vertex which does not appear in the image of <var class="Arg">trans</var> will be isolated in the returned digraph, and the returned digraph may contain multiple edges, even if <var class="Arg">digraph</var> does not. If <var class="Arg">trans</var> is mathematically a permutation, then the result coincides with <code class="code">OnDigraphs(<var class="Arg">digraph</var>, AsPermutation(<var class="Arg">trans</var>))</code>.</p>
<p>The <code class="func">DigraphVertexLabels</code> (<a href="chap5.html#X7E51F2FE87140B32"><span class="RefLink">5.1-12</span></a>) of <var class="Arg">digraph</var> will not be retained in the returned digraph.</p>
<p>If <var class="Arg">digraph</var> belongs to <code class="func">IsMutableDigraph</code> (<a href="chap3.html#X7D7EDF83820ED6F5"><span class="RefLink">3.1-2</span></a>), then relabelling of the vertices is performed directly on <var class="Arg">digraph</var>. If <var class="Arg">digraph</var> belongs to <code class="func">IsImmutableDigraph</code> (<a href="chap3.html#X7CAFAA89804F80BD"><span class="RefLink">3.1-3</span></a>), an immutable copy of <var class="Arg">digraph</var> with the vertices relabelled is returned.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">D := Digraph([[3], [1, 3, 5], [1], [1, 2, 4], [2, 3, 5]]);</span>
<immutable digraph with 5 vertices, 11 edges>
<span class="GAPprompt">gap></span> <span class="GAPinput">new := OnDigraphs(D, (1, 2));</span>
<immutable digraph with 5 vertices, 11 edges>
<span class="GAPprompt">gap></span> <span class="GAPinput">OutNeighbours(new);</span>
[ [ 2, 3, 5 ], [ 3 ], [ 2 ], [ 2, 1, 4 ], [ 1, 3, 5 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">D := Digraph([[2], [], [2]]);</span>
<immutable digraph with 3 vertices, 2 edges>
<span class="GAPprompt">gap></span> <span class="GAPinput">t := Transformation([1, 2, 1]);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">new := OnDigraphs(D, t);</span>
<immutable multidigraph with 3 vertices, 2 edges>
<span class="GAPprompt">gap></span> <span class="GAPinput">OutNeighbours(new);</span>
[ [ 2, 2 ], [ ], [ ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">ForAll(DigraphEdges(D),</span>
<span class="GAPprompt">></span> <span class="GAPinput"> e -> IsDigraphEdge(new, [e[1] ^ t, e[2] ^ t]));</span>
true
</pre></div>
<p><a id="X7AFBA7608498F9CE" name="X7AFBA7608498F9CE"></a></p>
<h5>7.1-2 OnMultiDigraphs</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ OnMultiDigraphs</code>( <var class="Arg">digraph</var>, <var class="Arg">pair</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ OnMultiDigraphs</code>( <var class="Arg">digraph</var>, <var class="Arg">perm1</var>, <var class="Arg">perm2</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: A digraph.</p>
<p>If <var class="Arg">digraph</var> is a digraph, and <var class="Arg">pair</var> is a pair consisting of a permutation of the vertices and a permutation of the edges of <var class="Arg">digraph</var>, then this operation returns a digraph constructed by relabelling the vertices and edges of <var class="Arg">digraph</var> according to <var class="Arg">perm[1]</var> and <var class="Arg">perm[2]</var>, respectively.</p>
<p>In its second form, <code class="code">OnMultiDigraphs</code> returns a digraph with vertices and edges permuted by <var class="Arg">perm1</var> and <var class="Arg">perm2</var>, respectively.</p>
<p>Note that <code class="code">OnDigraphs(<var class="Arg">digraph</var>, perm)=OnMultiDigraphs(<var class="Arg">digraph</var>, [perm, ()])</code> where <code class="code">perm</code> is a permutation of the vertices of <var class="Arg">digraph</var>. If you are only interested in the action of a permutation on the vertices of a digraph, then you can use <code class="code">OnDigraphs</code> instead of <code class="code">OnMultiDigraphs</code>. If <var class="Arg">digraph</var> belongs to <code class="func">IsMutableDigraph</code> (<a href="chap3.html#X7D7EDF83820ED6F5"><span class="RefLink">3.1-2</span></a>), then relabelling of the vertices is performed directly on <var class="Arg">digraph</var>. If <var class="Arg">digraph</var> belongs to <code class="func">IsImmutableDigraph</code> (<a href="chap3.html#X7CAFAA89804F80BD"><span class="RefLink">3.1-3</span></a>), an immutable copy of <var class="Arg">digraph</var> with the vertices relabelled is returned.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">D1 := Digraph([</span>
<span class="GAPprompt">></span> <span class="GAPinput">[3, 6, 3], [], [3], [9, 10], [9], [], [], [10, 4, 10], [], []]);</span>
<immutable multidigraph with 10 vertices, 10 edges>
<span class="GAPprompt">gap></span> <span class="GAPinput">p := BlissCanonicalLabelling(D1);</span>
[ (1,7)(3,6)(4,10)(5,9), () ]
<span class="GAPprompt">gap></span> <span class="GAPinput">D2 := OnMultiDigraphs(D1, p);</span>
<immutable multidigraph with 10 vertices, 10 edges>
<span class="GAPprompt">gap></span> <span class="GAPinput">OutNeighbours(D2);</span>
[ [ ], [ ], [ ], [ ], [ ], [ 6 ], [ 6, 3, 6 ], [ 4, 10, 4 ],
[ 5 ], [ 5, 4 ] ]</pre></div>
<p><a id="X7F6A97E6870CDDA3" name="X7F6A97E6870CDDA3"></a></p>
<h5>7.1-3 OnTuplesDigraphs</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ OnTuplesDigraphs</code>( <var class="Arg">list</var>, <var class="Arg">perm</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ OnSetsDigraphs</code>( <var class="Arg">list</var>, <var class="Arg">perm</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: A list or set of digraphs.</p>
<p>If <var class="Arg">list</var> is a list of digraphs, and <var class="Arg">perm</var> is a <em>permutation</em> of the vertices of the digraphs in <var class="Arg">list</var>, then <code class="func">OnTuplesDigraphs</code> returns a new list constructed by applying <var class="Arg">perm</var> via <code class="func">OnDigraphs</code> (<a href="chap7.html#X808972017C486F1F"><span class="RefLink">7.1-1</span></a>) to a copy (with the same mutability) of each entry of <var class="Arg">list</var> in turn.</p>
<p>More precisely, <code class="code">OnTuplesDigraphs(<var class="Arg">list</var>,<var class="Arg">perm</var>)</code> is a list of length <code class="code">Length(<var class="Arg">list</var>)</code>, whose <code class="code">i</code>-th entry is <code class="code">OnDigraphs(DigraphCopy(<var class="Arg">list</var>[i]), <var class="Arg">perm</var>)</code>.</p>
<p>If <var class="Arg">list</var> is moreover a <strong class="pkg">GAP</strong> set (i.e. a duplicate-free sorted list), then <code class="func">OnSetsDigraphs</code> returns the sorted output of <code class="func">OnTuplesDigraphs</code>, which is therefore again a set.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">list := [CycleDigraph(IsMutableDigraph, 6),</span>
<span class="GAPprompt">></span> <span class="GAPinput"> DigraphReverse(CycleDigraph(6))];</span>
[ <mutable digraph with 6 vertices, 6 edges>,
<immutable digraph with 6 vertices, 6 edges> ]
<span class="GAPprompt">gap></span> <span class="GAPinput">p := (1, 6)(2, 5)(3, 4);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">result_tuples := OnTuplesDigraphs(list, p);</span>
[ <mutable digraph with 6 vertices, 6 edges>,
<immutable digraph with 6 vertices, 6 edges> ]
<span class="GAPprompt">gap></span> <span class="GAPinput">result_tuples[2] = OnDigraphs(list[2], p);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">result_tuples = list;</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">result_tuples = Reversed(list);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">result_sets := OnSetsDigraphs(list, p);</span>
[ <immutable digraph with 6 vertices, 6 edges>,
<mutable digraph with 6 vertices, 6 edges> ]
<span class="GAPprompt">gap></span> <span class="GAPinput">result_sets = list;</span>
true</pre></div>
<p><a id="X7E48B9F87A0F22D4" name="X7E48B9F87A0F22D4"></a></p>
<h4>7.2 <span class="Heading">Isomorphisms and canonical labellings</span></h4>
<p>From version 0.11.0 of <strong class="pkg">Digraphs</strong> it is possible to use either <span class="URL"><a href="http://www.tcs.tkk.fi/Software/bliss/">bliss</a></span> or <span class="URL"><a href="https://pallini.di.uniroma1.it">nauty</a></span> (via <span class="URL"><a href="https://github.com/gap-packages/NautyTracesInterface">NautyTracesInterface</a></span> ) to calculate canonical labellings and automorphism groups of digraphs; see <a href="chapBib.html#biBJK07">[JK07]</a> and <a href="chapBib.html#biBMP14">[MP14]</a> for more details about <span class="URL"><a href="http://www.tcs.tkk.fi/Software/bliss/">bliss</a></span> and <span class="URL"><a href="https://pallini.di.uniroma1.it">nauty</a></span> , respectively.</p>
<p><a id="X83E593F3855B122E" name="X83E593F3855B122E"></a></p>
<h5>7.2-1 DigraphsUseNauty</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DigraphsUseNauty</code>( )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DigraphsUseBliss</code>( )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: Nothing.</p>
<p>These functions can be used to specify whether <span class="URL"><a href="https://pallini.di.uniroma1.it">nauty</a></span> or <span class="URL"><a href="http://www.tcs.tkk.fi/Software/bliss/">bliss</a></span> should be used by default by <strong class="pkg">Digraphs</strong>. If <span class="URL"><a href="https://github.com/gap-packages/NautyTracesInterface">NautyTracesInterface</a></span> is not available, then these functions do nothing. Otherwise, by calling <code class="code">DigraphsUseNauty</code> subsequent computations will default to using <span class="URL"><a href="https://pallini.di.uniroma1.it">nauty</a></span> rather than <span class="URL"><a href="http://www.tcs.tkk.fi/Software/bliss/">bliss</a></span> , where possible.</p>
<p>You can call these functions at any point in a <strong class="pkg">GAP</strong> session, as many times as you like, it is guaranteed that existing digraphs remain valid, and that comparison of existing digraphs and newly created digraphs via <code class="func">IsIsomorphicDigraph</code> (<a href="chap7.html#X7B4F24B283C9EE28"><span class="RefLink">7.2-15</span></a>), <code class="func">IsIsomorphicDigraph</code> (<a href="chap7.html#X7D4A1FA8868DA930"><span class="RefLink">7.2-16</span></a>), <code class="func">IsomorphismDigraphs</code> (<a href="chap7.html#X8219FE6C839D9457"><span class="RefLink">7.2-17</span></a>), and <code class="func">IsomorphismDigraphs</code> (<a href="chap7.html#X7ED93C0F86D9D34F"><span class="RefLink">7.2-18</span></a>) are also valid.</p>
<p>It is also possible to compute the automorphism group of a specific digraph using both <span class="URL"><a href="https://pallini.di.uniroma1.it">nauty</a></span> and <span class="URL"><a href="http://www.tcs.tkk.fi/Software/bliss/">bliss</a></span> using <code class="func">NautyAutomorphismGroup</code> (<a href="chap7.html#X857758B18144C0CD"><span class="RefLink">7.2-4</span></a>) and <code class="func">BlissAutomorphismGroup</code> (<a href="chap7.html#X7E7B0D88865A89F6"><span class="RefLink">7.2-3</span></a>), respectively.</p>
<p><a id="X858C32127A190175" name="X858C32127A190175"></a></p>
<h5>7.2-2 AutomorphismGroup</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ AutomorphismGroup</code>( <var class="Arg">digraph</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>Returns: A permutation group.</p>
<p>If <var class="Arg">digraph</var> is a digraph, then this attribute contains the group of automorphisms of <var class="Arg">digraph</var>. An <em>automorphism</em> of <var class="Arg">digraph</var> is an isomorphism from <var class="Arg">digraph</var> to itself. See <code class="func">IsomorphismDigraphs</code> (<a href="chap7.html#X8219FE6C839D9457"><span class="RefLink">7.2-17</span></a>) for more information about isomorphisms of digraphs.</p>
<p>If <var class="Arg">digraph</var> is not a multidigraph then the automorphism group is returned as a group of permutations on the set of vertices of <var class="Arg">digraph</var>.</p>
<p>If <var class="Arg">digraph</var> is a multidigraph then the automorphism group is returned as the direct product of a group of permutations on the set of vertices of <var class="Arg">digraph</var> with a group of permutations on the set of edges of <var class="Arg">digraph</var>. These groups can be accessed using <code class="func">Projection</code> (<a href="/home/runner/gap/doc/ref/chap32.html#X8769E8DA80BC96C1"><span class="RefLink">Reference: Projection for a domain and a positive integer</span></a>) on the returned group.</p>
<p>By default, the automorphism group is found using <span class="URL"><a href="http://www.tcs.tkk.fi/Software/bliss/">bliss</a></span> by Tommi Junttila and Petteri Kaski. If <span class="URL"><a href="https://github.com/gap-packages/NautyTracesInterface">NautyTracesInterface</a></span> is available, then <span class="URL"><a href="https://pallini.di.uniroma1.it">nauty</a></span> by Brendan Mckay and Adolfo Piperno can be used instead; see <code class="func">BlissAutomorphismGroup</code> (<a href="chap7.html#X7E7B0D88865A89F6"><span class="RefLink">7.2-3</span></a>), <code class="func">NautyAutomorphismGroup</code> (<a href="chap7.html#X857758B18144C0CD"><span class="RefLink">7.2-4</span></a>), <code class="func">DigraphsUseBliss</code> (<a href="chap7.html#X83E593F3855B122E"><span class="RefLink">7.2-1</span></a>), and <code class="func">DigraphsUseNauty</code> (<a href="chap7.html#X83E593F3855B122E"><span class="RefLink">7.2-1</span></a>).</p>
<p>If the argument <var class="Arg">digraph</var> is mutable, then the return value of this attribute is recomputed every time it is called.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">johnson := DigraphFromGraph6String("E}lw");</span>
<immutable symmetric digraph with 6 vertices, 24 edges>
<span class="GAPprompt">gap></span> <span class="GAPinput">G := AutomorphismGroup(johnson);</span>
Group([ (3,4), (2,3)(4,5), (1,2)(5,6) ])
<span class="GAPprompt">gap></span> <span class="GAPinput">cycle := CycleDigraph(9);</span>
<immutable cycle digraph with 9 vertices>
<span class="GAPprompt">gap></span> <span class="GAPinput">G := AutomorphismGroup(cycle);</span>
Group([ (1,2,3,4,5,6,7,8,9) ])
<span class="GAPprompt">gap></span> <span class="GAPinput">IsCyclic(G) and Size(G) = 9;</span>
true</pre></div>
<p><a id="X7E7B0D88865A89F6" name="X7E7B0D88865A89F6"></a></p>
<h5>7.2-3 BlissAutomorphismGroup</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ BlissAutomorphismGroup</code>( <var class="Arg">digraph</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ BlissAutomorphismGroup</code>( <var class="Arg">digraph</var>, <var class="Arg">vertex_colours</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ BlissAutomorphismGroup</code>( <var class="Arg">digraph</var>, <var class="Arg">vertex_colours</var>, <var class="Arg">edge_colours</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: A permutation group.</p>
<p>If <var class="Arg">digraph</var> is a digraph, then this attribute contains the group of automorphisms of <var class="Arg">digraph</var> as calculated using <span class="URL"><a href="http://www.tcs.tkk.fi/Software/bliss/">bliss</a></span> by Tommi Junttila and Petteri Kaski.</p>
<p>The attribute <code class="func">AutomorphismGroup</code> (<a href="chap7.html#X858C32127A190175"><span class="RefLink">7.2-2</span></a>) and operation <code class="func">AutomorphismGroup</code> (<a href="chap7.html#X877732B1783C391B"><span class="RefLink">7.2-5</span></a>) returns the value of either <code class="code">BlissAutomorphismGroup</code> or <code class="func">NautyAutomorphismGroup</code> (<a href="chap7.html#X857758B18144C0CD"><span class="RefLink">7.2-4</span></a>). These groups are, of course, equal but their generating sets may differ.</p>
<p>The attribute <code class="func">AutomorphismGroup</code> (<a href="chap7.html#X7DA2C4FE837FFE01"><span class="RefLink">7.2-6</span></a>) returns the value of <code class="code">BlissAutomorphismGroup</code> as it is not implemented for <span class="URL"><a href="https://pallini.di.uniroma1.it">nauty</a></span> The requirements for the optional arguments <var class="Arg">vertex_colours</var> and <var class="Arg">edge_colours</var> are documented in <code class="func">AutomorphismGroup</code> (<a href="chap7.html#X7DA2C4FE837FFE01"><span class="RefLink">7.2-6</span></a>). See also <code class="func">DigraphsUseBliss</code> (<a href="chap7.html#X83E593F3855B122E"><span class="RefLink">7.2-1</span></a>), and <code class="func">DigraphsUseNauty</code> (<a href="chap7.html#X83E593F3855B122E"><span class="RefLink">7.2-1</span></a>).</p>
<p>If the argument <var class="Arg">digraph</var> is mutable, then the return value of this attribute is recomputed every time it is called.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">G := BlissAutomorphismGroup(JohnsonDigraph(5, 2));;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsSymmetricGroup(G);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">Size(G);</span>
120</pre></div>
<p><a id="X857758B18144C0CD" name="X857758B18144C0CD"></a></p>
<h5>7.2-4 NautyAutomorphismGroup</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ NautyAutomorphismGroup</code>( <var class="Arg">digraph</var>[, <var class="Arg">vert_colours</var>] )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>Returns: A permutation group.</p>
<p>If <var class="Arg">digraph</var> is a digraph, then this attribute contains the group of automorphisms of <var class="Arg">digraph</var> as calculated using <span class="URL"><a href="https://pallini.di.uniroma1.it">nauty</a></span> by Brendan Mckay and Adolfo Piperno via <span class="URL"><a href="https://github.com/gap-packages/NautyTracesInterface">NautyTracesInterface</a></span> . The attribute <code class="func">AutomorphismGroup</code> (<a href="chap7.html#X858C32127A190175"><span class="RefLink">7.2-2</span></a>) and operation <code class="func">AutomorphismGroup</code> (<a href="chap7.html#X877732B1783C391B"><span class="RefLink">7.2-5</span></a>) returns the value of either <code class="code">NautyAutomorphismGroup</code> or <code class="func">BlissAutomorphismGroup</code> (<a href="chap7.html#X7E7B0D88865A89F6"><span class="RefLink">7.2-3</span></a>). These groups are, of course, equal but their generating sets may differ.</p>
<p>See also <code class="func">DigraphsUseBliss</code> (<a href="chap7.html#X83E593F3855B122E"><span class="RefLink">7.2-1</span></a>), and <code class="func">DigraphsUseNauty</code> (<a href="chap7.html#X83E593F3855B122E"><span class="RefLink">7.2-1</span></a>).</p>
<p>If the argument <var class="Arg">digraph</var> is mutable, then the return value of this attribute is recomputed every time it is called.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">NautyAutomorphismGroup(JohnsonDigraph(5, 2));</span>
Group([ (3,4)(6,7)(8,9), (2,3)(5,6)(9,10), (2,5)(3,6)(4,7),
(1,2)(6,8)(7,9) ])</pre></div>
<p><a id="X877732B1783C391B" name="X877732B1783C391B"></a></p>
<h5>7.2-5 AutomorphismGroup</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ AutomorphismGroup</code>( <var class="Arg">digraph</var>, <var class="Arg">vert_colours</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: A permutation group.</p>
<p>This operation computes the automorphism group of a vertex-coloured digraph. A vertex-coloured digraph can be specified by its underlying digraph <var class="Arg">digraph</var> and its colouring <var class="Arg">vert_colours</var>. Let <code class="code">n</code> be the number of vertices of <var class="Arg">digraph</var>. The colouring <var class="Arg">vert_colours</var> may have one of the following two forms:</p>
<ul>
<li><p>a list of <code class="code">n</code> integers, where <var class="Arg">vert_colours</var><code class="code">[i]</code> is the colour of vertex <code class="code">i</code>, using the colours <code class="code">[1 .. m]</code> for some <code class="code">m <= n</code>; or</p>
</li>
<li><p>a list of non-empty disjoint lists whose union is <code class="code">DigraphVertices(<var class="Arg">digraph</var>)</code>, such that <var class="Arg">vert_colours</var><code class="code">[i]</code> is the list of all vertices with colour <code class="code">i</code>.</p>
</li>
</ul>
<p>The <em>automorphism group</em> of a coloured digraph <var class="Arg">digraph</var> with colouring <var class="Arg">vert_colours</var> is the group consisting of its automorphisms; an <em>automorphism</em> of <var class="Arg">digraph</var> is an isomorphism of coloured digraphs from <var class="Arg">digraph</var> to itself. This group is equal to the subgroup of <code class="code">AutomorphismGroup(<var class="Arg">digraph</var>)</code> consisting of those automorphisms that preserve the colouring specified by <var class="Arg">vert_colours</var>. See <code class="func">AutomorphismGroup</code> (<a href="chap7.html#X858C32127A190175"><span class="RefLink">7.2-2</span></a>), and see <code class="func">IsomorphismDigraphs</code> (<a href="chap7.html#X7ED93C0F86D9D34F"><span class="RefLink">7.2-18</span></a>) for more information about isomorphisms of coloured digraphs.</p>
<p>If <var class="Arg">digraph</var> is not a multidigraph then the automorphism group is returned as a group of permutations on the set of vertices of <var class="Arg">digraph</var>.</p>
<p>If <var class="Arg">digraph</var> is a multidigraph then the automorphism group is returned as the direct product of a group of permutations on the set of vertices of <var class="Arg">digraph</var> with a group of permutations on the set of edges of <var class="Arg">digraph</var>. These groups can be accessed using <code class="func">Projection</code> (<a href="/home/runner/gap/doc/ref/chap32.html#X8769E8DA80BC96C1"><span class="RefLink">Reference: Projection for a domain and a positive integer</span></a>) on the returned group.</p>
<p>By default, the automorphism group is found using <span class="URL"><a href="http://www.tcs.tkk.fi/Software/bliss/">bliss</a></span> by Tommi Junttila and Petteri Kaski. If <span class="URL"><a href="https://github.com/gap-packages/NautyTracesInterface">NautyTracesInterface</a></span> is available, then <span class="URL"><a href="https://pallini.di.uniroma1.it">nauty</a></span> by Brendan Mckay and Adolfo Piperno can be used instead; see <code class="func">BlissAutomorphismGroup</code> (<a href="chap7.html#X7E7B0D88865A89F6"><span class="RefLink">7.2-3</span></a>), <code class="func">NautyAutomorphismGroup</code> (<a href="chap7.html#X857758B18144C0CD"><span class="RefLink">7.2-4</span></a>), <code class="func">DigraphsUseBliss</code> (<a href="chap7.html#X83E593F3855B122E"><span class="RefLink">7.2-1</span></a>), and <code class="func">DigraphsUseNauty</code> (<a href="chap7.html#X83E593F3855B122E"><span class="RefLink">7.2-1</span></a>).</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">cycle := CycleDigraph(9);</span>
<immutable cycle digraph with 9 vertices>
<span class="GAPprompt">gap></span> <span class="GAPinput">G := AutomorphismGroup(cycle);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsCyclic(G) and Size(G) = 9;</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">colours := [[1, 4, 7], [2, 5, 8], [3, 6, 9]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">H := AutomorphismGroup(cycle, colours);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">Size(H);</span>
3
<span class="GAPprompt">gap></span> <span class="GAPinput">H = AutomorphismGroup(cycle, [1, 2, 3, 1, 2, 3, 1, 2, 3]);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">H = SubgroupByProperty(G, p -> OnTuplesSets(colours, p) = colours);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">IsTrivial(AutomorphismGroup(cycle, [1, 1, 2, 2, 2, 2, 2, 2, 2]));</span>
true</pre></div>
<p><a id="X7DA2C4FE837FFE01" name="X7DA2C4FE837FFE01"></a></p>
<h5>7.2-6 AutomorphismGroup</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ AutomorphismGroup</code>( <var class="Arg">digraph</var>, <var class="Arg">vert_colours</var>, <var class="Arg">edge_colours</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: A permutation group.</p>
<p>This operation computes the automorphism group of a vertex- and/or edge-coloured digraph. A coloured digraph can be specified by its underlying digraph <var class="Arg">digraph</var> and colourings <var class="Arg">vert_colours</var>, <var class="Arg">edge_colours</var>. Let <code class="code">n</code> be the number of vertices of <var class="Arg">digraph</var>. The colourings must have the following forms:</p>
<ul>
<li><p><var class="Arg">vert_colours</var> must be <code class="keyw">fail</code> or a list of <code class="code">n</code> integers, where <var class="Arg">vert_colours</var><code class="code">[i]</code> is the colour of vertex <code class="code">i</code>, using the colours <code class="code">[1 .. m]</code> for some <code class="code">m <= n</code>;</p>
</li>
<li><p><var class="Arg">edge_colours</var> must be <code class="keyw">fail</code> or a list of <code class="code">n</code> lists of integers of the same shape as <code class="code">OutNeighbours(digraph)</code>, where <var class="Arg">edge_colours</var><code class="code">[i][j]</code> is the colour of the edge <code class="code">OutNeighbours(digraph)[i][j]</code>, using the colours <code class="code">[1 .. k]</code> for some <code class="code">k <= n</code>;</p>
</li>
</ul>
<p>Giving <var class="Arg">vert_colours</var> [<var class="Arg">edge_colours</var>] as <code class="code">fail</code> is equivalent to setting all vertices [edges] to be the same colour.</p>
<p>Unlike <code class="func">AutomorphismGroup</code> (<a href="chap7.html#X858C32127A190175"><span class="RefLink">7.2-2</span></a>), it is possible to obtain the automorphism group of an edge-coloured multidigraph (see <code class="func">IsMultiDigraph</code> (<a href="chap6.html#X7BB84CFC7E8B2B26"><span class="RefLink">6.2-11</span></a>)) when no two edges share the same source, range, and colour. The <em>automorphism group</em> of a vertex/edge-coloured digraph <var class="Arg">digraph</var> with colouring <var class="Arg">c</var> is the group consisting of its vertex/edge-colour preserving automorphisms; an <em>automorphism</em> of <var class="Arg">digraph</var> is an isomorphism of vertex/edge-coloured digraphs from <var class="Arg">digraph</var> to itself. This group is equal to the subgroup of <code class="code">AutomorphismGroup(<var class="Arg">digraph</var>)</code> consisting of those automorphisms that preserve the colouring specified by <var class="Arg">colours</var>. See <code class="func">AutomorphismGroup</code> (<a href="chap7.html#X858C32127A190175"><span class="RefLink">7.2-2</span></a>), and see <code class="func">IsomorphismDigraphs</code> (<a href="chap7.html#X7ED93C0F86D9D34F"><span class="RefLink">7.2-18</span></a>) for more information about isomorphisms of coloured digraphs.</p>
<p>If <var class="Arg">digraph</var> is not a multidigraph then the automorphism group is returned as a group of permutations on the set of vertices of <var class="Arg">digraph</var>.</p>
<p>If <var class="Arg">digraph</var> is a multidigraph then the automorphism group is returned as the direct product of a group of permutations on the set of vertices of <var class="Arg">digraph</var> with a group of permutations on the set of edges of <var class="Arg">digraph</var>. These groups can be accessed using <code class="func">Projection</code> (<a href="/home/runner/gap/doc/ref/chap32.html#X8769E8DA80BC96C1"><span class="RefLink">Reference: Projection for a domain and a positive integer</span></a>) on the returned group.</p>
<p>By default, the automorphism group is found using <span class="URL"><a href="http://www.tcs.tkk.fi/Software/bliss/">bliss</a></span> by Tommi Junttila and Petteri Kaski. If <span class="URL"><a href="https://github.com/gap-packages/NautyTracesInterface">NautyTracesInterface</a></span> is available, then <span class="URL"><a href="https://pallini.di.uniroma1.it">nauty</a></span> by Brendan Mckay and Adolfo Piperno can be used instead; see <code class="func">BlissAutomorphismGroup</code> (<a href="chap7.html#X7E7B0D88865A89F6"><span class="RefLink">7.2-3</span></a>), <code class="func">NautyAutomorphismGroup</code> (<a href="chap7.html#X857758B18144C0CD"><span class="RefLink">7.2-4</span></a>), <code class="func">DigraphsUseBliss</code> (<a href="chap7.html#X83E593F3855B122E"><span class="RefLink">7.2-1</span></a>), and <code class="func">DigraphsUseNauty</code> (<a href="chap7.html#X83E593F3855B122E"><span class="RefLink">7.2-1</span></a>).</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">cycle := CycleDigraph(12);</span>
<immutable cycle digraph with 12 vertices>
<span class="GAPprompt">gap></span> <span class="GAPinput">vert_colours := List([1 .. 12], x -> x mod 3 + 1);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">edge_colours := List([1 .. 12], x -> [x mod 2 + 1]);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">Size(AutomorphismGroup(cycle));</span>
12
<span class="GAPprompt">gap></span> <span class="GAPinput">Size(AutomorphismGroup(cycle, vert_colours));</span>
4
<span class="GAPprompt">gap></span> <span class="GAPinput">Size(AutomorphismGroup(cycle, fail, edge_colours));</span>
6
<span class="GAPprompt">gap></span> <span class="GAPinput">Size(AutomorphismGroup(cycle, vert_colours, edge_colours));</span>
2
<span class="GAPprompt">gap></span> <span class="GAPinput">IsTrivial(AutomorphismGroup(cycle,</span>
<span class="GAPprompt">></span> <span class="GAPinput">vert_colours, List([1 .. 12], x -> [x mod 4 + 1])));</span>
true
</pre></div>
<p><a id="X7D676FE67A6684FF" name="X7D676FE67A6684FF"></a></p>
<h5>7.2-7 BlissCanonicalLabelling</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ BlissCanonicalLabelling</code>( <var class="Arg">digraph</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ NautyCanonicalLabelling</code>( <var class="Arg">digraph</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>Returns: A permutation, or a list of two permutations.</p>
<p>A function <span class="SimpleMath">ρ</span> that maps a digraph to a digraph is a <em>canonical representative map</em> if the following two conditions hold for all digraphs <span class="SimpleMath">G</span> and <span class="SimpleMath">H</span>:</p>
<ul>
<li><p><span class="SimpleMath">ρ(G)</span> and <span class="SimpleMath">G</span> are isomorphic as digraphs; and</p>
</li>
<li><p><span class="SimpleMath">ρ(G)=ρ(H)</span> if and only if <span class="SimpleMath">G</span> and <span class="SimpleMath">H</span> are isomorphic as digraphs.</p>
</li>
</ul>
<p>A <em>canonical labelling</em> of a digraph <span class="SimpleMath">G</span> (under <span class="SimpleMath">ρ</span>) is an isomorphism of <span class="SimpleMath">G</span> onto its <em>canonical representative</em>, <span class="SimpleMath">ρ(G)</span>. See <code class="func">IsomorphismDigraphs</code> (<a href="chap7.html#X8219FE6C839D9457"><span class="RefLink">7.2-17</span></a>) for more information about isomorphisms of digraphs.</p>
<p><code class="code">BlissCanonicalLabelling</code> returns a canonical labelling of the digraph <var class="Arg">digraph</var> found using <span class="URL"><a href="http://www.tcs.tkk.fi/Software/bliss/">bliss</a></span> by Tommi Junttila and Petteri Kaski. <code class="code">NautyCanonicalLabelling</code> returns a canonical labelling of the digraph <var class="Arg">digraph</var> found using <span class="URL"><a href="https://pallini.di.uniroma1.it">nauty</a></span> by Brendan McKay and Adolfo Piperno. Note that the canonical labellings returned by <span class="URL"><a href="http://www.tcs.tkk.fi/Software/bliss/">bliss</a></span> and <span class="URL"><a href="https://pallini.di.uniroma1.it">nauty</a></span> are not usually the same (and may depend of the version used).</p>
<p><code class="code">BlissCanonicalLabelling</code> can only be computed if <var class="Arg">digraph</var> has no multiple edges; see <code class="func">IsMultiDigraph</code> (<a href="chap6.html#X7BB84CFC7E8B2B26"><span class="RefLink">6.2-11</span></a>).</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">digraph1 := DigraphFromDiSparse6String(".ImNS_AiB?qRN");</span>
<immutable digraph with 10 vertices, 8 edges>
<span class="GAPprompt">gap></span> <span class="GAPinput">BlissCanonicalLabelling(digraph1);</span>
(1,9,5,7)(3,6,4,10)
<span class="GAPprompt">gap></span> <span class="GAPinput">p := (1, 2, 7, 5)(3, 9)(6, 10, 8);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">digraph2 := OnDigraphs(digraph1, p);</span>
<immutable digraph with 10 vertices, 8 edges>
<span class="GAPprompt">gap></span> <span class="GAPinput">digraph1 = digraph2;</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">OnDigraphs(digraph1, BlissCanonicalLabelling(digraph1)) =</span>
<span class="GAPprompt">></span> <span class="GAPinput"> OnDigraphs(digraph2, BlissCanonicalLabelling(digraph2));</span>
true</pre></div>
<p><a id="X87DA265D803DB337" name="X87DA265D803DB337"></a></p>
<h5>7.2-8 BlissCanonicalLabelling</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ BlissCanonicalLabelling</code>( <var class="Arg">digraph</var>, <var class="Arg">colours</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ NautyCanonicalLabelling</code>( <var class="Arg">digraph</var>, <var class="Arg">colours</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: A permutation.</p>
<p>A function <span class="SimpleMath">ρ</span> that maps a coloured digraph to a coloured digraph is a <em>canonical representative map</em> if the following two conditions hold for all coloured digraphs < | | |