News for hackers. Stuff that matters.
Re:Calculating integer factorials in constant time, taking a... by evanpw on Tuesday December 15, 2015 @06:04PM (#10741130)
> Making those diverge is intentional obfuscation.

It's not obfuscation, it's literally the definition.

I'm not saying that the algorithm in question is practical, but asymptotic complexity has a precise mathematical definition, so it's totally possible for an algorithm with "good" time complexity to be so complicated or have such a huge constant that it's impossible to use (see [1] and [2] for some examples).

It's also totally legitimate to give a constraint on additional memory size, so that this algorithm is disallowed altogether (which is probably the right answer), or change the problem so that the word size varies with the list length, but it's not legitimate to just say that the algorithm isn't linear time because the constant is too big.

[1] http://cstheory.stackexchange.com/questions/4491/powerful-al...

[2] https://rjlipton.wordpress.com/2010/10/23/galactic-algorithm...

Re:Calculating integer factorials in constant time, taking a... by Dylan16807 on Tuesday December 15, 2015 @06:22PM (#10741222)
The definition talks about what happens for extremely large numbers.

It does not talk about smaller numbers at all.

If you use an algorithm and complexity that are close for both moderately large numbers and extremely large numbers, you've done a good job.

If you introduce dumb things like constants that are larger than the known universe, you are performing obfuscation.

The suggested algorithm is linear, but only when applied to a very specific interpretation of the problem. I'm disagreeing with that interpretation of the problem, not the conclusion that it's linear within that particular interpretation.