Well, no matter how large your space is, I’m assuming you’re still going to need to specify initial conditions, so you must have a 100-dimensional initial vector somewhere. I’m going to use 5-dimensional examples to save space.
In[]:=
initialValues=RandomReal[{100,500},5];initialValues
Out[]=
{109.747,131.885,453.529,486.964,376.026}
We don’t want to hand-pick letters for the variable names, but we can certainly let Mathematica do that work for us. Let’s create a function for that so we’re not dependent on one exact dimension.
In[]:=
VariableNames[n_]:=Table[Subscript[x,i],{i,n}]
In[]:=
VariableNames[5]
Out[]=
{,,,,}
x
1
x
2
x
3
x
4
x
5
We want to generate an expression where each variable name gets applied to 0, and Through will do that.
In[]:=
Through[VariableNames[5][0]]
Out[]=
{[0],[0],[0],[0],[0]}
x
1
x
2
x
3
x
4
x
5
Then we want to create an Equal expression for each, and Thread will do that
In[]:=
Thread[Equal[Through[VariableNames[5][0]],initialValues]]
Out[]=
{[0]109.747,[0]131.885,[0]453.529,[0]486.964,[0]376.026}
x
1
x
2
x
3
x
4
x
5
Now we need our recurrence relation. With 100-dimensional data, I’m assuming that your relation can be put in a nice vector equation form, like your original question. We’ve already shown above how we can create such vector expressions.
Here’s the “next” vector.
In[]:=
Through[VariableNames[5][k+1]]
Out[]=
{[1+k],[1+k],[1+k],[1+k],[1+k]}
x
1
x
2
x
3
x
4
x
5
Here’s the recurrence formula.
In[]:=
With[{vec=Through[VariableNames[5][k]]},Outer[Plus,vec,vec].vec]
Out[]=
2[k]+[k]([k]+[k])+[k]([k]+[k])+[k]([k]+[k])+[k]([k]+[k]),2[k]+[k]([k]+[k])+[k]([k]+[k])+[k]([k]+[k])+[k]([k]+[k]),2[k]+[k]([k]+[k])+[k]([k]+[k])+[k]([k]+[k])+[k]([k]+[k]),2[k]+[k]([k]+[k])+[k]([k]+[k])+[k]([k]+[k])+[k]([k]+[k]),2[k]+[k]([k]+[k])+[k]([k]+[k])+[k]([k]+[k])+[k]([k]+[k])
2
x
1
x
2
x
1
x
2
x
3
x
1
x
3
x
4
x
1
x
4
x
5
x
1
x
5
2
x
2
x
1
x
1
x
2
x
3
x
2
x
3
x
4
x
2
x
4
x
5
x
2
x
5
2
x
3
x
1
x
1
x
3
x
2
x
2
x
3
x
4
x
3
x
4
x
5
x
3
x
5
2
x
4
x
1
x
1
x
4
x
2
x
2
x
4
x
3
x
3
x
4
x
5
x
4
x
5
2
x
5
x
1
x
1
x
5
x
2
x
2
x
5
x
3
x
3
x
5
x
4
x
4
x
5
Here we’ve put them together.
In[]:=
Thread[Equal[Through[VariableNames[5][k+1]],With[{vec=Through[VariableNames[5][k]]},Outer[Plus,vec,vec].vec]]]
Out[]=
[1+k]2[k]+[k]([k]+[k])+[k]([k]+[k])+[k]([k]+[k])+[k]([k]+[k]),[1+k]2[k]+[k]([k]+[k])+[k]([k]+[k])+[k]([k]+[k])+[k]([k]+[k]),[1+k]2[k]+[k]([k]+[k])+[k]([k]+[k])+[k]([k]+[k])+[k]([k]+[k]),[1+k]2[k]+[k]([k]+[k])+[k]([k]+[k])+[k]([k]+[k])+[k]([k]+[k]),[1+k]2[k]+[k]([k]+[k])+[k]([k]+[k])+[k]([k]+[k])+[k]([k]+[k])
x
1
2
x
1
x
2
x
1
x
2
x
3
x
1
x
3
x
4
x
1
x
4
x
5
x
1
x
5
x
2
2
x
2
x
1
x
1
x
2
x
3
x
2
x
3
x
4
x
2
x
4
x
5
x
2
x
5
x
3
2
x
3
x
1
x
1
x
3
x
2
x
2
x
3
x
4
x
3
x
4
x
5
x
3
x
5
x
4
2
x
4
x
1
x
1
x
4
x
2
x
2
x
4
x
3
x
3
x
4
x
5
x
4
x
5
x
5
2
x
5
x
1
x
1
x
5
x
2
x
2
x
5
x
3
x
3
x
5
x
4
x
4
x
5
Let’s bundle all of this into a function. Ideally, we could even pass your recurrence expression, but I’ll hard code it for now. I’m using these three arguments so that I don’t have to depend on “global” variables (but the actual recurrence function is hard-coded as I mentioned).
In[]:=
RecurrenceRelation[variables_,inits_,iter_]:=With[{length=Length@inits},With[{vector0=Through[variables[0]],vectorK=Through[variables[iter]],vectorNext=Through[variables[iter+1]]},With[{initialCondition=Thread[Equal[vector0,initialValues]],recurrenceRelation=Thread[Equal[vectorNext,Outer[Plus,vectorK,vectorK].vectorK]]},Join[initialCondition,recurrenceRelation]]]]
In[]:=
RecurrenceRelation[VariableNames[Length@initialValues],initialValues,k]
Out[]=
[0]109.747,[0]131.885,[0]453.529,[0]486.964,[0]376.026,[1+k]2[k]+[k]([k]+[k])+[k]([k]+[k])+[k]([k]+[k])+[k]([k]+[k]),[1+k]2[k]+[k]([k]+[k])+[k]([k]+[k])+[k]([k]+[k])+[k]([k]+[k]),[1+k]2[k]+[k]([k]+[k])+[k]([k]+[k])+[k]([k]+[k])+[k]([k]+[k]),[1+k]2[k]+[k]([k]+[k])+[k]([k]+[k])+[k]([k]+[k])+[k]([k]+[k]),[1+k]2[k]+[k]([k]+[k])+[k]([k]+[k])+[k]([k]+[k])+[k]([k]+[k])
x
1
x
2
x
3
x
4
x
5
x
1
2
x
1
x
2
x
1
x
2
x
3
x
1
x
3
x
4
x
1
x
4
x
5
x
1
x
5
x
2
2
x
2
x
1
x
1
x
2
x
3
x
2
x
3
x
4
x
2
x
4
x
5
x
2
x
5
x
3
2
x
3
x
1
x
1
x
3
x
2
x
2
x
3
x
4
x
3
x
4
x
5
x
3
x
5
x
4
2
x
4
x
1
x
1
x
4
x
2
x
2
x
4
x
3
x
3
x
4
x
5
x
4
x
5
x
5
2
x
5
x
1
x
1
x
5
x
2
x
2
x
5
x
3
x
3
x
5
x
4
x
4
x
5
The RecurrenceRelation function has no checks for whether the initial conditions are numeric, whether the iterator is a symbol or whether the two lists are the same length. Those would be reasonable (actually advisable) additions.
Now we can use RecurrenceTable.
In[]:=
With[{vars=VariableNames[Length@initialValues]},RecurrenceTable[RecurrenceRelation[vars,initialValues,k],vars,{k,0,9}]]
Out[]=
{{109.747,131.885,453.529,486.964,376.026},{784658.,819152.,1.32032×,1.37242×,1.19956×},{1.0665×,1.08546×,1.36091×,1.38954×,1.29453×},{1.43834×,1.45009×,1.62078×,1.63852×,1.57965×},{2.30931×,2.31839×,2.45029×,2.46401×,2.41851×},{5.62529×,5.63615×,5.79391×,5.81031×,5.7559×},{3.24874×,3.25185×,3.29701×,3.3017×,3.28613×},{1.069310001320860×,1.069819240881615×,1.077217869974060×,1.077986960151097×,1.075435092418044×},{1.150889982338371×,1.151163432227451×,1.155136325263651×,1.155549308935408×,1.154179014868862×},{1.328857656123514×,1.329015352433998×,1.331306487295532×,1.331544651595196×,1.330754414234711×}}
6
10
6
10
6
10
13
10
13
10
13
10
13
10
13
10
27
10
27
10
27
10
27
10
27
10
55
10
55
10
55
10
55
10
55
10
111
10
111
10
111
10
111
10
111
10
224
10
224
10
224
10
224
10
224
10
450
10
450
10
450
10
450
10
450
10
901
10
901
10
901
10
901
10
901
10
1803
10
1803
10
1803
10
1803
10
1803
10
It’s entirely possible I’ve made some error in putting this together, so you should check the results. But I think the general strategy is workable.
When you're doing this with 100 variables, I'd suggest you suppress the output. Assign things to variables and inspect those variables piece-by-piece. Or use Short. Or start with a smaller dimension to verify that it's working before jumping to 100.