Pattern Matching under Weighted Edit Distance

Abstract

In Pattern Matching with Weighted Edits (PMWED), we are given a pattern P of length m, a text T of length n, a positive threshold k, and oracle access to a weight function that specifies the costs of edits (depending on the involved characters, and normalized so that the cost of each edit is at least 1). The goal is to compute the starting positions of all fragments of T that can be obtained from P with edits of total cost at most k. PMWED captures typical real-world applications more accurately than its unweighted variant (PMED), where all edits have unit costs. We obtain three main results: (a) a conceptually simple O(nk)-time algorithm for PMWED, very different from that of Landau and Vishkin for PMED; (b) a significantly more complicated O(n+k3.5 · W4· n/m)-time algorithm for PMWED under the assumption that the weight function is a metric with integer values between 0 and W; and (c) an O(n+k4 · n/m)-time algorithm for PMWED for the case of arbitrary weights. In the setting of metrics with small integer values, we nearly match the state of the art for PMED where W=1.

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…