algorithm - How to give mathemarical proof or support my answer through reasoning as a general case? -
you managing software project involves building computer-assisted instrument medical surgery. exact placement of surgical knife dependent on number of different parameters, @ least 25, more. programmer has developed 2 algorithms positioning cutting tool, , seeking advice algorithm use:
algorithm has average – case run time of n, , worst case run time of n^4, n number of input parameters.
algorithm b has average case run time of n[(log n)^3], , worst case of n^2. algorithm favour inclusion in software? justify answer.
i think should choose algorithm 1 because in medical science must more focused towards saving life of more people hence average case should better worst case can apply optimization work better or can choose algorithm 2. m confused how proof mathematically correct.
for interested readers. have marked first answer perspective read comments , second answer.
this hard real-time system - if deadline missed patient might die. such, algorithm b preferred algorithm because can design hardware around n^2
worst case, whereas algorithm hardware must account n^4
worst case (the average case doesn't matter because system ostensibly intended save every patient's life, not 80% of patient's lives).
this assumes hardware budget not factor. if hardware budget factor (e.g. machines intended sold facilities short on funds) algorithm preferred because hardware can designed n
average case - result in patient deaths in n^4
case, presumably more patients saved use of machines. however, getting outside scope of computer science , more scope of ethics - preferred answer select algorithm b , pay decent hardware.
Comments
Post a Comment