# Painting edges of a 3x3 grid with 4 colours

Can you paint the edges of a 3x3 grid with 4 colours, such that:

• The colours of edges of every 1x1 square are different.
• The colours of edges adjacent to every vertex are different.

Here is a similar puzzle for a 2x2 grid: Painting edges of a 2x2 grid with 4 colours

Good luck!

It would appear that

I can, as follows:

@ -1- @ -4- @ -1- @
|     |     |     |
2     3     2     3
|     |     |     |
@ -4- @ -1- @ -4- @
|     |     |     |
3     2     3     2
|     |     |     |
@ -1- @ -4- @ -1- @
|     |     |     |
2     3     2     3
|     |     |     |
@ -4- @ -1- @ -4- @

I further remark that

this pattern can be continued indefinitely, so it's no harder for (say) a 15x15 square.

• That's a better answer than mine, I'd say! But it would be interesting to ask for the total number of different solutions on an $n\times n$ grid. – WhatsUp Oct 7 '19 at 0:59
• Great find Gareth! Indeed it seems you can just use this pattern for larger grids. – Dmitry Kamenetsky Oct 7 '19 at 0:59
• @DmitryKamenetsky: It also extends to three dimensions, where you colour the faces shared between the cubical cells using 6 colours, no cell has two faces of the same colour, and no two faces of the same colour share an edge. – Jaap Scherphuis Oct 7 '19 at 3:45

Again got it on the first try...

• Ah... this time a bit late ^_^ – WhatsUp Oct 7 '19 at 0:56