Unfortunately there is this problem called the Halting problem.
Unfortunately there is this problem called the Halting problem...
1 To make things perhaps a bit clearer, this means the proposed tool is impossible, not just infeasible. – David Thornley Mar 11 '09 at 19:11.
No, this isn't possible, due to the halting problem. If you'd like to do this to improve your applications, you might consider profiling instead. It would allow you to pin-point what is actually taking the most time.
This way you don't spend time optimizing a O(n^3) algorithm that only runs on small datasets.
If you can assume that the program actually halts, then I suppose that a profiler could in principle guess at the complexity of the algorithm that it's just profiled. However, as Ben says, on real code the real-world profiling of bottlenecks is much more useful than the theoretical complexity. – stevemegson Mar 11 '09 at 19:20.
A few thoughs: Real computers are approximately deterministic finite state machines, so the halting problem isn't actually a practical limitation. A practical limitation is an algorithm that takes more time to run than you feel like waiting, ruling out any brute force methods of analysis. To get a rough idea of complexity of an algorithm, you can always run it on a set of random inputs and measure the time taken.
Then plot a curve through the data. Analyzing the time complexity of algorithms can be fairly complicated, requiring some creative steps. (See for example analysis of quicksort).
The problem is related closely to logical theorem proving and program verification. It might be feasible to construct a useful tool that enables semi-automatic solution of complexity, i.e. A tool that searches systematically for solutions given hints from a human, but it certainly isn't easy.
Never seen a tool to do this but we utilize profiling tools to get a better idea where the bottlenecks are. It isn't always obvious and I've been surprised a few times by things that I thought took a long time actually taking very little and vice-versa. In the .
NET world, I've used ANTS and the JetBrains tools.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.