Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # array with length n and m types
- import math
- def burnside_lemma(n, m):
- total = 0
- for k in range(n):
- total += m ** math.gcd(k, n)
- return total // n
- # Test the function with the example given (n = 4, m = 3)
- n = 4
- m = 3
- result = burnside_lemma(n, m)
- result
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement