Papers
Topics
Authors
Recent
Search
2000 character limit reached

LZ-End: Structured Parsing Variant

Updated 7 July 2026
  • LZ-End is a variant of LZ-style parsing that restricts copied phrases to have endpoints at earlier phrase boundaries, ensuring efficient random access.
  • It typically sacrifices some compression power compared to LZ77 while enabling enhanced local decoding and richer structural analysis.
  • Research focuses on its greedy versus optimal parsing differences, NP-hardness of optimal parsing, and sensitivity to local text modifications.

Searching arXiv for papers on LZ-End parsing, approximation, hardness, sensitivity, and related random-access variants. LZ-End is a variant of LZ-style string factorization in which each copied phrase must have a previous occurrence whose endpoint coincides with the end of an earlier phrase. This end-alignment constraint places LZ-End between unrestricted LZ77-style parsing and more structured compression schemes: it typically sacrifices some compression power relative to LZ77, but it enables stronger random-access and local-decoding properties and supports a rich body of structural, algorithmic, and complexity-theoretic results. The literature distinguishes the original greedy left-to-right parsing introduced by Kreft and Navarro from the optimization problem of finding a minimum-size valid LZ-End factorization; this distinction has become central in recent work on parsing complexity, approximation, dynamic stability under edits, and compressed indexing (Kempa et al., 2016, Ideue et al., 2021, Bannai et al., 2023, Fujie et al., 28 Jun 2025, Dinklage, 2024).

1. Definition and parsing model

An LZ-style factorization of a string TT is a decomposition into phrases f1,,fzf_1,\dots,f_z such that each phrase is either a fresh character or a copy of a substring occurring earlier in the text. LZ-End imposes an additional structural restriction: every copied phrase must have a previous occurrence ending at a previous phrase boundary (Fujie et al., 28 Jun 2025, Ideue et al., 2021).

One standard formulation describes the greedy LZ-End factorization q1,,qzq_1,\dots,q_{z'} of a string ww so that qi[1..qi1]q_i[1..|q_i|-1] is the longest prefix of the remaining suffix that occurs as a suffix of q1qjq_1\cdots q_j for some j<ij<i; exceptionally, the last phrase may be a suffix of ww that occurs as a suffix of q1qjq_1\cdots q_j for some j<zj<z' (Ideue et al., 2021). Equivalent descriptions appear throughout the literature. In a triple-based representation, a phrase is encoded as f1,,fzf_1,\dots,f_z0, where f1,,fzf_1,\dots,f_z1 is a source phrase, f1,,fzf_1,\dots,f_z2 is the copied length, and f1,,fzf_1,\dots,f_z3 is a trailing character; the copied substring ends at the end of phrase f1,,fzf_1,\dots,f_z4 (Dinklage et al., 23 Jul 2025, Roodt et al., 2020, Dinklage, 2024).

The essential contrast with LZ77 is therefore not the existence of copying, but the admissible source geometry. In LZ77, the source may end anywhere in the preceding text; in LZ-End, it must end at a phrase boundary (Ideue et al., 2021, Dinklage, 2024). This boundary synchronization is the defining combinatorial feature of the scheme and underlies both its algorithmic strengths and its limitations.

The literature also distinguishes greedy and optimal forms. The original LZ-End is greedy, choosing the longest valid next phrase from left to right (Bannai et al., 2023). Later work studies an optimal LZ-End parsing, meaning any valid LZ-End-like factorization minimizing the number of phrases (Bannai et al., 2023, Fujie et al., 28 Jun 2025). This distinction is nontrivial: unlike LZ77, where greedy parsing is also optimal in the relevant sense, greedy LZ-End can be strictly suboptimal (Bannai et al., 2023).

2. Relation to neighboring compression schemes

LZ-End belongs to a broader family of restricted LZ-like parsings designed to balance compressibility and random access. It is usually compared most directly with LZ77, LZSS, grammar-based compression, and more recent access-oriented schemes such as LZSE (Shibata et al., 25 Jun 2025).

Relative to LZ77, LZ-End is weaker as a parser because end-alignment removes many otherwise legal sources. This can enlarge the parse. On the period-doubling sequence f1,,fzf_1,\dots,f_z5, the LZ77 phrase count is f1,,fzf_1,\dots,f_z6, whereas the LZ-End phrase count is f1,,fzf_1,\dots,f_z7 with f1,,fzf_1,\dots,f_z8, so the approximation ratio of LZ-End to LZ77 asymptotically approaches f1,,fzf_1,\dots,f_z9 even over a binary alphabet (Ideue et al., 2021). This sharpened an earlier large-alphabet separation by showing that the same asymptotic lower bound already appears on the smallest nontrivial alphabet (Ideue et al., 2021).

Relative to grammar-based compression, the picture is subtler. The LZSE work shows that greedy LZSE can be asymptotically smaller than the smallest grammar, and explicitly states that the same argument applies to greedy LZ-End, thereby answering an open question: there exist strings for which greedy LZ-End is asymptotically smaller than the smallest grammar (Shibata et al., 25 Jun 2025). At the same time, the optimal LZ-End paper notes the relation q1,,qzq_1,\dots,q_{z'}0, where q1,,qzq_1,\dots,q_{z'}1 is the smallest context-free grammar size, as one motivation for studying the optimal—not greedy—variant (Bannai et al., 2023). This suggests that greedy and optimal LZ-End occupy distinct positions relative to grammar measures.

Relative to LZSE, LZ-End is less restrictive. LZSE requires every copy factor to be a contiguous sequence of preceding factors, meaning both the start and end of the source align to factor boundaries, whereas LZ-End only requires end alignment (Shibata et al., 25 Jun 2025). A plausible implication is that LZ-End generally achieves better compression than LZSE, while LZSE can support a cleaner q1,,qzq_1,\dots,q_{z'}2-time random-access structure (Shibata et al., 25 Jun 2025).

3. Random access, extraction, and compressed indexing

The primary practical motivation for LZ-End has long been extraction efficiency. Because phrase sources end at phrase boundaries, decoding a symbol or substring requires following a more structured dependency chain than in unrestricted LZ77. This makes local extraction feasible with compact auxiliary structures and motivated LZ-End’s introduction as an extraction-friendly alternative to LZ77 (Ideue et al., 2021, Roodt et al., 2020, Dinklage, 2024).

A recurrent access bound in the literature is that if q1,,qzq_1,\dots,q_{z'}3 denotes the length of the longest phrase, then a substring of length q1,,qzq_1,\dots,q_{z'}4 can be decoded in q1,,qzq_1,\dots,q_{z'}5 time (Dinklage, 2024), and related work cites an LZ-End index supporting random access in q1,,qzq_1,\dots,q_{z'}6 time (Shibata et al., 25 Jun 2025). This access property is precisely why LZ-End repeatedly appears as a design point between strong compression and efficient query support.

This trade-off has recently been revisited in compressed self-indexing. In “RLZ-r and LZ-End-r: Enhancing Move-r” (Dinklage et al., 23 Jul 2025), LZ-End is used not as a new parsing definition but as a compression scheme for the differential suffix array inside q1,,qzq_1,\dots,q_{z'}7-index and Move-q1,,qzq_1,\dots,q_{z'}8 variants. The paper derives a data structure of size q1,,qzq_1,\dots,q_{z'}9 supporting reconstruction of a suffix-array interval in time

ww0

where ww1 is the number of LZ-End phrases in the differential suffix array and ww2 is the longest phrase length (Dinklage et al., 23 Jul 2025). The empirical conclusion is an explicit size/speed trade-off: LZ-End-based suffix-array compression is typically smaller than RLZ-based compression but slower to access (Dinklage et al., 23 Jul 2025).

This access-oriented role also motivates new restricted schemes. LZSE is introduced precisely because unrestricted LZ-like factorizations lack known compressed-linear random-access structures, whereas restricted variants such as LZ-End can support access more effectively (Shibata et al., 25 Jun 2025). In that sense, LZ-End is now best understood as one of the canonical “structured LZ” schemes in compressed data structures.

4. Construction algorithms and practical parsing

The algorithmic study of LZ-End parsing has followed two tracks: asymptotic construction complexity and practical implementability. A key structural lemma used in multiple construction algorithms is that if ww3 is the LZ-End parsing of a string ww4, then for any appended character ww5, the last phrase in the parsing of ww6 is one of only three forms: ww7, ww8, or ww9 (Kempa et al., 2016, Dinklage, 2024). This trichotomy permits left-to-right algorithms that only inspect the recent suffix structure.

A compressed-space construction algorithm builds the parsing in qi[1..qi1]q_i[1..|q_i|-1]0 expected time and qi[1..qi1]q_i[1..|q_i|-1]1 space, where qi[1..qi1]q_i[1..|q_i|-1]2 is input length, qi[1..qi1]q_i[1..|q_i|-1]3 is the number of phrases, and qi[1..qi1]q_i[1..|q_i|-1]4 is the length of the longest phrase (Kempa et al., 2016). It can also be run with a fixed phrase-length cap qi[1..qi1]q_i[1..|q_i|-1]5, giving an approximate LZ-End parsing in streaming fashion with one left-to-right pass and one right-to-left verification pass (Kempa et al., 2016). This result is significant because earlier LZ-End construction required qi[1..qi1]q_i[1..|q_i|-1]6 space, which is prohibitive on very large repetitive inputs (Kempa et al., 2016).

A later practical study focuses on the simpler qi[1..qi1]q_i[1..|q_i|-1]7-time algorithm of Kempa and Kosolobov and argues that it is the right implementation sweet spot (Dinklage, 2024). The paper simplifies the method, incorporates undocumented implementation tricks, uses lazy evaluation to reduce dictionary operations, and removes a level of indirection by storing phrase identifiers directly in the dynamic predecessor/successor structure (Dinklage, 2024). In benchmark comparisons excluding preprocessing time, this implementation outperforms the prior state of the art on most tested inputs, though highly repetitive inputs can still favor the older merge-first tuning (Dinklage, 2024).

These algorithmic results reveal an important feature of LZ-End research: the asymptotically optimal theory exists, but the practically relevant frontier lies in exploiting the boundary-restricted structure without importing excessive indexing machinery (Dinklage, 2024).

5. Optimal parsing, hardness, and approximation phenomena

The structural distinction between greedy and optimal LZ-End has deep complexity consequences. “Optimal LZ-End Parsing is Hard” proves that the decision version of computing the minimum-size LZ-End-like parsing is NP-complete via reduction from vertex cover (Bannai et al., 2023). The reduction constructs a string

qi[1..qi1]q_i[1..|q_i|-1]8

whose admissible phrase-boundary choices encode vertex selection in a cover (Bannai et al., 2023). The resulting theorem places optimal LZ-End alongside a growing class of NP-hard repetitiveness measures.

The same paper gives a MAX-SAT formulation for exact computation, using Boolean variables for phrase starts, leftmost singleton occurrences, and reference relations, with qi[1..qi1]q_i[1..|q_i|-1]9 variables and q1qjq_1\cdots q_j0 total CNF size (Bannai et al., 2023). This does not alter the hardness classification, but it provides an exact route for moderate-size instances and formalizes the end-boundary constraints as satisfiability conditions.

The greedy/optimal gap can itself approach q1qjq_1\cdots q_j1. For the family

q1qjq_1\cdots q_j2

the paper shows that the greedy parse size is q1qjq_1\cdots q_j3, while a valid non-greedy parse has size q1qjq_1\cdots q_j4, so the ratio q1qjq_1\cdots q_j5 asymptotically approaches q1qjq_1\cdots q_j6 (Bannai et al., 2023). This mirrors the well-known ratio-2 phenomenon between greedy LZ-End and LZ77 (Ideue et al., 2021), but now entirely within the class of LZ-End-admissible parsings.

A common misconception is that LZ-End is simply “LZ77 with a nicer source convention,” so greediness should remain essentially optimal. The hardness and approximation results show that phrase boundaries are not passive metadata: they are part of the state space. Choosing a shorter phrase can create a future source endpoint and thereby alter the admissibility of many subsequent phrases (Bannai et al., 2023).

6. Stability under edits and local modification

A distinct research direction concerns how LZ-End reacts to text edits. “Tight Additive Sensitivity on LZ-style Compressors and String Attractors” proves that the worst-case additive sensitivity of optimal LZ-End under a single-character substitution, insertion, or deletion is q1qjq_1\cdots q_j7 (Fujie et al., 28 Jun 2025). Formally, for each edit type in q1qjq_1\cdots q_j8,

q1qjq_1\cdots q_j9

The lower bound is obtained through a family where one changed character destroys a critical source and forces j<ij<i0 later gadgets to split (Fujie et al., 28 Jun 2025). The upper bound uses an LZ-End-specific repair analysis: the phrase containing the edit can be reparsed into at most j<ij<i1 phrases, where j<ij<i2 is its phrase index, and later phrases whose sources cross the edited position split into at most three phrases (Fujie et al., 28 Jun 2025).

This sensitivity result places LZ-End near LZSS/LZ77-style schemes rather than LZ78. It is less stable than string attractors or bidirectional schemes, which have j<ij<i3 sensitivity, but more stable than LZ78, which has linear j<ij<i4 sensitivity (Fujie et al., 28 Jun 2025).

A more operational perspective appears in “Local Editing in LZ-End Compressed Data” (Roodt et al., 2020), which presents an algorithm for insertion, deletion, and replacement directly on LZ-End-compressed data without global decompression. The unified update is

j<ij<i5

which replaces j<ij<i6 by j<ij<i7 (Roodt et al., 2020). The method identifies phrases touched by the edit, finds later dependent phrases, constructs safe replacement phrases for those dependents, locally encodes the inserted material, and adjusts phrase pointers (Roodt et al., 2020). The resulting structure remains decodable by the standard LZ-End decoder.

However, the paper is explicit that phrase uniqueness may be lost, so the usual coarse-optimality guarantees of LZ-End no longer apply after local edits (Roodt et al., 2020). Empirically, compression degradation is small for small edits and insertions, but can be severe for deletions or repeated edits on highly repetitive data (Roodt et al., 2020). This suggests that LZ-End’s structural locality is sufficient for mutability, but not for maintaining globally good compression under adversarial edit patterns.

7. Theoretical position and open directions

The modern picture of LZ-End is that of a boundary-constrained parsing family with three interlocking faces: a practically useful greedy parser, an NP-hard optimal variant, and a source of access-friendly compressed structures. Several theoretical themes remain active.

One is the approximation ratio between greedy LZ-End and LZ77. The period-doubling result establishes a binary lower bound tending to j<ij<i8 (Ideue et al., 2021), but no general upper bound matching this is given there. Another is the approximation ratio between greedy and optimal LZ-End: the lower bound again tends to j<ij<i9, but the existence of a constant-factor upper bound remains open in the optimal-parsing work (Bannai et al., 2023).

A second theme concerns the role of LZ-End among repetitiveness measures. Recent work positions it between unrestricted LZ-style parsing and grammar compression (Shibata et al., 25 Jun 2025), and additive-sensitivity analysis shows that its response to edits matches the ww0 scale of LZSS rather than the linear instability of LZ78 (Fujie et al., 28 Jun 2025). This suggests that LZ-End inherits much of the global-copy behavior of LZ77-like schemes while remaining structurally constrained enough to support query-efficient representations.

A third theme is practical engineering. Construction algorithms in compressed or near-linear space are available (Kempa et al., 2016), and the ww1 parser has been made comparatively easy to implement and practically efficient (Dinklage, 2024). At the same time, exact optimization is computationally intractable in the worst case (Bannai et al., 2023), so practical use continues to rely on greedy parsing.

Taken together, these results support a precise characterization. LZ-End is not merely a historical variant of LZ77. It is a structurally constrained parsing model whose endpoint-aligned sources generate nontrivial combinatorics, efficient extraction, distinctive sensitivity behavior under edits, and a sharp separation between greedy practice and optimal theory (Kempa et al., 2016, Ideue et al., 2021, Bannai et al., 2023, Shibata et al., 25 Jun 2025, Fujie et al., 28 Jun 2025, Dinklage, 2024).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to LZ-End.