I have a piece of code which finds all triangulations of a convex polygon. It is known that a number of such triangulations for a given $n$-gon is is given by ($n-2$)th Catalan Number, so for instance, for a pentagon, there are 5 triangulations:
CatalanNumber[3]
5
So, for instance, if I try to find all the triangulations of a 15-gon and there 742900 of them, everything is fine. It takes about 3 minutes to find them but it works. But, for instance, if I try to do it for a 20-gon (there are 477638700 triangulations), it will run for about 20 minutes before it stops. It stops, with no errors, but when I try to look at the list of triangulations there is nothing there, it appears that the notebook restarted(?) itself. Is that a memory issue? Can that be handled in Mathematica? What if I wanted to find all triangulations of a 100-gon (there are 57743358069601357782187700608042856334020731624756611000 such triangulations)?? What would be the biggest issue there? Memory? Storage?
UnitConvert[ N@Quantity[57743358069601357782187700608042856334020731624756611000, "Bits"], "Gigabytes" ]
memory. That is about7 10^45
Gigabytes. Out of reach. $\endgroup$