1: \section{Introduction}
2:
3: A \emph{matching} in an undirected graph is a subset of edges in which no pair of edges is adjacent. A matching $M$ is
4: \emph{maximal} if no proper superset of $M$ is also a matching. Matchings are typically used in distributed applications when pairs of neighboring nodes have to be set up (\emph{e.g.} between a server and a client). As current distributed applications usually run continuously, it is expected that the system is dynamic (nodes may leave or join the network), so an algorithm for the distributed construction of maximal matching should be able to reconfigure on the fly.
5: \emph{Self-stabilization}~\cite{Dij74,Dol00} is an elegant approach to forward recovery from transient faults as well as initializing a large-scale system. Informally, a self-stabilizing systems is able to recover from any transient fault in finite time, without restricting the nature or the span of those faults.
6:
7: The environment of a self-stabilizing algorithm is modeled by the notion of \emph{daemon}. There are two main characteristics
8: for the daemon: it can be either \emph{sequential} (or central, meaning that exactly one eligible process is scheduled for
9: execution at a given time) or \emph{distributed} (meaning that any subset of eligible processes can be scheduled for
10: execution at a given time), and in an orthogonal way, it can be \emph{fair} (meaning that in any execution, every eligible
11: processor is eventually scheduled for execution) or \emph{adversarial} (meaning that the daemon only guarantees global
12: progress, \emph{i.e.} some eligible process is eventually scheduled for execution). An extreme case of a fair daemon is the
13: \emph{synchronous} daemon, where all eligible processes are scheduled for execution at every step. Of course, any algorithm that can
14: cope with the distributed daemon can cope with the sequential daemon or the synchronous daemon, and any algorithm that can
15: handle the adversarial daemon can be used with a fair or a synchronous daemon, but the converse is not true in either case.
16:
17: There exists several self-stabilizing algorithms for computing a maximal matching in an unweighted general graph.
18: Hsu and Huang \cite{HH92} gave the first such algorithm and proved a bound of $O(n^3)$ on the number of steps assuming an
19: adversarial daemon. This analysis was later improved to $O(n^2)$ by Tel \cite{Tel94b} and finally to $O(m)$ by Hedetniemi et
20: al.~\cite{HJS01}. The original algorithm assumes an anonymous networks and operates therefore under the sequential daemon in
21: order to achieve symmetry breaking.
22:
23: By using randomization, Gradinariu and Johnen~\cite{GJ01} provide a scheme to give processes a local name that is unique within distance $2$, and use this scheme to run Hsu and Huang's algorithm under an adversarial distributed daemon. However, only a finite stabilization time is proved. Using the same technique of randomized local symmetry breaking, Chattopadhyay et al.~\cite{CHS02} later provide a maximal matching with $O(n)$ round complexity (in their model, this is tantamount to $O(n^2)$ steps), but assuming the weaker fair distributed daemon.
24:
25: In \cite{GHJ03} Goddard \emph{et al.}~describe a synchronous version of Hsu and Huang's algorithm and show that it stabilizes
26: in $O(n)$ rounds. Although not explicitly proved in the paper, it can be shown that their algorithm also copes with the
27: adversarial distributed daemon using $\theta(n^2)$ steps. Here, symmetry is broken using unique identifiers at every process.
28: In~\cite{GT06}, Gradinariu and Tixeuil provide a general scheme to transform an algorithm using the sequential adversarial
29: daemon into an algorithm that copes with the distributed adversarial daemon. Using this scheme with Hsu and Huang's algorithm
30: yields a step complexity of $O(\delta m)$, where $\delta$ denotes the maximum degree of the network.
31:
32: Our contribution is a new self-stabilizing algorithm that stabilizes after $O(m)$ steps both under the sequential and under
33: the distributed adversarial daemon. Under a distributed fair daemon the algorithm stabilizes after $O(n)$ rounds.
34: Thus this algorithm unifies the moves complexities of the previous best algorithms both for the sequential and for the
35: distributed fair daemon and also improves the previous best moves complexity for the distributed adversarial daemon.
36: As a side effect, we
37: improve the best known algorithm for the adversarial daemon by lowering the environment requirements
38: (distributed \emph{vs.} sequential).
39: To break symmetry, we assume that node identifiers are unique within distance $2$ (this can be done using the scheme of~\cite{GJ01,CHS02}). The following table compares features of aforementioned algorithms and our (best features for each category is presented in boldface).
40:
41: \medskip
42:
43: \begin{center}
44:
45: {\small
46: \begin{tabular}{|l|l|l|l|} \hline
47: \textbf{Reference} & \textbf{Daemon} & \textbf{Step complexity} & \textbf{Round complexity} \\ \hline
48: \cite{HH92,Tel94b,HJS01} & sequential adversarial & $\mathbf{O(m)}$ & \\
49: \cite{GJ01} & \textbf{distributed adversarial} & finite & \\
50: \cite{CHS02} & distributed fair & O$(n^2)$ & $\mathbf{O(n)}$ \\
51: \cite{GHJ03} & synchronous & $O(n^2)$ & $\mathbf{O(n)}$ \\
52: \cite{GT06} & \textbf{distributed adversarial} & $O(\delta m)$ & \\
53: \textbf{This paper} & \textbf{distributed adversarial} & $\mathbf{O(m)}$ & $\mathbf{O(n)}$ \\ \hline
54: \end{tabular}
55: }
56:
57: \end{center}
58:
59: \medskip
60:
61: The rest of this paper is organized as follows. In Section \ref{sec:self} we give a short introduction to self-stabilizing algorithms and the computational environment we use. In Section \ref{sec:algorithm} we describe our algorithm and prove its correctness and speed of convergence in Section \ref{sec:proof}. Finally, in Section \ref{sec:conclusion} we conclude.
62:
63: