Binary Jumbled Pattern Matching via All-Pairs Shortest Paths

نویسندگان

  • Danny Hermelin
  • Gad M. Landau
  • Yuri Rabinovich
  • Oren Weimann
چکیده

In binary jumbled pattern matching we wish to preprocess a binary string S in order to answer queries (i, j) which ask for a substring of S that is of size i and has exactly j 1-bits. The problem naturally generalizes to node-labeled trees and graphs by replacing “substring” with “connected subgraph”. In this paper, we give an n/2 n/ log log n) 1/2 time solution for both strings and trees. This odd-looking time complexity improves the state of the art O(n/ log n) solutions by more than any polylogarithmic factor. It originates from the recent seminal algorithm of Williams for min-plus matrix multiplication. We obtain the result by giving a black box reduction from trees to strings. This is then combined with a reduction from strings to min-plus matrix multiplications.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Efficient Algorithm for δ-Approximate Jumbled Pattern Matching

The Jumbled Pattern Matching problem consists on finding substrings which can be permuted to be equal to a given pattern. Similarly the δ Approximate Jumbled Pattern Matching problem asks for substrings equivalent to a permutation of the given pattern, but allowing a vector of possible errors δ. Here we provide a new efficient solution for the δ Approximate Jumbled Pattern Matching problem usin...

متن کامل

An O(n 3 loglogn/log2 n) Time Algorithm for All Pairs Shortest Paths

We present an O(n log log n/ log n) time algorithm for all pairs shortest paths. This algorithm improves on the best previous result of O(n(log log n)/ log n) time.

متن کامل

Grammar-Based Construction of Indexes for Binary Jumbled Pattern Matching

We show how, given a straight-line program with g rules for a binary string B of length n, in O ( gn ) time we can build a (2nH0(B)+ o(n))-bit index such that, given m and c, in O(1) time we can determine whether there is a substring of B with length m containing exactly c copies of 1. If we use O(n log n) bits for the index, then we can list all such substrings using O(m) time per substring.

متن کامل

Jumbled Matching with SIMD

Jumbled pattern matching addresses the problem of finding all permuted occurrences of a substring in a text. We introduce two improved algorithms for exact jumbled matching of short patterns. Our solutions apply SIMD (Single Instruction Multiple Data) computation in order to quickly filter the text. One of them utilizes the equal any operation and the other searches for the least frequent chara...

متن کامل

All Pairs Shortest Paths Algorithms

Given a communication network or a road network one of the most natural algorithmic question is how to determine the shortest path from one point to another. In this paper we deal with one of the most fundamental problems of Graph Theory, the All Pairs Shortest Path (APSP) problem. We study three algorithms namely The FloydWarshall algorithm, APSP via Matrix Multiplication and the Johnson’s alg...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • CoRR

دوره abs/1401.2065  شماره 

صفحات  -

تاریخ انتشار 2014