How to obtain a huge amount of data solved in FrobeniusSolve more systematically?
I am interested in obtaining these two sets of data from FrobeniusSolve:
sol = FrobeniusSolve[Table[1, {i,1,36}], 8] -- (command 1)
and
sol = FrobeniusSolve[Table[1, {i,1,70}], 16] -- (command 2)
But running either of each of these two commands -- I run out of memory and the Mathematica quit its kernel after 3 days or so.
Question: Do you have any way to obtain such a data sol defined above?
What I can do at my best is running
sol = FrobeniusSolve[Table[1, {i,1,20}], 8] -- (command 0)
using Timing[sol = FrobeniusSolve[Table[i, {i,1,20}], 8];]
It shows {508.029, Null} that it costs 508.029 secs, about 8 minutes 20 secs.
For given n and b, I know the meaning of
FrobeniusSolve[Table[1, {i,1,n}], b]
means that solving the set of all possible equations of the Frobenius equation $$ x_1+\dots+x_n=b,$$ where the coefficients all are positive integer 1, while $b$ is an integer, and a solution $$(x_1, \dots, x_n)$$ must consist of non-negative integers, i.e. $$ x_j \in \mathbb{N} $$ as Natural numbers. See https://mathoverflow.net/q/352331/27004
It turns out that the number of solutions $f(n,b)$ is given by
$$ f(n,b)= \binom{b+n-1}{n-1}. $$
So (command 0), (command 1) and (command 2) requires these numbers of solutions: $$ f(n=20,b=8)= \binom{8+20-1}{20-1}=2220075. $$ $$ f(n=36,b=8)= \binom{8+36-1}{36-1}=145008513. $$ $$ f(n=70,b=16)= \binom{16+70-1}{70-1}=78682166288559225. $$ So the rough estimation of time to run (command 1) in my computer is: $$ f(n=36,b=8)/f(n=20,b=8) \times 500 sec \simeq 65 \times 500 sec. $$ The rough estimation of time to run (command 2) in my computer is: $$ f(n=70,b=16)/f(n=20,b=8) \times 500 sec \simeq 3.5 \times 10^{10} \times 500 sec. $$ These are literally impossible! (Using a Laptop.)
- Are there any simple ways to obtain these data of (command 1) and (command 2) easily? (perhaps without running the commands?) It is also possible to simplify the math equations by reiteration, etc.
See the math: (https://mathoverflow.net/q/352331/27004)
NOTE add: To @yarchik (see comments), NO, I do not just need the number of solutions. I need the long strings of such data as sol above. I need the sol as the basis/bases for solving some nonlinear algebraic equations.
FrobeniusSolveis not needed. You can just apply the generating formula from MO. – yarchik Feb 18 '20 at 07:26FrobeniusSolve? There are two posts I could point out as analogous (at least in certain aspects): Finding the number of solutions to a diophantine equation and Finding long strings of identical digits in transcendental numbers – Artes Feb 18 '20 at 12:31