# SymPy | Partition.RGS_enum () in Python

|

Bounded growth lines — a line where each character a i leads to the block (B i ) to which it belongs the corresponding element.

Syntax: sympy.combinatorics.partitions.Partition.RGS_enum ()

Return: total number of restricted growth strings, possible for a superset of size n.

Code # 1: Example RGS_enum ()

 ` # Python code explaining ` ` # SymPy.RGS_enum () `   ` # import SymPy libraries ` ` from ` ` sympy.combinatorics.partitions ` ` import ` ` Partition ` ` from ` ` sympy.combinatorics. partitions ` ` import ` ` RGS_enum ` ` `  ` # Using the sympy.combinatorics.partitions.Partition.RGS_enum () method ` ` p ` ` = ` ` RGS_enum (` ` 4 ` `) `   ` q ` ` = ` ` RGS_enum (` ` 9 ` `) `   ` print ` ` (` ` "no. of strings possible for size 4: "` `, p) ` ` print ` ` (` ` "no. of strings possible for size 9:" ` `, q) `

Output:

no. of strings possible for size 4: 15
no. of strings possible for size 9: 203

Code # 2: Example RGS_enum ()

 ` # Python code explaining ` ` # SymPy.RGS_enum () `   ` # import SymPy libraries ` ` from ` ` sympy.combinatorics.partitions ` ` import ` ` Partition ` ` from sympy.combinatorics.partitions import RGS_enum ``   # Using the sympy.combinatorics.partitions.Partition.RGS_enum () method p = RGS_enum ( 20 )   q = RGS_enum ( - 1 )   print ( "no. of strings possible for size 20 " , p) print ( "no. of strings possible for size -1:" , q) `

Output:

no. of strings possible for size 20 51724158235372
no. of strings possible for size -1: 0

## Shop Learn programming in R: courses

\$ Best Python online courses for 2022

\$ Best laptop for Fortnite

\$ Best laptop for Excel

\$ Best laptop for Solidworks

\$ Best laptop for Roblox

\$ Best computer for crypto mining

\$ Best laptop for Sims 4

\$

Latest questions

NUMPYNUMPY

psycopg2: insert multiple rows with one query

NUMPYNUMPY

How to convert Nonetype to int or string?

NUMPYNUMPY

How to specify multiple return types using type-hints

NUMPYNUMPY

Javascript Error: IPython is not defined in JupyterLab

## Wiki

Python OpenCV | cv2.putText () method

numpy.arctan2 () in Python

Python | os.path.realpath () method

Python OpenCV | cv2.circle () method

Python OpenCV cv2.cvtColor () method

Python - Move item to the end of the list

time.perf_counter () function in Python

Check if one list is a subset of another in Python

Python os.path.join () method