5,062 research outputs found

    Fast Algorithm for Partial Covers in Words

    Get PDF
    A factor uu of a word ww is a cover of ww if every position in ww lies within some occurrence of uu in ww. A word ww covered by uu thus generalizes the idea of a repetition, that is, a word composed of exact concatenations of uu. In this article we introduce a new notion of α\alpha-partial cover, which can be viewed as a relaxed variant of cover, that is, a factor covering at least α\alpha positions in ww. We develop a data structure of O(n)O(n) size (where n=wn=|w|) that can be constructed in O(nlogn)O(n\log n) time which we apply to compute all shortest α\alpha-partial covers for a given α\alpha. We also employ it for an O(nlogn)O(n\log n)-time algorithm computing a shortest α\alpha-partial cover for each α=1,2,,n\alpha=1,2,\ldots,n

    Efficient Seeds Computation Revisited

    Get PDF
    The notion of the cover is a generalization of a period of a string, and there are linear time algorithms for finding the shortest cover. The seed is a more complicated generalization of periodicity, it is a cover of a superstring of a given string, and the shortest seed problem is of much higher algorithmic difficulty. The problem is not well understood, no linear time algorithm is known. In the paper we give linear time algorithms for some of its versions --- computing shortest left-seed array, longest left-seed array and checking for seeds of a given length. The algorithm for the last problem is used to compute the seed array of a string (i.e., the shortest seeds for all the prefixes of the string) in O(n2)O(n^2) time. We describe also a simpler alternative algorithm computing efficiently the shortest seeds. As a by-product we obtain an O(nlog(n/m))O(n\log{(n/m)}) time algorithm checking if the shortest seed has length at least mm and finding the corresponding seed. We also correct some important details missing in the previously known shortest-seed algorithm (Iliopoulos et al., 1996).Comment: 14 pages, accepted to CPM 201

    Internal Quasiperiod Queries

    Full text link
    Internal pattern matching requires one to answer queries about factors of a given string. Many results are known on answering internal period queries, asking for the periods of a given factor. In this paper we investigate (for the first time) internal queries asking for covers (also known as quasiperiods) of a given factor. We propose a data structure that answers such queries in O(lognloglogn)O(\log n \log \log n) time for the shortest cover and in O(logn(loglogn)2)O(\log n (\log \log n)^2) time for a representation of all the covers, after O(nlogn)O(n \log n) time and space preprocessing.Comment: To appear in the SPIRE 2020 proceeding

    Searching of gapped repeats and subrepetitions in a word

    Full text link
    A gapped repeat is a factor of the form uvuuvu where uu and vv are nonempty words. The period of the gapped repeat is defined as u+v|u|+|v|. The gapped repeat is maximal if it cannot be extended to the left or to the right by at least one letter with preserving its period. The gapped repeat is called α\alpha-gapped if its period is not greater than αv\alpha |v|. A δ\delta-subrepetition is a factor which exponent is less than 2 but is not less than 1+δ1+\delta (the exponent of the factor is the quotient of the length and the minimal period of the factor). The δ\delta-subrepetition is maximal if it cannot be extended to the left or to the right by at least one letter with preserving its minimal period. We reveal a close relation between maximal gapped repeats and maximal subrepetitions. Moreover, we show that in a word of length nn the number of maximal α\alpha-gapped repeats is bounded by O(α2n)O(\alpha^2n) and the number of maximal δ\delta-subrepetitions is bounded by O(n/δ2)O(n/\delta^2). Using the obtained upper bounds, we propose algorithms for finding all maximal α\alpha-gapped repeats and all maximal δ\delta-subrepetitions in a word of length nn. The algorithm for finding all maximal α\alpha-gapped repeats has O(α2n)O(\alpha^2n) time complexity for the case of constant alphabet size and O(nlogn+α2n)O(n\log n + \alpha^2n) time complexity for the general case. For finding all maximal δ\delta-subrepetitions we propose two algorithms. The first algorithm has O(nloglognδ2)O(\frac{n\log\log n}{\delta^2}) time complexity for the case of constant alphabet size and O(nlogn+nloglognδ2)O(n\log n +\frac{n\log\log n}{\delta^2}) time complexity for the general case. The second algorithm has O(nlogn+nδ2log1δ)O(n\log n+\frac{n}{\delta^2}\log \frac{1}{\delta}) expected time complexity

    A_{n-1} singularities and nKdV hierarchies

    Full text link
    According to a conjecture of E. Witten proved by M. Kontsevich, a certain generating function for intersection indices on the Deligne -- Mumford moduli spaces of Riemann surfaces coincides with a certain tau-function of the KdV hierarchy. The generating function is naturally generalized under the name the {\em total descendent potential} in the theory of Gromov -- Witten invariants of symplectic manifolds. The papers arXiv: math.AG/0108100 and arXive: math.DG/0108160 contain two equivalent constructions, motivated by some results in Gromov -- Witten theory, which associate a total descendent potential to any semisimple Frobenius structure. In this paper, we prove that in the case of K.Saito's Frobenius structure on the miniversal deformation of the An1A_{n-1}-singularity, the total descendent potential is a tau-function of the nnKdV hierarchy. We derive this result from a more general construction for solutions of the nnKdV hierarchy from n1n-1 solutions of the KdV hierarchy.Comment: 29 pages, to appear in Moscow Mathematical Journa

    Strings on Celestial Sphere

    Full text link
    We transform superstring scattering amplitudes into the correlation functions of primary conformal fields on two-dimensional celestial sphere. The points on celestial sphere are associated to the asymptotic directions of (light-like) momenta of external particles, with the Lorentz group realized as the SL(2,C) conformal symmetry of the sphere. The energies are dualized through Mellin transforms into the parameters that determine dimensions of the primaries. We focus on four-point amplitudes involving gauge bosons and gravitons in type I open superstring theory and in closed heterotic superstring theory at the tree-level.Comment: 28 pages, harvmac; v2: added Appendix A, final version to appear in Nucl. Phys.

    The Number of Repetitions in 2D-Strings

    Get PDF
    The notions of periodicity and repetitions in strings, and hence these of runs and squares, naturally extend to two-dimensional strings. We consider two types of repetitions in 2D-strings: 2D-runs and quartics (quartics are a 2D-version of squares in standard strings). Amir et al. introduced 2D-runs, showed that there are O(n3)O(n^3) of them in an n×nn \times n 2D-string and presented a simple construction giving a lower bound of Ω(n2)\Omega(n^2) for their number (TCS 2020). We make a significant step towards closing the gap between these bounds by showing that the number of 2D-runs in an n×nn \times n 2D-string is O(n2log2n)O(n^2 \log^2 n). In particular, our bound implies that the O(n2logn+output)O(n^2\log n + \textsf{output}) run-time of the algorithm of Amir et al. for computing 2D-runs is also O(n2log2n)O(n^2 \log^2 n). We expect this result to allow for exploiting 2D-runs algorithmically in the area of 2D pattern matching. A quartic is a 2D-string composed of 2×22 \times 2 identical blocks (2D-strings) that was introduced by Apostolico and Brimkov (TCS 2000), where by quartics they meant only primitively rooted quartics, i.e. built of a primitive block. Here our notion of quartics is more general and analogous to that of squares in 1D-strings. Apostolico and Brimkov showed that there are O(n2log2n)O(n^2 \log^2 n) occurrences of primitively rooted quartics in an n×nn \times n 2D-string and that this bound is attainable. Consequently the number of distinct primitively rooted quartics is O(n2log2n)O(n^2 \log^2 n). Here, we prove that the number of distinct general quartics is also O(n2log2n)O(n^2 \log^2 n). This extends the rich combinatorial study of the number of distinct squares in a 1D-string, that was initiated by Fraenkel and Simpson (J. Comb. Theory A 1998), to two dimensions. Finally, we show some algorithmic applications of 2D-runs. (Abstract shortened due to arXiv requirements.)Comment: To appear in the ESA 2020 proceeding
    corecore