کد مقاله کد نشریه سال انتشار مقاله انگلیسی نسخه تمام متن
436165 689974 2015 13 صفحه PDF دانلود رایگان
عنوان انگلیسی مقاله ISI
A simple yet time-optimal and linear-space algorithm for shortest unique substring queries
ترجمه فارسی عنوان
یک الگوریتم ساده در عین حال زمان بهینه و خطی فضا برای کوتاه ترین نمایش داده شده زیر رشته منحصر به فرد
کلمات کلیدی
زیرشاخه منحصر به فرد، کوتاهترین زیرمجموعه منحصر به فرد، تکرارپذیری، منظم بودن
موضوعات مرتبط
مهندسی و علوم پایه مهندسی کامپیوتر نظریه محاسباتی و ریاضیات
چکیده انگلیسی

We revisit the problem of finding shortest unique substring (SUS) proposed recently by Pei et al. (2013) [12]. We propose an optimal O(n)O(n) time and space algorithm that can find an SUS for every location of a string of size n   and thus significantly improve their O(n2)O(n2) time complexity. Our method also supports finding all the SUSes covering every location, whereas theirs can find only one SUS for every location. Further, our solution is simpler and easier to implement and is more space efficient in practice, since we only use the inverse suffix array and the longest common prefix array of the string, while their algorithm uses the suffix tree of the string and other auxiliary data structures. Our theoretical results are validated by an empirical study with real-world data that shows our method is at least 8 times faster and uses at least 20 times less memory. The speedup gained by our method against Pei et al.'s can become even more significant when the string size increases due to their quadratic time complexity. We also have compared our method with the recent Tsuruta et al.'s (2014) [14] proposal, another independent O(n)O(n) time and space algorithm for SUS finding. The empirical study shows that both methods have nearly the same processing speed. However, ours uses at least 4 times less memory for finding one SUS and at least 2 times less memory for finding all SUSes, both covering every string location.

ناشر
Database: Elsevier - ScienceDirect (ساینس دایرکت)
Journal: Theoretical Computer Science - Volume 562, 11 January 2015, Pages 621–633
نویسندگان
, , ,