Matching time controls algorithm

The following explanation is for the mathematicians among you. A help article in easy language is here.

Algorithm to match time controls

Suppose we have two chess players with the following time control preferences - on top are the most desirable time controls, below the least ones:

 Player A                   Player B
  45 45                       90 30   
  90 30                      120 30
  50 10                       45 45  
 120 30

We assume the solutions are space discrete. The only information that is provided is the relative preference of one time control over another for each player.

Let A be a set of all time controls player A accepts, and B for player B, respectively. A \cap B \neq \emptyset (because 45 45 cannot be ruled out), so S = A \cap B - the time controls both players willing to play.

We define enumeration index sets I,J \subset \mathbb{N}, so that f: I \mapsto A, J \mapsto B (I contains sequential indices of A, J - indices of B)

For the discrete domain of time controls x \in S we define the "undesirability" objective function as follows:

g(x) = I_x + J_x

So the problem is to find such x in S so

g(x) \to \min.

given S. This is easily solvable.

If there is a tie between different time controls, the shortest is chosen.

Example

A = {45 45, 90 30, 50 10, 120 30}

B = {90 30, 120 30, 45 45}

S = A ? B = {45 45, 90 30, 120 30}

I45 45 = 1

I90 30 = 2

I120 30 = 4

J45 45 = 3

J90 30 = 1

J120 30 = 2

Computing g(x) for every x in S:

g(45 45) = 1 + 3 = 4

g(90 30) = 2 + 1 = 3

g(120 30) = 2 + 4 = 6

So the minimum is at 90 30, and therefore 90 30 is the most desirable time control for both players.