-2

Sort of a programming question, sort of a general logic question. Imagine a circular base with a pattern of circles:

enter image description here

And another circle, mounted above and able to rotate, with holes that expose the colored circles below:

enter image description here

There must be an optimal pattern of either the colored circles or the openings (or both) that will allow for all N possible combinations of colors... but I have no idea how to attack the problem! At this point, combinations of 2 seem probably the easiest and would be fine as a starting point (red/blue, red/green, red/white, etc).

I would imagine there will need to be gaps in the colors, unlike the example above. Any suggestions welcome!

Edit: clarified the question (hopefully!) thanks to feedback from Robert Harvey

4

1 回答 1

1

对于两个孔,您可以在二分图中寻找完美匹配,每个排列由两个节点描述,每个分区中一个节点。如果节点共享一个元素,即(blue,red)第一个分区的节点连接到(red,green)第二个分区的节点,则它们将被连接。以相同距离排列的圆圈将允许这两种模式。该图中的完美匹配将对应于排列的链或循环,其中两个总是共享一种颜色。有点像多米诺骨牌。如果您有一组相同长度的循环,您可以将它们交错以在下盘上形成图案。不过,我不确定获得这些相同长度的循环有多容易,而且我也不知道如何将其推广到每个排列中的两个以上元素。

于 2013-05-06T08:45:29.287 回答