Skip to content

Commit

Permalink
fixed bug pointed out by LarsLouder
Browse files Browse the repository at this point in the history
  • Loading branch information
ManuelAFDelgado committed Jun 24, 2021
1 parent 6594ac0 commit d645965
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions gap/foldings.gi
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,14 @@ InstallGlobalFunction(FlowerAutomaton, function(L)
AddSet(T[p][q], q-1);
fi;
od;
p := Position(alph, g[Length(g)]);
if p <= n then
AddSet(T[p][q],1);
else
p := p - n;
AddSet(T[p][1], q);
if Length(g) > 1 then
p := Position(alph, g[Length(g)]);
if p <= n then
AddSet(T[p][q],1);
else
p := p - n;
AddSet(T[p][1], q);
fi;
fi;
od;

Expand Down

1 comment on commit d645965

@ManuelAFDelgado
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From Lars' email:
I'm using GAP 4.11.0, with automata 1.14, which I think is current. The command
FlowerAutomaton([2, "aa", "b"]);
produces an automaton with the wrong underlying graph.

Please sign in to comment.