Papers
Topics
Authors
Recent
Search
2000 character limit reached

Greedy Sequencing Rule

Updated 5 April 2026
  • GSR is a systematic method for sequentially selecting the best immediate option while ensuring overall sequence feasibility across various fields.
  • In additive combinatorics, GSR constructs B_h[g]-sequences by choosing the smallest legal numbers to maintain constraints, linking to classic Sidon sets.
  • In decentralized finance and iterative solvers, GSR optimizes transaction ordering and convergence by enforcing local optimality and robust residual selection.

The Greedy Sequencing Rule (GSR) is a paradigm for sequentially selecting actions or arranging events according to optimality criteria, with “greedy” referring to the property of making each choice to maximize an immediate objective while maintaining feasibility with respect to problem-specific constraints. GSR arises independently in mathematical finance (transaction ordering in decentralized exchanges, especially as an MEV mitigation mechanism), in combinatorial number theory (explicit constructions of Bh[g]B_h[g]-sequences), in stochastic games (fairness in alternating-move games with memoryless strategies), and in computational linear algebra (row/projector selection for iterative solvers). The rule generically produces sequences that are locally optimal with provable global properties, often tightly connected to combinatorics or information theory.

1. Foundations and Formal Definitions

The Greedy Sequencing Rule can be formalized in diverse domains as an explicit algorithm for building a sequence, by appending, at each step, the “smallest” or “best” permissible candidate under some inductively maintained feasibility condition.

In Additive Combinatorics (Bh[g]B_h[g]-Sequences)

Let h2,g1h \ge 2, g \ge 1. A Bh[g]B_h[g]-sequence is a sequence A={a1<a2<}A = \{a_1 < a_2 < \dots\} such that no integer appears as a sum of hh (possibly repeated) elements of AA in more than gg ways. The GSR constructs such sequences as follows: set a1=1,a2=2a_1 = 1, a_2 = 2, and for n2n \ge 2, choose Bh[g]B_h[g]0 to be the smallest positive integer not already used such that Bh[g]B_h[g]1 remains a Bh[g]B_h[g]2-sequence. If stronger bounds are needed (e.g., on the number of sums realized with prescribed multiplicities), the construction can be made with “strong Bh[g]B_h[g]3-sets” as intermediates, allowing tight inductive control over density and growth bounds (Cilleruelo, 2016).

In Decentralized Finance (MEV Mitigation)

In the context of constant-function market makers (CFMMs), GSR is defined on transaction blocks as follows: given a starting reserve state Bh[g]B_h[g]4 and a sequence of user swaps, a permutation Bh[g]B_h[g]5 of the user (and, potentially, attacker) transactions is GSR-compliant iff for every position Bh[g]B_h[g]6 and current state Bh[g]B_h[g]7:

  • if Bh[g]B_h[g]8, either Bh[g]B_h[g]9 or every remaining swap after position h2,g1h \ge 2, g \ge 10 is also a h2,g1h \ge 2, g \ge 11;
  • if h2,g1h \ge 2, g \ge 12, either h2,g1h \ge 2, g \ge 13 or every remaining swap after h2,g1h \ge 2, g \ge 14 is h2,g1h \ge 2, g \ge 15.

This guarantees that execution prices oscillate about the block’s starting price, preventing sandwich attacks and other forms of adversarial MEV (Li et al., 2023).

In Iterative Linear Solvers

Within the Kaczmarz framework for solving h2,g1h \ge 2, g \ge 16, the GSR is instantiated as the Maximum-Residual (MR) rule: at each iteration, choose the equation (row) whose residual h2,g1h \ge 2, g \ge 17 is maximal, thus greedily reducing the worst current violation (Nutini et al., 2016).

2. Key Algorithmic and Mathematical Properties

h2,g1h \ge 2, g \ge 18-Sequences: Greedy Growth Bound

Cilleruelo provides a constructive greedy algorithm for building infinite h2,g1h \ge 2, g \ge 19-sequences, with the main result:

Bh[g]B_h[g]0

for all Bh[g]B_h[g]1 (Cilleruelo, 2016). The combinatorial proof uses an inductive tally of forbidden choices at each step, leveraging “strong set” properties to ensure that the number of forbidden candidates grows only polynomially.

CFMM/MEV: MEV/Liveness Dichotomy and Complexity

Under GSR, Ferreira and Parkes establish a dichotomy:

  • Fee-free case (Bh[g]B_h[g]2): Miner-optimal MEV-maximizing strategies (possibly including attacker swaps) can be computed in Bh[g]B_h[g]3 time. The algorithm is simple: after each user swap, the miner immediately “undoes” the price impact, returning reserves to Bh[g]B_h[g]4, so every user receives execution at the expected (single-trader) CFMM price (Li et al., 2023).
  • With constant trading fee (Bh[g]B_h[g]5): Deciding whether optimal profit Bh[g]B_h[g]6 is attainable under GSR is NP-complete via a reduction from Partition; optimal strategies may not be efficiently computable.

This shows that GSR eliminates sandwich attacks and controls exploitative MEV, but cannot eliminate all arbitrage; the profit-maximizing problem becomes computationally intractable for positive fees.

Kaczmarz/MR Rule: Linear Convergence Rate

The MR form of GSR leads to the guarantee:

Bh[g]B_h[g]7

with Bh[g]B_h[g]8 a Hoffman-type constant, and Bh[g]B_h[g]9 the largest row norm (Nutini et al., 2016). This is at least as strong as the guarantee from uniform random sampling, and is superior when the system matrix is sparse or nearly orthogonal.

3. Structural Features and Domain-Specific Effects

Additive/Combinatorial Contexts

  • The GSR is especially valuable where explicit, dense, infinite sequences with low additive redundancy are needed (e.g., in additive number theory, coding, or hashing). The strong-set variant further improves density bounds.
  • In special cases (A={a1<a2<}A = \{a_1 < a_2 < \dots\}0), the GSR recovers the Sidon set construction, but with improved constants.

Blockchain/DeFi Transaction Ordering

  • The GSR imposes verifiable, local restrictions enforceable in polynomial time, and can be further refined with tie-breaking rules (e.g., ordering same-direction swaps by size) to further limit residual MEV extraction (Li et al., 2023).
  • When A={a1<a2<}A = \{a_1 < a_2 < \dots\}1, every user transaction is guaranteed to execute, and each user’s realized price is exactly as if they alone had transacted (‘profit preservation’), with the miner’s profit coming only from the arbitragable difference.
  • For A={a1<a2<}A = \{a_1 < a_2 < \dots\}2, even approximate or constant-factor approximation algorithms (e.g., PTAS, knapsack heuristics) may be worthwhile, but exact optimality remains NP-hard.

Linear Algebra/Optimization

  • The MR/MD GSR is competitive with random selection both in theory and in practice, with update costs of A={a1<a2<}A = \{a_1 < a_2 < \dots\}3 per iteration on sparse systems, and with superior convergence when the system matrix has high sparsity or orthogonality (Nutini et al., 2016).
  • Approximate greedy selection (e.g., via projection or sketching) retains much of the benefit, provided error sequences vanish or remain controlled.

4. Connections to Symbolic Sequences and Fairness

In the context of two-player alternating games, such as the “Galois duel” (both shooters with probability A={a1<a2<}A = \{a_1 < a_2 < \dots\}4 of hitting), the GSR prescribes the next move to the player with lower cumulative win probability. As A={a1<a2<}A = \{a_1 < a_2 < \dots\}5, the greedy turn-sequence converges pointwise to the Thue–Morse sequence A={a1<a2<}A = \{a_1 < a_2 < \dots\}6, a deep link between greedy fairness, combinatorics, and symbolic dynamics (Cooper et al., 2011). The same sequence arises in connection with greedy fractional base-A={a1<a2<}A = \{a_1 < a_2 < \dots\}7 expansions for A={a1<a2<}A = \{a_1 < a_2 < \dots\}8, revealing a unifying underlying structure.

Furthermore, for broader fairness objectives (beyond the myopic greedy rule), Güntürk’s construction achieves exponentially better uniformity, but at the expense of more elaborate, non-memoryless rules (Cooper et al., 2011). Thus, the greedy rule offers natural simplicity and combinatorial structure, but not always global optimality with respect to fairness or balance.

5. Theoretical Limits and Open Directions

  • Arbitrage Boundaries: In MEV applications, the “arbitrage-free interval” delineates the reserve range A={a1<a2<}A = \{a_1 < a_2 < \dots\}9 in which isolated arbitrage is unprofitable; GSR aligns block execution to prevent systematic exploitation outside this range (Li et al., 2023).
  • Approximation and Complexity: For hh0 in MEV or denser hh1-sequences, approximation algorithms and parameterized complexity strategies remain important research directions.
  • Game-Theoretic Equilibria: In GSR-ordered CFMMs, user incentives (e.g., splitting trades to “game” position under GSR) are not yet fully characterized; full equilibrium analysis is pending.
  • Multi-agent and Multi-way Extensions: Extensions to multi-agent rounds (e.g., truels, or more general multi-party games) raise questions regarding the existence, uniqueness, and structure of greedy or nearly-fair sequences (Cooper et al., 2011).
  • Alternative “Greedy” Functions: The choice of residual or “immediate gain” as the greedy objective is crucial; in some contexts, bounded look-ahead or “patient” fairness can yield globally superior properties.

6. Comparison Table: Instantiations of the Greedy Sequencing Rule

Domain GSR Selection Criterion Main Global Property
Additive Number Theory Smallest legal hh2 preserving hh3-set Polynomial-density infinite hh4 sequence
Blockchain/CFMM MEV Next swap must not push reserves further from baseline than GSR allows Eliminates sandwich attacks; polytime opt. if hh5
Kaczmarz Algorithms Pick row with largest residual (MR rule) Provable linear convergence
Stochastic Galois Games Next move by player with lower cumulative win probability Yields Thue–Morse sequence for fairness

Each instantiation realizes GSR by maximizing an appropriate notion of immediate gain while ensuring a domain-specific feasibility constraint.

7. References

These papers provide formal definitions, optimal algorithms, proof strategies, and domain-specific consequences of the Greedy Sequencing Rule, together mapping out its role in modern combinatorics, optimization, computational geometry, decentralized finance, and symbolic dynamics.

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 Greedy Sequencing Rule (GSR).