Fast multiplication algorithm Flashcards

1
Q

Which assumption of Carl Friedrich Gaus helped reduced the time complexity of numbers multiplication, and how?

A

He noticed that in order to multiply two complex numbers:

(a + bi)(c + di) = ac - bd + (bc + ad)i

it is possible to have only three multiplications:

ac, bd and (a + b)(c + d), since

bc + ad = (a + b)(c + d) - ac - bd

It helps because x * y can be written as in the image attached.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Explain why the run time is T(n) = 3T(n/2) + O(n)

and why is it O(n^1.59)

A

Computing 2^n/2 and comuting the additions takes O(n).

and having 3 multiplication on n/2 bits numbers results with:

T(n) = 3T(n/2) + O(n)

the depth of the tree is log_2(3). so we have:

O(n^log_2(3)) = O(n^1.59)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Why the naive recursive algorithm for matrix multiplication takes T(n) = 8T(n/2) + O(n^2)

A

We can see that there are 8 mul operations of size n/2 and 4 addition of n^2/4-size bit numbers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the big buzz around Strassen’s algorithm?

A

He managed to have a matrix multiplication recursion with only 7 multiplication calls. Thus reducting the time to O(n^log_2(7))

How well did you know this?
1
Not at all
2
3
4
5
Perfectly