Thursday, July 4, 2024
HomeLanguagesPythonPython | sympy partitions.RGS_enum() method

Python | sympy partitions.RGS_enum() method

With the help of sympy.combinatorics.partitions.RGS_enum() method, we can get the total number unrestricted growth string of size m by using sympy.combinatorics.partitions.RGS_enum() method.

Syntax : sympy.combinatorics.partitions.RGS_enum(m)
Return : Return a total number of unrestricted growth string.

Example #1 :
In this example we can see that by using sympy.combinatorics.partitions.RGS_enum() method, we are able to get the total number of unrestricted growth string of size m.




# import sympy and RGS_generalized
from sympy.combinatorics.partitions import RGS_enum
from sympy import *
    
# Using sympy.combinatorics.partitions.RGS_enum() method
gfg = RGS_enum(5)
  
print(gfg)


Output :

52

Example #2 :




# import sympy and RGS_generalized
from sympy.combinatorics.partitions import RGS_enum
from sympy import *
    
# Using sympy.combinatorics.partitions.RGS_enum() method
gfg = RGS_enum(16)
  
print(gfg)


Output :

10480142147

Nicole Veronica Rubhabha
Nicole Veronica Rubhabha
A highly competent and organized individual DotNet developer with a track record of architecting and developing web client-server applications. Recognized as a personable, dedicated performer who demonstrates innovation, communication, and teamwork to ensure quality and timely project completion. Expertise in C#, ASP.Net, MVC, LINQ, EF 6, Web Services, SQL Server, MySql, Web development,
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments