3. We can then write up a table of triangles
with all the colours they need painting in.
Triangle 1 Purple, Brown, Blue, Red
Triangle 2 Blue, Red, Purple, Orange
Triangle 3 Orange, Pink, Yellow, Green
Triangle 4 Yellow, Green, Blue, Orange
4. Each time a brush changes colour, it needs a rinse.
With two brushes, if we colour in the triangles in the order T1, T2, T3, T4, we
will need 9 rinses.
If instead we use the order T1, T3, T2 and T4, we end up with 11 rinses.
To find the perfect ordering, we’d have to count the rinses for all possible
orderings, which is the factorial of the number of triangles, i.e., 24.
This is the kind of combinatorial problem that Blanchard was solving above.
5. Our aim is to find an ordering that reduces brush rinses significantly.
To do this, let’s rewrite our table a bit differently.
We’ll use a 1 if a triangle has a colour, and 0 if it doesn’t.
Purple Blue Brown Red Orange Green Pink Yellow
T1 1 1 1 1 0 0 0 0
T2 1 1 0 1 1 0 0 0
T3 0 0 0 0 1 1 1 1
T4 0 1 0 0 1 1 0 1
6. Rewriting our table as a matrix, we get
Multiplying T by its transpose, we’d get another matrix A.
8. Now, we can reorder A such that the 0 entries are pushed as far away
from the diagonal as possible.
This is exactly what Blanchard was attempting to do.
Doing so gives us a rearranged matrix A* as below.
9. Having rearranged the row means we’ve reordered the triangles. Our
ordering now reads T1, T2, T4, T3.
Counting the number of rinses, this ordering has only 8, i.e., smaller
than the naïve orderings we tried out before!