Python之生成二面体群元素

from sympy.combinatorics.named_groups import DihedralGroup
from collections import Counter  

n = 12
G = DihedralGroup(n)
a = list(G.generate_dimino())
for perm in a:
    ks = []

    for k in perm.cyclic_form:
        ks.append(len(k))
    c = Counter(ks)
    print ks,c

 

posted @ 2018-05-05 10:50  Shiyu_Huang  阅读(556)  评论(0编辑  收藏  举报