Detecting Regularities on Grammar-Compressed Strings

  title={Detecting Regularities on Grammar-Compressed Strings},
  author={I Tomohiro and Wataru Matsubara and Kouji Shimohira and Shunsuke Inenaga and Hideo Bannai and Masayuki Takeda and Kazuyuki Narisawa and Ayumi Shinohara},
We solve the problems of detecting and counting various forms of regularities in a string represented as a Straight Line Program (SLP). Given an SLP of size n that represents a string s of length N , our algorithm compute all runs and squares in s in O(nh) time and O(n) space, where h is the height of the derivation tree of the SLP. We also show an… CONTINUE READING