The Exchange Problem
Mohit Garg, Suneel Sarswat
TL;DR
The paper studies two call-auction matching tasks: (i) maximizing total traded volume (Task 1) and (ii) maximizing volume with a uniform transaction price (Task 2). It establishes a tight separation: any algorithm for Task 1 requires $\Omega(n \log n)$ time in the comparison model (and $\Omega(n \sqrt{\log n})$ in the binary-query model), while Task 2 admits an $O(n)$-time linear algorithm; moreover, a linear-time linear-time fair uniform-price matching is achieved. The approach hinges on a stronger demand-supply inequality, a reduction from Element Distinctness to prove lower bounds, and a medians-based strategy that bypasses sorting to obtain linear time for Task 2. These results advance understanding of foundational complexity for exchange-style matching and have potential implications for real-world market mechanisms and decentralized exchanges.
Abstract
Auctions are widely used in exchanges to match buy and sell requests. Once the buyers and sellers place their requests, the exchange determines how these requests are to be matched. The two most popular objectives used while determining the matching are maximizing volume at a uniform price and maximizing volume with dynamic pricing. In this work, we study the algorithmic complexity of the problems arising from these matching tasks. We present a linear time algorithm for uniform price matching which is an improvement over the previous algorithms that take $O(n\log n)$ time to match $n$ requests. For dynamic price matching, we establish a lower bound of $Ω(n \log n)$ on the running time, thereby proving that the currently known best algorithm is time-optimal.
