Python | Sympy partitions.RGS_rank() method
Last Updated :
26 Aug, 2019
With the help of sympy.combinatorics.partitions.RGS_rank()
method, we can get the rank of the restricted growth string in sympy.combinatorics.partitions.RGS_rank()
method.
Syntax : sympy.combinatorics.partitions.RGS_rank()
Return : Return a rank of restricted growth string.
Example #1 :
In this example we can see that by using sympy.combinatorics.partitions.RGS_rank()
method, we are able to get the rank of restricted growth string.
from sympy.combinatorics.partitions import RGS_rank
from sympy import * x, y = symbols( 'x y' )
gfg = RGS_rank([ 1 , 2 , 5 , 4 , 2 , 10 ])
print (gfg)
|
Output :
697
Example #2 :
from sympy.combinatorics.partitions import RGS_rank
from sympy import * x, y = symbols( 'x y' )
gfg = RGS_rank([ 2 , 1 , 5 , 1 , 0 , 7 ])
print (gfg)
|
Output :
392
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...