How to calculate the computational complexity
54 views (last 30 days)
Show older comments
Muhammad Ali Qadar
on 30 Nov 2013
Commented: Ge Shi
on 14 Aug 2020
hi,
I am segmenting images using region growing, Otsu methods, Fuzzy c mean methods, I wondering that how can i calculate the computational complexity of these methods? and how I can categorize in terms of performance using computational complexity? I have seen many links talking about complexity like O(n), O(n^2) Whats the difference and How I can know the complexity for my above listed methods.
Please Suggest !
1 Comment
VELAMMAL SORIMUTHU PILLAI
on 18 Feb 2020
Edited: VELAMMAL SORIMUTHU PILLAI
on 18 Feb 2020
Hello
https://in.mathworks.com/matlabcentral/fileexchange/43707-computational-complexity
Refer This Link. It may help you!!
Accepted Answer
More Answers (2)
Walter Roberson
on 3 Dec 2013
There is no mechanical way to calculate computational complexity.
You should refer to papers for the complexity analysis. See for example http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.219.4060&rep=rep1&type=pdf
2 Comments
Walter Roberson
on 4 Dec 2013
See also any of the foundational books by Aho and Ullman, including http://infolab.stanford.edu/~ullman/focs/ch03.pdf
Sean
on 25 Mar 2014
I too am interested in calculating the computational complexity of a sequence of code executed in Matlab as I wish to do protyping in Matlab and then transfer it to embedded.
Ideally, the number of floating point operations or mathematical operations would be helpful.
Does Matlab have a feature such as this?
S
1 Comment
Walter Roberson
on 25 Mar 2014
No, it is not possible to calculate in general.
There are some quite simple code sequences that no-one has been able to find the computational complexity of despite many many people trying. See for example the Colatz Conjecture.
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!