Searching 2D-Strings for Matching Frames

Abstract

We introduce the natural notion of a matching frame in a 22-dimensional string. A matching frame in a 22-dimensional n×mn\times m string MM, 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 MM is a tuple (u,d,,r)(u,d,\ell,r) such that M[u][..r]=M[d][..r]M[u][\ell ..r] = M[d][\ell ..r] and M[u..d][]=M[u..d][r]M[u..d][\ell] = M[u..d][r]. In this paper, we present an algorithm for finding the maximum perimeter matching frame in a matrix MM in O~(n2.5)\tilde{O}(n^{2.5}) time (assuming nm)n \ge m). Additionally, for every constant ϵ>0\epsilon> 0 we present a near-linear (1ϵ)(1-\epsilon)-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

    Similar works

    Full text

    thumbnail-image

    Available Versions