Questions tagged [strassen]

Set of algorithms (co)created by Volker Strassen for speeding up number (Schönhage–Strassen algorithm) and matrix (Strassen Algorithm) multiplications.

Strassen Algorithm

  • it subdivides square matrices to 4 quadrants
  • and handle them in way similar to Karatsuba multiplication
  • it is only slightly faster then standard matrix multiplication (and only for big matrices)

Schönhage–Strassen algorithm

  • it uses FFT/NTT convolution (of digits) to compute number multiplication
  • it is fast only for very big numbers
  • it handle number as polynomial of digits and digit base

Homepage: http://www.math.uni-konstanz.de/~strassen

73 questions
3
votes
2 answers

Strassen's Algorithm proof

I have been reading about the Strassen Algorithm for matrix multiplication. As mentioned in Introduction to Algorithms by Cormen , the algorithm is not intuitive. However I am curious to know if there exists any rigorous mathematical proof of the…
Dref D
  • 257
  • 2
  • 17
3
votes
2 answers

Join four 2-D array in Java

I am trying to implement Strassen's Algorithm in Java and I am at a step where I need to combine the output into a single matrix/2D array. I am using System.arraycopy to copy the arrays, which works well for concatenating two arrays in a top-down…
Vinay Pandey
  • 1,129
  • 3
  • 16
  • 33
3
votes
1 answer

Matrix multiplication algorithm over F_2 in just O(n^2.81/(log n)^0.4). Create algorithm. But how?

We have a matrix with elements in the field of integers modulo 2 (F_2). We are looking for algorithm that multiply n x n matrix over F_2 in just O(n^2.81/(log n)^0.4) How it is possible? I know, that Strassen's algorithm gives O(n^2.81), but how can…
2
votes
2 answers

Strassen's Subcubic Matrix Multiplication Algorithm with recursion

I am having an difficult time conceptualizing how to implement Strassen's version of this algorithm. For background, I have the following pseudocode for the iterative version: def Matrix(a,b): result = [] for i in range(0,len(a)): …
Benjamin Powers
  • 3,186
  • 2
  • 18
  • 23
2
votes
1 answer

How would I use execute code to solve matrices while measuring the runtime of the code?

Preferably I would use C++ to execute the code, but I would be open to any suggestion for a better language for the situation. I essentially want to use Strassen's algorithm to solve matrices, and I want to know how I would solve a matrices and…
2
votes
1 answer

Strassen's multiplication algorithm for n bits numbers (2way split vs 3way split)

There is a version of Strassen's algorithm for integer multiplication that uses a three-way split (division of the n-bit number into 3 parts of n/3 bits) and takes O(n^1.46). My question is why is this method not generally preferred to the usual one…
Diana
  • 1,417
  • 5
  • 25
  • 48
2
votes
2 answers

Strassen's Algorithm for Matrix multiplication c# implementation

I'm just doing a self-study of Algorithms & Data structures and I'd like to know if anyone has a C# (or C++) implementation of Strassen's Algorithm for Matrix Multiplication? I'd just like to run it and see what it does and get more of an idea of…
Tony The Lion
  • 61,704
  • 67
  • 242
  • 415
2
votes
1 answer

How to divide a matrix into quarters without additional use of memory?

I am making the Strassen algorithm for matrix multiplication. The basis of this algorithm is division of the matrix A (N * N) into quarters A1-A4 (N / 2 * N / 2). To do this I use cycles and allocate the memory for each quarter of the matrix. …
Dmytro
  • 63
  • 8
2
votes
0 answers

Strassen's turnover to brute force

As a homework assignment over break, our professor asked us to find the point where Strassen's algorithm becomes less efficient than brute force (specifically, how many recursions should I do on this machine before I go to brute force?) I am in…
2
votes
1 answer

How can I improve the speed of this Strassen Algorithm implementation?

I'm struggling to determine why my Strassen implementation is so slow. It allocates memory with each iteration, but I'm freeing it all as appropriate. int** multiply(int** a, int** b, int size) { int row,col,i,j; if(size == 1) { int** c =…
jtcortex
  • 21
  • 2
2
votes
2 answers

How many floating-point operations for Strassen's algorithm for a matrix of size k x k?

I am trying to understand this analysis of Strassen's algorithm for multiply k x k matrices. But I am still not too sure how many operations are invovled. Can someone help clarify this?
hao
  • 21
  • 1
2
votes
2 answers

Recursion in Strassen's Algorithm

I'm wondering how you would make the recursive calls in Strassen's algorithm, and where exactly they're required. I understand that the 7 multipliers is more efficient than the 8 we would have otherwise, but I'm confused as to how these multipliers…
Bob John
  • 3,688
  • 14
  • 43
  • 57
1
vote
3 answers

Why is my Strassen Matrix multiplier so fast?

As an experiment I implemented the Strassen Matrix Multiplication Algorithm to see if truly lead to faster code for large n. https://github.com/wcochran/strassen_multiplier/blob/master/mm.c To my surprise it was way faster for large n. For example,…
wcochran
  • 10,089
  • 6
  • 61
  • 69
1
vote
1 answer

If additions/subtractions and multiplications have almost the same computational speed, why is Strassen's algorithm considered efficient?

I have implemented the usual matrix multiplication algorithm and Strassen's algorithm for matrix multiplication. Both algorithms are implemented on Rust. The main advantage of Strassen's algorithm is that it saves one multiplication operation, which…
Д Т
  • 45
  • 1
  • 6
1
vote
1 answer

Why is Strassen's algorithm slower than the usual matrix multiplication?

I'm trying to figure out how to multpiply matrixes really fast on Python without using NumPy. By this reason, I've recreated the Strassen algorithm and compared it with the standard multiplication of loops. Also, I compare only square matrices of…
kdduha
  • 11
  • 1