What is the bug [closed]

asked 2016-05-03 07:04:11 +0200

this post is marked as community wiki

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

return c
edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by calc314
close date 2016-05-03 15:10:08.491832