On the average-case complexity of pattern matching with wildcards

被引:1
|
作者
Barton, Carl [1 ]
机构
[1] Birkbeck Univ London, Malet St, London WC1E 7HX, England
关键词
Average case complexity; Pattern matching with wildcards; Stringology; Pattern matching; Pattern matching with don't care symbols;
D O I
10.1016/j.tcs.2022.04.009
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
Pattern matching with wildcards is a string matching problem with the goal of finding all factors of a text t of length n that match a pattern x of length m, where wildcards (characters that match everything) may be present. In this paper we present a number of complexity results and fast average-case algorithms for pattern matching where wildcards are allowed in the pattern, however, the results are easily adapted to the case where wildcards are allowed in the text as well. We analyse the average-case complexity of these algorithms and derive non-trivial time bounds. These are the first results on the average-case complexity of pattern matching with wildcards which provide a provable separation in time complexity between exact pattern matching and pattern matching with wildcards. We introduce the wc-period of a string which is the period of the binary mask x(b) where x(b)[i] = a iff x[i] not equal phi and b otherwise. We denote the length of the wc-period of a string x by wcp(x). We show the following results for constant 0 < epsilon < 1 and a pattern xof length m and gwildcards with wcp(x) = p the prefix of length p contains g(p) wildcards: If lim(m ->infinity) g(p)/p= 0 there is an optimal algorithm running in O(nlog(sigma)m/m)-time on average. If lim(m ->infinity) g(p)/p= 1 - epsilon there is an algorithm running in O(nlog(sigma)mlog(2)p/m)-time on average. If lim(m ->infinity) g/m= lim(m ->infinity) 1 - f(m) = 1 any algorithm takes at least Omega(nlog(sigma)m/f(m))-time on average. (C) 2022 The Author(s). Published by Elsevier B.V.
引用
收藏
页码:37 / 45
页数:9
相关论文
共 50 条
  • [41] The Value of Help Bits in Randomized and Average-Case Complexity
    Salman Beigi
    Omid Etesami
    Amin Gohari
    computational complexity, 2017, 26 : 119 - 145
  • [42] Average-case complexity of the Whitehead problem for free groups
    Shpilrain, Vladimir
    COMMUNICATIONS IN ALGEBRA, 2023, 51 (02) : 799 - 806
  • [43] THE VALUE OF HELP BITS IN RANDOMIZED AND AVERAGE-CASE COMPLEXITY
    Beigi, Salman
    Etesami, Omid
    Gohari, Amin
    COMPUTATIONAL COMPLEXITY, 2017, 26 (01) : 119 - 145
  • [44] Junta distributions and the average-case complexity of manipulating elections
    Procaccia, Ariel D.
    Rosenschein, Jeffrey S.
    JOURNAL OF ARTIFICIAL INTELLIGENCE RESEARCH, 2007, 28 (157-181): : 157 - 181
  • [45] Bounds for the average-case complexity of monotone Boolean functions
    Chashkin A.V.
    Discrete Mathematics and Applications, 2017, 27 (03): : 137 - 142
  • [46] Pseudorandomness and Average-Case Complexity Via Uniform Reductions
    Luca Trevisan
    Salil Vadhan
    computational complexity, 2007, 16 : 331 - 364
  • [47] Pseudorandomness and average-case complexity via uniform reductions
    Trevisan, L
    Vadhan, S
    17TH ANNUAL IEEE CONFERENCE ON COMPUTATIONAL COMPLEXITY, PROCEEDINGS, 2002, : 129 - 138
  • [48] Average-case analysis of algorithms using Kolmogorov complexity
    Jiang, T
    Li, M
    Vitányi, PMB
    JOURNAL OF COMPUTER SCIENCE AND TECHNOLOGY, 2000, 15 (05) : 402 - 408
  • [49] Average-case analysis of algorithms using Kolmogorov complexity
    Tao Jiang
    Ming Li
    Paul M. B. Vitányi
    Journal of Computer Science and Technology, 2000, 15 : 402 - 408
  • [50] Characterizing Average-Case Complexity of PH by Worst-Case Meta-Complexity
    Hirahara, Shuichi
    2020 IEEE 61ST ANNUAL SYMPOSIUM ON FOUNDATIONS OF COMPUTER SCIENCE (FOCS 2020), 2020, : 50 - 60