One of my colleagues was on a master’s men’s swim team that set a world record in the 400-meter medley. He pointed out how the rules generate the complexities of creating the best team. The team members’ ages must sum to at least 200 years. Assuming each person’s time slows at an accelerating rate, you might think that minimizing the relay team’s time would require having each member be age 50. Yet my colleague is 53, but he is an exceptionally fine swimmer, especially at freestyle, which he swam in the meet. Having him on the team doesn’t slow the total time very much (he’s never the best among masters in any event); but including him allows the team also to include a 47-year-old who has several individual world records.
The programming problem becomes even more complex because each swimmer’s time slows at a different rate in different events. Since teams need time to practice, constructing the optimal team requires taking into account the sum of ages constraint, the current time of each potential team member in each relay leg, and the rate at which times are slowing for each person in each event. (HT: MS)

Are there an upper- and lower- bounds for how many team members you can or must have?
One 200-year-old or 200 one-year-olds would probably not have a good standing, but can’t you field say… ten 20-year-olds or six 33-year-olds?
Somewhere in the middle is your optimum. It might very well hover around 50, but that’s not where my first assumption lay.
You recruit one 200 year old swimmer.
Since he’s been doing it for almost two centuries, he must be REALLY good at it by now.
A medley relay has 4 people.
Re: 9 — Steneub: A 400m medley relay is comprised of exactly 4 swimmers, each completing 100m of a single stroke. The backstroker starts and is followed by the breastroker, butterflyer and finally, the freestyler (which has the most lax rules — any stroke is legal, but the crawl is generally fastest).
@Mark #2: “it’s the kind of thing that modern desktop computers can do very quickly” is almost exactly the *opposite* of what NP-complete means. For an NP-complete problem (or technically speaking an NP-hard problem), even working with a computer very quickly becomes impractical, due to the rapidly increasing time required to solve larger and larger instances.
@ Drill-Baby-Drill drill Team…
Thanks man, I needed a good laugh!
Apologies for piling on comment #2, but the truth is way more interesting than that incorrect post.
The problem is part of a class of problem that is computer scientists call NP-Hard (and if you squint at an NP-Hard problem just right it can also be considered NP-Complete). It’s not NP-Complete because it’s “exponential”. It’s NP-Complete because we can show another NP-Complete problem can solve it, and therefore it’s at least as hard as that problem. I’m thinking of 0-1 Knapsack for those who know what I’m talking about. http://en.wikipedia.org/wiki/Knapsack_problem
That sounds like a lot of meaningless taxonomy, but knowing what problem class is immediately tells us how not to spend our efforts solving it. A computer will never be able to perfectly solve the problem once it grows beyond very small sizes. A human won’t either. The best you can do is make approximations, or change your problem specification. We run into this tough class of problems in all walks of software engineering and computer science: from picking the best trucking lanes to route cargo, to figuring out how to pack those trucks optimally, to even figuring out what the best supplier/buyer relationship is for sourcing the truck parts. NP-Complete problems pop up everywhere, and it takes a vast amount of human brainpower in all corners of industry to come up with acceptable approximation algorithms and other solutions to make inroads on this real-world tough tough problems.
It’s really remarkable and humbling that there are so many common ‘simple’ problems that we can prove we’ll never be able to perfectly solve with computers.
Sounds like a job for the Hungarian Algorithm, which of course runs in O(n^3). The advantage is, the algorithm can determine which combination of ages and times per each discipline can produce the best team. It can take into account skill at different strokes.
The trick is, of course, determining a rate of time decline to hypothesize the time for each swimmer in the future.
http://en.wikipedia.org/wiki/Hungarian_algorithm