A note on the longest common compatible prefix problem for partial words
نویسندگان
چکیده
For a partial word w the longest common compatible prefix of two positions i, j, denoted lccp(i, j), is the largest k such that w[i, i+k−1] ↑ w[j, j +k−1], where ↑ is the compatibility relation of partial words (it is not an equivalence relation). The LCCP problem is to preprocess a partial word in such a way that any query lccp(i, j) about this word can be answered in O(1) time. It is a natural generalization of the longest common prefix (LCP) problem for regular words, for which an O(n) preprocessing time and O(1) query time solution exists. Recently an efficient algorithm for this problem has been given by F. Blanchet-Sadri and J. Lazarow (LATA 2013). The preprocessing time was O(nh + n), where h is the number of " holes " in w. The algorithm was designed for partial words over a constant alphabet and was quite involved. We present a simple solution to this problem with slightly better runtime that works for any linearly-sortable alphabet. Our preprocessing is in time O(nµ + n), where µ is the number of blocks of holes in w. Our algorithm uses ideas from alignment algorithms and dynamic programming.
منابع مشابه
Truly Subquadratic-Time Extension Queries and Periodicity Detection in Strings with Uncertainties
Strings with don’t care symbols, also called partial words, and more general indeterminate strings are a natural representation of strings containing uncertain symbols. A considerable effort has been made to obtain efficient algorithms for pattern matching and periodicity detection in such strings. Among those, a number of algorithms have been proposed that behave well on random data, but still...
متن کاملA High Performance Parallel IP Lookup Technique Using Distributed Memory Organization and ISCB-Tree Data Structure
The IP Lookup Process is a key bottleneck in routing due to the increase in routing table size, increasing traıc and migration to IPv6 addresses. The IP address lookup involves computation of the Longest Prefix Matching (LPM), which existing solutions such as BSD Radix Tries, scale poorly when traıc in the router increases or when employed for IPv6 address lookups. In this paper, we describe a ...
متن کاملA High Performance Parallel IP Lookup Technique Using Distributed Memory Organization and ISCB-Tree Data Structure
The IP Lookup Process is a key bottleneck in routing due to the increase in routing table size, increasing traıc and migration to IPv6 addresses. The IP address lookup involves computation of the Longest Prefix Matching (LPM), which existing solutions such as BSD Radix Tries, scale poorly when traıc in the router increases or when employed for IPv6 address lookups. In this paper, we describe a ...
متن کاملCommon Fixed Point Theorems for Weakly Compatible Mappings by (CLR) Property on Partial Metric Space
The purpose of this paper is to obtain the common fixed point results for two pair of weakly compatible mapping by using common (CLR) property in partial metric space. Also we extend the very recent results which are presented in [17, Muhammad Sarwar, Mian Bahadur Zada and Inci M. Erhan, Common Fixed Point Theorems of Integral type on Metric Spaces and application to system of functional equat...
متن کاملA new characteristic property of rich words
Originally introduced and studied by the third and fourth authors together with J. Justin and S. Widmer (2008), rich words constitute a new class of finite and infinite words characterized by containing the maximal number of distinct palindromes. Several characterizations of rich words have already been established. A particularly nice characteristic property is that all ‘complete returns’ to p...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- J. Discrete Algorithms
دوره 34 شماره
صفحات -
تاریخ انتشار 2015