On a 27-point grid, every three-color pattern with the fewest same-color sums has a single-color plane
Why it matters
Color a grid of 27 points so that two points and their sum share a color as rarely as possible. There is just one best pattern once you account for symmetry, and it leaves a whole plane one color. On larger grids, starting with a pattern that loses by two sums and dividing its plane between colors beats the natural extension of the small winner.
How well can you color a grid with three colors so that two points and their sum rarely share a color? A coloring with few same-color sums shows what is possible. To find out whether its pattern is necessary, you have to rule out every coloring that does as well in a different way.
On a grid of 27 points, where coordinates add modulo three, the minimum is 55 same-color sums out of 729 ordered pairs of points. Every coloring that attains it gives all the points of exactly one plane the same color, and that plane misses the origin. All 8,424 minimizing colorings differ only in the choice of coordinates and color names. In larger grids the best small pattern loses its advantage. On 243 points, breaking up the single-color plane of a different pattern beats the best refinement of the center of the winning pattern. The new construction gives a same-color fraction that approaches 2/27 as the grid grows.
How sums are counted
Write \mathbb F_3^n for the grid of points with n coordinates, each 0, 1 or -1. Add points coordinate by coordinate, reducing each sum modulo three. A point x, a point y and their sum x+y form a Schur triple. Let W count the ordered pairs (x,y) for which the triple is monochromatic (all one color). The fraction of pairs counted is W/3^{2n}. This includes triples with repeated points, which matter on the 27-point grid. Their share vanishes as the grid grows: a repetition requires x=y, x=0 or y=0, together at most 3\cdot 3^n pairs.
Rué and Spiegel [1] studied how small the monochromatic fraction can be for several patterns as the dimension grows. They found the exact limiting minimum for three-term arithmetic progressions in three colors over this field. A progression here satisfies x+y+z=0: shifting every point by the same vector preserves the equation because three copies of the shift add to zero. The equation x+y=z generally fails after such a shift, so the progression result does not settle the question for sums. For sums, Rué and Spiegel gave an upper bound by coloring a nine-point grid and letting just those two coordinates decide the color in every larger grid. Direct counting on their published coloring [2] gives seven monochromatic sums out of 81.
The pattern on 27 points
Write the three coordinates as (t,u,v) and slice the grid into parallel planes according to t (Figure 1). Color the whole plane t=1 red. On the opposite plane, t=-1, color the center of the (u,v) grid red, the four other points on the coordinate axes blue, and the four points off the axes green. These green points lie on the two diagonals. Copy the pattern onto the central plane, t=0, but change the color of the center point to blue or green.

Figure 1. The columns and rows give the coordinates u and v. On 27 points, B/G means that the center point can be either blue or green. In a larger grid each disk represents a cell containing several points. The cell marked B/G can then be divided between the two colors.
A search from random colorings, changing one point at a time, reached 55 monochromatic sums in all 200 runs on 27 points. To prove that 55 is the minimum and identify every tie, we used a counting test to narrow the enumeration. The test allows all three colors on every plane.
Why every minimum has this pattern
Instead of checking all three coordinates of a sum at once, consider one linear combination of coordinates, called a linear form d. It assigns a single coordinate modulo three to each point and preserves addition. Count the monochromatic triples (x,y,z) that satisfy d(x+y-z)=0, and call this count P_d. There are 26 nonzero forms, but d and -d give the same test, leaving 13 distinct tests. A true sum passes all 13. For a triple with nonzero error x+y-z, the forms that vanish on the error form a two-dimensional space. Its eight nonzero forms give four tests.
If the color classes have sizes a,b,c, then S=a^3+b^3+c^3 counts all ordered monochromatic triples before testing. Of these, W are true sums. Adding the test counts therefore gives
If W\le55, at least one test must have 13P_d-4S\le495, by averaging. We can check this inequality knowing only how many points of each color lie on each of the three planes where d is constant. A color with counts v_0,v_1,v_{-1} on those planes contributes \sum_{i,j}v_i v_j v_{i+j} to P_d, with indices added modulo three.
Use a form passing the inequality as the coordinate t. Choose its sign so that the largest count of any one color at t=1 is at least the largest at t=-1. To avoid equivalent cases, we kept one coloring of the t=1 plane for each set related by renaming colors or by invertible affine changes of grid coordinates. Such a change sends the grid position q=(u,v) to Aq+b, where A is an invertible matrix and b a shift. Although a shift alone can break a sum, this change on the plane extends to (t,q)\mapsto(t,Aq+tb) on the full space, a linear map that preserves sums.
For each retained coloring we took every combination of color counts on the central and opposite planes that passed the tests, and enumerated every placement with those counts. To count sums, we grouped the two summands by their planes. For each color, the contributions of the nine ordered pairs of planes could be tabulated once for each pair of subsets that the color occupied on the central and opposite grids.
The tests retained 25 representative colorings of the first plane and 4,077 combinations of representative and plane counts. Among the 558,832,209 placements examined, none scored below 55 and 110 scored exactly 55. Independently, we took the coloring in Figure 1 with a single color at the central intersection and applied every invertible three-by-three matrix over \mathbb F_3 and every permutation of the colors. This gave 8,424 distinct colorings with coordinates and color names held fixed for counting. They included all 110 ties, whose scores we also checked by direct addition. Every possible winner has a representative in the enumeration, so these 8,424 are precisely the minimizers. Of all 39 affine planes in Figure 1 (three parallel planes for each test), only the red plane away from the origin is monochromatic. An invertible linear change of coordinates preserves that property.
Repeating the pattern in larger grids
In dimension n\ge3, color each point using its first three coordinates (t,u,v). Each of the 27 cells then contains h=3^{n-3} points, and each ordered pair of cells stands for h^2 ordered pairs of points. Repeating the minimizing pattern keeps its fraction of monochromatic sums unchanged, already 12.7% below the nine-point fraction 7/81. Dividing the central intersection between blue and green as evenly as possible, to within one point, saves a further 3/2916 in the limit.
To see why the split works, first count sums involving an outer plane. There are 10h^2 red sums: 9h^2 from two summands in the red plane and h^2 from two in the opposite red cell. For a blue or green sum involving an outer plane, one summand lies in the central plane and shifts the other within the opposite grid. A shift by a nonzero axis point takes just one blue site to a blue site. A shift by a nonzero diagonal point likewise takes just one green site to a green site. A central point at the intersection gives a zero shift, preserving all four sites of its color whether it is blue or green. The eight nonzero shifts, the zero shift and the two summand orders thus give 2(8+4)h^2 pairs.
The count inside the central plane depends only on its blue fraction b. For uniform independent summands in that plane, any two of x,y,x+y are independent and uniform. Counting disagreements across the three pairs of positions therefore gives an average of 6b(1-b) per triple. Each mixed triple contributes two disagreements, so the monochromatic fraction is 1-3b(1-b). Balancing the two color counts minimizes this fraction and gives (81h^2+3)/4 internal pairs. Adding the outer counts gives (217h^2+3)/4 in all. This is the minimum even if the central plane can use all three colors and the opposite grid can be redesigned, provided the red plane stays fixed and each opposite cell has a single color (Appendix).
Searching without a fixed plane
On 81 and 243 points we searched without requiring points in any plane or cell to share a color. We started from 12 random colorings in each dimension and proposed recoloring individual points. To allow the search to escape a local minimum, we used simulated annealing: a move that raised the count by \Delta W was accepted with probability \exp(-\Delta W/T). The temperature T decreased geometrically from 3 to 0.006 over one million proposals on 81 points and five million on 243. We checked the best coloring of each run by direct addition over every ordered pair.
All 12 runs on 81 points reached 489, matching the central split. On 243 points five reached the split's count of 4,395 and seven reached 4,377. We checked every affine hyperplane, a slice defined by fixing one linear combination of coordinates. None was monochromatic in any of those seven colorings. Across all 363 hyperplanes, the largest number of points of one color in a hyperplane ranged from 61 to 64 out of 81, depending on the coloring. Repeating any of the seven gives the same fraction 4377/243^2=1459/19683 in every higher dimension.
A different pattern for larger grids
The seven better colorings on 243 points each had an underlying 27-cell pattern. To find it, we shifted the grid by each possible vector and counted the points whose color changed. In each coloring the nine shifts changing the fewest colors formed a two-dimensional subspace, with a strict gap in the count before the tenth shift. Grouping points related by these nine shifts partitioned the grid into 27 cells called cosets. Giving each coset its majority color changed only 17 to 20 points in total. Treating each coset as a single point then gave the same 27-point coloring in all seven cases, up to linear coordinate changes and color names. This coloring has 57 monochromatic sums, two more than the small-grid minimum. All the changes from it in the seven examples lay in its monochromatic plane.
That observation gives an explicit rule. On both t=0 and t=1, color the intersection red, the four remaining axis sites blue and the four diagonal sites green. On t=-1 keep the intersection red. In each other cell of that plane, color m of the h points according to the grid and leave the remaining h-m red. Taking m=0 repeats the 57-pair pattern; increasing m breaks up its monochromatic plane. Only the number m of points chosen in each cell affects the count.
To see this, write p=m/h and let f_i(a) be the fraction of cell a=(t,u,v) colored i. No triple lies entirely in t=-1, since (-1)+(-1)=1 modulo three. Thus at most two positions in a triple can have colors that vary within their cells. Once the summand cells are fixed, any two of the three vectors of remaining coordinates are independent and uniform for uniformly chosen summands. The color fractions for the variable positions therefore multiply, giving the exact count
Because at most two factors vary, this expression is a polynomial of degree at most two in p. Three evaluations determine it. Group contributions by the planes of the first and second summands, with rows and columns both in the order 0,1,-1. At p=0 the rows are (9,9,9),(9,1,1),(9,1,9). Evaluating at p=1/2 gives (9,9,5),(9,5,5),(5,5,5); at p=1 every entry is nine. The totals 57,57,81 give
Choosing the integer m nearest to h/4 gives W=54h^2+3, since h is odd. This matches the central split on 81 points and saves (h^2-9)/4 pairs for n\ge5, including the observed gain of 18 pairs on 243 points. Its limiting fraction is 54/729=2/27, below the central split's 217/2916 by 1/2916.
The exact minimum on 27 points forces a single-color plane. In larger grids the exact comparison is with the family that keeps one outer plane red and each opposite cell a single color. The searches on 81 and 243 points do not prove unrestricted minima, and 2/27 is an upper bound on the unrestricted limiting minimum.
Appendix. The minimum with one fixed outer plane
Keep the plane t=1 red and give each cell of the opposite plane a single color. Allow any coloring in the central plane. To show that the balanced split attains the minimum of (217h^2+3)/4 in this family, we must account for a possible advantage of red in the center. A third color could break up triples that would otherwise be monochromatic.
Measure central populations in units of h and all triple counts in units of h^2. Let B,G,s be the central blue, green and red populations in these units, so B+G+s=9, and put D=(B-G)/2. Choose blue or green with equal probability, then give that color to every central red point. After this merger the blue population differs from 9/2 by D+s/2 or D-s/2. The two-color formula gives an expected internal count of 81/4+3D^2+3s^2/4. A newly monochromatic triple must have contained both red and nonred, and at most one merger makes it monochromatic. The red/nonred two-color formula counts 3s(9-s) mixed triples in our units. Subtracting half of this bounds the original internal count from below by
For triples that touch an outer plane, we can count exactly how many sums each central color choice contributes. Call this its external cost. For an opposite grid with r red cells, let C_i(q) count the sites of color i that still have color i after a shift by q. Triples confined to the two outer slices cost 9r+r^2. For each unit of central population at q, blue and green cost 2C_B(q) and 2C_G(q), respectively, from shifting the opposite slice. Red costs 2C_R(q)+2(9+r). The extra terms count a central red summand paired with the red plane, and a central red sum produced by one summand from each outer slice.
These costs let us screen opposite grids without enumerating central colorings. For each grid we need a lower bound that holds however the central cells are divided. For parameters k and l, replace the two squares in the internal bound by tangent lines, 3D^2\ge kD-k^2/12 and 9s^2/4\ge ls-l^2/9. The remaining expression is linear in the three color populations at each site. The three populations at a site sum to one in our units. Assigning the whole site the cheapest of the three costs therefore gives a lower bound for any division of the site. In full, the bound on W/h^2 is
For each of the 3^9=19{,}683 opposite grids, we counted the overlaps at all nine shifts and took the largest of these bounds over integers -27\le k\le27, 0\le l\le9. Multiplying by 36 makes every comparison integral. Each tested pair gives a valid bound, so a finite selection suffices. For 19,629 grids the bound was at least 57, above the construction's count of at most 55 in these units. The remaining 54 all gave 217/4. They were exactly the nine choices of a red intersection and the six choices of two of the four line directions through it to color blue. Each is equivalent to the opposite grid in Figure 1. A shift of that grid extends to a linear map of the full space as above, so it can move the intersection, and any two distinct directions can serve as coordinate axes.
On these 54 grids any positive central red population costs more externally than it can save internally. At zero shift its unit cost is 22, versus 8 for either blue or green. At a nonzero shift red costs 20, versus 2 and 4 for the alternatives. Merging red into either color thus saves at least 14s externally, whereas the expected internal increase is at most 3s(9-s)/2\le 13.5s. At least one merger strictly improves the coloring if s>0. With red excluded, the cheaper color at every nonzero shift is exactly the one in Figure 1, and the colors tie at zero. The balanced split simultaneously minimizes this external cost and the two-color internal count. Equality requires both minima, leaving only the choice of which individual points receive each color in the split cell, up to the stated symmetries.
References
- J. Rué and C. Spiegel. The Rado multiplicity problem in vector spaces over finite fields. Finite Fields and Their Applications 111 (2026), 102782.
- J. Rué and C. Spiegel. Construction data accompanying the Rado multiplicity paper.