Mail Archives: djgpp/1998/01/26/10:15:28
Heutchy wrote:
> > 2^n, n!, n^3, n^2, nlog(n), n, log(n), 1.
>
> At the risk of sounding like an idiot, isn't n! worse than 2^n?
>
> n! = 1 * 2 * 3 * 4 * ... * n-1 * n
> 2^n = 2 * 2 * 2 * 2 * ... * 2 * 2
>
> So the n! grows much faster. n^n would be worse however. I don't know
> if there are any useful algorithms with O(n^n) though.
I dunno, I was working from memory . . . .
You're right, both by intuition, and by looking it up. You correctly
guessed that I confused 2^n with n^n.
So I stand (or sit) corrected.
n^n is the complexity of multiplication of hypermatrices of order n in n
dimensions. Sure, I do it all the time. Yeah, right!
--
Charles Krug, Jr.
- Raw text -