# Problem with GeneralDihedralGroup constructor

While exploring cayley graphs of generalized dihedral groups I get a wrong result if I use GeneralDihedralGroup([n]) to create a simple dihedral group for some values on n, 6 and 10 for instance. Sage responds that it is isomorphic to DihedralGroup(n), but the cayley graphs and group generators are not the same. Is it me or the system?
For example:

sage:  gd=GeneralDihedralGroup([10])
sage:  CGD10=Graph(gd.cayley_graph())
sage: CGD10.diameter()
4
sage:  CGD10.degree()
[4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4]
sage:  dih10=DihedralGroup(10)
sage: sage: Cdih10=Graph(dih10.cayley_graph())
sage: Cdih10.diameter()
6
sage: Cdih10.degree()
[3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]
sage: gd.is_isomorphic(DihedralGroup(10))
True
sage: dih10.gens()
[(1,2,3,4,5,6,7,8,9,10), (1,10)(2,9)(3,8)(4,7)(5,6)]
sage: gd.gens()
[(4,7)(5,6), (3,4,5,6,7), (1,2)]

edit retag close merge delete

Sort by ยป oldest newest most voted

The system is right!

The Cayley graph (and its diameter) depends not only of the group but also on a set of generators, and a group usually has more than one sets of generators. For example, if you consider the group of integers modulo 6 (with the addition), then both {1} and {2,3} are sets of generators, leading to different Cayley graphs.

The method .gens() choses a particular set of generators. In the .cayley_graph() method, you can change this arbitrary choice by setting your own set of generators (type gd.cayley_graph?` for more details).

more

Thank you, that was careless of me; I must remember to read more closely and remember what I read a few days ago!

( 2013-08-27 10:49:48 -0500 )edit
1

@Questors if you are happy with the answer of tmonteil you should select it as a good answer (button on the left of the answer). That way the question will be seen as answered and tmonteil will win some karma ;-)

( 2013-08-27 13:41:10 -0500 )edit