Answers for Puzzles #14
Response to the key question:
You can put up to three keys of the same cover color in a row as long as the keys on each side of this set of three are of a different color. This works for a five key chain: Blue,Red,Red,Red,Green and a six key chain:B,B,R,R,R,G. You do not always need to put three keys of the same color in a row as long as every set of a color (be it composed of two or three keys) is contained by different colors on each side: B,B,R,R,R,G,G. This method tops out at 18 keys though because at this point all of the relationships that each key color can have to its neighboring keys is present on the chain. It would look like: BBB,R,G,R,GGG,B,R,B,RRR,G,B,G.
This solution makes the assumption that a key only has a unique identity if it can be distinguished by looking at its color and the color of its immediately adjacent neighbors.
Am I missing something here? Is it possible to identify five or six different keys using only two colors? Is there a method that can produce unique relationships between keys up to infinity with a set number of colors? I suppose that if you had a Blue and Green Key next to eachother and a million red keys in between you could identify all the Red keys by referring to them as, "one from the Green key, two from the Green key" etc. Or you you could distinguish color patterned units of keys from eachother in which each key that made up a particular color pattern had a specefic identity within its specefic pattern. Anyway, what's the answer?
Response from Brandon:
I've underlined the section of Steven's response that I think constitutes a wonderful solution to the problem. However, he raises a more interesting version of the problem. How many colors would be necessary for n keys if, to identify a key you are only allowed to look at its immediate neighbors?
Response from Sean:
For many keys, fewer than 3 colors are necessary! (ie. two) So there is still a better answer out there, although Steven is definitely on the right track.
The bugs will reach the end at the same time (having traveled the same distance).
The path lengths are the same, so they arrive at the same time. The path of the big circle is pi * R. The path of the 2 circles is