Multiplication "speed"

49 Views Asked by At

If I have nested multiplications:

$\left((a+b)(c+d)+(e+f)(g+h)\right)\left((i+j)(k+l)+(m+n)(o+p)\right)$

How long does it take to multiply out and collect terms? - Suppose there are at most $n$ "layers". Is this problem in P? - Can it be computed in polynomial time?

  • I am just starting to learn about computational complexity and I do not know some of the formal names so hopefully nested and "layers" make sense.

Thanks for any help, Ben