Separate result of multiplication using Sigma

75 Views Asked by At

Let's suppose I have two numbers $a=a_{N/2}...a_1$ and $b={b_N/2}...b_1$ where $a_1, b_1$ etc are single digits of the number (So each number has $N/2$ digits).

How can I write the result of $a*b$ using sigmas such that I want to separate each column.

What I mean?

When we do $a_3a_2a_1*b_3b_2b_1$ then first column is $b_1*a_1+0+0$ second columns is $a_2*b_1+a_1*b_2+0$ and so on.

In other words I want to seperate the parts which are multiplied by 10^0, 10^1, 10^2 ...

1

There are 1 best solutions below

7
On

You can write

$$a= \sum_{k=1}^{N/2}a_k10^{k-1} \\ b= \sum_{k=1}^{N/2}b_k10^{k-1}$$

So

$$ a*b= \sum_{k=1}^{N/2}\sum_{j=1}^{N/2}a_kb_j10^{k+j-1} $$

Or

$$a *b= \sum_{i=1}^n ( \sum_{k+j=i}a_kb_j) 10^{i-1} $$

I hope it helps you :)