1: \section{Randomized bounds for the message complexity of $\bm{\cal A}$ in arbitrary networks}
2:
3: The network considered now is general. The exact cost of a path reversal
4: in a rooted tree $T_{n}$ is therefore much more difficult to compute. The
5: message complexity of the variant $\cal A'$ of algorithm $\cal A$ for
6: arbitrary networks is of course modified likewise.
7:
8: Let $G = (V,E)$ denote the underlying graph of an arbitrary network, and
9: let $d(x,y)$ the distance between two given vertices $x$ and $y$ of $V$.
10: The diameter of the graph $G$ is defined as $$D \: = \: \max_{x,y \in V}
11: d(x,y).$$
12: \begin{lemma}
13: Let $\left|V \right| = n$ be the number of nodes in $G$. The number of
14: messages $M_{n}$ used in the algorithm $\cal A'$ for arbitrary networks of
15: size $n$ is such that $0 \leq M_{n} \leq 2D$.
16: \end{lemma}
17: \begin{proof}
18: Each request for critical section is at least satisfied by sending zero
19: messages (whenever the request is made by the root), up to at most $2D$
20: messages, whenever the whole network must be traversed by the request
21: message.
22: \end{proof}
23:
24: In order to bound $D$, we make use of some results of B\'{e}la
25: Bollob\'{a}s about random graphs \cite{bo} which yield the following
26: summary results.
27:
28: \subsection*{Summary results}
29: \begin{enumerate}
30: \item
31: Consider {\em very sparse} networks, {\em e.g.} for which the underlying
32: graph $G$ is just hardly connected. For {\em almost every} such network, the
33: worst-case message complexity of the algorithm is
34: $\Theta(\frac{\log n}{\log\log n})$.
35: \item
36: For {\em almost every} sparse networks ({\em e.g.} such that $M = O(n/2)$),
37: the worst-case message complexity of the algorithm is $\Theta(\log n)$.
38: \item
39: For {\em almost every} $r$-regular network, the worst-case message
40: complexity of the algorithm is $O(\log n)$.
41: \end{enumerate}
42:
43: \section{Conclusion and open problems}
44: The waiting time of algorithm $\cal A$ is of course highly dependent on the
45: values of many system parameters such as the service time $\sigma$ and the
46: communication delay $\delta$. Yet, the performance of $\cal A$, analysed
47: in terms of average and worst-case complexity measures (time and message
48: complexity), is {\em quite comparable} with the best existing distributed
49: algorithms for mutual exclusion ({\em e.g.} \cite{ab,ra}). However, algorithm
50: $\cal A$ is only designed for complete networks and is {\em a priori} not
51: fault tolerant, although a fault tolerant version of $\cal A$ could easily
52: be designed. The use of direct one-one correspondences between combinatorial
53: structures and associated probability generating functions proves here a powerful
54: tool to derive the expected and the second moment of the cost of path reversal;
55: such combinatorial and analytic methods are more and more required to complete
56: average-case analyses of distributed algorithms and data structures \cite{fl}.
57: From such a point of view, the full analysis of algorithm $\cal A$ completed
58: herein is quite general. Nevertheless, the simulation results obtained in the
59: experimental tests performed in \cite{tn} also show a very good agreement with
60: the average-case complexity value computed in the present paper. \par
61: Let $\cal C$ be the class of distributed tree-based algorithms for mutual
62: exclusion, {em e.g.} \cite{ab,ra}. There still remain open questions about
63: $\cal A$. In particular, is the algorithm $\cal A$ average-case optimal
64: in the class $\cal C$~?
65: By the tight upper bound derived in \cite{gi}, we know that the amortized cost
66: of path reversal is $O(\log n)$. It is therefore likely that the average complexity
67: of $\cal A$ is $\Theta(\log n)$, and whence that algorithm $\cal A$ is average-case
68: optimal in its class $\cal C$. The same argument can be derived from the fact that
69: the average height of $n$-node binary search trees is $\Theta(\log n)$ \cite{fl}.
70: