-
June 13th, 2008, 04:12 PM
#16
Re: matrix algorithm
The above comments are all 100% correct.
MY point simply is that too many people thing that
O(1) <= O(n) <= O(nLogn) < O(n^2) < O(n^3)
This in fact has NO actual basis in fact. I have seen many O(n^2) that are so much simpler than an O(nLogn) that for all reasonable values of n, the higher order of complexity is much faster.
Yet people persist in making comments about "efficiency" in terms of "big-O".
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
June 14th, 2008, 02:04 AM
#17
Re: matrix algorithm
Originally Posted by kiuhnm
Neither of you noticed that if n<m that kind of matrix cannot exist ;-)
Right...
"Programs must be written for people to read, and only incidentally for machines to execute."
-
June 14th, 2008, 05:04 AM
#18
Re: matrix algorithm
Originally Posted by TheCPUWizard
The above comments are all 100% correct.
MY point simply is that too many people thing that
O(1) <= O(n) <= O(nLogn) < O(n^2) < O(n^3)
This in fact has NO actual basis in fact. I have seen many O(n^2) that are so much simpler than an O(nLogn) that for all reasonable values of n, the higher order of complexity is much faster.
Yet people persist in making comments about "efficiency" in terms of "big-O".
Agreed.
But note that "O(1) <= O(n)" is true by definition (if n->inf). You can't say it's false.
To be consistent, you should get rid of the big-O notation and use something else.
-
June 14th, 2008, 07:36 AM
#19
Re: matrix algorithm
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
June 16th, 2008, 07:01 AM
#20
Re: matrix algorithm
And nobody is disputing that constant factors can make a huge difference when considering an algorithm, depending of course on the size of the data set. However, when discussing algorithms in general and talking about their asymptotic behavior nobody gives a crap about the 'a'.
In real world practice: yes you need to consider the size of the data set and the actual run time. Nobody was saying that the 'a' didn't matter in the real world.
You are getting all worked up about this. Did you have a hard time in your algorithms class at school? Did you hate the fact that most of it was theorhetical?
Personally it pissed me off at first. I would tell the teacher 'why the f*ck don't we care about the constant factor, it matters!!!'. And I was right, we just didn't cover that aspect of algorithm analysis until the second semester
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
|