Skip to content

IsAcyclicDigraph producing errors when digraph is not outputted first #900

Closed

Description

@joe-dw

The following function generates a digraph which is claimed to not be acyclic if it has not been printed to terminal.

StarDigraphReverse := function(n)
  return Digraph (Concatenation ([[2 .. n]], List([1 .. n-1], i -> [] ) ) );
end;

The issue is shown below

gap> IsAcyclicDigraph(StarDigraphReverse(3));
false
gap> StarDigraphReverse(3);
<immutable digraph with 3 vertices, 2 edges>
gap> IsAcyclicDigraph(last);
true

The issue appears to occur for all values of n at least 2.

Activity

  1. changed the title [-]IsAcyclicDigraph producing errors when digraph is not outputted first[/-] [+]`IsAcyclicDigraph` producing errors when digraph is not outputted first[/+] on Feb 25, 2026
  2. reiniscirpons commented on Feb 25, 2026

    @reiniscirpons
    Collaborator

    We tracked it down at the meeting, it seems the issue is the range constructor. Essentially culprit is the FuncIS_ACYCLIC_DIGRAPH function assuming that the underlying lists are all plain lists, and ranges are not like this.

    Minimal failing example:

    gap> IsAcyclicDigraph(Digraph([[2 .. 4], [], [], []]));
    false

    Should be fixed by #901 .

  3. reiniscirpons commented on Feb 28, 2026

    @reiniscirpons
    Collaborator

    Resolved by #901

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions