# Streaming Pattern Matching with d Wildcards

**Authors:** Shay Golan, Tsvi Kopelowitz, Ely Porat

arXiv: 1704.01646 · 2020-01-01

## TL;DR

This paper introduces two new randomized streaming algorithms for pattern matching with wildcards, achieving efficient time and space complexities, and enabling real-time detection of pattern matches in streaming data.

## Contribution

The paper presents two novel randomized algorithms for wildcard pattern matching in streaming models, improving efficiency and space usage over previous methods.

## Key findings

- First algorithm uses $	ilde{O}(d^{1-rac{	ext{delta}}{}})$ amortized time per character.
- Second algorithm achieves $O(d+	ext{log} m)$ worst-case time per character.
- Both algorithms operate with sublinear space in the pattern length.

## Abstract

In the pattern matching with $d$ wildcards problem one is given a text $T$ of length $n$ and a pattern $P$ of length $m$ that contains $d$ wildcard characters, each denoted by a special symbol $'?'$. A wildcard character matches any other character. The goal is to establish for each $m$-length substring of $T$ whether it matches $P$. In the streaming model variant of the pattern matching with $d$ wildcards problem the text $T$ arrives one character at a time and the goal is to report, before the next character arrives, if the last $m$ characters match $P$ while using only $o(m)$ words of space.   In this paper we introduce two new algorithms for the $d$ wildcard pattern matching problem in the streaming model. The first is a randomized Monte Carlo algorithm that is parameterized by a constant $0\leq \delta \leq 1$. This algorithm uses $\tilde{O}(d^{1-\delta})$ amortized time per character and $\tilde{O}(d^{1+\delta})$ words of space. The second algorithm, which is used as a black box in the first algorithm, is a randomized Monte Carlo algorithm which uses $O(d+\log m)$ worst-case time per character and $O(d\log m)$ words of space.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1704.01646/full.md

## Figures

17 figures with captions in the complete paper: https://tomesphere.com/paper/1704.01646/full.md

## References

38 references — full list in the complete paper: https://tomesphere.com/paper/1704.01646/full.md

---
Source: https://tomesphere.com/paper/1704.01646