26 research outputs found

    Quantum pattern matching fast on average

    Full text link
    The dd-dimensional pattern matching problem is to find an occurrence of a pattern of length mΓ—β‹―Γ—mm \times \dots \times m within a text of length nΓ—β‹―Γ—nn \times \dots \times n, with nβ‰₯mn \ge m. This task models various problems in text and image processing, among other application areas. This work describes a quantum algorithm which solves the pattern matching problem for random patterns and texts in time O~((n/m)d/22O(d3/2log⁑m))\widetilde{O}((n/m)^{d/2} 2^{O(d^{3/2}\sqrt{\log m})}). For large mm this is super-polynomially faster than the best possible classical algorithm, which requires time Ξ©~((n/m)d+nd/2)\widetilde{\Omega}( (n/m)^d + n^{d/2} ). The algorithm is based on the use of a quantum subroutine for finding hidden shifts in dd dimensions, which is a variant of algorithms proposed by Kuperberg.Comment: 22 pages, 2 figures; v3: further minor changes, essentially published versio

    Fully dynamic data structure for LCE queries in compressed space

    Get PDF
    A Longest Common Extension (LCE) query on a text TT of length NN asks for the length of the longest common prefix of suffixes starting at given two positions. We show that the signature encoding G\mathcal{G} of size w=O(min⁑(zlog⁑Nlogβ‘βˆ—M,N))w = O(\min(z \log N \log^* M, N)) [Mehlhorn et al., Algorithmica 17(2):183-198, 1997] of TT, which can be seen as a compressed representation of TT, has a capability to support LCE queries in O(log⁑N+log⁑ℓlogβ‘βˆ—M)O(\log N + \log \ell \log^* M) time, where β„“\ell is the answer to the query, zz is the size of the Lempel-Ziv77 (LZ77) factorization of TT, and Mβ‰₯4NM \geq 4N is an integer that can be handled in constant time under word RAM model. In compressed space, this is the fastest deterministic LCE data structure in many cases. Moreover, G\mathcal{G} can be enhanced to support efficient update operations: After processing G\mathcal{G} in O(wfA)O(w f_{\mathcal{A}}) time, we can insert/delete any (sub)string of length yy into/from an arbitrary position of TT in O((y+log⁑Nlogβ‘βˆ—M)fA)O((y+ \log N\log^* M) f_{\mathcal{A}}) time, where fA=O(min⁑{log⁑log⁑Mlog⁑log⁑wlog⁑log⁑log⁑M,log⁑wlog⁑log⁑w})f_{\mathcal{A}} = O(\min \{ \frac{\log\log M \log\log w}{\log\log\log M}, \sqrt{\frac{\log w}{\log\log w}} \}). This yields the first fully dynamic LCE data structure. We also present efficient construction algorithms from various types of inputs: We can construct G\mathcal{G} in O(NfA)O(N f_{\mathcal{A}}) time from uncompressed string TT; in O(nlog⁑log⁑nlog⁑Nlogβ‘βˆ—M)O(n \log\log n \log N \log^* M) time from grammar-compressed string TT represented by a straight-line program of size nn; and in O(zfAlog⁑Nlogβ‘βˆ—M)O(z f_{\mathcal{A}} \log N \log^* M) time from LZ77-compressed string TT with zz factors. On top of the above contributions, we show several applications of our data structures which improve previous best known results on grammar-compressed string processing.Comment: arXiv admin note: text overlap with arXiv:1504.0695

    Implementasi Algoritma Boyer Moore Pada Aplikasi Kamus Istilah Kebidanan Berbasis Web

    Get PDF
    The lack of understanding in obstetrics and limit of instructional media has become one of the factors in the making of dictionary application of midwifery. The current dictionary is still a thick book with many terms in it and difficult to use. dictionary midwifery terms have a weakness in the search process, because users should search for words and terms manually by opening pages per page on the dictionary and existing data could not be changed.Keywords: Algorithm, Boyer Moore, Midwifery Dictionary

    Fast equivalence-checking for normed context-free processes

    Get PDF
    Bisimulation equivalence is decidable in polynomial time over normed graphs generated by a context-free grammar. We present a new algorithm, working in time O(n5)O(n^5), thus improving the previously known complexity O(n8βˆ—polylog(n))O(n^8 * polylog(n)). It also improves the previously known complexity O(n6βˆ—polylog(n))O(n^6 * polylog(n)) of the equality problem for simple grammars
    corecore