Shlomi Fish avatar Shlomi Fish committed f29804c

Add the Euler #189 planning.

Comments (0)

Files changed (1)

project-euler/189/euler-189-planning.txt

+
+Problem description:
+====================
+
+Consider the following configuration of 64 triangles:
+
+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.
+
+For example, here is a valid colouring of the above grid:
+
+A colouring C' which is obtained from a colouring C by rotation or reflection
+is considered distinct from C unless the two are identical.
+
+How many distinct valid colourings are there for the above configuration?
+
+Planning:
+=========
+
+* The colours of the rows will be stored as vec($s,$pos,2) with a tri-state.
+
+* We will keep an array (indexed by height) of hashes of the sequence of the
+bottom edges of rows including the count for each one.
+
+* Also a map of Height -> Permutation of Height colours -> Permutation
+of Height+1 colours in the row below -> Num of such for each.
+
+
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.