ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 27 Aug 2013 13:41:10 -0500Problem with GeneralDihedralGroup constructorhttp://ask.sagemath.org/question/10476/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)]`Tue, 27 Aug 2013 08:57:13 -0500http://ask.sagemath.org/question/10476/problem-with-generaldihedralgroup-constructor/Answer by tmonteil for <p>While exploring cayley graphs of generalized dihedral groups I get a wrong result if I use <code>GeneralDihedralGroup([n])</code> to create a simple dihedral group for some values on <code>n</code>, 6 and 10 for instance. Sage responds that it is isomorphic to <code>DihedralGroup(n)</code>, but the cayley graphs and group generators are not the same. Is it me or the system? <br/>
For example: </p>
<pre><code>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)]`
</code></pre>
http://ask.sagemath.org/question/10476/problem-with-generaldihedralgroup-constructor/?answer=15382#post-id-15382The 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).
Tue, 27 Aug 2013 09:45:19 -0500http://ask.sagemath.org/question/10476/problem-with-generaldihedralgroup-constructor/?answer=15382#post-id-15382Comment by vdelecroix for <p>The system is right!</p>
<p>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.</p>
<p>The method <code>.gens()</code> choses a particular set of generators. In the <code>.cayley_graph()</code> method, you can change this arbitrary choice by setting your own set of generators (type <code>gd.cayley_graph?</code> for more details).</p>
http://ask.sagemath.org/question/10476/problem-with-generaldihedralgroup-constructor/?comment=17121#post-id-17121@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 ;-)Tue, 27 Aug 2013 13:41:10 -0500http://ask.sagemath.org/question/10476/problem-with-generaldihedralgroup-constructor/?comment=17121#post-id-17121Comment by Questors for <p>The system is right!</p>
<p>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.</p>
<p>The method <code>.gens()</code> choses a particular set of generators. In the <code>.cayley_graph()</code> method, you can change this arbitrary choice by setting your own set of generators (type <code>gd.cayley_graph?</code> for more details).</p>
http://ask.sagemath.org/question/10476/problem-with-generaldihedralgroup-constructor/?comment=17122#post-id-17122Thank you, that was careless of me; I must remember to read more closely and remember what I read a few days ago!Tue, 27 Aug 2013 10:49:48 -0500http://ask.sagemath.org/question/10476/problem-with-generaldihedralgroup-constructor/?comment=17122#post-id-17122