Computing runs on a trie

01/30/2019
by   Ryo Sugahara, et al.
0

A maximal repeat, or run, in a string, is a periodically maximal substring whose smallest period is at most half the length of the substring. In this paper, we consider runs that correspond to a path on a trie, or in other words, on a rooted edge-labeled tree where the endpoints of the path must be a descendant/ancestor of the other. For a trie with n edges, we show that the number of runs is less than n. We also show an O(n√( n) n) time and O(n) space algorithm for counting and finding the shallower endpoint of all runs. We further show an O(n√( n)^2 n) time and O(n) space algorithm for finding both endpoints of all runs.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/29/2019

A Time-space Trade-off for Computing the Geodesic Center of a Simple Polygon

In this paper we study the problem of computing the geodesic center of a...
research
02/17/2021

Linear Time Runs over General Ordered Alphabets

A run in a string is a maximal periodic substring. For example, the stri...
research
06/26/2018

Linear-Time Online Algorithm Inferring the Shortest Path from a Walk

We consider the problem of inferring an edge-labeled graph from the sequ...
research
11/08/2022

Computing palindromes on a trie in linear time

A trie 𝒯 is a rooted tree such that each edge is labeled by a single cha...
research
04/17/2018

Time- and space-optimal algorithms for the many-visits TSP

The many-visits traveling salesperson problem (MV-TSP) asks for an optim...
research
05/25/2020

Variance of Longest Run Duration in a Random Bitstring

We continue an earlier study, starting with unconstrained n-bitstrings, ...
research
11/01/2017

Typically-Correct Derandomization for Small Time and Space

Suppose a language L can be decided by a bounded-error randomized algori...

Please sign up or login with your details

Forgot password? Click here to reset