Greedy Sequencing Rule
- 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 -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 (-Sequences)
Let . A -sequence is a sequence such that no integer appears as a sum of (possibly repeated) elements of in more than ways. The GSR constructs such sequences as follows: set , and for , choose 0 to be the smallest positive integer not already used such that 1 remains a 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 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 4 and a sequence of user swaps, a permutation 5 of the user (and, potentially, attacker) transactions is GSR-compliant iff for every position 6 and current state 7:
- if 8, either 9 or every remaining swap after position 0 is also a 1;
- if 2, either 3 or every remaining swap after 4 is 5.
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 6, the GSR is instantiated as the Maximum-Residual (MR) rule: at each iteration, choose the equation (row) whose residual 7 is maximal, thus greedily reducing the worst current violation (Nutini et al., 2016).
2. Key Algorithmic and Mathematical Properties
8-Sequences: Greedy Growth Bound
Cilleruelo provides a constructive greedy algorithm for building infinite 9-sequences, with the main result:
0
for all 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 (2): Miner-optimal MEV-maximizing strategies (possibly including attacker swaps) can be computed in 3 time. The algorithm is simple: after each user swap, the miner immediately “undoes” the price impact, returning reserves to 4, so every user receives execution at the expected (single-trader) CFMM price (Li et al., 2023).
- With constant trading fee (5): Deciding whether optimal profit 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:
7
with 8 a Hoffman-type constant, and 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 (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 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 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 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 4 of hitting), the GSR prescribes the next move to the player with lower cumulative win probability. As 5, the greedy turn-sequence converges pointwise to the Thue–Morse sequence 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-7 expansions for 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 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 0 in MEV or denser 1-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 2 preserving 3-set | Polynomial-density infinite 4 sequence |
| Blockchain/CFMM MEV | Next swap must not push reserves further from baseline than GSR allows | Eliminates sandwich attacks; polytime opt. if 5 |
| 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
- "MEV Makes Everyone Happy under Greedy Sequencing Rule" (Li et al., 2023)
- "Greedy Galois Games" (Cooper et al., 2011)
- "A greedy algorithm for 6 sequences" (Cilleruelo, 2016)
- "Convergence Rates for Greedy Kaczmarz Algorithms, and Faster Randomized Kaczmarz Rules Using the Orthogonality Graph" (Nutini et al., 2016)
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.