Searching 2D-Strings for Matching Frames

Abstract

We introduce the natural notion of a matching frame in a 2-dimensional string. A matching frame in a 2-dimensional n× m string M, 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 M is a tuple (u,d,,r) such that M[u][ ..r] = M[d][ ..r] and M[u..d][] = M[u..d][r]. In this paper, we present an algorithm for finding the maximum perimeter matching frame in a matrix M in O(n2.5) time (assuming n m). Additionally, for every constant ε> 0 we present a near-linear (1-ε)-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.

0

Turn this paper into a full lesson

ArcXiv compiles a staged curriculum from this paper: 8-12 lessons across beginner → advanced, synthesised section guides, visuals, flashcards, a quiz, exercises, and on-demand deep dives per section. Grounded in the abstract, never invented.

Discussion (0)

Sign in to join the discussion.

Loading comments…