Wikipedia:Reference desk/Archives/Mathematics/2017 January 23

= January 23 =

Smallest Equilateral Triangle with points within 1/10 unit of grid points
What is the smallest equilateral triangle with sides greater than .5 where all three of the corners are within .1 unit of a point with integer x,y coordinates? Followup, same question for a regular pentagon?Naraht (talk) 14:49, 23 January 2017 (UTC)


 * This isn't a full answer to your question, but if the triangle is rotated so that one side is parallel with the x-axis and the bottom left corner is within 0.1 of [0,0] then the bottom right must be within 0.1 of [2n,0] and we need [n,0.866*n ] to be within 0.1 of a third grid point. It looks as though n=2,4,6 all fail but 8 works. So the answer is <=8. And in fact 7.851963661 also meets the criteria. -- SGBailey (talk) 16:08, 23 January 2017 (UTC)
 * Reply removed - it was wrong. -- SGBailey (talk) 12:26, 24 January 2017 (UTC)
 * Redone corrected version of removed text... Rotate triangle 45 degrees around [0,0] The smallest that I can find has side length ~=4 which needs some offset. 3.97 seems as small as I can find at present with offsets x=y=0.066 giving [0.066,0.066], [1.093511609,3.90072553], [3.90072553,1.093511609]. -- SGBailey (talk) 12:45, 24 January 2017 (UTC)
 * It depends on what you mean by the points being within .1 of a grid point. Your solution has each coordinate within .1 of an integer but if you go by Euclidean distance it's √(0.09932+0.09352)≈0.1364. But even if you use Euclidean distance it looks like a triangle with vertices close to (0,0), (4,1) and (1,4) will work; you just have to do a bit more fine tuning. It is the smallest candidate I found after running through the possibilities on a spreadsheet.
 * Perhaps a better way to ask the question is which lattice triangles best approximate an equilateral triangle; best being among those of the same size or smaller. That way you can skip the adjustment step at the end. Even so, I think you'd need to make some sort of simplifying assumption, such as one of the sides being at 45°, to make it solvable without a computer search.
 * The pentagon is a bit more complicated but I think you'd do pretty much the same thing. Take one side to be from (0,0) to (a,b). The remaining three points can then be computed and you can eliminate any (a,b) where they are more than .2 from the nearest lattice point. Then comes the adjustment phase where you tweak the vertices to make them as close as possible to lattice points while keeping the pentagon regular. --RDBury (talk) 15:37, 24 January 2017 (UTC)


 * Ah yes, I was (unintentionally) doing point within a 0.1 square not a circle. -- SGBailey (talk) 17:44, 24 January 2017 (UTC)


 * By random search, my best solution is side length 2.1019 with points (1.9912, 0.0978), (0.9440, 1.9202), (3.0459, 1.9160). Dragons flight (talk) 16:14, 24 January 2017 (UTC)


 * I was using distance .2 from the nearest lattice point as a cutoff instead of .3 which it should be. After shifting to the origin and doing the optimization I got points (-0.045575, 0.089011), (2.045575, 0.089011), and (1. 1.9) for a triangle with side 2.091150.


 * Suppose we treat the number ".1" in the question as a parameter epsilon. How quickly does the answer grow as epsilon goes to 0? --JBL (talk) 15:41, 28 January 2017 (UTC)