[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-84665-en":3,"doc-seo-84665-105":29,"detail-sidebar-cat-0-en-105":91},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":20,"is_deleted":4,"is_public":20,"is_downloadable":20,"audit_status":20,"page_count":21,"language":22,"language_code":23,"site_id":24,"html_lang":23,"table_of_contents":25,"faqs":26,"seo_title":13,"seo_description":14,"update_tm":27,"read_time":28},84665,4810365810221,"Aurora","https://ap-avatar.wpscdn.com/davatar_155a257f0dc6eb9ab79c44ca47cae57d",8,"Research & Report","Compact Enumeration of Maximal Closed Substrings in Run-Length Encoded Strings","Compact enumeration of maximal closed substrings (MCS) is developed directly on run-length encoded (RLE) strings to avoid expanding the input. A string is closed when its borders occur only as prefix and suffix, and maximal closed substrings correspond to maximal closed repeats. For an RLE of size m representing a length-n string, all MCS occurrences are represented by a compact family whose size is O(m2), sometimes tight. The method uses border-occurrence pairs, suffix-tree machinery on run-start suffixes, and range reporting over RLE-boundary point sets, achieving listing in O(m log2 m + |F| log m) time with O(m) space.","arXiv :2607 .02838v 1 [ cs .DS] 3 Jul 2026  \nCompact Enumeration of Maximal Closed Substrings in Run-Length Encoded Strings  \nHaruki Umezaki 1 , Hiroki Shibata2, Yuto Nakashima3, and Shunsuke Inenaga3  \n1 Department of Information Science and Technology, Kyushu University  \n[umezaki.haruki.314@s.kyushu-u.ac.jp](umezaki.haruki.314@s.kyushu-u.ac.jp)  \n2 Joint Graduate School of Mathematics for Innovation, Kyushu University  \n[shibata.hiroki.753@s.kyushu-u.ac.jp](shibata.hiroki.753@s.kyushu-u.ac.jp)  \n3 Department of Informatics, Kyushu University  \n{nakashima.yuto.003, [inenaga.shunsuke.380](inenaga.shunsuke.380}@m.kyushu-u.ac.jp)[}](inenaga.shunsuke.380}@m.kyushu-u.ac.jp)[@m.kyushu-u.ac.jp](inenaga.shunsuke.380}@m.kyushu-u.ac.jp)  \n[Abstract.](Abstract. A string w is closed if |w| = 1)[ A string](Abstract. A string w is closed if |w| = 1)[ w](Abstract. A string w is closed if |w| = 1)[ is](Abstract. A string w is closed if |w| = 1)[ closed](Abstract. A string w is closed if |w| = 1)[ if](Abstract. A string w is closed if |w| = 1)[ |](Abstract. A string w is closed if |w| = 1)[w](Abstract. A string w is closed if |w| = 1)[|](Abstract. A string w is closed if |w| = 1)[ = 1](Abstract. A string w is closed if |w| = 1), [or if](or if) w has a non-empty border occurring only as its prefix and suffix. A maximal closed substring (MCS) is a maximal occurrence of a closed string; equivalently, it is a maximal closed repeat (MCR) . We study MCS enumeration directly from the run-length encoding (RLE) of a string. For a string T of length n with RLE size m, we introduce a compact family representation for all MCS occurrences. We prove that O(m2 ) families are always sufficient and sometimes necessary. The representation relies on consecutive occurrence pairs of longest borders, classified by the RLE length of the border. Thenon-unary non-periodic cases are handled uniformly by a sparse suffix tree on run-start suffixes and height-based three-sided range reporting over RLE-boundary point sets; periodic cases are treated separately. Using McCreight’s balanced priority search trees, the compact representation F of all MCSs can be listed in O(m log2 m + |F|log m) time with O (m) working space.  \n1 Introduction  \nRepeated substrings are among the most fundamental objects in string processing. Classical examples include squares, runs, maximal repeats, gapped repeats, and their algorithmic variants. A string is called closed if it is of length one, or if it has a non-empty border that occurs in the string only as the prefix and the suffix. Badkobeh et al. [2] introduced maximal closed substrings (MCSs), namely occurrences of closed substrings that cannot be extended to the left nor to the right into a longer closed substring. They showed that MCSs with exponent at least two are exactly runs, while the other MCSs form a subclass of maximal gapped repeats. They also showed that all MCSs in a string of length n can be computed in O (nlog n) time with O (n) space. Their algorithm also implies an O (nlog n) upper bound for the number of MCSs occurring in any string of length n [2] . Kosolobov [5] later introduced maximal closed repeats (MCRs) and showed a matching Ω (nlog n) lower bound on their number in a string of length n.  \n2 Umezaki, Shibata, Nakashima, Inenaga  \nThis paper studies MCSs from the viewpoint of compressed computation. We focus on the most basic compression scheme, run-length encoding (RLE) . Given an RLE string T = ce11 ··· cemm of size m with ci  ci+1 and ei ≥ 1, our goal is to describe and enumerate the MCSs of T without expanding T. Since the number of MCSs can be Θ (nlog n) in the expanded length n [5], it is hopeless to output all occurrences within a time bound depending polynomially only on m in the worst case. We therefore aim at a compact representation by RLE-based families.  \nOur classification is RLE-based in spirit, as in the RLE-based study of minimal absent words [1], but the structural object is a pair of consecutive","cbCainhpuAEhrGxI","https://ap.wps.com/l/cbCainhpuAEhrGxI","pdf",419131,1,12,"English","en",105,"# Introduction\n# RLE-based viewpoint and goals\n# Preliminaries","[{\"question\":\"What is a closed string and how does it relate to maximal closed substrings (MCS)?\",\"answer\":\"A string is closed if it has length one or it has a non-empty border that occurs in the string only as prefix and suffix. A maximal closed substring (MCS) is a closed occurrence that cannot be extended left or right into a longer closed substring.\"},{\"question\":\"Why does the paper avoid expanding the run-length encoded (RLE) string?\",\"answer\":\"In the expanded string, the number of MCS occurrences can be Θ(n log n), making explicit enumeration impractical under bounds depending only on the RLE size m. The paper therefore seeks a compact RLE-based family representation of all MCS occurrences.\"},{\"question\":\"What is the main complexity result for listing all MCSs from an RLE?\",\"answer\":\"For an RLE of size m, a compact family of size O(m^2) representing all MCSs can be computed in O(m log^2 m + |F| log m) time using O(m) working space.\"}]",1784197559,30,{"code":4,"msg":30,"data":31},"ok",{"site_id":24,"language":23,"slug":32,"title":13,"keywords":33,"description":14,"schema_data":34,"social_meta":86,"head_meta":88,"extra_data":90,"updated_unix":27},"compact-enumeration-of-maximal-closed-substrings-in-run-length-encoded-strings","",{"@graph":35,"@context":85},[36,53,68],{"@type":37,"itemListElement":38},"BreadcrumbList",[39,43,47,50],{"item":40,"name":41,"@type":42,"position":20},"https://docshare.wps.com","Home","ListItem",{"item":44,"name":45,"@type":42,"position":46},"https://docshare.wps.com/document/","Document",2,{"item":48,"name":12,"@type":42,"position":49},"https://docshare.wps.com/document/research-report/",3,{"item":51,"name":13,"@type":42,"position":52},"https://docshare.wps.com/document/compact-enumeration-of-maximal-closed-substrings-in-run-length-encoded-strings/84665/",4,{"url":51,"name":13,"@type":54,"author":55,"headline":13,"publisher":57,"fileFormat":60,"inLanguage":23,"description":14,"dateModified":61,"datePublished":62,"encodingFormat":60,"isAccessibleForFree":63,"interactionStatistic":64},"DigitalDocument",{"name":9,"@type":56},"Person",{"url":40,"name":58,"@type":59},"DocShare","Organization","application/pdf","2026-07-23","2026-07-16",true,{"@type":65,"interactionType":66,"userInteractionCount":20},"InteractionCounter",{"@type":67},"ViewAction",{"@type":69,"mainEntity":70},"FAQPage",[71,77,81],{"name":72,"@type":73,"acceptedAnswer":74},"What is a closed string and how does it relate to maximal closed substrings (MCS)?","Question",{"text":75,"@type":76},"A string is closed if it has length one or it has a non-empty border that occurs in the string only as prefix and suffix. A maximal closed substring (MCS) is a closed occurrence that cannot be extended left or right into a longer closed substring.","Answer",{"name":78,"@type":73,"acceptedAnswer":79},"Why does the paper avoid expanding the run-length encoded (RLE) string?",{"text":80,"@type":76},"In the expanded string, the number of MCS occurrences can be Θ(n log n), making explicit enumeration impractical under bounds depending only on the RLE size m. The paper therefore seeks a compact RLE-based family representation of all MCS occurrences.",{"name":82,"@type":73,"acceptedAnswer":83},"What is the main complexity result for listing all MCSs from an RLE?",{"text":84,"@type":76},"For an RLE of size m, a compact family of size O(m^2) representing all MCSs can be computed in O(m log^2 m + |F| log m) time using O(m) working space.","https://schema.org",{"og:url":51,"og:type":87,"og:title":13,"og:site_name":58,"og:description":14},"article",{"robots":89,"canonical":51},"index,follow",{"doc_id":7,"site_id":24},{"code":4,"msg":5,"data":92},[93,97,101,105,110,115,120,122,127,130,134],{"id":20,"doc_module":4,"doc_module_name":45,"category_name":94,"show_sort_weight":95,"slug":96},"Story & Novel",90,"story-novel",{"id":46,"doc_module":4,"doc_module_name":45,"category_name":98,"show_sort_weight":99,"slug":100},"Literature",80,"literature",{"id":52,"doc_module":4,"doc_module_name":45,"category_name":102,"show_sort_weight":103,"slug":104},"Exam",70,"exam",{"id":106,"doc_module":4,"doc_module_name":45,"category_name":107,"show_sort_weight":108,"slug":109},5,"Comic",60,"comic",{"id":111,"doc_module":4,"doc_module_name":45,"category_name":112,"show_sort_weight":113,"slug":114},6,"Technology",50,"technology",{"id":116,"doc_module":4,"doc_module_name":45,"category_name":117,"show_sort_weight":118,"slug":119},7,"Healthcare",40,"healthcare",{"id":11,"doc_module":4,"doc_module_name":45,"category_name":12,"show_sort_weight":28,"slug":121},"research-report",{"id":123,"doc_module":4,"doc_module_name":45,"category_name":124,"show_sort_weight":125,"slug":126},9,"Religion & Spirituality",20,"religion-spirituality",{"id":125,"doc_module":4,"doc_module_name":45,"category_name":128,"show_sort_weight":125,"slug":129},"World Cup","world-cup",{"id":131,"doc_module":4,"doc_module_name":45,"category_name":132,"show_sort_weight":131,"slug":133},10,"Lifestyle","lifestyle",{"id":135,"doc_module":4,"doc_module_name":45,"category_name":136,"show_sort_weight":106,"slug":137},19,"General","general"]