0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Pythonその4Advent Calendar 2020

Day 1

Python de 対称群

Last updated at Posted at 2020-12-17

#Python 3次対称群

プログラムはデフォルトだと0から数え始めるので,普段使う1からの表示にする関数を作った.

from sympy.combinatorics import *
from sympy import *
init_printing(pretty_print=False)

SymmetricGroup(3)[1]
#Permutation(2)(0, 1)
n = 3
def plusone(x):
    X = tuple([0])
    for i in range(n):
        a = tuple([tuple(x)[i] + 1])
        X = X + a
    return Permutation(tuple(X))
plusone(SymmetricGroup(3)[1])
#Permutation(3)(1, 2)

目標は5次対称群の積表.

次の記事:
Python de 対称群 2 - Qiita

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?