Processing math: 100%
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

asked 5 years ago

Captcha gravatar image

How to draw a graph whose vertices are elements of permuation group

How to write the following program in SageMath:

Consider the Permutation Group S3.

The elements of S3 are e,(12),(13),(23),(123),(132).

I want to draw a graph G whose members are the elements of S3 and two vertices x,y are adjacent if and only if xyyx.

I am stuck in doing the following things:

  1. How to call the elements of S3 through a loop?
  2. How to draw the graph G ?

I can check whether they commute or not but I am stuck in the two things. Is there any way to write the code in SageMath?

As an example if I input S3 I want to get the following graph

$G=Graph({1:[2,3,4,5],2:[1,3,4,5],3:[1,2,4,5],4:[1,2,3],5:[1,2,3]})

Any help will be highly appreciated.

How to draw a graph whose vertices are elements of permuation group

How to write the following program in SageMath:

Consider the Permutation Group S3.

The elements of S3 are e,(12),(13),(23),(123),(132).

I want to draw a graph G whose members are the elements of S3 and two vertices x,y are adjacent if and only if xyyx.

I am stuck in doing the following things:

  1. How to call the elements of S3 through a loop?
  2. How to draw the graph G ?

I can check whether they commute or not but I am stuck in the two things. Is there any way to write the code in SageMath?

As an example if I input S3 I want to get the following graph

$G=Graph({1:[2,3,4,5],2:[1,3,4,5],3:[1,2,4,5],4:[1,2,3],5:[1,2,3]})G=Graph(1:[2,3,4,5],2:[1,3,4,5],3:[1,2,4,5],4:[1,2,3],5:[1,2,3])

Any help will be highly appreciated.

click to hide/show revision 3
None

updated 5 years ago

FrédéricC gravatar image

How to draw a graph whose vertices are elements of permuation group

How to write the following program in SageMath:

Consider the Permutation Group S3.

The elements of S3 are e,(12),(13),(23),(123),(132).

I want to draw a graph G whose members are the elements of S3 and two vertices x,y are adjacent if and only if xyyx.

I am stuck in doing the following things:

  1. How to call the elements of S3 through a loop?
  2. How to draw the graph G ?

I can check whether they commute or not but I am stuck in the two things. Is there any way to write the code in SageMath?

As an example if I input S3 I want to get the following graph

G=Graph(1:[2,3,4,5],2:[1,3,4,5],3:[1,2,4,5],4:[1,2,3],5:[1,2,3])

Any help will be highly appreciated.