'Compute the degree of transitivity of the group.
A permutation group `G` acting on `\Omega = \{0, 1, ..., n-1\}` is
``k``-fold transitive, if, for any k points
`(a_1, a_2, ..., a_k)\in\Omega` and any k points
`(b_1, b_2, ..., b_k)\in\Omega` there exists `g\in G` such that
`g(a_1)=b_1, g(a_2)=b_2, ..., g(a_k)=b_k`
The degree of transitivity of `G` is the maximum ``k`` such that
`G` is ``k``-fold transitive. ([8])
Examples
>>> from sympy.combinatorics.perm_groups import PermutationGroup
>>> from sympy.combinatorics.permutations import Permutation
>>> a = Permutation([1, 2, 0])
>>> b = Permutation([1, 0, 2])
>>> G = PermutationGroup([a, b])
>>> G.transitivity_degree
3
See Also
is_transitive, orbit'

@property
def transitivity_degree(self):

    if (self._transitivity_degree is None):
        n = self.degree
        G = self
        for i in range(n):
            orb = G.orbit(i)
            if (len(orb) != (n - i)):
                self._transitivity_degree = i
                return i
            G = G.stabilizer(i)
        self._transitivity_degree = n
        return n
    else:
        return self._transitivity_degree
