# The Greenhouse Problem version 2

This is an extension of Nilster's great puzzle: The Greenhouse Problem

The task is the same, but this time sprinklers cover only a 3x3 square around them. For completeness, here is the full set of rules:

• The greenhouse floor is made of tiles arranged in a 9x11 rectangle. The door is on the center of the 11-length edge.
• Each plant takes up 1 tile.
• Each plant needs to be watered by a sprinkler. Each sprinkler waters a 3x3 square around it.
• A plant and a sprinkler cannot be placed on the same tile.
• I must be able to reach every plant orthogonally. I cannot walk on plants or sprinklers. I can only move orthogonally.
• Asymmetry is allowed. The fewer sprinklers, the better, but there's no limit.

What is the most number plants possible in this greenhouse?

Here's a symmetric solution with

50 plants:

$$\begin{matrix} &S &P &P &S &P &. &P &S &P &P &S\\ &P &. &. &P &P &. &P &P &. &. &P\\ &P &. &P &S &P &. &P &S &P &. &P\\ &S &. &P &P &P &. &P &P &P &. &S\\ &P &. &. &. &. &. &. &. &. &. &P\\ &S &. &P &P &P &. &P &P &P &. &S\\ &P &. &P &S &P &. &P &S &P &. &P\\ &P &. &. &P &P &. &P &P & . &. &P\\ &S &P &P &S &P &. &P &S &P &P &S\\\end{matrix}$$

• Excellent work Rob! Feb 2 at 22:07

I could place

49 plants

in this way (which is also more symmetric than the previous one):

S P . P S P S P . P S
P P . P P . P P . P P
. . . P P . P P . . .
P P . P S . S P . P P
S P . P P . P P . P S
P P . . . . . . . P P
. . . P P . P P . . .
P P . P S . S P . P P
S P . P P . P P . P S

Another one with the same count:

S P . P S . S P . P S
P P . P P P P P . P P
. . . . . . . . . . .
P P . P S P P P . P P
S P . P P P S P . P S
P P . . . . P P . P P
. . . P P P S P . . .
P P . P S P P P . P P
S P . P P . . . . P S

• This is a great start! Feb 2 at 6:09
• I tried various other patterns and non-patterns, but tweaking them all converged to the existing ones. I'm suspecting the current number is optimal. Feb 2 at 7:48
• I can confirm that this is not optimal. Better solutions exist. Feb 2 at 10:56

Same P-count as @Bubbler but I managed to squeeze out one S:

 
P S P . P S P . P S P
. P P . P P P . P P .
. . . . . . . . . . .
P P P P P . P P P P P
S . P S P . P S P . S
P . P P P . P P P . P
P . . . . . . . . . P
S . P P P . P P P . S
P . P S P . P S P . P
 

My solver found some more solutions with the optimal number of plants:

50 plants

 S P P S P P S P P S P
P . . . . . . . . . .
P . P P P P P P . P P
S . P S P P S P . P S
P . P P . . P P . P P
S . P S P . P P . . .
P . P P P . P S P P P
P . . . . . P P P P S
S P P S P . . . . . P

and

S P . P S P P S P P S
P P . P P . . . . . P
. . . P S P P P P . P
P P . P P P P S P . S
S P . . . . . P P . P
P P . P P P P S P . P
. . . P S P P P P . S
P P . P P . . . . . P
S P . . . . P S P P S