(self)
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
Compute the degree of transitivity of the group.
Compute the degree of transitivity of the group .
def transitivity_degree(self):
        """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

        """
        if self._transitivity_degree is None:
            n = self.degree
            G = self
            # if G is k-transitive, a tuple (a_0,..,a_k)
            # can be brought to (b_0,...,b_(k-1), b_k)
            # where b_0,...,b_(k-1) are fixed points;
            # consider the group G_k which stabilizes b_0,...,b_(k-1)
            # if G_k is transitive on the subset excluding b_0,...,b_(k-1)
            # then G is (k+1)-transitive
            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
def transitivity_degree ( self ) : if self . _transitivity_degree is None : n = self . degree G = self # if G is k-transitive, a tuple (a_0,..,a_k) # can be brought to (b_0,...,b_(k-1), b_k) # where b_0,...,b_(k-1) are fixed points; # consider the group G_k which stabilizes b_0,...,b_(k-1) # if G_k is transitive on the subset excluding b_0,...,b_(k-1) # then G is (k+1)-transitive 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