Praxis Core Academic Skills for Educators: Mathematics (5733)Algebra and FunctionsMedium
A software engineer is optimizing an algorithm. The runtime T (in milliseconds) of the algorithm for processing n data points is given by T(n) = 3n^2 + 5n. What is the difference in runtime between processing 10 data points and 5 data points?
- A250 milliseconds
- B300 milliseconds
- C325 milliseconds
- D275 milliseconds
Show answer & explanationAnswer & explanation
Correct answer: A. 250 milliseconds
To find the difference in runtime, we first calculate the runtime for 10 data points, then for 5 data points, and finally subtract the two results.
Why the other options are wrong
- B. This is T(10) = 350, not the difference.
- C. This is a plausible distractor, possibly from an arithmetic error.
- D. This might be a calculation error or a misinterpretation of the operations.
Function Evaluation and Difference
To find the difference between function values at two points, evaluate the function at each point separately and then subtract the results.
- Substitute the first input value into the function.
- Substitute the second input value into the function.
- Subtract the two resulting output values.
Memory trick: Calculate Each, Then Subtract.