On Optimal Point Sets Determining Distinct Triangles

Erd\H{o}s and Fishburn studied the maximum number of points in the plane that span $k$ distances and classified these configurations, as an inverse problem of the Erd\H{o}s distinct distances problem. We consider the analogous problem for triangles. Past work has obtained the optimal sets for one and two distinct triangles in the plane. In this paper, we resolve a conjecture that at most six points in the plane can span three distinct triangles, and obtain the hexagon as the unique configuration that achieves this. We also provide evidence that optimal sets cannot be on the square lattice in the general case.


Introduction
A famous open problem in combinatorial geometry is Erdős' distinct distances problem, which asks for the minimum number of distinct distances between pairs of points in an n-point subset of the Euclidean plane.Erdős conjectured [5] that any set of n points spans Ω n √ log n distinct distances; this was essentially resolved by Guth and Katz [7], whose work implies a bound of Ω n log n .In higher dimensions R d (d ≥ 3), it is conjectured that the maximum number of distinct distances is asymptotic to n 2/d , with the current best-known results due to Solymosi and Vu [11].
The inverse problem to Erdős' distinct distances problem is to determine the maximum number of points in the plane that span only a fixed number of distinct distances.This problem was first studied by Erdős and Fishburn [6], who found the maximum number of points in a subset of the plane spanning k distances, and also determined all associated extremal configurations, for k ≤ 4.This work was extended by Shinohara [10], who determined the maximal 5-distance sets, and Wei [12], who found the maximum size of 6-distance sets, though the optimal configurations remain unknown.
In this paper, we consider the analogue of the Erdős-Fishburn and Erdős distinct-distances problems for triangles.This is a problem previously studied by Epstein et.al. [4], finding the maximal number of points in a set determining k distinct triangles and characterizing the optimal configurations for k = 1, 2. Optimal point sets for one and two distinct triangles in higher-dimensional Euclidean spaces have since been characterized [3,2].
To avoid ambiguity regarding degenerate triangles, we can formalize this as counting the number of triples of distinct points in a point set, up to the equivalence relation defined by rigid plane isometries (hence, the three vertices of the triangle are allowed to be collinear, but must be distinct).This is equivalent to characterizing a "triangle" by its side lengths, up to permutation.
In this paper, we extend the results of [4] to the k = 3 case: Theorem 1.1.Any set of points in the plane that span at most 3 distinct triangles contains at most 6 points, and the only configuration that achieves this is the regular hexagon.
In addition, we consider the density of distinct triangles in the square lattice.The square lattice gave rise to the original asymptotic conjecture for the Erdős distinct distance problems, while trianglular lattices have slightly fewer distinct distances [1]; Erdős and Fishburn [6] conjectured that optimal configurations for any sufficiently large number of distinct distances exist on the triangular lattice.
It has been shown in [9] that an n-point set spans at least Ω(n 2 ) distinct triangles; the true constant is unknown.Epstein et.al. [4] conjectured that the asymptotic is at least 1  12 n 2 , which is achieved by the regular n-gon, but it is unknown if other optimal configurations exist.A natural place to search for such configurations are lattices.However, we show that the square lattice cannot give rise to optimal configurations.This suggests that the trend where structures with lattice symmetry have fewer distinct distances than structures with rotational symmetry is reversed for the distinct triangles problem: the regular n-gon has roughly half the number of distinct triangles as the square grid.

Proof of Theorem 1.1
Notation.For two points p, q of a subset P of the plane, we say that segment pq is a diameter of P if no other segment with both endpoints in P has length greater than that of pq.It is wellknown that, by the triangle inequality, any two diameters of a point set must intersect or share an endpoint.
For point P and line ℓ, we use dist(P, ℓ) to denote the distance from P to ℓ.We will let to imply that there exists a rigid plane isometry mapping A i to B i for i = 1, 2, 3. On the other hand, we will use We first prove a simple lemma that will be used repeatedly later on, characterizing congruent triangles sharing a side length.Proof.We first show that either ABC ∼ = ABD or ABC ∼ = BAD.Casework on the true point order of the congruence: • If ABC ∼ = ABD or ABC ∼ = BAD, then we are already done.
When ABC ∼ = ABD, the only non-identity rigid isometry preserving A and B is the reflection over the line AB.On the other hand, when ABC ∼ = BAD, the only rigid isometries swapping A and B are the reflection across the midpoint of AB (i.e., 180 • rotation about the midpoint) and the reflection across the perpendicular bisector of AB.Hence C and D must be related via one of these three isometries.
We now prove a highly useful lemma that, roughly speaking, enables us to convert information about distances and triangle congruences into a regular hexagon.Lemma 2.2.If ACEBDF is a convex hexagon with vertices in that order (where consecutive vertices are allowed to be collinear) spanning at most three distinct triangles such that AB is a diameter length and {ABC} ∼ = {ABD} ∼ = {ABE} ∼ = {ABF }, then ACEBDF must be a regular hexagon.
Proof.Note that C, D, E, F must be related as dictated by Lemma 2.1, so CEDF is a rectangle with center at the midpoint of AB, with CE AB DF .Note that AD BC and E is on the opposite side of BC as A, so dist(E, AD) > dist(B, AD).This implies Since ABF D is an isosceles trapezoid with DF < AB, we also have {ABD} ∼ = {AF D} ∼ = {BCE}.This means the three distinct triangles must be {ADE}, {BCE}, and {ABD}.Now, {BDE} ∼ = {ADE} because they are both isosceles, but their legs BD = AD.Also {BDE} ∼ = {ABD} because neither AD or AB can be equal in length to BE = BD, This means {BED} ∼ = {BCE}.This implies BE = CE, and it follows by a symmetry argument that the hexagon is equilateral.It also implies that ∠EBD = ∠CEB, and it follows that the hexagon is equiangular, so it is regular.
We are now ready to prove Theorem 1.1.Roughly speaking, we approach the proof by repeatedly identifying congruency classes of triangles, until we either derive a contradiction or arrive at the premises of Lemma 2.2.
Proof of Theorem 1.1.We prove that if six distinct points in the plane span at most three congruency classes of triangles, then these six points must be a regular hexagon.This implies Theorem 1.1, since for any seven points in the plane, we can find a subset of six points that do not form a regular hexagon, and therefore span at least four congruency classes of triangles.
Label the six points ABCDEF such that AB is a diameter length.By the Pigeonhole principle, at least two of the triangles ABC, ABD, ABE, ABF are congruent.Without loss of generality assume {ABC} ∼ = {ABD}; by Lemma 2.1 we have three cases: either ABCD is an isosceles trapezoid, with bases AB, CD (and AB > CD), or ABCD is a kite with perpendicular diagonals AB and CD, or ABCD is a parallelogram with diagonals AB and CD.
This can be further split into four cases, which we will deal with in turn: (1) ACBD is a rhombus; (2) ACBD is a kite but not a rhombus; (3) ACBD is a parallelogram but not a rhombus; (4) ACBD is an isosceles trapezoid.
Case 1: ACBD is a rhombus (possibly square): At least one of E, F is not the center of the rhombus; without loss of generality, assume it is E. Note that dist(E, AB), dist(E, BC), dist(E, CD), dist(E, DA) cannot all be distinct, else the four triangles EAB, EBC, ECD, EDA (which have identical bases AB = BC = CD = DA) have different areas and are therefore pairwise noncongruent.It follows that E is either on line AB, line CD, one of the external angle bisectors of the rhombus, or one of the midlines of the rhombus (as shown in the subcases below).

Subcase 1b
Subcase 1a: E ∈ AB (and E ∈ CD is analogous-no statements in this subcase rely on the fact that AB is the diameter).We claim that triangles {ACE}, {CBE}, {ACD}, and {ABE} are pairwise noncongruent: • {ABE} is not congruent to any of the other triangles because it is degenerate and the others are not.
and CD = BC = AC = AD implies the rhombus is composed of two equilateral triangles, so that ∠CBE = 30 , while the vertex angle of ACD is ∠ACD.Since they are equal, ∠CAD = 120 • , which implies the rhombus is composed of two equilateral triangles and E = A, contradiction.
Thus we have found four noncongruent triangles among the six points, contradiction.
Subcase 1b: E lies on the external angle bisector of A (and that of B is analogous) is impossible because BE > AB, but AB is a diameter.Subcase 1c: E lies on the external angle bisector of C (and that of D is analogous).We may assume CD < AB, else this reduces to the previous case.Without loss of generality, assume E and B are on the same side of line CD.We claim {ABC}, {ACD}, {ECD}, {EAC} are pairwise noncongruent: • {ABC}, {ACD}.and {ECD} are pairwise noncongruent because they are obtuse, acute, and right, respectively.• {EAC} ∼ = {ABC} because both are obtuse, while the obtuse angle ∠ECA is greater than the obtuse angle ∠ACB.• {EAC} ∼ = {ACD} or {ECD} because {EAC} is obtuse, while {ACD} and {ECD} are acute and right, respectively.
Thus we have found four noncongruent triangles among the six points, contradiction.Subcase 1d: E lies on the midline parallel to AC (and the midline parallel to BC follows analogously).We claim {EBC}, {EDA}, {EAC}, {ABC} are pairwise noncongruent: • {EBC} ∼ = {EDA} because E is not the center of the rhombus, hence dist(E, BC) = dist(E, AD), so the two triangles have different areas.• {EBC} ∼ = {EAC} because otherwise, by Lemma 2.1 either EBC ∼ = EAC, implying EB = EA and forcing E to be the center of the rhombus, or EBC ∼ = CAE, implying BC = AE and AC = BE, which is impossible.• {EDA} ∼ = {EAC} by symmetry with above.
• {EBC} ∼ = {ABC} because by Lemma 2.1 the only points P such that {P BC} ∼ = {ABC} are the reflection of A over BC, which is not E because ∠ACB ≥ 90 • , so it lies on the opposite side of line AC from E; the reflection of A over the midpoint of BC, which is not E because it lies on line BD; and the reflection of A over the perpendicular bisector of BC, which is not E because it lies on line AD and cannot be the midpoint of AD.
2 dist(B, AC), so the two triangles have different areas.Thus we have found four noncongruent triangles among the six points, contradiction.
This completes all cases when ACBD is a rhombus.Case 2: ACBD is a kite but not a rhombus.Then {ABC}, {ACD}, and {BCD} are pairwise noncongruent, which implies these are the only three congruency classes of triangles.Without loss of generality assume AC < BC.Subcase 2d: CD = AB and BC = AB.Then ACBD must be as shown, with BCD equilateral and A the arc midpoint of CD on the circle with center B. Now {BCD}, {ACD}, {ABC} are noncongruent, so {EAB} must be congruent to one of these three triangles.We perform the finite case-check and verify that in all cases a fourth distinct triangle is produced.
This completes all cases where ACBD is a kite.Case 3: ACBD is a parallelogram with diagonals AB and CD.We may assume it is not a rhombus, since otherwise we reduce to Case 1.We may also assume that no four-vertex subset of the six vertices forms a kite, since otherwise we reduce to Case 2.

Subcase 4b
Now, {EAC} ∼ = {EBC}, else some four points determine a kite by Lemma 2.1 and we reduce to a previous case.Repeating this argument, {EAC} ∼ = {EBC} ∼ = {EBD} ∼ = {EAD} ∼ = {EAC}.However, since there are only three distinct triangles, some pair of these four triangles must be congruent; without loss of generality, assume the pair is {EAC} ∼ = {EBD}, which implies their areas are equal, so E is on the midline of the parallelogram parallel to AC.Now if ACBD is not a rectangle, then it is impossible for {EAC} and {EBD} to be congruent.So ACBD is a rectangle.Note {ACD} ∼ = {ACE} by area considerations, and {BCE} ∼ = {ACD} since the former is isosceles and the latter is not.We already have {ACE} ∼ = {BCE}; by applying Lemma 2.1 we also find {ADE} ∼ = {ACD} and {ADE} ∼ = {ACE}.Since there are only three distinct triangles, we see {BCE} ∼ = {ADE}, which proves E is the center.But then EAC, EBC, EAB, ACD are pairwise noncongruent, contradiction.
Case 4: ACDB is an isosceles trapezoid with bases AB and CD.Without loss of generality, assume C is closer to A than B. If either E or F are the reflections of C or D across AB, then we reduce to one of the previous cases, so assume this is not the case.Observe that {ABC} ∼ = {ACD}.Subcase 4a: If BC = AD < AB then {EAB} ∼ = {ABC}, Otherwise, E is either D, the reflection of C over AB, or the reflection of C over the midpoint of AB; all of these are disallowed (the latter two produce kites ACBE and ADBE, respectively).Also, {EAB} ∼ = {ACD}, since all side lengths of the latter are shorter than AB.Therefore our three congruency classes are {EAB}, {ABC}, and {ACD}.By the same reasoning {F AB} ∼ = {ABC}, {ACD}, so {EAB} ∼ = {F AB}.If ABEF is a rhombus, a non-rhombus kite, or a non-rhombus parallelogram, we reduce to Cases 1, 2, and 3 respectively, so by Lemma 2.1 ABEF is also a trapezoid, implying {AEF } ∼ = {ABE}.Also, {AEF } ∼ = {ABC}, else one of AE, AF = AB; without loss of generality assume AE = AB, so AEB is an isosceles triangle with leg length AB which is not congruent to any of the three previous triangles, giving us four distinct triangles.Thus {AEF } ∼ = {ACD}.Since ∠ACD and ∠AEF are both obtuse, they must correspond with each other, so AD = AF and triangle AF D is isosceles.Since {ABC} and {ABE} are not isosceles, we find {AF D} = {ACD} so triangle ACD is also isosceles.As ∠ACD is obtuse, we must have AC = CD and F AD ∼ = ACD, which implies AC = CD = AD.But this means ACD is equilateral, implying ∠ACD = 60 • < 90 • , contradiction.
Subcase 4b: BC = AD = AB.Note that {EAB} and {F AB} are both noncongruent to {ABC}, since otherwise would produce a kite (by the same reasoning as in the previous subcase).
If {EAB} and {F AB} are both noncongruent to {ACD}, then the three congruency classes must be {ABC}, {ACD}, and {EAB} ∼ = {F AB}.Since {EAB}, {F AB} ∼ = {ACD} it follows that the lengths EA = F B and EB = F A are not equal to length AB, which reduces ABEF to the previous subcase.Otherwise, without loss of generality, assume {EAB} ∼ = {ACD}, and that the orientation of the congruence is EAB ∼ = CAD.If BE = AE, then all lengths of triangle BDE are are less than AB, so {BDE} is not congruent to {ABC} or {ABD}.Also, {DEC} has no side length equal to BD, so {DEC} is not congruent to {ABC}, {ABD}, or {BDE}, because it has no side length equal to AC = BD.This gives us four distinct triangles.
If BE = AE, we have AC = CD = DB = BE = EA, so the pentagon is equilateral, and DA = AB = BC = CE.Therefore ∠ABD = ∠BDA = ∠BCA = ∠BAC = ∠BEC and ∠EBA = ∠ADC = ∠BCD = ∠BAE = ∠AEC, which means ∠EBD = ∠BDC = ∠DCA = ∠CAE = ∠AEB, and the pentagon is also equiangular.This implies it is a regular pentagon.It is straightforward to check that one cannot add a sixth point to a regular pentagon without introducing two new distinct triangles.
So we have exhausted all cases and are done.For ease of notation, we consider an N × N grid, so we wish to show that the number of triangles is between 0.1558N 4 + o(N 4 ) and 0.1875N 4 + o(N 4 ) distinct triangles.
Let [N ] = {0, 1, . . ., N − 1}, so the square lattice grid is [N ] × [N ].Note that any triangle contained in this grid has at least one vertex as a vertex of its bounding box, so it can be mapped with suitable reflections, rotations, and translations onto a congruent triangle also contained in the grid with one vertex at the origin (see Figure 17).This means it suffices to count the number of distinct triangles having one vertex at the origin.
Let O be the origin, A = (a 1 , a 2 ), and B = (b 1 , b 2 ).The set of all triangles (including OAB) contained in [N ] × [N ] congruent to OAB will be referred to as the congruency class of OAB.If OAB is scalene and has no sides parallel to the coordinate axes, define the minimal congruency set of OAB as follows: For angle θ and lattice point P , we say that P is rotatable by θ if the rotation of P counterclockwise about the origin by θ is also a lattice point.Call P rotatable if there exists θ ∈ {0 We now show that rotatability of a triangle is linked to minimality of its congruency class: Lemma 3.1.If a scalene non-right triangle with one vertex at the origin is not rotatable, then its congruency class is minimal.
Proof.Suppose for the sake of contradiction there existed a triangle OAB (in the first quadrant) which is not rotatable but also not minimal; by the latter assumption there exists another triangle OCD (also in the first quadrant) such that {OCD} ∼ = {OAB} and OCD is not in OAB's minimal congruency set.If triangles {OCD} and {OAB} are not oriented identically (i.e. the isometry mapping one to the other is a rotation rather than a glide reflection), then reflect OCD over the line y = x to make it oriented identically to OAB while keeping it in the first quadrant.Consider the point order of the congruence.If OCD ∼ = OAB, then OCD must be OAB, since otherwise would contradict rotatability of OAB.However, this contradicts the assumption that OCD is not one of the triangles in OAB's minimal congruency set.Similarly ODC ∼ = OAB leads to contradiction.Note that if a non-origin lattice point P is rotatable by 0 • < θ < 90 • , then cos θ and sin θ must be rational, so can be expressed as p r and q r for primitive Pythagorean triple (p, q, r).Lemma 3.2.Let (p, q, r) be a primitive Pythagorean triple, and let θ = arccos(q/r) = arcsin(p/r).

The number of points in
In the remaining cases, it will be useful to note that (a, b) rotates by θ to ap−bq r , aq+bp r , which means (a, b) is rotatable by θ if and only if ap ≡ bq (mod r).
The above implies that there is exactly one point rotatable by θ in any 1×r subrow of the lattice.If N ≤ r then one can cover [N ] × [N ] in N such subrows, so the number of lattice points rotatable by θ in in ⌈N/r⌉ 2 squares of size r, each having r points rotatable by θ, so the number of points rotatable by θ is at most r⌈N/r⌉ 2 .
We now present a refinement of the middle case of Lemma 3.2 that holds when r is sufficiently large.
Lemma 3.3.Let M > 4 be an arbitrarily chosen positive integer, let (p, q, r) be a primitive Pythagorean triple, and let θ = arccos q r = arcsin p r .If r ≥ 2M 4 N and N ≥ M 5 , the number of points in Proof.From the observations in the proof of Lemma 3.2, letting c = p −1 q (mod r), rotatability by θ can be expressed as a ≡ bc (mod r).Hence rotatability by θ is a linear relation, i.e. if points S and T are rotatable by θ then so are uS + vT for any u, v ∈ Z.Note that the points rotatable by For any b, consider the rows b, b+v, . . ., b+2M 4 N |u| v.The corresponding columns for rotatable points by θ in [r] × [r] in those rows are, respectively, a, a + u, . . ., a + 2M 4 N  |u| u (mod r) for a ≡ cb (mod r).Note that the largest difference in the set of column indices above is 2M 4 N  |u| |u| ≤ 2M 4 N ≤ r, so this set of lattice points "wraps around" the modulus r at most once (see Figure 22).
Figure 22.Rotatable points differing by a multiple of (u, v), here indexed by P k = (a + ku mod r, b + kv).
After removing the last element from the set, the remaining corresponding columns a, a + u, . . ., a + 2M We now finish the calculation, recalling that N ≥ M 5 , 0 < v < M , and M 2 < |u| < N : Let P denote the set of primitive Pythagorean triples, where triples (p, q, r) and (q, p, r) are counted separately.The number of rotatable triangles contained in [N ] × [N ] is at most (p,q,r)∈P f (arctan(q/p)) 2 .
By Lemma 3.2 and Lemma 3.3, The first summand is at most N 4 (p,q,r)∈P 1 2r 2 +o(N 4 ).Since the number of primitive Pythagorean triples with hypotenuse less than k, counting (p, q, r) and (q, p, r) separately, is k π +o(k) [8,[327][328], the second summand is o(N 4 ) and the third summand is at most N 4  πM 2 + o(N 4 ).Thus the number of rotatable triangles is at most It remains to give the numerical upper bound on (p,q,r)∈P 1 2r 2 .It is well-known that any primitive Pythagorean triple (p, q, r) can be expressed as (m 2 − n 2 , 2mn, m 2 + n 2 ) or (2mn, m 2 − n 2 , m 2 + n 2 ) for positive integers m and n.Since m 2 + n 2 ≤ r, we have n ≤ √ r.This means the number of primitive Pythagorean triples with hypotenuse r is at most 2 √ r.The rest is a straightfoward computer-assisted computation: (p,q,r)∈P where the former summand is evaluated by enumerating the finite number of triples and summing, while the latter summand is evaluated by upper-bounding with a Riemann integral.(Here, the index cutoff of 10 5 was arbitrarily chosen to facilitate the computation; the constant may be reduced slightly by increasing the index cutoff and employing more computational power.) We are now ready to prove Theorem 1.2.It is equivalent to prove the following: Proof.As noted before, it suffices to count the number of congruency classes of triangles with at least one vertex at the origin.The total number of such triangles is ).Since any line contains at most N points inside [N ] × [N ], the number of right triangles and isosceles triangles are both o(N 4 ), so the number of scalene non-right triangles is 1  2 N 4 + o(N 4 ).Furthermore, consider pairing triangles {(0, 0), (a 1 , a 2 ), (b 1 , b 2 )} and {(0, 0), (a , b 2 ), (a 2 , b 1 )} (see Figure 23).This pairs the scalene non-right triangles with three vertices on its bounding box and the scalene non-right triangles with two vertices on its bounding box, except for o(N 4 ) exceptions (where the pair of a scalene non-right triangle is paired with an isosceles or a right triangle).This implies that the number of scalene non-right triangles with three vertices on its bounding box and the number of scalene non-right triangles with two vertices on its bounding box are identical up to a constant difference of o(N 4 ).Hence the number of each is The number of non-rotatable scalene non-right triangles having three vertices on its bounding box is therefore 0.25N 4 − A + o(N 4 ), and the number of non-rotatable scalene non-right triangles having two vertices on its bounding box is 0.25N 4 − B + o(N 4 ).
By Lemma 3.1, non-rotatable scalene non-right triangles have minimal congruency classes.The minimal congruency set of scalene non-right triangles with three vertices on its bounding box consists of exactly 2 triangles, each with three vertices on their bounding boxes; the minimal congruency set of scalene non-right triangles with two vertices on its bounding box consists of exactly 4 triangles, each with two vertices on their bounding boxes.Hence the number of congruency classes is at least 0.25N

Conjectures
We present several natural conjectures based on this work.Firstly, observing that the regular heptagon has 4 distinct triangles, we conjecture that this is optimal: Conjecture 4.1.The maximum number of points in the plane spanning four distinct triangles is 7, achieved only by the regular heptagon.
In light of work done in 1 and 2 distinct triangles in higher dimensions [3,2], we also suspect the maximum number of points in R 3 spanning three distinct triangles may be 8, e.g. is achievable by the vertices of a cube.
It would be interesting to determine the true constant c for which the n-point square lattice determines cn 2 + o(n 2 ) distinct triangles.
In addition, we have numerical evidence suggesting that the equilateral triangular lattice has more triangles than the square lattice: note that in the N × N triangular lattice, by a similar translational argument to the square lattice, it suffices to count triangles with at least one vertex on either a 60 • or a 120 • corner of the lattice.We used a computer program to count the number of distinct triangles T N in such a grid, and computed T N N 4 for 1 ≤ N ≤ 250; a curvefit suggests that a triangular lattice of n points spans approximately 0.2n 2 distinct triangles.Thus, we would like to also exclude the triangular lattice from optimal configurations.We more strongly conjecture that no two-dimensional lattice has asymptotically fewer distinct triangles than the square lattice: The investigation of non-rectangular lattice point sets could also be relevant to the discussion of this problem.For instance, one might consider the hexagonal grid formed by the triangular lattice, or sets of points formed by taking the intersection of a disk with any lattice.The authors believe this analysis will be more technically challenging, but may yield interesting results in the way of lower constant factors on the number of distinct triangles.

Figure 17 . 3 .
Figure 17.Lattice triangle with a congruent triangle having vertex at the origin

Figure 21 .
Figure 21.(a, b) is rotatable by angle θ, and tan θ = d c − b a 1+ d c • b a = ad−bc ac+bd .
θ in [N ] × [N ] are in the form of (cb mod r, b) for 0 ≤ b < N and 0 ≤ cb mod r < N .Since r > N , there is at most one point rotatable by θ per row of [N ] × [N ] by the above reasoning.Suppose there were more than N/M points rotatable by θ contained in [N ] × [N ]; then by the Pigeonhole Principle there exist 0 ≤ b 1 < b 2 < N such that b 2 − b 1 < M , and the rows b 1 , b 2 both contain points rotatable by θ in [N ] × [N ].Let the vector connecting these points be (u, v) with v > 0, so we have 0 < v < M .Meanwhile by Lemma 3.2, since r

Lemma 3 . 4 . 2 
The number of rotatable triangles in [N ] × [N ] with one vertex at the origin is at most + o(N 4 ) ≤ 0.0633N 4 + o(N 4 ).Proof.Let N > 5 5 and M = ⌊ 5 √ N ⌋.We begin by upper-bounding the number of rotatable triangles in [N ] × [N ].This may be done by finding the number of triangles which are rotatable by θ for each θ, then summing over all θ.Take N large and M ≤ √ N ; use f (θ) to denote the number of points in [N ] × [N ] rotatable by θ.

1 4 N
4 + o(N 4 ).Let A be the number of rotatable triangles in [N ] × [N ] having three vertices on its bounding box, and B be the number of rotatable triangles [N ] × [N ] having two vertices on its bounding box.By Lemma 3.4, A + B ≤ 0.0633N 4 + o(N 4 ).

Conjecture 4 . 2 .
Let c 0 be the real number such that the n-point square lattice spans c 0 n 2 + o(n 2 ) distinct triangles.Then for any distinct nonzero vectors a, b ∈ R 2 , the n-point lattice generated by a and b, i.e. {ua + vb | 0 ≤ u, v < √ n, u, v ∈ Z}, spans at least c 0 n 2 + o(n 2 ) distinct triangles.
• , 90 • , 180 • , 270 • } such that P is rotatable by θ.Note that P is rotatable by θ if and only if it is rotatable by θ + 90 • , so if it is rotatable then there exists 0 < θ < 90 • such that P is rotatable by θ. Second type of minimal congruency class Similarly, for triangle OAB and angle θ, we say that OAB is rotatable by θ if A and B are both rotatable by θ, and that OAB is rotatable if there exists θ ∈ {0 • , 90 • , 180 • , 270 • } such that A and B are both rotatable by θ.
when reduced to residues modulo r are all spaced a distance of at least u from each other.Thus the square grid [N ] × [N ] can contain at most N |u| points rotatable by θ from this set, by counting columns.Partition the rows of [N ] × [N ] into sets of the form k, k + v, . . ., k + 2M 4 N |u| − 1 v such that each row is in at least one set.One can do this with at most v than 0.1558N4+ o(N 4 ) as desired.Meanwhile, since the congruency class of any scalene non-right triangle contains at least the triangles given by its minimal congruency set, we have the number of congruency classes total is at most 0.25N 4 + o(N 4 ) 2 + 0.25N 4 + o(N 4 ) 4 = 0.1875N 4 + o(N 4 ).