## Hexagon of hexagons

Gengulphus
Lemon Quarter
Posts: 2806
Joined: November 4th, 2016, 1:17 am
Been thanked: 1412 times

### Hexagon of hexagons

You have a the following 'hexagon of hexagons':

`.     |     |     |     |     |     |     |     V     |     |     |     |           |     |     |     V   *---*   V     |     |        /     \        |     V   *---*       *---*   V        /     \     /     \        *---*       *---*       *---*  /     \     /     \     /     \ *       *---*       *---*       *  \     /     \     /     \     /   *---*       *---*       *---*  /     \     /     \     /     \ *       *---*       *---*       *  \     /     \     /     \     /   *---*       *---*       *---*  /     \     /     \     /     \ *       *---*       *---*       *  \     /     \     /     \     /   *---*       *---*       *---*        \     /     \     /         *---*       *---*              \     /               *---*`

Your task is to draw lines through it along the five indicated vertical axes, using three colours (e.g. Blue, Green and Red). Then rotate it by 120 degrees and do the same along what are now the corresponding vertical axes, using another three colours (e.g. Cyan, Magenta and Yellow). Then rotate it by another 120 degrees and do it again, using yet another three colours (e.g. Amber, Fawn and Purple). Can you do it in such a way that no two of the 19 small hexagons has the same combination of colours crossing it, or alternatively show that that cannot be done?

If it can be done, then any solution can obviously have its colours permuted within each of the three sets of three colours - e.g. I could replace all Red lines by Green lines and all Green lines by Red lines and it would still be a solution. Also, any solution can be reflected or rotated and the sets of colours exchanged correspondingly - e.g. I could reflect a solution left-to-right, replace Cyan/Magenta/Yellow lines by Amber/Fawn/Purple lines respectively and vice versa to get another solution. Regard two solutions as essentially identical if you can transform one into the other by a sequence of such colour permutations, rotations and reflections. Can you find two solutions that are not essentially identical, or alternatively show that all solutions are essentially identical?

Note that you don't have to actually draw diagrams with coloured lines to show a solution - I've chosen the colours to all have different initial letters, so you can indicate lines just by typing the letters into the hexagon. E.g. the following diagram shows the state after drawing a full set of Blue, Green and Red lines, a Cyan line and a Purple line:
`.               *---*              /     \          *---*  G..  *---*        /     \     /     \        *---*  R..  *---*  B..  *---*  /     \     /     \     /     \ *  GC.  *---*  G..  *---*  G..  *  \     /     \     /     \     /   *---*  RC.  *---*  B..  *---*  /     \     /     \     /     \ *  G..  *---*  GC.  *---*  G..  *  \     /     \     /     \     /   *---*  R..  *---*  BC.  *---*  /     \     /     \     /     \ *  G..  *---*  G..  *---*  GCP   *  \     /     \     /     \     /   *---*  R..  *---*  B.P  *---*        \     /     \     /         *---*  G.P  *---*              \     /               *---*`

The objective is then basically to end up with a different combination of three letters in each hexagon.

Gengulphus

Gengulphus
Lemon Quarter
Posts: 2806
Joined: November 4th, 2016, 1:17 am
Been thanked: 1412 times

### Re: Hexagon of hexagons

Gengulphus wrote:... E.g. the following diagram shows the state after drawing a full set of Blue, Green and Red lines, a Cyan line and a Purple line:
`.               *---*              /     \          *---*  G..  *---*        /     \     /     \        *---*  R..  *---*  B..  *---*  /     \     /     \     /     \ *  GC.  *---*  G..  *---*  G..  *  \     /     \     /     \     /   *---*  RC.  *---*  B..  *---*  /     \     /     \     /     \ *  G..  *---*  GC.  *---*  G..  *  \     /     \     /     \     /   *---*  R..  *---*  BC.  *---*  /     \     /     \     /     \ *  G..  *---*  G..  *---*  GCP   *  \     /     \     /     \     /   *---*  R..  *---*  B.P  *---*        \     /     \     /         *---*  G.P  *---*              \     /               *---*`

The objective is then basically to end up with a different combination of three letters in each hexagon.

Have just spotted a possible misunderstanding of that last sentence, which I should clarify: the task is not to complete that particular example with further lines so that it ends up with a different combination of three letters in each hexagon - that is actually impossible. It is to complete the empty hexagon of hexagons in such a way.

Gengulphus

UncleEbenezer
Lemon Quarter
Posts: 3398
Joined: November 4th, 2016, 8:17 pm
Has thanked: 352 times
Been thanked: 543 times

### Re: Hexagon of hexagons

I have an out-of-cheese error in my hex. But let's see.

Each of the three long axes needs its own unique colour, as those intersect everything.
Of the others, there cannot be two lines the same colour on the same side of a long axis, as that'll duplicate intersections of lines in the other two directions. And if we have the same permutation of distinctions in more than one direction, we'll get symmetrical opposites being the same colour.

How about a pattern that's different in each axis, with patterns AACBB, ABCAB, and ABCBA? This gives 6^3 = 216 permutations of those, and six rotations, for 1296 essentially identical solutions. Does it work?

I can't remember your colours as I type, so I'll think sudoku and use digits in their place. So the right hand column is verticals 7-9, the middle is sloping upwards 4-6, and the left sloping downwards 1-3.
`.        148     247     159347     258     169     357      269157     368     259     167     359267     158     349     257     149         248`

Gengulphus
Lemon Quarter
Posts: 2806
Joined: November 4th, 2016, 1:17 am
Been thanked: 1412 times

### Re: Hexagon of hexagons

A correct final result, UncleEbenezer, but your reasoning is suspect in at least two ways:

* "Each of the three long axes needs its own unique colour, as those intersect everything." No, they don't: they don't intersect the other four axes parallel with them, which are the only ones that could share a colour with them anyway given the disjoint sets of colours for the three directions.

* "Of the others, there cannot be two lines the same colour on the same side of a long axis, ..." Oddly enough, your solution has two lines the same colour to the left of the vertical long axis, and another two lines sharing a (different) colour to its right!

Gengulphus

UncleEbenezer
Lemon Quarter
Posts: 3398
Joined: November 4th, 2016, 8:17 pm
Has thanked: 352 times
Been thanked: 543 times

### Re: Hexagon of hexagons

You're right of course. I was armwaving through a thought process that had been down some blind alleys, having started with looking to prove an answer that turned out to be wrong.

Hmmm ...

Gengulphus
Lemon Quarter
Posts: 2806
Joined: November 4th, 2016, 1:17 am
Been thanked: 1412 times

### Re: Hexagon of hexagons

As this thread seems to have died, I think a hint might be in order: there can be at most 9 small hexagons on the lines of any particular colour, since there are only 3*3 possible combinations of colours in the other two directions.

Gengulphus

cinelli
2 Lemon pips
Posts: 203
Joined: November 9th, 2016, 11:33 am
Has thanked: 57 times
Been thanked: 27 times

### Re: Hexagon of hexagons

Gengulphus,

Just to say I haven't ignored this splendid puzzle. In fact I have been thinking about it quite a lot, but just can't seem to get a grip on it. Still trying though.

Cinelli

Gengulphus
Lemon Quarter
Posts: 2806
Joined: November 4th, 2016, 1:17 am
Been thanked: 1412 times

### Re: Hexagon of hexagons

I think a further hint might be in order at this point: there's something similar to be said about the number of hexagons at the intersections of lines of two different colours.

Gengulphus

Gengulphus
Lemon Quarter
Posts: 2806
Joined: November 4th, 2016, 1:17 am
Been thanked: 1412 times

### Re: Hexagon of hexagons

One more hint, I think, but I think I've run out of good hints after this one!

It might be worth focussing on what one can work out about the central line in each direction.

Gengulphus

Gengulphus
Lemon Quarter
Posts: 2806
Joined: November 4th, 2016, 1:17 am
Been thanked: 1412 times

### Re: Hexagon of hexagons

I think the time has come for me to post my solution, for the sake of those who have given up and just want to see an answer. Those who haven't given up should avoid reading the following spoiler. By the way, don't be put off too much by its length - that's mainly due to it containing nine big diagrams, not to it being hundreds of lines of dense argument!

The solution starts with my first hint above, that the lines of any particular colour cannot pass through more than 9 hexes (which is the term I'll use for brevity to describe the small hexagons). In any particular direction, there are two 3-hex lines, two 4-hex lines and one 5-hex line, so for each colour:

* If there is just one line of that colour, it passes through between 3 and 5 hexes.
* If there are exactly two lines of that colour, they pass through a total of between 3+3=6 and 4+5=9 hexes.
* If there are three or more lines of that colour, they pass through at least 3+3+4=10 hexes.

So there are at most two lines of any particular colour. For any particular direction there are five lines sharing the three colours associated with that colour, so there must be one colour that is used by only one line and the other two colours must be used by two colours each.

For each direction, now consider the colour of the central line, of length 5 hexes. That colour might be shared by one of the 4-hex lines in that direction, or by one of the 3-hex lines in that direction, or by no other lines. Consider the first of those possibilities, after rotating/colour-permuting as necessary to make the direction vertical and the colour Red:
`.                  _____                 /  R  \           _____/   R   \_____          /  R  \   R   /     \    _____/???R   \__R__/       \_____   /     \   R???/  R  \       /     \  /???    \__R__/???R   \_____/       \  \    ???/  R  \   R???/     \       /   \_____/???R   \__R__/???    \_____/   /     \   R???/  R  \    ???/     \  /???    \__R__/???R   \_____/???    \  \    ???/  R  \   R???/     \    ???/   \_____/???R   \__R__/???    \_____/   /     \   R???/  R  \    ???/     \  /???    \__R__/???R   \_____/???    \  \    ???/  R  \   R???/     \    ???/   \_____/???R   \__R__/???    \_____/         \   R???/  R  \    ???/          \__R__/???R   \_____/                \   R???/                 \__R__/`

But now consider the four NW-SE lines I've marked with "?"s in the diagram. Since there are only three colours for that direction, two of them must share a colour. Each of those lines intersects the Red lines in two hexes, so there are four hexes with the combination of Red and that colour. But there are only three colours available for the last direction (NE-SW), so at least two of those four hexes must share all three colours. So there are no solutions in which any of the 4-hex lines shares the colour of the central line in the same direction.

On to the possibility of the central line's colour being shared by a 3-hex line. After rotating/colour-permuting appropriately, we have the following position:
`.                  _____                 /  R  \           _____/   R   \_____          /     \   R   /     \    _____/       \__R__/       \_____   /  R  \       /  R  \       /     \  /???R   \_____/   R   \_____/       \  \   R???/     \   R   /     \       /   \__R__/???    \__R__/       \_____/   /  R  \    ???/  R  \       /     \  /???R   \_____/???R   \_____/       \  \   R???/     \   R???/     \       /   \__R__/???    \__R__/???    \_____/   /  R  \    ???/  R  \    ???/     \  /???R   \_____/???R   \_____/???    \  \   R???/     \   R???/     \    ???/   \__R__/???    \__R__/???    \_____/         \    ???/  R  \    ???/          \_____/???R   \_____/                \   R???/                 \__R__/`

This time, there are only three NW-SE lines (marked with "?"s) that intersect the Red lines in two hexes each. No two of them can share a colour, since that would lead to there being four hexes sharing that colour and Red, which cannot result in a solution for the same reason as above. So they have three different colours, and after a further colour permutation if appropriate, we have the following position:
`.                  _____                 /  R  \           _____/   R   \_____          /     \   R   /     \    _____/???    \__R__/    ...\_____   /  R  \    ???/  R  \...    /     \  /CCCR   \_____/???R...\_____/       \  \   RCCC/     \...R???/     \       /   \__R__/CCC ...\__R__/???    \_____/   /  R  \... CCC/  R  \    ???/     \  /MMMR...\_____/CCCR   \_____/???    \  \...RMMM/     \   RCCC/     \    ???/   \__R__/MMM    \__R__/CCC    \_____/   /  R  \    MMM/  R  \    CCC/     \  /YYYR   \_____/MMMR   \_____/CCC    \  \   RYYY/     \   RMMM/     \    CCC/   \__R__/YYY    \__R__/MMM    \_____/         \    YYY/  R  \    MMM/          \_____/YYYR   \_____/                \   RYYY/                 \__R__/`

What's the colour of the NW-SE line I've now additionally marked with "?"s? It cannot be Cyan, because that would mean the central NW-SE line shared the colour of a 4-hex NW-SE line, which we already know cannot be the case. It also cannot be Magenta, because if it were, then no matter what the colour of the NE-SW line I've marked with "."s, there would be two hexes sharing the combination of Red, Magenta and that colour. So it must be Yellow, which means that after decluttering the diagram to only include the Red and Yellow lines, we must have the following situation:
`.                  _____                 /  R  \           _____/   R   \_____          /     \   R   /     \    _____/YYY    \__R__/       \_____   /  R  \    YYY/  R  \       /     \  /   R   \_____/YYYR   \_____/       \  \   R   /     \   RYYY/     \       /   \__R__/       \__R__/YYY    \_____/   /  R  \       /  R  \    YYY/     \  /   R   \_____/   R   \_____/YYY    \  \   R   /     \   R   /     \    YYY/   \__R__/       \__R__/       \_____/   /  R  \       /  R  \       /     \  /YYYR   \_____/   R   \_____/       \  \   RYYY/     \   R   /     \       /   \__R__/YYY    \__R__/       \_____/         \    YYY/  R  \       /          \_____/YYYR   \_____/                \   RYYY/                 \__R__/`

But now we can apply a symmetrical argument (the symmetry being top-bottom reflection) to show that two NE-SW lines must have the same colour, which we can assume to be Amber after permuting the NE-SW colours if necessary, resulting in:
`.                  _____                 /  R  \           _____/   RAAA\_____          /  ?  \AAAR   /     \    _____/YYY?AAA\__R__/       \_____   /  R  \AAA?YYY/  R  \       /     \  /   RAAA\__?__/YYYR   \_____/       \  \AAAR   /  ?  \   RYYY/     \       /   \__R__/   ?   \__R__/YYY    \_____/   /  R  \   ?   /  R  \    YYY/     \  /   R   \__?__/   R   \_____/YYY AAA\  \   R   /  ?  \   R   /     \AAA YYY/   \__R__/   ?   \__R__/    AAA\_____/   /  R  \   ?   /  R  \AAA    /     \  /YYYR   \__?__/   RAAA\_____/       \  \   RYYY/  ?  \AAAR   /     \       /   \__R__/YYY?AAA\__R__/       \_____/         \AAA?YYY/  R  \       /          \__?__/YYYR   \_____/                \   RYYY/                 \__R__/`

and whatever the colour of the line marked with "?"s, two hexes on it share the combination of Yellow, Amber and that colour. That eliminates the last possibility for a central line of a solution to share the colour of a parallel 3-hex line, and since we've already eliminated the possibility of it sharing the colour of a parallel 4-hex line, it must be the only line of its colour, and the other two colours in that direction must be used by two lines each.

That means that for each of the three directions, if we look at the colours of the lines successively from one side to the other, they must follow one of the patterns xxzyy, xyzxy and xyzyx.

Can two of the directions use the pattern xxzyy? No, because after rotating appropriately, it means we must have the following situation with regard to one of the NW-SE colours (which can be Yellow after permuting those colours if needed) and one of the NE-SW colours (which similarly can be Amber):
`.                  _____                 /     \           _____/YYY AAA\_____          /     \AAA YYY/     \    _____/YYY AAA\_____/YYY AAA\_____   /     \AAA YYY/     \AAA YYY/     \  /    AAA\_____/YYY AAA\_____/YYY    \  \AAA    /     \AAA YYY/     \    YYY/   \_____/    AAA\_____/YYY    \_____/   /     \AAA    /     \    YYY/     \  /    AAA\_____/       \_____/YYY    \  \AAA    /     \       /     \    YYY/   \_____/       \_____/       \_____/   /     \       /     \       /     \  /       \_____/       \_____/       \  \       /     \       /     \       /   \_____/       \_____/       \_____/         \       /     \       /          \_____/       \_____/                \       /                 \_____/`

and that has two hexes on the central vertical line that must share the combination of Yellow, Amber and its colour.

Can two of the directions use the pattern xyzyx? No, because doing similar rotating/colour-permuting again gives us two hexes on the central vertical line that must have the same colour combination:
`.                  _____                 /     \           _____/       \_____          /     \       /     \    _____/YYY    \_____/    AAA\_____   /     \    YYY/     \AAA    /     \  /       \_____/YYY AAA\_____/       \  \       /     \AAA YYY/     \       /   \_____/    AAA\_____/YYY    \_____/   /     \AAA    /     \    YYY/     \  /YYY AAA\_____/       \_____/YYY AAA\  \AAA YYY/     \       /     \AAA YYY/   \_____/YYY    \_____/    AAA\_____/   /     \    YYY/     \AAA    /     \  /       \_____/YYY AAA\_____/       \  \       /     \AAA YYY/     \       /   \_____/    AAA\_____/YYY    \_____/         \AAA    /     \    YYY/          \_____/       \_____/                \       /                 \_____/`

Can two of the directions use the pattern xyzxy? No, because we similarly get the following with the same need to have two hexes on the central vertical line with the same colour combination:
`.                  _____                 /     \           _____/       \_____          /     \       /     \    _____/YYY    \_____/    AAA\_____   /     \    YYY/     \AAA    /     \  /       \_____/YYY AAA\_____/       \  \       /     \AAA YYY/     \       /   \_____/    AAA\_____/YYY    \_____/   /     \AAA    /     \    YYY/     \  /    AAA\_____/       \_____/YYY    \  \AAA    /     \       /     \    YYY/   \_____/       \_____/       \_____/   /     \       /     \       /     \  /YYY    \_____/       \_____/    AAA\  \    YYY/     \       /     \AAA    /   \_____/YYY    \_____/    AAA\_____/         \    YYY/     \AAA    /          \_____/YYY AAA\_____/                \AAA YYY/                 \_____/`

So a solution must use each of the three patterns once. After rotating if necessary, we can assume the vertical direction uses the pattern xxzyy, and after then reflecting as necessary, we can assume that NE-SW uses xyzyx and NW-SE uses xyzxy. From that and with an arbitrary choice of which of the three colours is which in each direction, that pins down the solution:
`.                  _____                 /  R  \           _____/YYYRAAA\_____          /  B  \AAARYYY/  G  \    _____/MMMBAAA\__R__/YYYGFFF\_____   /  B  \AAABMMM/  R  \FFFGYYY/  G  \  /CCCBAAA\__B__/MMMRFFF\__G__/YYYGPPP\  \AAABCCC/  B  \FFFRMMM/  G  \PPPGYYY/   \__B__/CCCBFFF\__R__/MMMGPPP\__G__/   /  B  \FFFBCCC/  R  \PPPGMMM/  G  \  /YYYBFFF\__B__/CCCRPPP\__G__/MMMGFFF\  \FFFBYYY/  B  \PPPRCCC/  G  \FFFGMMM/   \__B__/YYYBPPP\__R__/CCCGFFF\__G__/   /  B  \PPPBYYY/  R  \FFFGCCC/  G  \  /MMMBPPP\__B__/YYYRFFF\__G__/CCCGAAA\  \PPPBMMM/  B  \FFFRYYY/  G  \AAAGCCC/   \__B__/MMMBFFF\__R__/YYYGAAA\__G__/         \FFFBMMM/  R  \AAAGYYY/          \__B__/MMMRAAA\__G__/                \AAARMMM/                 \__R__/`

which is the solution UncleEbenezer found with the colour permutation 1=Yellow, 2=Magenta, 3=Cyan, 4=Amber, 5=Fawn, 6=Purple, 7=Blue, 8=Red, 9=Green. By the way, I prepared a version of a differently rotated/reflected/colour-permuted version of the solution with coloured text to make the individual lines stand out better some time ago and have it on file - but it can't be spoiler-concealed because spoiler-concealment doesn't work on coloured text, due to it also using text-colouring. So it isn't appropriate here - but I might well post it later on in this thread.

Anyway, the above shows that any solution must after a suitable rotation/reflection/colour permutation (if needed) be the solution UncleEbenezer found - or in the terminology of my OP, all solutions are essentially identical.

Gengulphus

cinelli
2 Lemon pips
Posts: 203
Joined: November 9th, 2016, 11:33 am
Has thanked: 57 times
Been thanked: 27 times

### Re: Hexagon of hexagons

That really is a masterpiece of an explanation. Thank you. And thanks for the puzzle.

Cinelli

Gengulphus
Lemon Quarter
Posts: 2806
Joined: November 4th, 2016, 1:17 am
Been thanked: 1412 times

### Re: Hexagon of hexagons

Gengulphus wrote:... By the way, I prepared a version of a differently rotated/reflected/colour-permuted version of the solution with coloured text to make the individual lines stand out better some time ago and have it on file - but it can't be spoiler-concealed because spoiler-concealment doesn't work on coloured text, due to it also using text-colouring. So it isn't appropriate here - but I might well post it later on in this thread.

Here it is:
`.                  _____                 /  R  \           _____/MMMRAAA\_____          /  B  \AAARMMM/  B  \    _____/MMMBAAA\__R__/MMMBFFF\_____   /  G  \AAABMMM/  R  \FFFBMMM/  G  \  /CCCGAAA\__B__/MMMRFFF\__B__/MMMGPPP\  \AAAGCCC/  B  \FFFRMMM/  B  \PPPGMMM/   \__G__/CCCBFFF\__R__/MMMBPPP\__G__/   /  G  \FFFBCCC/  R  \PPPBMMM/  G  \  /YYYGFFF\__B__/CCCRPPP\__B__/MMMGAAA\  \FFFGYYY/  B  \PPPRCCC/  B  \AAAGMMM/   \__G__/YYYBPPP\__R__/CCCBAAA\__G__/   /  G  \PPPBYYY/  R  \AAABCCC/  G  \  /YYYGPPP\__B__/YYYRAAA\__B__/CCCGFFF\  \PPPGYYY/  B  \AAARYYY/  B  \FFFGCCC/   \__G__/YYYBAAA\__R__/YYYBFFF\__G__/         \AAABYYY/  R  \FFFBYYY/          \__B__/YYYRFFF\__B__/                \FFFRYYY/                 \__R__/`

And a follow-up puzzle:

The reason I tackled this problem (and discovered more-or-less inadvertently that it could be posed as a puzzle that had a pretty neat solution) was that I have a 'competitive solitaire' board game called "Take It Easy!". In it, each player has a small board with the blank hexagon-of-hexes on it and a set of 27 hex tiles, each with a set of coloured lines crossing it in the vertical, NW-to-SE and NE-to-SW directions. There are three colours for the vertical lines, three more for the NW-to-SE lines, and yet three more for the NE-to-SW lines, and there is one tile for each of the 27 combinations of one vertical colour, one NW-to-SE colour and one NE-to-SW colour. The game is played by having one person shuffle their set of tiles and place them in a face-down pile, while everybody else arranges their own sets of tiles so that they can pick out specific tiles reasonably quickly and easily (dividing them into three groups of 9 according to e.g. the vertical colour is generally good enough to let one pick out a particular colour). Then the person with the shuffled tiles takes the top tile from the pile, turns it over and calls out which tile it is. Everybody else takes the same tile from their own set, and everybody places their tile where they think it will best go on their board. When everyone has done that, the process is repeated until 19 tiles have been drawn and everybody's board is completed - note that once the next tile has been drawn, a tile may not be moved again.

The added element comes in the final scoring. Each colour is associated with a number in the range 1-9, with the numbers for the vertical tiles being 1, 5 and 9, those for the NW-to-SE colours being 3, 4 and 8, and those for the NE-to-SW colours being 2, 6 and 7. These are printed on the lines on the tiles, which is incidentally how one can tell which direction is vertical. Each line consisting entirely of a single colour scores the length of the line (i.e. 3, 4 or 5) times the colour's number, while each line with two or more colours on it scores nothing. Each player's score is their total for the fifteen lines, and the player with the highest score wins. As an example of the scoring:
`.                  _____                 /  1  \           _____/3331666\_____          /  5  \6661333/  5  \    _____/3335666\__1__/3335777\_____   /  5  \6665333/  1  \7775333/  9  \  /4445222\__5__/3331777\__5__/3339222\  \2225444/  5  \7771333/  5  \2229333/   \__5__/4445777\__1__/3335222\__9__/   /  9  \7775444/  1  \2225333/  1  \  /8889666\__5__/3331222\__5__/4441666\  \6669888/  5  \2221333/  5  \6661444/   \__9__/8885222\__1__/4445666\__1__/   /  9  \2225888/  1  \6665444/  9  \  /8889222\__5__/8881666\__5__/4449777\  \2229888/  5  \6661888/  5  \7779444/   \__9__/8885666\__1__/8885777\__9__/         \6665888/  1  \7775888/          \__5__/8881777\__5__/                \7771888/                 \__1__/`

scores 3*8 = 24, 4*8 = 32, 0, 0 and 3*3 = 9 for the NW-to-SE lines, 0, 4*5 = 20, 5*1 = 5, 4*5 = 20 and 0 for the vertical lines, and 0, 0, 5*2 = 10, 4*6 = 24 and 3*7 = 21 for the NE-to-SW lines, making a total score of 165.

The follow-up puzzle has two parts:

* What is the maximum possible score?

* Suppose every number were one less, so that the numbers were 0-8, the vertical colours 0, 4 and 8, the NW-to-SE colours 2, 3 and 7, and the NE-to-SW colours 1, 5 and 6. What would the maximum possible score be in that case?

By the way, I mean the maximum possible scores in theory: to actually get either of them in practice would require a huge amount of luck, firstly to get one of the few combinations of 19 of the 27 tiles that one needs to (which is a tall order given that there are 27 CHOOSE 19 = 27!/(19!*8!) = 2220075 such combinations - i.e. in the same league as the chances of winning a Lottery jackpot with a reasonably small number of entries), and secondly because even if you do get one of those combinations, you've got to place most of the tiles with very incomplete information about what combination you're going to end up with...

As usual, answers with explanations of why they're the answers get more kudos than ones that are just the results of computer searches. But I will admit up front that I don't actually yet have fully-explained answers myself...

Gengulphus