Here is an original reproducible finite set with 40 points and 512 coordinates. Let be the first four vectors of the standard basis of . With point indices , generate
The four groups have different centers, and the standard normal random variables perturb all 512 coordinates. Generate the coordinates in row order using NumPy's PCG64 pseudorandom number generator with seed 20261013. Then keep this finite set fixed. A second PCG64 stream with seed 424242 generates a matrix of independent random variables with the standard normal distribution; divide it by to obtain the Gaussian Johnson–Lindenstrauss transform.
For all 780 unordered pairs, compute the distance ratio . In this draw, its minimum is approximately and its maximum , giving a maximum relative error in Euclidean distance of about . The squared-distance ratios instead range from approximately to : their maximum relative error is about . Thus this particular draw fails a 20% distance tolerance. The Johnson–Lindenstrauss lemma does not assert that every draw into 32 dimensions must succeed.
Figure 1.
All 780 pairwise Euclidean distances for one Gaussian map from 512 to 32 dimensions
. Details.
The two bands of original Euclidean distances distinguish pairs within a group from pairs between groups. Their spread after the linear map shows why checking an average distance is insufficient: the Johnson–Lindenstrauss lemma controls every pair. The dashed 20% distance band is an illustrative tolerance, not a confidence interval or a squared-distance band. The affine hull of 40 points has dimension at most 39; 512 is the ambient coordinate count, and no full-dimensionality assumption is required. For this draw the bi-Lipschitz distortion is approximately .
Now keep the same points and draw 48 fresh Gaussian Johnson–Lindenstrauss transforms for each target dimension . NumPy's SeedSequence(314159).spawn(240) supplies distinct PCG64 streams, ordered first by target dimension, then by draw. Each stream generates a new random matrix, normalized by ; no map is a row prefix of another map. Each plotted value is
Figure 2.
Maximum relative distance error over independently drawn Gaussian maps at five target dimensions
. Details.
The observed median maximum relative errors in Euclidean distance are approximately , , , , and , respectively. All pairs fall inside the 20% distance tolerance in , , , , and of the 48 draws, respectively. These are computations on one synthetic finite set, rather than optimal dimension bounds or measured physical data. The displayed quantiles describe the sampled maps; they do not certify a success probability for other sets. Even at 128 dimensions, 13 of the sampled maps fail this tolerance.
The practical benefit is that each point acquires fewer coordinates while its pairwise Euclidean distances can remain useful. The choice of target dimension balances compression, accuracy, and failure probability. For example, a conservative sufficient squared-distance tolerance with and gives by the explicit bound above. Here that exceeds the ambient dimension, so the identity map is better for a certified guarantee. The much smaller dimensions in the plots illustrate observed behavior without claiming that this sufficient bound is sharp.
A linear polyhedron in is full-dimensional when its affine hull is all of . Equivalently, it contains an open Euclidean ball. An open Euclidean ball spans the ambient space. Conversely, a full-dimensional convex set contains affinely independent points; their convex hull is a simplex with nonempty interior, so the set contains an open Euclidean ball.
A linear polyhedron is full-dimensional if its affine hull is . For a convex set, this is equivalent to containing an open Euclidean ball: an open ball has full affine span, while affinely independent points in the set span a simplex with nonempty interior. In particular, a nonempty linear polyhedron need not be full-dimensional; a singleton or a hyperplane is an example.
Assume , increasing the coefficient bound to one if necessary. If and denotes the th row, then . For and , the Cauchy-Schwarz inequality gives
Thus with , proving that is a full-dimensional linear polyhedron. This part works for every positive ; the particular small value also ensures that relaxation cannot create feasibility when is empty.
Here is that exact-feasibility point. Put . If is empty, a Farkas certificate for linear inequalities gives with and . Normalize , and maximize over the compact linear polyhedron
Choose a maximizing extreme point. Its positive support has size : a dependence among its supported columns would permit small perturbations of both signs in , contradicting extremality. Select independent equations for those coordinates. Cramer's rule expresses them over a common nonzero integer determinant , with . Since is integer and , its numerator is a positive integer after choosing a positive denominator. Hence . This is the normalized integer Farkas infeasibility gap. A point in would imply
a contradiction. Consequently if and only if .
The ellipsoid method takes the integer matrix , vector , dimension , and a bound (or their binary encodings). It computes the prescribed , an inner radius , and an outer radius whose logarithms have polynomial size. For an explicit outer bound, let . A nonempty has a rational feasibility certificate for integer inequalities with . To see this bound, intersect with an orthant containing a feasible point. This intersection is a nonempty linear polyhedron containing no whole nontrivial affine line, and it has an extreme point. Indeed, if its active rows do not yet span the ambient space, move along a nonzero direction annihilating them. The orthant prevents motion in both directions from being feasible forever, so in at least one direction a new independent row becomes active. Repeating at most times produces an extreme point. At that point choose independent active constraints, including coordinate constraints where needed. Cramer's rule and the Hadamard determinant inequality bound the numerators by , while a nonzero integer denominator has absolute value at least one. Thus the point has norm at most . Choosing ensures that, whenever is nonempty, an entire radius- Euclidean ball in lies inside .
Start with the ellipsoid and retain . At each iteration test the centre against every relaxed inequality. If it passes all tests, is nonempty and hence so is . Otherwise a violated row gives the separation oracle: the feasible set lies in . Cut the current ellipsoid by this half-space through its centre and replace it by the standard containing ellipsoid. Every step retains and, for , reduces Lebesgue measure by a factor at most . In dimension one the corresponding step bisects an interval.
If more than cuts occur without finding a feasible centre, the Lebesgue measure is smaller than that of a radius- ball. This contradicts the retained ball whenever is nonempty, so the algorithm can declare empty. Both and are polynomial in and , and each inequality test uses arithmetic operations for rows. The bit implementation uses rational rounding with outward enlargement of the containing ellipsoids; the encoding bounds allow polynomial precision while keeping a constant fraction of the volume decrease. Detailed update and rounding formulae are not needed for this account. The essential role of the full-dimensional relaxation of integer inequalities is to supply a positive inner-volume bound without changing the emptiness decision; applying a Lebesgue measure stopping test directly to a lower-dimensional would fail.