Ask Your Question

popoti9's profile - activity

2019-06-20 00:37:38 +0200 received badge  Nice Question (source)
2019-06-20 00:37:23 +0200 received badge  Teacher (source)
2019-06-20 00:37:23 +0200 received badge  Self-Learner (source)
2019-06-20 00:15:36 +0200 commented answer Inverting matrix after Cholesky decomposition does not finish for "large" dimension

I cannot accept my answer, unfortunately (not enough points)

2019-06-20 00:15:01 +0200 answered a question Inverting matrix after Cholesky decomposition does not finish for "large" dimension

So, I found the problem.

In fact,

N.parent() == Full MatrixSpace of 30 by 30 dense matrices over Algebraic Real Field

since this has infinite precision, the computation takes forever.

This is solved, and the computation is almost instant (as expected), by using finite precision, i.e.

Ni = N.n().inverse()

Maybe this'll help someone.

Cheers! : )

2019-06-17 17:38:24 +0200 received badge  Student (source)
2019-06-16 00:40:19 +0200 asked a question Inverting matrix after Cholesky decomposition does not finish for "large" dimension

I'm trying to invert the cholesky decomposition of a matrix. While this works for small a, for around a=~30, it no longer finishes.

From the _print_, I know that the problem is in the last line.

This seems a very odd behavior, as like matrix inversion would blow exponentially, which is not true, but even if it was it shouldn't go from taking 10s to finish to not finishing at all. Moreover, since the matrix N is triangular, shouldn't it even be faster to compute the inverse matrix?

I am very puzzled about this, sorry...

a = 30
M = random_matrix(ZZ, a, x = -a, y = a)
M = M.T * M
N = M.inverse().cholesky()
print "choleskied"
Ni = N.inverse()

Thanks for the help!

2019-06-16 00:40:18 +0200 asked a question Inverting a matrix after cholesky decomposition does not finish for 30x30 matrix

I have the following code. It works quite fast from a=2 until a=30 (or around there a=25~30), but then it does not finish.

From the _print_, I know the problem is in the last line N.inverse().

This behavior looks very odd, as it stops working as if matrix inversion would take exponential time, and even then it did, the algorithm shouldn't change from taking 10s to not stopping from adding 1 dimension to the matrix.

Moreover, since N is a triangular matrix, shouldn't the computation of the inverse be quite fast?

a = 30
M = random_matrix(ZZ, a, x = -a, y = a)
M = M.T * M
N = M.inverse().cholesky()
print "choleskied"
Ni = N.inverse()

Thanks for the help !