Watson Ladd on Wed, 20 Nov 2024 23:23:03 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: integral homology |
On Mon, Nov 18, 2024 at 1:02 AM John Cremona <john.cremona@gmail.com> wrote: > > Well, I no longer need an answer to my question since it turned out that in my specific application, the matrix A10 was so simply structured that I could simply replace all of steps 1-3 by a new preliminary step which just deleted certain rows from A21 without having to do the HNF or matrix inversion steps. > > It would still be nice to know if there is a better way to do the general case, For example, in the HNF computation of H and U from A10, I presume that a series of column operations are applied to A10, with U recording those operations; and then it would be easy to compute U^{-1} at the same time step by step, I think. In some of the examples I was having difficulty with where the dimensions n0, n1, n2 are 36,14219, and 24599, I was running out of memory even after setting PARISIZEMAX to 50000000000, i.e. 50G, and this occurred while in _ZM_inv_worker() so while inverting U. It doesn't seem that the matrix functions over Z have anything like this. Maybe matsolve per column, while less efficient, avoids lots of RAM as an intermediate. The other thing that occurs to me is that the group structure is going to be entirely determined by working in Zp for all p and over R. I don't know a bound off the top of my head for what p to consider, and working Zp might not actually speed anything up, but it could. Sincerely, Watson > > John > > On Fri, 15 Nov 2024 at 15:03, John Cremona <john.cremona@gmail.com> wrote: >> >> I am computing some integral homology in a C++ program using libpari, and while what I have works fine it is possible that there is a better (simpler or faster) way to do this, possibly even a built-in function which I have not found which does what I want more simply. >> >> I have Z-linear maps maps Z^n2 -> Z^n1 -> Z^n0 whose composite is 0 with integer matrices A10 (size n0 x n1) and A21 (size n1 x n2), so acting on column vectors on the right, and A10*A21=0. All I want is the abelian group structure of ker(A10)/im(A21). A rough sketch of what I do is this: >> >> 1. Find the HNF of A10, say H = A10*U with U in GL(n1,Z) representing a change of basis for the module in the middle. >> 2. Compute M = U^{-1}*A21, the new matrix of the second map. >> 3. Drop the last r rows of M, where r is the rank of H (also of A10). >> 4. Return the SNF of M. >> >> Is there a better way? >> >> John >> -- Astra mortemque praestare gradatim