Gro-Tsen Profile picture
Feb 16 18 tweets 4 min read
So, here's a good approximation of a regular pentagon on a square lattice (to save you the bother of counting, the vertex positions are, up to translation: (0, 55), (−29, 34), (−18, 0), (18, 0), (29, 34)). How did I find it? 🧵⤵️ •1/18
Easy, you say: just pick any regular pentagon in the plane, and replace each one of its vertices by the closest lattice point! Well… yes, but that will give a very shitty approximation. To be honest, I didn't bother to compute how shitty, … •2/18
… but if you don't use the freedom to choose the size and orientation of your near-regular pentagon arbitrarily in the lattice, you won't do a good job (much like if you try to approximate ξ by rational p/q, you shouldn't just pick q arbitrarily and take p close to qξ). •3/18
What are we trying to do here? Find four size two vectors v₀,v₁,v₂,v₃ (the sides) with (smallish) integer coordinates such that v₁≈R·v₀, v₂≈R²·v₀, v₃≈R³·v₀ where R is rotation by 2π/5. The vertices will then be 0, v₀, v₀+v₁, v₀+v₁+v₂ and v₀+v₁+v₂+v₃. •4/18
(That's up to translation, of course: we don't care where the origin is. This is why I'm using the side vectors as unknowns, not the vertex positions, so as to kill one degree of freedom that's just irrelevant.) •5/18
A more sophisticated way of saying this (not too relevant for this thread, but still worth noting) is, if we replace v₀,v₁,v₂,v₃ by the corresponding complex numbers, which lie in ℤ[i], and R = exp(2iπ/5), we're trying to have v₁/v₀≈R, v₂/v₀≈R², v₃/v₀≈R³, … •6/18
… so we're trying to perform simultaneous Diophantine approximation of the three numbers (R,R²,R³) by ratios (v₁/v₀, v₂/v₀, v₃/v₀) of Gaussian integers with the SAME denominator: now simultaneous Diophantine approximation is hard, … •7/18
… even over the ordinary integers (and it's not made easier by working over the Gaussian integers), there's nothing miraculous like the Euclidean algorithm here, for which I refer to my previous thread (🔽). •8/18
So instead, let me reformulate the problem as follows: consider the linear map T: ℝ⁸→ℝ⁸ (written as four pairs) which takes (v₀,v₁,v₂,v₃) to (Rv₀−v₁, R²v₀−v₂, R³v₀−v₃, c·v₀) where c is some to-be-decided (smallish) tuning parameter. •9/18
Our problem now becomes to find v=(v₀,v₁,v₂,v₃) in ℤ⁸ nonzero such that T(v) is small in ℝ⁸: the smallness of the first 3×2 coordinates means that v₁≈R·v₀, v₂≈R²·v₀, v₃≈R³·v₀, and the smallness of the last 1×2 means that v₀ is small(ish). •10/18
(So the tuning parameter c acts as a tradeoff between how hard we try to make v₀ small, i.e., our pentagon have small side coordinates, and the approximation good. The smaller c is, the more we care about the approximation quality, at the expense of size.) •11/18
What we are trying to do, now, is find a small nonzero vector in T(ℤ⁸). Now T(ℤ⁸) is a Euclidean lattice, and we know a base for it (namely the image by T of the standard basis of ℤ⁸), but finding the shortest nonzero vector in a Euclidean lattice is HARD … •12/18
… (“hard” as in “cryptographically hard”, in fact variants of this problem are used in various post-quantum cryptographic schemes). However, here, we don't care about the very shortest vector, we just care about finding some short vector. •13/18
Fortunately, there's an incredibly useful efficient (as in “polynomial”) algorithm to find reasonably short vectors in lattices (actually it does much more, it finds a reasonably good basis, but here we just care about a short vector): “LLL”. en.wikipedia.org/wiki/Lenstra%E… •14/18
Essentially, LLL takes a Euclidean lattice (here, T(ℤ⁸); actually it just cares about the Gram matrix Tᵗ·T of the lattice), and returns an invertible integral matrix U such that T·U is “close to being orthogonal”: its columns are the good basis of the lattice, … •15/18
… the first column of T·U is a shortish vector in the lattice, so here, the first column of the matrix U returned by LLL will be (v₀,v₁,v₂,v₃)∈ℤ⁸ we sought. •16/18
So, putting this together, here's the Sage code I used to find the pentagon shown above (note: what I called “T” in the above thread is called `m` in this code): gist.github.com/Gro-Tsen/b3e79… •17/18
Note: the answer I got (for weight c=1/200) happened to have a side aligned with an axis, I thought this was nice, but it's not necessarily the case, as this other example shows (whose vertices are (2,2), (0, 13), (10, 18), (18, 10), (13, 0)). •18/18

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Gro-Tsen

Gro-Tsen Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @gro_tsen

Feb 15
I just received this spam:

«
Dear David A. Madore,

We’d like to inform you that [redacted dot com], a leading academic platform for researchers, has just released the 2022 Edition of our Ranking of Top 1000 Scientists in the field of Mathematics.
The ranking is based on the H-index metric provided by Microsoft Academic and includes only leading scientists with an H-index of at least 30 for academic publications made in the area of Mathematics.

The full world ranking is available here: [redacted URL]
The annual release of our ranking is regularly featured by leading universities worldwide, including the University of Maryland, Stanford Robotics Lab, or the University of Texas, and it is a great opportunity to explore where leading experts are heading.
Read 5 tweets
Feb 15
Full disclosure: at the time, I may have been part of the cult-like following around RMS that Laurent mentions.
In particular, I remember leading a group of free software geeks around a (ahem) “Linux” expo in the late 1990's (still fairly rare then, at least in France), chanting: “Join us now and share the software: you'll be free, hackers, you'll be free!” gnu.org/music/free-sof…
Read 4 tweets
Feb 15
If I claimed that these three vertices of a square grid form an equilateral triangle, would you believe me? A few thoughts on this question. 🧵⤵️ •1/26 A square lattice with the a triangle drawn with vertices a (
Well, assuming you're not the sort of person who uses a ruler to measure on a monitor (in which case it may be hard to make the call), maybe you use the Pythagorean theorem and compare 4²+15² = 241 to 11²+11² = 242 to conclude that the bottom-right edge is a bit longer. •2/26
But maybe you just know that there are no three vertices of a square lattice that form an equilateral triangle: so I must have cheated. This seems to be the sort of math fact that everyone knows somehow. But why is it true, again? •3/26
Read 26 tweets
Feb 14
Je sais que pour arriver à un haut niveau dans l'administration de la Recherche il faut ne pas trop aimer pratiquer cette dernière puisqu'on lui préfère l'administration, — mais même comme ça, le niveau de bêtise des propos proférés par Antoine Petit ne cesse de me surprendre.
Cherche-t-il à justifier toutes les têtes sur lesquelles il a dû marcher en faisant passer ça pour une saine compétition? À convaincre que comme il a le titre ronflant de PDG du CNRS, c'est qu'il est «le premier» en quelque chose? Je l'ignore.
Il est fort possible que les gens voulant à tout prix être premiers soient de bons chercheurs. (Peut-être que Petit lui-même est excellent — je n'en sais rien.) Mais même si c'est le cas, ce n'est pas en les attirant qu'on obtiendra un progrès collectif:
Read 5 tweets
Feb 13
Since I mentioned The Backrooms (in citing a weird thread about a supposedly real experience that has now been made protected so maybe it was just made up, or maybe They Don't Want Us To Know The Truth™), a few remarks about this Internet legend. ⤵️ •1/10
Since just about forever, I've been fascinated and terrified at once with the idea of huge labyrinthine spaces taking the form of more or less benign empty / abandoned places. I often have dreams about such places that aren't really nightmares but are still disquieting. •2/10
This seems to relate to another fear-with-fascination of mine (or is it just a variation of the same?), that of abandoned places, especially industrial ones, and urban exploration. •3/10
Read 10 tweets
Feb 13
Promenade cet après-midi avec @Conscrit_Neuneu dans la forêt de Galluis dans le Vexin. openstreetmap.org/#map=13/49.066… Arrivés par Frémainville, ça commençait bien. Mais rapidement nous sommes tombés sur un endroit appelé les “carrières de Feularde(s?)”, et là c'était moins drôle! …
… Ces carrières de Feularde sont un labyrinthe de petits lacs, mares, flaques d'eau dans un terrain boueux (argileux) dévasté par les traces d'engins d'exploitation forestière et/ou de quads ou motocross. Pas agréable du tout de s'y perdre. …… ImageImageImageImage
… (J'écris “perdre”, évidemment nous avions notre position par GPS sur nos smartphones, mais les chemins marqués sur la carte IGN ou OSM n'existaient pas dans la réalité ou inversement. Et des mares infranchissables pouvaient les couper. Nous avons beaucoup erré.)
Read 5 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

:(