in reply to Re^3: Algorithm complexity
in thread Algorithm complexity

Well it's only approximation and as I said implies waiting for "enough" time. I doubt that waiting for weeks is considered practicable for a reasonable accuracy of the numerical calculations! (since these calculations rely on leveraging effects of multiple runs 8 )

(OTOH the sheer fact that you have to wait too long already gives you information that the tested algorithm might not be what you wanted).

But you're right, worst case complexity is far less practicable, because this implies checking _all_ cases. And worst case is what you normally want to be expressed by the Landau symbol.

Cheers Rolf

Replies are listed 'Best First'.
Re^5: Algorithm complexity
by spx2 (Deacon) on Jul 08, 2009 at 09:56 UTC
    I think there are many problems which we don't have efficient algorithms for. There are even some problems to which the known algorithms take so much time that it would be almost impossible for you to get the data needed to plot it and then use numerical methods. One such example are Wiefrich primes for which only 1 pair is known to this date. Can you apply your numerical methods to 1 point on a chart ?
      Lets suppose a brute-force algorithm testing all numbers up to n. (don't wanna complicate it by restricting it to primes)

      After a week and testing 10^x numbers you'll get 2 correct Wieferich primes and the information that calculating a third prime bigger than 10^x takes at least 10^x steps.

      That's an empiric lower bound for the complexity, you can tell that this brute-force approach is at best O(n) for n<10^x, which is quite accurate!

      OK, this example is a little bit too trivial, since it's a decision problem.

      You actually have 10^x points and not only 2 !

      Cheers Rolf

        no you don't . since 1940 until 2005 they have only been able to check all pairs up to 1.25 x 10^15 and it turned out there was only one pair of such numbers . please notice that it took 65 years and they did not find another one , so it's not a matter of weeks/months .. it's almost 7 decades.