Breaking the Middle Term: Divide and Conquer

25 Views Asked by At

I found the following link:

By Guassian

They have shown something like that:

(a + bi)(c + di) = ac − bd + (bc + ad)i-----(1)
=ac − bd + (bc + ad)i
=bc + ad = (a + b)(c + d) − ac – bd

In the above I can't understand how there are 3 multiplications because if we put the values back in (1), we would get something like:

 =ac -bd + [(a+b)(c+d) -ac -bd]i

Above looks like 5 multiplications:

I tried to go further:

= ac -bd -aci -bdi + (a+b)(c+d)i
=ac(1-i) -bd(1 + i) +(a+b)(c+d)i

I don't know if the above is correct to show that there are 3 multiplications.

Somebody please guide me.

Zulfi.

2

There are 2 best solutions below

0
On BEST ANSWER

The multiplies are

$$a\times c,$$

$$b\times d,$$

$$(a+b)\times(c+d).$$

Though you trade a single multiply for three adds, it is worth doing it because the computational complexity of naive multiplication ($O(n^2)$) is much higher than that of addition ($O(n)$).

1
On

Three multiplications: one in $\color{blue}{\text{blue}}$ and one in $\color{red}{\text{red}}$ and one in $\color{green}{\text{green}}$. The ones in $\color{red}{\text{red}}$ and $\color{green}{\text{green}}$ are written twice.

$\color{red}{ac} -\color{green}{bd} + [\color{blue}{(a+b)(c+d)} -\color{red}{ac} -\color{green}{bd}]i$