Skip to main content
made the question readable
Source Link
Doc Brown
  • 220.6k
  • 35
  • 410
  • 625

I have a huge list of matrix i.e A = {M0, M1, M2 .. Mn}. I have a task to find the product of all the matrices in a given range {x,y} i.e MxMx * Mx+1Mx+1 * Mx+2Mx+2 ... * MyMy.

I would like to know if there is any algorithm or data structures that might efficiently compute this query.

I have tried creating a 2D matrix of all possible combination of range but as my initial matrix is very big this does not seem like a practical solution.

I have a huge list of matrix i.e A = {M0, M1, M2 .. Mn}. I have a task to find the product of all the matrices in a given range {x,y} i.e Mx * Mx+1 * Mx+2 ... * My.

I would like to know if there is any algorithm or data structures that might efficiently compute this query.

I have tried creating a 2D matrix of all possible combination of range but as my initial matrix is very big this does not seem like a practical solution.

I have a huge list of matrix i.e A = {M0, M1, M2 .. Mn}. I have a task to find the product of all the matrices in a given range {x,y} i.e Mx * Mx+1 * Mx+2 ... * My.

I would like to know if there is any algorithm or data structures that might efficiently compute this query.

I have tried creating a 2D matrix of all possible combination of range but as my initial matrix is very big this does not seem like a practical solution.

Source Link

Matrix multiplication range queries

I have a huge list of matrix i.e A = {M0, M1, M2 .. Mn}. I have a task to find the product of all the matrices in a given range {x,y} i.e Mx * Mx+1 * Mx+2 ... * My.

I would like to know if there is any algorithm or data structures that might efficiently compute this query.

I have tried creating a 2D matrix of all possible combination of range but as my initial matrix is very big this does not seem like a practical solution.