5 ms·
Huh? n-squared is an exponent
by tomc1985 6y ago
Huh? n-squared is an exponent
- connor4312 6y agoExponential refers to c^N. N^c is quadratic. Small visualization: https://www.onlinemathlearning.com/image-files/exponential-quadratic-linear.png https://www.onlinemathlearning.com/image-files/exponential-q...
- brokensegue 6y agowe call that "quadratic". exponential is when the exponent is variable. (unless I'm being whooshed)
- mabbo 6y agoNo, you're 100% correct. O(n^[number]) = polynomial, with O(n^2) being quadratic. O([a number]^n) = exponential. I guess the authors aren't big on CS fundamentals?
- tomc1985 6y agoIndeed. It's been a while since I've had to so much as think about big O notation and I forgot that quirk. To most folks "exponential" means n^2 or greater
- whycombagator 6y agoSure, but for something to be considered exponential running time it must be <some-constant>^n. So 2^n would be exponential. However, n^2 is instead quadratic. Quadratic time complexity is better than exponential. Here is a useful comparison of the rate of growth for various time complexities[0] [0] https://stackoverflow.com/a/34517541/3574076 https://stackoverflow.com/a/34517541/3574076
- dgb23 6y agoQuadratic in this specific case, or more generally: polynomial.
- toby 6y agon^0 is also an exponent. Do you consider constant time to be exponential growth?
- tomc1985 6y agoWhen family talks to me about covid spreading exponentially I am pretty sure they mean n times n, or n^2 Yes we all know the technical definitions with respect to software and algorithmic complexity. But the lack of sympathy/empathy on display with how a common definition of a word can be misconstrued by someone without an academic background in tech is kind of surprising (ok well maybe not so surprising but c'mon folks, we are all human)
- brokensegue 6y agodisease spread when modeled is actually exponential. https://en.wikipedia.org/wiki/Basic_reproduction_number#Estimation_methods https://en.wikipedia.org/wiki/Basic_reproduction_number#Esti...