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
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
转载于:https://www.cnblogs.com/huangshiyu13/p/8994002.html