Question
4. Make an Excel spreadsheet to compare the following functions, and then compare them, and comment which will be the best choice for a runtime,
4. Make an Excel spreadsheet to compare the following functions, and then compare them, and comment which will be the best choice for a runtime, and which will be the worst choice for an algorithm? The Range of N should be taken from 5 to 1000 (Take: 5, 10, 20, 50, 100, 200, 500, and 1000) The functions are: F 1 (N) = 100N F 2 (N) =
F 3 (N) = N 2 F 4 (N) = lgN F 5 (N) = NlgN F 6 (N) = (1.05) N In Excel there are built-in functions that you can make use of. For example, for square root, use sqrt, for lgN use log(N, 2), for N 2 use N^2 etc. Once you generate the table, then plot them and change the y-axis in logarithmic scale.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started