Computing Andrew's slog solution
#10
My graphing code had a few bugs in it, so I essentially started from scratch to clean it up. While doing so, I noticed some weird behavior in the matrix solver.

To start with, I was curious how the time to solve increased with n. Theoretically, if we double n, we'll get 4 times as many elements, and we have to perform twice as many row reductions. So we're already at n^3=8 times longer. Of course, with a larger matrix, the size of the operands increases (the bottom right corner contains n^(n-1)). Looking solely at the bottom right element, the size of operands (in bits) increases as n*log(n). Additions and subtractions will therefore take n*log(n) times longer. However, multiplications take even longer. Depending on the math library, they can take up to n^2 time, though n^1.5 or n*log(n) is possible. I'm not sure what SAGE uses. And if it's n^2, then it's really (n*log(n))^2, because the operand size is n*log(n). Anyway, I was hoping SAGE's library was at least n^1.5, if not faster.

Stringing it all together, I was expecting something in the ballpark of O(n^4.5) time. Interestingly, it looks like it's at least O(n^5), possibly slightly more.

But even more interestingly, for n approximately 10+45*k, e.g., 55, 100, 145, 190, 235, etc., the solve time suddenly jumps by a significant amount. Increasing n by 1 might suddenly make the solve time increase by 30-40%.

I was so perplexed the first time I noticed this that I spent several hours playing around with it, trying to figure out the pattern. I'm still not sure if this is an artifact of SAGE internals, or if it's a property of the matrix method itself. Andrew found repetitive ratios every 7th term, if I recall correctly, so perhaps there's another pattern every 44th or 45th term.

So I graphed the fifth root of the solve times (because a linear graph would mean O(n^5) solve time). Here's what I got:

   

Notice the jump at roughly evenly spaced intervals. There aren't any jumps beyond 280 because the solve times were too long to try to verify that the jumps continue regularly.

Now, here's a detailed graph of each data point. There are gaps when I heuristically determined it wouldn't be interesting. In the transition ranges, I ran every value of n, up to 10 times to ensure stable times for comparisons.

   

The first thing to notice is the chaotic nature. Near the transition points (55, 100, 145, 189, etc.), the time might increase by 30% by adding a term, then decrease 15% by adding another term. I ran multiple tests, so it wasn't just a random effect of processor load or whatever.
~ Jay Daniel Fox
Reply


Messages In This Thread
Computing Andrew's slog solution - by jaydfox - 08/21/2007, 04:27 PM
RE: Computing Andrew's slog solution - by jaydfox - 08/21/2007, 04:41 PM
RE: Computing Andrew's slog solution - by jaydfox - 08/22/2007, 04:27 AM
RE: Computing Andrew's slog solution - by jaydfox - 08/22/2007, 10:41 AM
RE: Computing Andrew's slog solution - by jaydfox - 08/22/2007, 04:00 PM
RE: Computing Andrew's slog solution - by jaydfox - 08/22/2007, 04:06 PM
RE: Computing Andrew's slog solution - by jaydfox - 08/23/2007, 07:27 AM
RE: Computing Andrew's slog solution - by jaydfox - 08/23/2007, 04:43 PM
RE: Computing Andrew's slog solution - by jaydfox - 08/23/2007, 04:47 PM
RE: Computing Andrew's slog solution - by jaydfox - 08/24/2007, 07:07 AM
RE: Computing Andrew's slog solution - by jaydfox - 08/24/2007, 07:48 AM
RE: Computing Andrew's slog solution - by jaydfox - 08/24/2007, 03:20 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question Computing Kneser's Super Logarithm and its Analytic Continuation Catullus 2 5,954 07/10/2022, 04:04 AM
Last Post: Catullus
Question Computing Integer Tetrations Catullus 5 9,060 06/10/2022, 10:59 PM
Last Post: JmsNxn
  Revisting my accelerated slog solution using Abel matrix inversion jaydfox 22 68,934 05/16/2021, 11:51 AM
Last Post: Gottfried
  A note on computation of the slog Gottfried 6 26,208 07/12/2010, 10:24 AM
Last Post: Gottfried
  Improving convergence of Andrew's slog jaydfox 19 67,807 07/02/2010, 06:59 AM
Last Post: bo198214
  intuitive slog base sqrt(2) developed between 2 and 4 bo198214 1 10,116 09/10/2009, 06:47 PM
Last Post: bo198214
  SAGE code for computing flow matrix for exp(z)-1 jaydfox 4 22,182 08/21/2009, 05:32 PM
Last Post: jaydfox
  computing teh last digits without computing the number deepinlife 3 14,644 02/24/2009, 09:09 AM
Last Post: deepinlife
  sexp and slog at a microcalculator Kouznetsov 0 7,270 01/08/2009, 08:51 AM
Last Post: Kouznetsov
  Convergence of matrix solution for base e jaydfox 6 23,032 12/18/2007, 12:14 AM
Last Post: jaydfox



Users browsing this thread: 1 Guest(s)