What is the bug [closed]
asked 2016-05-03 00:04:11 -0500
This post is a wiki. Anyone with karma >750 is welcome to improve it.
I am writing this code in sage online worksheet given a tuple say $a=(a_1,a_2,...a_n)$ \phi be an permutation in S_n then \phi(a)= (a_\phi(1),...,a_\phi(n)) I want to count the number of permutation that fixes a The code is as follows
def Aut(tuple): c=1 for a in SymmetricGroup(len(tuple)): if a.action(tuple)== tuple : c=c+1