Linear Wiggle Height Minimization in Storylines
- The paper introduces LWHMin, which minimizes total vertical displacement by linearly penalizing each unit of character movement.
- It employs an exact linear-programming formulation that ensures polynomial-time solvability under fixed vertical order constraints.
- Applications in storyline visualizations and stacked area charts demonstrate its efficacy compared to quadratic or count-based wiggle measures.
Searching arXiv for the most relevant papers on linear wiggle height minimization and closely related wiggle-minimization formulations. Linear Wiggle Height Minimization denotes an optimization objective in which wiggle is penalized linearly, by absolute vertical displacement rather than by counts or squares. In the exact current usage of the term, it is the storyline objective
$\LWH(y)=\sum_{t=1}^{\ell-1}\sum_{c\in \Ac(t)\cap \Ac(t+1)}|y_{t,c}-y_{t+1,c}|,$
defined for an ordered storyline instance with fixed vertical order at every time step (Dobler et al., 27 Aug 2025). Closely related absolute-deviation formulations occur in stacked area charts as $1$-WiggleMin and Weighted-$1$-WiggleMin, where wiggle is measured by cumulative border displacement rather than by individual-character motion (Dobler et al., 26 Jun 2025). The common principle is an -type treatment of vertical movement: each unit of displacement contributes proportionally to the objective.
1. Scope and principal formalizations
The term is not universal across visualization and combinatorial-optimization literature. The exact phrase Linear Wiggle Height Minimization (LWHMin) belongs to storyline visualization, whereas stacked area charts use the closely related formulations $1$-WiggleMin and Weighted-$1$-WiggleMin. This suggests a broader viewpoint in which “linear wiggle” means absolute-deviation minimization of vertical variation under domain-specific geometric constraints (Dobler et al., 27 Aug 2025, Dobler et al., 26 Jun 2025).
| Setting | Linear wiggle objective | Status |
|---|---|---|
| Storylines | $\LWH(y)=\sum_{t=1}^{\ell-1}\sum_{c\in \Ac(t)\cap \Ac(t+1)}|y_{t,c}-y_{t+1,c}|$ | Exact LP; polynomial-time solvable when the order is fixed at every time step |
| Stacked area charts | or | Strongly NP-complete; exact MILP for Weighted-$1$-WiggleMin |
| Tangles | Minimum number of layers in a realizing tangle | Related height-minimization problem, but not an $1$0 displacement objective |
In all of these settings, “wiggle” refers to vertical change over time, but the optimized quantity differs. Storylines optimize layerwise character displacement, stacked area charts optimize cumulative border motion, and tangles optimize the number of horizontal layers. Confusing these objectives obscures the role of the underlying combinatorial constraints.
2. Storyline formulation
In storyline visualization, an instance is a 4-tuple
$1$1
where $1$2 is the set of characters, $1$3 is the set of totally ordered time steps, $1$4 is the set of meetings, and $1$5 is the active interval of character $1$6. For each time step $1$7, the active characters are
$1$8
The input to LWHMin is an ordered storyline instance: for every $1$9, a permutation $1$0 of $1$1 is fixed, and every meeting at time $1$2 must appear consecutively in $1$3 (Dobler et al., 27 Aug 2025).
A coordination assigns a vertical coordinate $1$4 to each active character $1$5 at time $1$6. Validity means that the assigned coordinates respect the fixed order: $1$7 The paper further imposes “nice” spacing constraints. If consecutive characters in the order belong to the same meeting at time $1$8, then their distance is exactly the within-meeting spacing,
$1$9
If they do not belong to the same meeting, then their distance is at least the between-meeting spacing,
0
Under these assumptions, Linear Wiggle Height Minimization is the problem of finding a nice coordination minimizing
1
The outer sum ranges over consecutive time steps, and the inner sum ranges only over characters active in both layers. Thus each term 2 is precisely the vertical movement of character 3 from one layer to the next. A central restriction is that crossings are not optimized here: the vertical order is already fixed at every time step, so LWHMin is a post-ordering optimization problem rather than a joint crossing-and-wiggle formulation.
3. Exact linear-programming model and structural properties
LWHMin admits an exact linear-programming formulation. The variables are the coordinates 4 for all 5 and 6, together with wiggle variables 7 for all 8 and 9. The objective is
$1$0
For each time step $1$1, only consecutive pairs in the fixed permutation are constrained: $1$2 This set is partitioned into consecutive pairs inside the same meeting,
$1$3
and consecutive pairs outside the same meeting,
$1$4
The niceness and ordering constraints are
$1$5
and
$1$6
Absolute values are linearized by
$1$7
for all $1$8 and $1$9, together with
$1$0
Minimization then forces
$1$1
This formulation is exact rather than heuristic, and because it is a linear program it is solvable in polynomial time in the standard LP model (Dobler et al., 27 Aug 2025). The paper also proves an integrality property: if $1$2, then all extreme points defined by the wiggle height minimization polytope are integer. The result is stronger than a rounding statement: the extreme-point structure of the feasible polytope is itself integral under integer spacing parameters.
4. Alternative storyline objectives, routing, and empirical behavior
LWHMin is studied alongside two other wiggle notions. Wiggle count is
$1$3
and quadratic wiggle height is
$1$4
These objectives encode different preferences. $1$5 counts whether a movement occurs but ignores magnitude; $1$6 charges proportionally to displacement; $1$7 penalizes large moves more strongly than several small moves (Dobler et al., 27 Aug 2025).
The computational contrast is sharp. LWHMin is solved by the LP above, and QWHMin is solved by a convex quadratic program. By contrast, WCMin is NP-complete in general, although for the special case $1$8 it is polynomial-time solvable in $1$9. The paper also gives an ILP for WCMin. This separation illustrates why linear absolute-deviation objectives are tractable once the per-layer order has been fixed, whereas counting zero-versus-nonzero moves introduces a discrete nonconvex structure.
The paper distinguishes optimization of layerwise $\LWH(y)=\sum_{t=1}^{\ell-1}\sum_{c\in \Ac(t)\cap \Ac(t+1)}|y_{t,c}-y_{t+1,c}|$0-positions from the later routing stage. After the coordinates are fixed, each wiggle is drawn by two circular arcs. If
$\LWH(y)=\sum_{t=1}^{\ell-1}\sum_{c\in \Ac(t)\cap \Ac(t+1)}|y_{t,c}-y_{t+1,c}|$1
and the two arcs have radii $\LWH(y)=\sum_{t=1}^{\ell-1}\sum_{c\in \Ac(t)\cap \Ac(t+1)}|y_{t,c}-y_{t+1,c}|$2 and $\LWH(y)=\sum_{t=1}^{\ell-1}\sum_{c\in \Ac(t)\cap \Ac(t+1)}|y_{t,c}-y_{t+1,c}|$3, then the horizontal space $\LWH(y)=\sum_{t=1}^{\ell-1}\sum_{c\in \Ac(t)\cap \Ac(t+1)}|y_{t,c}-y_{t+1,c}|$4 satisfies
$\LWH(y)=\sum_{t=1}^{\ell-1}\sum_{c\in \Ac(t)\cap \Ac(t+1)}|y_{t,c}-y_{t+1,c}|$5
X-monotonicity is enforced by
$\LWH(y)=\sum_{t=1}^{\ell-1}\sum_{c\in \Ac(t)\cap \Ac(t+1)}|y_{t,c}-y_{t+1,c}|$6
This routing stage does not alter the LWH optimum, because $\LWH(y)=\sum_{t=1}^{\ell-1}\sum_{c\in \Ac(t)\cap \Ac(t+1)}|y_{t,c}-y_{t+1,c}|$7 depends only on the discrete layer coordinates.
The case study reports that optimizing one wiggle objective can degrade the others. Minimizing wiggle count can yield “some large wiggles,” while producing many small wiggles may lead to unnecessarily wide drawings under the routing style used in the paper. In the reported benchmarks, the LP for LWHMin is very fast: on most instances runtime is below $\LWH(y)=\sum_{t=1}^{\ell-1}\sum_{c\in \Ac(t)\cap \Ac(t+1)}|y_{t,c}-y_{t+1,c}|$8 seconds, and even on the largest benchmark instances runtimes remain under about $\LWH(y)=\sum_{t=1}^{\ell-1}\sum_{c\in \Ac(t)\cap \Ac(t+1)}|y_{t,c}-y_{t+1,c}|$9 second. QWHMin is also fast but typically somewhat slower, whereas WCMin via ILP can range from seconds to many hours, and one instance did not finish in 0 hours. The qualitative conclusion is that LP/LWHMin produced the best results most consistently.
5. Stacked area charts and the prefix-sum view of linear wiggle
In stacked area charts, the closest analogue to linear wiggle height minimization is the case 1 of wiggle minimization. The input is a set 2 of 3-time series, where each
4
A solution is a permutation 5 of the time series, interpreted as the bottom-to-top layer order. For border 6 and adjacent time points 7, the wiggle value is
8
This is the vertical displacement of the 9-th cumulative boundary between time points 0 and 1, equivalently the change in the prefix sum of layer heights up to position 2. Wiggle is therefore measured as prefix-sum variation of the stacked layers rather than as curvature or arbitrary boundary motion (Dobler et al., 26 Jun 2025).
The unweighted linear objective is
3
and the weighted linear objective is
4
where 5 is the all-zero time series. The weighted version is described as “more common in the stacked area charts literature,” and it is equivalent to minimizing flatness in Mathiesen and Schulz.
For 6, 7-WiggleMin is equivalent to the number-ordering problem
8
that is, ordering numbers so that the sum of absolute prefix sums is minimized. This special case clarifies the relation between linear wiggle and cumulative deviation. The paper proves several structural facts for Min-9, including the lower bound
$1$0
and an $1$1 algorithm for the case with exactly one negative element, or symmetrically one positive element, under $1$2.
The complexity results are strong. The decision version of Min-$1$3 is strongly NP-complete. Because of the two-time-point equivalence, the decision variants of both $1$4-WiggleMin and Weighted-$1$5-WiggleMin are strongly NP-complete, even for a constant number of time points. More generally, for every integer $1$6, both $1$7-WiggleMin and Weighted-$1$8-WiggleMin are strongly NP-complete. The paper also proves approximation hardness: a PTAS for either problem would imply subexponential-time algorithms for SAT, and under the Small-Set Expansion Hypothesis neither admits a constant-factor approximation.
Despite these hardness results, the paper gives an exact mixed-integer linear program for Weighted-$1$9-WiggleMin. The model uses binary order variables
$1$00
prefix-height variables
$1$01
and absolute wiggle variables $1$02 and $1$03 for upper and lower borders. The objective is
$1$04
Antisymmetry and transitivity constraints encode a total order, and standard absolute-value linearization enforces border movements. The number of constraints is cubic in $1$05, owing to the transitivity constraints on triples.
In the experimental evaluation on $1$06 subinstances sampled from real-world datasets, the MILP solved $1$07 instances to optimality. On those solved instances, the heuristic UpwardsOpt found the optimum on $1$08 instances, and on the remaining solved instances the optimality gaps were generally small. UpwardsOpt was consistently fast, whereas the MILP scales poorly, with timeouts already occurring around $1$09 time series. No memory limit was reached, but runtime was the bottleneck. Thus exact weighted linear wiggle minimization is practically restricted to small and medium instances, even though the heuristic performs well empirically.
6. Related but non-equivalent meanings of height minimization
A recurrent source of confusion is that several nearby arXiv topics optimize “height” without optimizing linear wiggle height in the storyline sense. In Tangle-Height Minimization, the input is a list $1$10 of swaps on $1$11 $1$12-monotone wires, and the objective is to realize $1$13 with the minimum number of horizontal layers. A tangle is a sequence
$1$14
of permutations whose consecutive pairs are adjacent, with total swap multiset equal to $1$15. This is a genuine height-minimization problem, but its objective is the number of layers $1$16, not the sum of absolute vertical displacements. The problem is NP-hard; exact algorithms are given for general lists and for simple lists, but the optimized quantity is combinatorially different from $1$17 or from $1$18-WiggleMin (Firman et al., 2023, Woodstock, 30 Jan 2025).
A second distinct usage appears in convex optimization, where “height” may denote the linear functional $1$19 over a compact convex feasible set $1$20. In that setting, the problem is
$1$21
with minimizer set
$1$22
The paper on projection-based linear minimization shows that one can compute an $1$23-approximate linear minimizer from a single projection
$1$24
with objective-gap bound
$1$25
and that exact minimization is obtainable by one projection for compact convex polyhedral $1$26. Here “linear minimization” and “height” are literal convex-analytic notions; there is no wiggle geometry.
The most precise contemporary meaning of Linear Wiggle Height Minimization therefore remains the storyline problem with objective
$1$27
fixed vertical order at every layer, and exact LP solvability. The stacked-area formulations $1$28-WiggleMin and Weighted-$1$29-WiggleMin are the closest cognate problems in another visualization domain, sharing the same absolute-deviation philosophy but replacing individual trajectories by cumulative boundary motion. Across both domains, the technically salient idea is the same: wiggle is measured linearly in height change, and the computational character of the problem is determined less by the absolute value itself than by the combinatorics of the ordering constraints.