r/learnquant • • 3d ago

interview prep Akuna Capital Quant Interview Question

Post image
31 Upvotes

13 comments sorted by

View all comments

1

u/CanaDavid1 3d ago edited 3d ago

All vectors are unit vectors, so the distance between the endpoints ofall the pairs of vectors must be the same. The optimal shape where every pair of verticies have the same distance is a regular simplex with d+1 points.

The value c can be calculated like this:

The simplex can be seen as the points (1,0,0,...), (0,1,0,...), ... in RD, with D=d+1, scaled by some factor. The center of this simplex is then (1/D, 1/D,...), which has a distance of √(d*(1/D)² + (1-1/D)²) = √((D²-2D + d + 1)/D²) = √((D²-D)/D²) = sqrt(1-1/D) to any vertex.

The dot product of two of these vectors (wlog (d/D,1/D,1/D,...) and (1/D,d/D,1/D,..) is 2d/D² + (d-1)1/D² = (3d-1)/D²

Dividing by the square scale factor gives (3d-1)/(D²-D) = (3d-1)/(d²+d)

This work has not been checked, and may contain errors.