|
-
November 26th, 2008, 04:03 AM
#7
Re: Computational Complexity
 Originally Posted by laserlight
That said, if an algorithm's complexity is in O(1) then it is also in O(n), but I presume that we are abusing big-O notation here as it is often abused to mean theta (or something like that, I have not taken my algorithms module in university yet, so I can claim ignorance  ).
You don't need to claim ignorance , the following is always true:
Code:
if f(n) = O(1) then f(n) = O(n)
The other direction is not true.
That said, it is customary to give the tighter bound, in this case it's O(1), but it is true that it is ALSO O(n).
Regards,
Zachm
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|