Wednesday, September 20, 2006

The Extreme Programming Code Review Problem

You manage a team of 7 programmers and have become a recent convert to extreme programming. You have decided to use a style of pair-programing that you call the weekly triplet review.

Each day of the week, 3 programmers will be picked from the 7 available to conduct code reviews together such that no two programmers will ever be on the same team more than once in one week. (Note, these programmers work on weekends too, so you need 7 teams of 3.)

If the programmers are numbered 1 through 7, can you enumerate all the possible teams?

-Ray

P.S. It is no coincidence that this problem features 7 objects like the previous problem. Believe it or not, this is a hint: if you solve this problem, you may have some inspiration for how to solve the Balsa Wood RAM problem.

Labels:

2 Comments:

Blogger Slava Pestov said...

By "enumerate all possible teams", do you mean enumerate all possible sets of 7 teams satisfying your condition? Or would one particular set of 7 teams be a solution to the problem? Or is the solution unique up to permutation, making the question moot?

11:46 PM  
Blogger Ray Cromwell said...

IIRC, it's unique up to permuation. You specify 7 3-tuples, and AFAIK, all other permissible solutions just permute the order you list the tuples.

I will post a solution soon in order to show the connection with the previous problem. This problem is a obfuscated variation of Kirkman's famous 15 schoolgirl problem, albeit the properties of the solution to Kirkman's 15-girl problem turn out different than the problem I gave.

Essentially, my problem asks for a 2-design block design, a steiner triple system (7,3,1). IIRC, the STS of order 7 is unique (i.e. up to isomorphism)

12:19 AM  

Post a Comment

<< Home