Two-dimensional pattern matching
In computer science, two-dimensional pattern matching is the problem of locating occurrences of a two-dimensional matrix of characters ("the pattern") in a bigger two-dimensional matrix ("the picture", or, in analogy with string searching, "the text"). == The naïve solution == Assume given a pattern P [ m × m ] {\displaystyle P[m\times m]} and a text T [ n × n ] {\displaystyle T[n\times n]} , where m ≤ n {\displaystyle m\leq n} .
Source: Wikipedia — Two-dimensional pattern matching (CC BY-SA 4.0)