Abstract
We experimentally study the fundamental problem of computing the volume of a convex polytope given as an intersection of linear halfspaces. We implement and evaluate randomized polynomial-time algorithms for accurately approximating the polytope’s volume in high dimensions (e.g., few hundreds) based on hit-and-run random walks. To carry out this efficiently, we experimentally correlate the effect of parameters, such as random walk length and number of sample points, with accuracy and runtime. Our method is based on Monte Carlo algorithms with guaranteed speed and provably high probability of success for arbitrarily high precision. We exploit the problem’s features in implementing a practical rounding procedure of polytopes, in computing only partial “generations” of random points, and in designing fast polytope boundary oracles. Our publicly available software, VolEsti, is significantly faster than exact computation and more accurate than existing approximation methods. For illustration, volume approximations of Birkhoff polytopes $B_{11}, \dots, B_{15}$ are computed in dimensions up to 196, whereas exact methods have only computed volumes up to $B_{10}$.
Introduction
Computing the volume of a convex polytope—a shape defined by the intersection of linear inequalities—is a deceptively difficult problem in computational geometry. While straightforward in low dimensions, the task is #-P hard, meaning the computational complexity grows exponentially as the number of dimensions ($d$) increases. Traditional exact computation tools generally become unfeasible beyond 15 dimensions.
Although theoretical randomized algorithms with polynomial-time complexity have existed since the 1990s, they were long considered impractical due to the massive constant factors in their complexity bounds. This research bridges the gap between theory and practice by introducing VolEsti, an open-source C++ package that implements advanced "Hit-and-run" random walks to handle hundreds of dimensions with high precision and efficiency.
Methodology: The Multiphase Monte Carlo Approach
The core of the approximation engine is the Multiphase Monte Carlo (MMC) algorithm. The algorithm places the target polytope inside a sequence of concentric balls and estimates the ratio of volumes between successive layers. To make this process viable for high-dimensional spaces, several technical innovations were implemented:
1. Coordinate Direction Hit-and-run (CDHR)
While traditional methods often use Random Direction Hit-and-run (RDHR), which picks directions from a full sphere, VolEsti utilizes CDHR. By moving along axis-aligned directions, the algorithm allows for "amortized" updates. Since only one coordinate changes at a time, the boundary oracle—the mechanism that calculates where a random walk hits the polytope's wall—can update distance calculations in $O(m)$ time rather than $O(md)$, where $m$ is the number of constraints.
2. Iterative Rounding
"Skinny" or ill-conditioned polytopes pose a significant challenge for random walks, often leading to high error rates. VolEsti employs an iterative rounding procedure to find a minimum enclosing ellipsoid and transform the polytope into a more "spherical" (isotropic) state. This preprocessing step is essential; without it, error rates can increase by two orders of magnitude.
3. Partial Generations and Optimized Oracles
To reduce the total number of random walk steps, the authors developed a "partial generation" technique. Instead of generating a completely new set of $N$ points for every phase of the MMC, the algorithm reuses points that fall into the next inner layer. Furthermore, the "ray-shooting" operations used to detect boundaries were optimized using facet intersection and duality-based nearest neighbor searches.
Experimental Results
The software was benchmarked against standard geometries (hypercubes, simplices), random polytopes, and the "gold standard" of volume computation: Birkhoff polytopes ($B_n$), which represent doubly stochastic matrices.
Speed and Accuracy
Across various shapes up to 100 dimensions, VolEsti maintained a mean approximation error consistently below 2%. The speed improvements over exact methods are transformative:
- The $B_{10}$ Benchmark: For the 81-dimensional Birkhoff polytope ($B_{10}$), VolEsti provided an estimate within 2% error in approximately 17 minutes. In contrast, the most efficient exact software requires the equivalent of 17 years of CPU time on a 1GHz processor to reach a result.
- High-Dimensional Frontiers: The authors successfully computed the first-ever volume approximations for Birkhoff polytopes $B_{11}$ through $B_{15}$. The $B_{15}$ polytope exists in 196 dimensions; VolEsti estimated its volume in roughly 9 hours.
Discussion and Insights
A key takeaway from this study is that theoretical complexity bounds are often overly pessimistic. While theory suggests astronomical step counts (e.g., $10^{11}$) are required for a random walk to "mix" (become uniform), the authors found that $O(d)$ steps are sufficient in practice to achieve high accuracy.
Future work aims to address the current limitations of the implementation, including the lack of a tight theoretical bound explaining this practical efficiency and the need for better support for V-polytopes (polytopes defined by vertices rather than inequalities). Additionally, because random walks are "embarrassingly parallel," future iterations of VolEsti could leverage GPU or multi-core distribution to further reduce computation times from hours to minutes.
Summary updated