Searching 2D-Strings for Matching Frames
arXiv:2310.02670
Abstract
We introduce the natural notion of a matching frame in a -dimensional string. A matching frame in a -dimensional string , is a rectangle such that the strings written on the horizontal sides of the rectangle are identical, and so are the strings written on the vertical sides of the rectangle. Formally, a matching frame in is a tuple such that and . In this paper, we present an algorithm for finding the maximum perimeter matching frame in a matrix in time (assuming . Additionally, for every constant we present a near-linear -approximation algorithm for the maximum perimeter of a matching frame. In the development of the aforementioned algorithms, we introduce inventive technical elements and uncover distinctive structural properties that we believe will captivate the curiosity of the community.