Program speed, or runtime, is an important concept in computer programming, and
ID: 3101087 • Letter: P
Question
Program speed, or runtime, is an important concept in computer programming, and it is measured in terms of the number of mathematical operations made during one run of the program. For example, the expression x3 – 2x + 3 has six operations. If we write it as x*x*x – 2*x + 3, we see that there are four multiplications, one addition, and one subtraction.
The time it takes to multiply two matrices of size n is determined by the polynomial expression 2n^3 – n^2. Compute the number of operations required to run a program that multiplies two matrices of size 20. Would I set it up as 2n^3 - n^2 = 20? How do I solve this? Not sure.
Explanation / Answer
The time it takes to multiply two matrices of size n is determined by the polynomial expression 2n^3 – n^2
For two matrices of size 20
n = 20
Put in the expression
2n^3 – n^2 = 15600
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.