2D Lattice Short-Vector Search Demo
Search integer combinations of two 2D basis vectors for a shortest nonzero vector within a finite coefficient window.
Start using
2D Lattice Short-Vector Search Demo
Search integer combinations of two 2D basis vectors for a shortest nonzero vector within a finite coefficient window.
Enter v1 as 2,0 and v2 as 0,3, without parentheses, and set the coefficient range to 1. Calculate: -1v1 + 0v2 = (-2, 0), length 2. Copy copies this numeric result; Clear empties all three fields.
Each basis needs exactly two integer coordinates, each within ±1000000; the vectors must be linearly independent. Separate coordinates by commas, semicolons or whitespace. Commas separate coordinates in every language; decimals, scientific notation and text are rejected. Range is an integer 1–100. The search checks (2r+1)²−1 pairs, with i and j both from -r to r, excluding only (0,0). It compares squared Euclidean lengths and keeps the first equal minimum in ascending i then j order. Only one vector, its coefficients and length to five decimal places are shown; there is no plot or pair list. Increasing the window cannot increase the minimum length but may leave it unchanged. A global shortest vector outside the window can be missed. This is finite 2D enumeration, not basis reduction by LLL/BKZ or a cryptographic security assessment.
Processing takes place locally in your browser.