Problem of the Month (October 2006)

This month I feature two problems which are generalizations of problems in "The Puzzling Adventures of Dr. Ecco", by Dennis Shasha. The first concerns how to rank several players in a tournament, and the second concerns how to build a building whose rooms have a tree structure.

1. The designers of a sports tournament want not only to identify the best player, but to completely rank the players. Assuming that the best player always wins a match, and assuming that the match schedule can not depend on the results of earlier matches, how many rounds and matches are necessary to do this? For example, the shortest tournaments for 2, 3, or 4 players are shown below. Time travels from left to right, the matches are represented by boxes, and the output of each box is assumed to be sorted.

In general, assume that we are playing some game where k players play at a time, and that the results of a match rank the k players. How many rounds and matches does it take to completely rank n players? How do the answers change if we only want to identify the top p players? How do the answers change if each match only identifies the best player?

2. An eccentric builder wants to build a 1-story building containing equal size rectangular rooms and no hallways. In addition, the building is to have a tree structure, so there is a unique path between any two rooms. The lobby must have a1 doors, and each of those rooms must have a2 more doors, and so on up to some final splitting with an doors. We say this is a a1a2...an building. What is the smallest aspect ratio for the rooms that will allow such a building?

ANSWERS

1.

It turns out that for k=2 these have been well-studied and are called Sorting Networks. Gavin Theobald sent me this page.

Corey Plover told me that Donald Knuth covered this problem in Section 5.3.4 of "The Art of Computer Programming", Volume 3, and sent two figures from that section. He also gave me some other references: