arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2006.16137cs.DS
收藏

面向字典匹配的模式掩码方法

Pattern Masking for Dictionary Matching

Panagiotis Charalampopoulos, Huiping Chen, Peter Christen, Grigorios Loukides, Nadia Pisanti, Solon P. Pissis, Jakub Radoszewski

AI总结:

本文研究字典匹配模式掩码(PMDM)问题,证明其NP完全性,提出多种精确算法与数据结构,建立其与最小并集问题的双向归约,得到紧近似比的近似算法,可用于敏感数据记录链接与查询词丢弃场景。

摘要:

在字典匹配模式掩码(PMDM)问题中,给定一个包含$d$个长度均为$\text{ℓ}$的字符串的字典$\text{𝒟}$、一个长度为$\text{ℓ}$的查询字符串$q$,以及一个正整数$z$,我们需要计算一个最小集合$K⊆\{1,…,ℓ\}$,使得当所有$i∈K$对应的$q[i]$被替换为通配符时,$q$能匹配字典$\text{𝒟}$中至少$z$个字符串。PMDM问题是大规模实际系统中两类重要应用的核心:含敏感信息的数据库记录链接,以及查询词丢弃。与现有方法不同,求解PMDM能够提供数据效用保证。\n我们首先通过从著名的$k$-Clique问题归约,证明PMDM问题的判定版本是NP完全的,即使字符串仅基于二进制字母表也成立。我们提出了一种用于PMDM的数据结构,针对任意参数$τ∈[1,d]$,它能在$\text{𝒪}(2^{ℓ/2}(2^{ℓ/2}+τ)ℓ)$时间内完成基于$\text{𝒟}$的查询,所需空间为$\text{𝒪}(2^{ℓ}d^2/τ^2+2^{ℓ/2}d)$。我们还从更实用的角度研究该问题:当$k=|K|=𝒪(1)$时,给出了一种时间复杂度为$\text{𝒪}((dℓ)^{k/3}+dℓ)$、空间复杂度为$\text{𝒪}(dℓ)$的PMDM算法。我们将该精确算法推广到可同时对多个查询字符串进行掩码的场景。作为补充,我们证明了PMDM与最小并集问题(Minimum Union,Chlamtáč等人,SODA 2017)之间存在双向多项式时间归约关系,由此得到PMDM的多项式时间$\text{𝒪}(d^{1/4+ε})$近似算法,该近似比在合理的复杂性猜想下是紧的。

英文摘要:

In the Pattern Masking for Dictionary Matching (PMDM) problem, we are given a dictionary $\mathcal{D}$ of $d$ strings, each of length $\ell$, a query string $q$ of length $\ell$, and a positive integer $z$, and we are asked to compute a smallest set $K\subseteq\{1,\ldots,\ell\}$, so that if $q[i]$, for all $i\in K$, is replaced by a wildcard, then $q$ matches at least $z$ strings from $\mathcal{D}$. The PMDM problem lies at the heart of two important applications featured in large-scale real-world systems: record linkage of databases that contain sensitive information, and query term dropping. In both applications, solving PMDM allows for providing data utility guarantees as opposed to existing approaches. We first show, through a reduction from the well-known $k$-Clique problem, that a decision version of the PMDM problem is NP-complete, even for strings over a binary alphabet. We present a data structure for PMDM that answers queries over $\mathcal{D}$ in time $\mathcal{O}(2^{\ell/2}(2^{\ell/2}+τ)\ell)$ and requires space $\mathcal{O}(2^{\ell}d^2/τ^2+2^{\ell/2}d)$, for any parameter $τ\in[1,d]$. We also approach the problem from a more practical perspective. We show an $\mathcal{O}((d\ell)^{k/3}+d\ell)$-time and $\mathcal{O}(d\ell)$-space algorithm for PMDM if $k=|K|=\mathcal{O}(1)$. We generalize our exact algorithm to mask multiple query strings simultaneously. We complement our results by showing a two-way polynomial-time reduction between PMDM and the Minimum Union problem [Chlamtáč et al., SODA 2017]. This gives a polynomial-time $\mathcal{O}(d^{1/4+ε})$-approximation algorithm for PMDM, which is tight under plausible complexity conjectures.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑