[Math] Three Color Triangle Challenge

combinatoricsproblem solvingpuzzle

Problem:

There is an inverted triangle colored dots. The colors are red, blue and yellow. If the two dots above are the same color, then the third dot below matches both. If the two dots above are different colors, then the third one below is different from either.

enter image description here

Above are some examples

If you make a colored row of only 3 dots, can you predict the outcome? Is there a pattern? How about 4 dots. Try the same for 5 and 6 dots and see if you can find any simplifications. Use this pattern to predict a row of 28 dots.

My Progress:

I read a paper on this online and it seems the for an even number of dots for the top row the product of the two yields the final dot. For odd ones I can carve out two triangles and get the problem. However, I need a solution based on the simplification of 3/4 dot rows.

I listed the possibilities for 3 dots:

  • If all three colors are different then the middle one is the final one (e.g. B R Y = R)
  • If two colors are involved then
    • If the odd one is in the middle, it is the color not involved (e.g. YBY = R)
    • If the odd one is the first or last it is that one (e.g YBB = Y)

However I don't understand how I can apply the above pattern to 4, 5, and then 28 dots to come up with a quicker solution.

Best Answer

Think of the colours as integers modulo $3$. So you can think of the rows as vectors over $\Bbb F_3$. If one row is then $(a_1,\ldots,a_n)$ then the next row is $(-a_1-a_2,-a_2-a_3,\ldots,-a_{n-1}-a_n)$. The next one will be $(a_1+2a_2+a_3,a_2+2a_3+a_4,\ldots)$. Starting with top row $(a_1,\ldots,a_n)$ I reckon the colour in last row will be $$(-1)^{n-1}\sum_{k=1}^n\binom{n-1}{k-1}a_k$$ modulo $3$.

Related Question