SymPy | Permutation.max() in Python Last Updated : 27 Aug, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report Permutation.max() : max() is a sympy Python library function that returns the maximum value in the permutation. Syntax : sympy.combinatorics.permutations.Permutation.max() Return : maximum value in the permutation. Code #1 : max() Example Python3 1=1 # Python code explaining # SymPy.Permutation.max() # importing SymPy libraries from sympy.combinatorics.partitions import Partition from sympy.combinatorics.permutations import Permutation # Using from sympy.combinatorics.permutations.Permutation.max() method # creating Permutation a = Permutation([[2, 0], [3, 1]]) b = Permutation([1, 3, 5, 4, 2, 0]) print ("Permutation a - max form : ", a.max()) print ("Permutation b - max form : ", b.max()) Output : Permutation a - max form : 3 Permutation b - max form : 5 Code #2 : max() Example - 2D Permutation Python3 1=1 # Python code explaining # SymPy.Permutation.max() # importing SymPy libraries from sympy.combinatorics.partitions import Partition from sympy.combinatorics.permutations import Permutation # Using from sympy.combinatorics.permutations.Permutation.max() method # creating Permutation a = Permutation([[2, 4, 0], [3, 1, 2], [1, 5, 6]]) print ("Permutation a - max form : ", a.max()) Output : Permutation a - max form : 6 Comment More infoAdvertise with us Next Article SymPy | Permutation.max() in Python N noobestars101 Follow Improve Article Tags : Python SymPy Practice Tags : python Similar Reads SymPy | Permutation.min() in Python Permutation.min() : min() is a sympy Python library function that returns the minimum value in the permutation. Syntax : sympy.combinatorics.permutations.Permutation.min() Return : minimum value in the permutation Code #1 : min() Example Python3 1=1 # Python code explaining # SymPy.Permutation.min() 1 min read SymPy | Permutation.list() in Python Permutation.list() : list() is a sympy Python library function that returns the permutation as an explicit list, possibly trimming unmoved elements if size is less than the maximum element in the permutation. Syntax : sympy.combinatorics.permutations.Permutation.list() Return : permutation as an exp 2 min read SymPy | Permutation.parity() in Python Permutation.parity() : parity() is a sympy Python library function that returns the parity of the permutation. It means the parity of the number of inversions in the permutation. Syntax : sympy.combinatorics.permutations.Permutation.parity() Return : next permutation in lexicographical parity Code # 1 min read SymPy | Permutation.order() in Python Permutation.order() : order() is a sympy Python library function that calculates the order of a permutation. When the permutation is raised to the power of its order, then, in that case, the order equals the identity permutation. Syntax : sympy.combinatorics.permutations.Permutation.order() Return : 1 min read SymPy | Permutation.next_lex() in Python Permutation.next_lex() : next_lex() is a sympy Python library function that returns the next permutation in lexicographical order and if in case the self is the last permutation in lexicographical order it returns None. Syntax : sympy.combinatorics.permutations.Permutation.next_lex() Return : next p 1 min read Like