There is a tool to see the algorithms complexity?

Started by
3 comments, last by daviangel 14 years, 5 months ago
hello, i want to know if there is a program that indicate you the complexity of a algorirhms. Thanks a lot for any reply!
Advertisement
O(n) complexity?

I don't think it's possible/viable, considering that exact bounds don't exist even for some sorting algorithms.
Further, it isn't really necessary. With a little practise you can just judge the typical cases by eye, and the calculations aren't that bad even for the trickier cases (i.e. recursion).

I would suggest picking up a textbook on algorithms - they usually explain the math behind algorithmic complexity in some detail.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

FWIW, the problem is undecidable in the general case: Rice's Theorem states that for any "non-trivial" property, there does not exist an algorithm that decides whether an arbitrary program has that property.
Sounds almost like the Halting Problem.
So I'd guess No.
[size="2"]Don't talk about writing games, don't write design docs, don't spend your time on web boards. Sit in your house write 20 games when you complete them you will either want to do it the rest of your life or not * Andre Lamothe

This topic is closed to new replies.

Advertisement