Frederic, your original vertex names are not lost: gap> VertexNames(graph); [ 1000 .. 1005 ]
Then you can do gap> List(Bicomponents(graph),t->List(t,y->VertexName(graph,y))); [ [ 1000, 1002, 1004 ], [ 1001, 1003, 1005 ] ] HTH, Dmitrii On 17 December 2012 20:18, Frederic Vanhove <fvanh...@cage.ugent.be> wrote: > Dear forum, > > I was considering graphs again, and I had another question about the > package GRAPE, in particular about the command "Bicomponents". > > If I first do: > > LoadPackage("grape"); > trivialaction := function(x,g) return x; end; > n:=6;s:=[1000..1000+n-1]; > graph:=Graph(Group(()), s, trivialaction, function(x,y) return (((x-y) > mod n) in [n-1,1]); end,true); > > then the output of the following code: > > Vertices(graph);Bicomponents(graph); > > is: > > [ 1 .. 6 ] > [ [ 1, 3, 5 ], [ 2, 4, 6 ] ] > > This is of course correct, but my original graph had vertices > [1000..1000+n-1], and I would like to have my bicomponents in terms of > those vertices. Is that possible? > > Thanks, > Frédéric > > _______________________________________________ > Forum mailing list > Forum@mail.gap-system.org > http://mail.gap-system.org/mailman/listinfo/forum CONFIDENTIALITY:This email is intended solely for the person(s) named and may be confidential and/or privileged.If you are not the intended recipient,please delete it,notify us and do not copy,use,or disclose its content. Towards A Sustainable Earth:Print Only When Necessary.Thank you. _______________________________________________ Forum mailing list Forum@mail.gap-system.org http://mail.gap-system.org/mailman/listinfo/forum