Associated with professor \(j\) is a function \(f_{j}\) where \(f_{j}(d)\) is the earliest day at, or after, day \(d\) that professor \(j\) can meet. The student starts scheduling on day 0.
Some professors don't talk to others, and some don't listen while others talk. The set of professors form a directed graph in which there is an edge \((j, k)\) exactly when professor \(k\) can read professor \(j\)'s state. We assume that there is an edge \((j, j)\) for all \(j\) because professors do like to hear themselves talk. The graph is strongly connected, i.e, there is directed path from each professor to every professor.
Day \(d\) is a possible meeting time exactly when all
professors can meet on day \(d\):
\(
\forall j:\; d_{j} = d
\)
Professors are busy; so scheduling a thesis committee is difficult. Assume that there is some day, perhaps in the far distant future, at which all professors can meet. Let \(m\) be the earliest possible meeting time.
For all edges \((j,k)\):
\( d_{k} < f_{k}(d_{j}) \; \rightarrow \; d_{k} = f_{k}(d_{j}) \)
\( d_{j} \leq m \)
This condition holds initially because \(m \geq 0\).If this condition holds when a guarded command with a true guard is executed then the condition continues to hold after the command is executed. The proof is straightforward.
A variant function \(f\) is the sum over all professors \(j\) of the number of days remaining to reach the earliest meeting time from the professor's current estimate of \(d_{j}\):
\( \sum_{j} (m - d_{j}) \)
This function is bounded below. This function takes on integer values. An execution of a guarded command with a true guard reduces the value of this function because it increases \(d_{j}\) for some \(j\).
If all the guards are false then you can show, quite easily, that all the \(d_{j}\) are identical. Let \(d\) be the common value of \(d_{j}\). Because there is an edge from \(j\) back to itself, \(f_{j}(d) = d\). Therefore, \(d\) is a possible meeting time.
From the invariant there exists no meeting time before \(d\), and so the result follows.
K. Mani Chandy, Emeritus Simon Ramo Professor, California Institute of Technology