[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-83601-en":3,"doc-seo-83601-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},83601,8796095360427,"Lucas Martin","https://ap-avatar.wpscdn.com/davatar_994ba38a5ba835b3df7d355c54d3ed8d",8,"Research & Report","Fully Persistent Dynamic LCE via AVL Trees and AVL Grammars","The paper investigates fully persistent dynamic strings supporting equality and longest common extension (LCE) queries under updates such as split, concatenation, and single-character substitution. Straightforward full persistence is inefficient for splay-based FeST due to repeated reuse of unbalanced historical versions that break amortized guarantees. It presents FeAVL, a worst-case balanced design using path copying on AVL trees, achieving O(log n) updates, O(log n) equality w.h.p., and O(log n + log^2 ℓ) LCE w.h.p. It further provides an AVL-grammar compressed implementation with total permanent nodes O(g0 + I + U log nmax).","arXiv :2607 .0 1580v 1 [ cs .DS] 2 Jul 2026  \nFully Persistent Dynamic LCE via AVL Trees and AVL Grammars  \nTaiki Kaneda 1 , Hiroki Arimura 1, and Shunsuke Inenaga2  \n1 Graduate School of IST, Hokkaido University, Sapporo, Japan  \n[kaneda.taiki.c9@elms.hokudai.ac.jp](kaneda.taiki.c9@elms.hokudai.ac.jp) , [arim@ist.hokudai.ac.jp](arim@ist.hokudai.ac.jp)  \n2 Department of Informatics, Kyushu University, Fukuoka, Japan  \n[inenaga.shunsuke.380@m.kyushu-u.ac.jp](inenaga.shunsuke.380@m.kyushu-u.ac.jp)  \nAbstract. We study fully persistent dynamic strings with equality and longest common extension (LCE) queries. Straightforward full persistence is problematic for the splay-based FeST structure, since the same unbalanced past version can be reused indefinitely and the usual amortized analysis no longer applies. We give a fully persistent dynamic LCE structure, called FeAVL, based on path copying over AVL trees. For an operation involving string(s) of total length n, it supports split, concatenate, and single-character updates in worst-case O(log n) time, equality in worst-case O(log n) time w.h.p., and LCE in worst-case O(log n + log2 ℓ) time w.h.p. , where ℓ is the answer; each update creates only O(log n) new permanent nodes. We also give a grammar-compressed instantiation via AVL grammars: starting from an initial grammar of size g0 , after U updates, the total number of permanent grammar nodes is O (g0 + I + U log nmax), where I is the number of inserted fresh characters and nmax is the maximum string length appearing during the update sequence.  \n1 Introduction  \nDynamic strings support insertion, deletion, substitution, splitting, and concatenation. A fundamental query on such strings is the longest common extension (LCE) query: given two positions, possibly in two different strings, return the length of the longest common prefix of the two corresponding suffixes. Dynamic LCE and dynamic string equality are basic primitives in dynamic text processing, versioned documents, genome editing, and dynamic indexing.  \nThe dynamic string problem has a long history, from practical rope data structures [2] to the optimal structure of Gawrychowski, Karczmarz, Kociumaka,Łącki, and Sankowski [5], which achieves logarithmic updates and constant-time equality and LCE queries w.h.p. using locally consistent parsing [11] . In contrast, Lipták, Masillo, and Navarro proposed FeST (a forest of  enhanced splay trees) as a simple textbook solution [7] . FeST supports splits, concatenations, equality, and LCE queries with logarithmic or nearly logarithmic amortized bounds.  \nThis paper focuses on making this simple paradigm fully persistent. A fully persistent data structure allows updates on any version, producing a new branch  \n2 T. Kaneda et al.  \nTable 1: Comparison of the AVL-tree version and the AVL-grammar version. I is the number of inserted fresh characters.  \n\n| Measure | AVL-tree version | AVL-grammar version |\n| --- | --- | --- |\n| Initial size | O (n0) | O (g0) |\n| Best initial choice | O (n0) | O(min{n0 , z0 log n0 }) |\n| Split/Concatenate time | O(log n) | O(log n) |\n| Update time | O(log n) | O(log n) |\n| Equality time | O(log n), w.h.p. | O(log n), w.h.p. |\n| LCE time | O(log n + log2 ℓ), w.h.p. | O(log n + log2 ℓ), w.h.p. |\n| New permanent objects/update | O(log n) nodes | O(log n) symbols |\n| Total size after U updates | O (n0 + I + U log nmax) | O (g0 + I + U log nmax) |\n\nof the version history. Throughout this paper, n denotes the total length of the string(s) involved in the operation under consideration. For a sequence of U updates, we write nmax = max0≤i≤U nu , where nu is the corresponding value of n for the u-th update.  \nAmortized structures like splay trees [13] lose efficiency in full persistence because poorly balanced versions can be repeatedly queried. Therefore, we propose FeAVL (a forest of  enhanced AVL trees), replacing self-adjusting trees with worst-case balanced implicit-key trees such as AVL trees [1] augmented ","cbCaiqC7JUG4AiDi","https://ap.wps.com/l/cbCaiqC7JUG4AiDi","pdf",556835,1,13,"English","en",105,"# Introduction\n# Preliminaries\n## Strings and Dynamic LCE","[{\"question\":\"What problem does the paper address in dynamic string processing?\",\"answer\":\"It addresses fully persistent dynamic strings that must support equality queries and longest common extension (LCE) queries while allowing updates like split, concatenation, and single-character changes.\"},{\"question\":\"Why is straightforward full persistence difficult for the splay-based FeST structure?\",\"answer\":\"Because path copying can repeatedly reuse the same poorly balanced past versions, invalidating the usual amortized analysis and harming efficiency in full persistence.\"},{\"question\":\"What are the key performance guarantees of the proposed FeAVL structure?\",\"answer\":\"For operations with total string length n, FeAVL supports split, concatenate, and updates in worst-case O(log n). It supports equality in worst-case O(log n) time with high probability and LCE in worst-case O(log n + log^2 ℓ) time with high probability, where ℓ is the LCE answer.\"}]",1784189126,33,{"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},"fully-persistent-dynamic-lce-via-avl-trees-and-avl-grammars","",{"@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/fully-persistent-dynamic-lce-via-avl-trees-and-avl-grammars/83601/",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-24","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 problem does the paper address in dynamic string processing?","Question",{"text":75,"@type":76},"It addresses fully persistent dynamic strings that must support equality queries and longest common extension (LCE) queries while allowing updates like split, concatenation, and single-character changes.","Answer",{"name":78,"@type":73,"acceptedAnswer":79},"Why is straightforward full persistence difficult for the splay-based FeST structure?",{"text":80,"@type":76},"Because path copying can repeatedly reuse the same poorly balanced past versions, invalidating the usual amortized analysis and harming efficiency in full persistence.",{"name":82,"@type":73,"acceptedAnswer":83},"What are the key performance guarantees of the proposed FeAVL structure?",{"text":84,"@type":76},"For operations with total string length n, FeAVL supports split, concatenate, and updates in worst-case O(log n). It supports equality in worst-case O(log n) time with high probability and LCE in worst-case O(log n + log^2 ℓ) time with high probability, where ℓ is the LCE answer.","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,123,128,131,135],{"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":121,"slug":122},30,"research-report",{"id":124,"doc_module":4,"doc_module_name":45,"category_name":125,"show_sort_weight":126,"slug":127},9,"Religion & Spirituality",20,"religion-spirituality",{"id":126,"doc_module":4,"doc_module_name":45,"category_name":129,"show_sort_weight":126,"slug":130},"World Cup","world-cup",{"id":132,"doc_module":4,"doc_module_name":45,"category_name":133,"show_sort_weight":132,"slug":134},10,"Lifestyle","lifestyle",{"id":136,"doc_module":4,"doc_module_name":45,"category_name":137,"show_sort_weight":106,"slug":138},19,"General","general"]