volume of intersection for high dimensional centred balls and cubes
What is the volume of intersection of
I have chosen to use the method of Constales from [1], which represents the volume as an infinite sum of Fresnel integrals, using the mpmath package for its excellent selection of mathematical functions, and the ease with which it allows one to increase precision. As such, your python will need access to it.
Given that I truncate an infinite sum, and use finite precision for Fresnel integrals, the volumes my script outputs are approximations.
For the case of findAccurateRange in accuracyTests.py).
Precomputed, high precision, values for the Fresnel integrals in a given dimension will be saved in a directory called precomps -- each will be about 3MB given current settings, so something to consider if planning on increasing the precision or number of terms, and approximating in many dimensions.
Future directions:
- More satisfying understanding of the required number of terms and precision for a given pair
$(n, s)$ to achieve a sufficiently precise approximation. - Implement the more general case given in [3].
To use these scripts, I open sage and then
attach("fresnel.py")
fresnelConstalesLog(n, s)
which returns
[1]: Cecil C. Rousseau and Otto G. Ruehr. Problems and solutions. SIAM Review, 39(4):761–789, 1997.
[2]: Peter J. Forrester. Comment on “sum of squares of uniform random variables” by I. Weissman. https://arxiv.org/abs/1804.07861, 2018.
[3]: Yoshinori Aono and Phong Q. Nguyen. Random sampling revisited: Lattice enumeration with discrete pruning. In Jean-S'{e}bastien Coron and Jesper Buus Nielsen, editors, EUROCRYPT 2017, Part II, volume 10211 of LNCS, pages 65–102. Springer, Heidelberg, April / May 2017.
[4]: S. Li , 2011. Concise Formulas for the Area and Volume of a Hyperspherical Cap. Asian Journal of Mathematics & Statistics, 4: 66-70. 10.3923/ajms.2011.66.70