You are managing a software project that includes the creation of a computer tool for medical surgery. The exact placement of the surgical knife depends on a number of different parameters, usually not less than 25, and sometimes more. Your programmer has developed two algorithms for positioning the cutting tool and is looking for your advice on which algorithm to use:
Algorithm A has an average execution time of n and the worst case, time n ^ 4, where n is the number of input parameters.
Algorithm B has an average execution time of n [(log n) ^ 3], and the worst case is n ^ 2. Which algorithm would you approve for inclusion in software? Justify your answer.
I think I should choose algorithm 1, because in medical science we should be more focused on saving the lives of more people, so the average case should be better, however in the worst case we can apply some optimization for better work, or we can choose algorithm 2. But I do not understand how to prove it. Mathematically, I'm right.
For all interested readers. However, I noted the first answer well, but actually get the whole prospect of reading the comments and the second Answer.
source
share