The image shows two regular octagons, each has 4 red and 4 blue beads, one placed on each vertex.
We say that there is a 'match' if a vertex has the same colour in both octagons. In the diagram, we can see that the upper-right vertices are both blue and the lower-right vertices are both red - all the other vertex pairs have different colours. In this case, we have a matching value of 2.
However, if we rotate the inner octagon by 45 degrees clockwise then all the vertices match, giving us a maximum matching score of 8 for these two arrangements.
Now, if we randomly allocate the beads to the two octagons (each with 4 of each colour) and we are allowed to rotate one of the octagons, what is the smallest
guaranteed maximum matching score?