-1

I need to find two identical submatices in a larger matrix. I am not getting how to approach as first I need to have a submatrice and then to find if its identical is present or not.

e.g. (N X M) 4X5 matrix

xy*yyx*

yx*xyy*

x*yyx*y

x*xyy*x

Identicals are

yyx

xyy

present at bold letters made points.. N,M <=10

not sure where to start with..

1 Answers1

0

What are the limits on the submatrix? E.g., can you have a 1x1 submatrix? If there are no limits, then a dynamic programming approach would seem to be in order.

I.e., find the 1x1 matching submatrices, then use that as a starting point to find 2x2, 3x3, etc.

Eric Brown
  • 13,774
  • 7
  • 30
  • 71