Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions gap/examples.gi
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,22 @@ InstallMethod(CompleteBipartiteDigraphCons,
[IsImmutableDigraph, IsPosInt, IsPosInt],
function(_, m, n)
local D, aut;

if Maximum(m, n) = 1 then
return CompleteDigraph(IsImmutableDigraph, 2);
fi;

D := MakeImmutable(CompleteBipartiteDigraph(IsMutableDigraph, m, n));
SetIsSymmetricDigraph(D, true);
SetDigraphNrEdges(D, 2 * m * n);
SetIsCompleteBipartiteDigraph(D, true);
if m = n then
aut := WreathProduct(SymmetricGroup(m), Group((1, 2)));
aut := WreathProduct(SymmetricGroup([1 .. m]), Group((1, m + 1)));
elif m = 1 then
aut := SymmetricGroup([2 .. n + 1]);
else
aut := DirectProduct(SymmetricGroup(m), SymmetricGroup(n));
aut := DirectProduct(SymmetricGroup([1 .. m]),
SymmetricGroup([m + 1 .. m + n]));
fi;
SetAutomorphismGroup(D, aut);
SetIsPlanarDigraph(D, m <= 2 or n <= 2);
Expand Down
27 changes: 27 additions & 0 deletions tst/testinstall.tst
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,33 @@ rec( comps := [ ], id := [ ] )
gap> IsConnectedDigraph(D);
true

# Issue #850: Problems with AutomorphismGroup for CompleteBipartiteDigraph
gap> D := CompleteBipartiteDigraph(1, 5);
<immutable complete bipartite digraph with bicomponent sizes 1 and 5>
gap> AutomorphismGroup(D) = SymmetricGroup([2 .. 6]);
true
gap> not DIGRAPHS_IsGrapeLoaded() or
> (DIGRAPHS_IsGrapeLoaded() and
> IsomorphismDigraphs(Digraph(Graph(D)), D) <> fail);
true
gap> not DIGRAPHS_IsGrapeLoaded() or
> (DIGRAPHS_IsGrapeLoaded() and
> OnDigraphs(D, IsomorphismDigraphs(Digraph(Graph(D)), D)) = D);
true
gap> D := CompleteBipartiteDigraph(5, 1);
<immutable complete bipartite digraph with bicomponent sizes 5 and 1>
gap> AutomorphismGroup(D) = SymmetricGroup([1 .. 5]);
true
gap> D := CompleteBipartiteDigraph(1, 1);
<immutable complete digraph with 2 vertices>
gap> AutomorphismGroup(D) = Group([(1, 2)]);
true
gap> D := CompleteBipartiteDigraph(3, 3);
<immutable complete bipartite digraph with bicomponents of size 3>
gap> AutomorphismGroup(D)
> = Group([(1, 2, 3), (1, 2), (4, 5, 6), (4, 5), (1, 4)(2, 5)(3, 6)]);
true

#
gap> DIGRAPHS_StopTest();
gap> STOP_TEST("Digraphs package: testinstall.tst", 0);
Loading