In a marathon, there are 14 runners. There are exactly of two runners that are wearing the same color shirt for each color of the rainbow.
At the finish line, their configuration is as follows:
- 1 runner between the red pairs,
- 2 runners between the orange pairs,
- 3 runners between the yellow pairs,
- 4 runners between the green pairs,
- 5 runners between the blue pairs,
- 6 runners between the indigo pairs,
- 7 runners between the violet pairs.
If we know that the first runner wore a red shirt, what is the total number of possible configuration(s) of all the runners (from fastest to slowest)?
As an explicit example, if the runners were arranged as ROYGBIVROYGBIV, then there are 6 runners between all of the colored pairs.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
I've coded a combinatorial Java app. If there's a good analytical solution to this one, i'd love to hear it. Meanwhile, here's the working unrefactored solution code from an online Java IDE: http://ideone.com/BnjftF