2018-10-10 18:03:03 -04:00
---
id: 5900f4291000cf542c50ff3c
2021-02-06 04:42:36 +00:00
title: 'Problem 189: Tri-colouring a triangular grid'
2018-10-10 18:03:03 -04:00
challengeType: 5
2021-02-06 04:42:36 +00:00
forumTopicId: 301825
2021-01-13 03:31:00 +01:00
dashedName: problem-189-tri-colouring-a-triangular-grid
2018-10-10 18:03:03 -04:00
---
2020-12-16 00:37:30 -07:00
# --description--
2018-10-10 18:03:03 -04:00
2021-02-06 04:42:36 +00:00
Consider the following configuration of 64 triangles:
2018-10-10 18:03:03 -04:00
2021-02-06 04:42:36 +00:00
We wish to colour the interior of each triangle with one of three colours: red, green or blue, so that no two neighbouring triangles have the same colour. Such a colouring shall be called valid. Here, two triangles are said to be neighbouring if they share an edge. Note: if they only share a vertex, then they are not neighbours.
2018-10-10 18:03:03 -04:00
2021-02-06 04:42:36 +00:00
For example, here is a valid colouring of the above grid:
2018-10-10 18:03:03 -04:00
2021-02-06 04:42:36 +00:00
A colouring C' which is obtained from a colouring C by rotation or reflection is considered distinct from C unless the two are identical.
2018-10-10 18:03:03 -04:00
2021-02-06 04:42:36 +00:00
How many distinct valid colourings are there for the above configuration?
2018-10-10 18:03:03 -04:00
2020-12-16 00:37:30 -07:00
# --hints--
2018-10-10 18:03:03 -04:00
2021-02-06 04:42:36 +00:00
`euler189()` should return 10834893628237824.
2018-10-10 18:03:03 -04:00
```js
2020-12-16 00:37:30 -07:00
assert.strictEqual(euler189(), 10834893628237824);
2018-10-10 18:03:03 -04:00
```
2021-01-13 03:31:00 +01:00
# --seed--
## --seed-contents--
```js
function euler189() {
return true;
}
euler189();
```
2020-12-16 00:37:30 -07:00
# --solutions--
2020-08-13 17:24:35 +02:00
2021-01-13 03:31:00 +01:00
```js
// solution required
```