I have a $80\times 80$ matrix $A$ and a vector $P$ and I want to compute efficiently the following minimum $$ \min\{n\in \Bbb N :\|A^nP\|_\infty < 1\} $$ Then I defined my matrix and vector in mathematica with the following code
A = SparseArray[{{1, 30} -> 1/2, {i_, j_} /; i - j == 1 -> 1}, {80,
80}];
P = Table[8 10^9 2^(-80) Binomial[80, k], {k, 0, 79}]
and to compute the above minimum I tried the following code
Minimize[{
Norm[MatrixPower[A, n].P, Infinity] < 1, n ∈ Integers, n > 0
}, n]
I tried different versions of the above code using NMinimize
instead of Minimize
, or N@Norm
or Max
instead of just Norm
, but every time my computer stay calculating for more than five minutes without giving a result.
However using directly Norm
and MatrixPower
and different values for n
I get manually the result for $n=801$ in less than 30 seconds, so I assume there is a way to compute the above efficiently, and this is the reason why I had opened this question.
Someone knows some way to compute the above fast?
EDIT: the original question is above. I had wrote wrongly the code to find the minimum value of $n$ such that $\|A^nP\|_\infty <1$. However I dont know how to fix it. Can someone help me?
I tried the code
Minimize[{n, 0 < Max[MatrixPower[A, n].P] <= 1 && n > 0},
n ∈ Integers]
but it still stay in the computation for a long time, so I cancelled it.
Norm
expression becomes less than 1? Or, similarly, for the maximum value of $n$ for which it is above 1? $\endgroup$Abs[Norm[ ... ] - 1]
, something likeNMinimize[{Abs[Norm[ ... ] - 1], Element[n, Integers]}, n]
? In other words, you would be trying to minimize the "distance of the norm from 1". I cannot test it myself at the moment unfortunately. $\endgroup$