Answer:
The answer of the the following question are 0(n^2)
The total number of multiplication is 2
And the total number of addition is 1
Step-by-step explanation:
Let the size of the input is the degree of the polynomial = "n"
Than the number of the multiplications depends on "n"
Let the number of multiplication = M(n)
Let the number of addition = A(n)
1): Solution-
M(n) = n∑_{i=0} i∑_{j=1} 2
= 2 n∑_{i=0} i∑_{j=1}
= 2 n∑_{i=0} i-1+1
= 2 n∑_{i=0} i
= 2 * n*(n+1)/2 = n*(n+1)
= n^2 + n ∈ 0(n^2)
2): Solution for addition-
A(n) = n∑_{i=0} i∑_{j=1} 1
= by solving this from the same way it leads to
= n^2 + n and n^2 + n ∈ 0(n^2)