# Twenty-four trees in eighteen rows of four

A very old puzzle, #146 from American Agriculturist, April 1865:

How may twenty-four trees be planted in exactly eighteen rows, with four trees in each row? A row consists of a number of trees in a straight line. The same tree can be part of multiple rows. The rows can intersect at any angle. Rows can’t contain more than 4 trees.

• Commented May 30, 2022 at 21:16
• Wow. A puzzle from American Agriculturist. Commented May 30, 2022 at 22:37
• ah the famous orchard planting problem. Commented May 31, 2022 at 1:11
• @DmitryKamenetsky Have you seen this particular puzzle before? Commented May 31, 2022 at 4:37
• Commented May 31, 2022 at 7:44

I can only do 20 rows. Is that OK?

Now if you want eeeeexactly 18 rows, you can do this.

And if you are crazy about rows of 4, here is how to do. Can you count them all?

• This is a nice planting arrangement but the goal is to have exactly 18 rows, not more and not less. Commented May 31, 2022 at 18:48
• Wow! Your second solution is even prettier than the solution given in the American Agriculturist. Commented May 31, 2022 at 21:11
• In your third diagram, I see 24 trees planted at the vertices of three concentric octagons. Using graph theory, each row of trees is drawn with three edges. The degrees of the vertices of the outer octagon is 5, middle octagon 6, and inner octagon 10. The sum of all the degrees is 8*(5+6+10)=168. The number of edges is 168/2=84. Lastly, the number of rows of trees is 84/3=28. Thanks for the cool counting problem. Commented Jun 3, 2022 at 0:25
• That is correct, assuming I drew all lines and didn't miss any. Commented Jun 3, 2022 at 10:24

I think this works:

Start with a construction that actually has too many rows (in this case, 20):

And then move one of the trees so that it breaks 2 of the rows but preserves the rest. In this case, I moved point A a little further out so it was no longer in line with the two sides of the red square:

There is this, which is perhaps a bit prettier:

• Your answer is prettier than the solution that I made a long time ago but there is a solution that is even more symmetrical than yours; this other solution has rotational symmetry in addition to lines of reflection. Can you find such a solution? Commented May 31, 2022 at 18:43
• @WillOctagonGibson I updated my answer to include another variation that has some rotational symmetry as well. Commented May 31, 2022 at 20:12
• I like your second solution. Both your solutions were based on squares; try hexagons. By the way, what software do you use to make your diagrams? Commented May 31, 2022 at 20:16
• @WillOctagonGibson I'm using desmos.com to do the geometric constructions. Commented Jun 1, 2022 at 0:00

I found a solution that works (mostly through guessing and using symmetry)

       X   X   X   X
X   X   X    X
X       X
X   X          XX
X       X
X  X   X   X
X   X   X   X


• I count only 17 lines in your arrangement - 5 horizontal, 2 vertical, 5 diagonally up, 5 diagonally down. Am I overlooking one? Commented May 31, 2022 at 10:34
• @JaapScherphuis Aah made an error, but there are actually 19 lines (2 more diagonals, one up, one down). I'll try to correct it and edit. Commented May 31, 2022 at 11:13
• @JaapScherphuis Maybe you missed one of these: link Commented May 31, 2022 at 11:32
• Yes, I missed the more horizontal one of those two (and its mirror image). Commented May 31, 2022 at 11:36
• It's pretty hard to see the rows in an ascii diagram. Can you make it in a program that supports exact geometry like geogebra?
– qwr
Commented Jun 2, 2022 at 5:12