Controllability, Matching Ratio and Graph Convergence

There is an important parameter in control theory which is closely related to the directed matching ratio of the network, as shown in the paper of Liu et al. (Nature 473:167–173, 2011). We give proofs of two main statements of Liu et al. (2011) on the directed matching ratio, which were based on numerical results and heuristics from statistical physics. First, we show that the directed matching ratio of directed random networks given by a fix sequence of degrees is concentrated around its mean. We also examine the convergence of the (directed) matching ratio of a random (directed) graph sequence that converges in the local weak sense, and generalize the result of Elek and Lippner (Proc Am Math Soc 138(8):2939–2947, 2010). We prove that the mean of the directed matching ratio converges to the properly defined matching ratio parameter of the limiting graph. We further show the almost sure convergence of the matching ratios for the most widely used families of scale-free networks, which was the main motivation of Liu et al. (2011).


Introduction and Results
Liu et al. [10] examined the controllability of both real networks and network models. The models that were most relevant to them are the so-called scale-free networks, which are known to exhibit several characteristics, such as a power-law degree decay, of the networks observed in real-world applications. Informally, the controllability parameter of a network is defined as the minimum number N D of nodes needed to control a network, e.g., the number of nodes that can shift molecular networks of the cell from a malignant state to a healthy state. They showed that the proportion n D = N D /|V (G)| of nodes needed to control a finite network G equals one minus the relative size of the maximal directed matching (directed matching ratio, see Definition 1). This allows one to prove results on n D by proving the corresponding statement for the directed matching ratio. In the paper [10] it was also observed that the matching ratio is mainly determined by the degree sequence of the graph; more precisely, if B Dorottya Beringer beringerdorottya@gmail.com the edges are randomized in a way that does not change the degrees, then the matching ratio does not change significantly. Furthermore, for the most widely used families of scale-free networks, the directed matching ratio converges to a constant. These two latter statements were based on numerical results, and for the last one methods from statistical physics were also used. In this paper we give rigorous mathematical proofs of these results on the directed matching ratio.
Our first theorem gives a quantitative result on the observation that the matching ratio is concentrated if we randomize the edges of a directed graph in a way that does not change the in-and out-degrees. Furthermore, we show that a similar concentration holds if we randomize the edges in such a way that preserves the total degrees but can alter the number of edges pointing to or from the particular vertices. For the definition of the random configuration model used in the next theorem, see Sect. 1.4. (2) Let G be a random directed graph on n vertices given by the random configuration model conditioned on the event that the total degrees of the vertices are d 1 , . . . , d n . Then the directed matching ratio m(G) of G satisfies P (|m(G) − E(m(G))| > ε) ≤ 2 exp − ε 2 n 2 8e(G) .
Consider random graph models which ensure that the number of edges is o(n 2 ) with probability tending to 1. Theorem 1 shows that for graph sequences given by such models, we have a strong concentration of the matching ratio around its mean in the re-randomized graphs with high probability. In particular, the above condition is satisfied if there is a uniform finite bound on the mean of the degrees with probability tending to 1. Erdős-Rényi graphs with parameters (n, c/n) or graphs given by the random configuration model with degree distribution ξ with Eξ < ∞ have this property.
Our second result proves the convergence of the matching ratio in the most common families of directed networks. See Definitions 3 and 4 and Remark 2 for the notion of graph convergence and Definition 5 for unimodularity. For the graph models used in the theorem see Sect. 1.4. Theorem 2 (Almost sure convergence of the matching ratio for scale-free graphs) (1) Let G n be a sequence of random (directed) finite graphs that converges to a random rooted (directed) graph (G, o) in the local weak sense. Then E(m(G n )) converges, namely (2) Let G n be a sequence of undirected finite graphs defined on a common probability space that converges almost surely in the local weak sense and let # » G n be a sequence of random directed graphs obtained from G n by giving each edge a random orientation independently. Then m( # » G n ) converges almost surely to the constant lim n→∞ E(m( # » G n )).
(3) Let G n be the sequence of random directed graphs given by the preferential attachment rule. Then m(G n ) converges almost surely to the constant lim n→∞ E(m(G n )).
The paper is organized as follows. In Sect. 1.1 we state our main results in the language of control theory and summarize our contribution to the main topics of the paper [10] of Liu, Slotine and Barabási. In Sect. 2 we present the proof of Theorem 1.
We prove Theorem 2 in Sect. 3. In Sect. 3.1 we prove part (1): in Theorem 6 we show the convergence of the mean of the matching ratio. It was proven in [8] that the limit of the matching ratio of local weak convergent sequences of deterministic finite graphs with a uniform bound on the degrees exists. Bordenave et al. [6] removed the bounded degree assumption and gave a formula on the value of the limit of the matching ratio. We still need the context of random directed graphs, hence could not apply their result directly. We proceeded through an alternative definition of the matching ratio of the limit object, which looks more natural in our setting. However, the formula in [6] for the matching ratio of the limit can be adapted, to obtain quantitative results on the asymptotic value of the directed matching ratio or controllability parameter of large random networks.
In Sect. 3.2.1 we prove the results on the matching ratio that imply part (2). This part could also be proven using the concentration in Theorem 1, but we use another method, based on previous results. We prove that if a sequence of random directed graphs is obtained from a convergent deterministic graph sequence by orienting each edge independently, then it converges almost surely in the local weak sense, see Definition 4. This is our Lemma 5 which is similar to Proposition 2.2 in [7]. As a consequence, we get that for directed graphs obtained from almost sure convergent undirected graph sequences the matching ratios converge almost surely. This result applies for sequences given by the random configuration model or Erdős-Rényi random graphs.
In Sect. 3.2.2 we prove the result that implies part (3) of Theorem 4. The method used in Sect. 3.2.1 does not apply to the preferential attachment graphs (we cannot start from an a priory almost sure convergence of the undirected graph sequence) hence we needed a different method.
We note that one can approach the directed matching ratio through an algorithmic point of view, as initiated in [11] via the application of the Karp-Sipser algorithm. We do not pursue this direction in the present paper, but preliminary investigations have been started with E. Csóka.

Our Contribution to Controllability of Complex Networks
We devote this subsection to the presentation of our results in a network theoretical language. We also highlight the relevance of the present paper for the network theoretical research community; in particular, as a follow-up of the work [10] of Liu, Slotine and Barabási. Denote by n D the proportion of the minimum number of driver nodes needed to control the network G to the number of nodes, as defined in [10]. Our Theorems 1 and 2 translate to Theorems 3 and 4 by n D (G) = 1 − m(G).
Previous results in [8] and [6] on the matching ratio and our Theorem 4 imply that the parameter n D is a quantity determined by the local structure of the graph. It is a natural question whether even the most local structure, namely the degrees of the vertices, determines this parameter. Liu, Slotine and Barabási approached this question through simulation: in their paper [10] some particular networks are taken from the real world, and then the edges are randomly reshuffled while keeping all in-and out-degrees unchanged. More precisely, the randomization used in [10] generates a random graphḠ with the same distribution as given by the random configuration model with the fixed sequence of in-and out-degrees, conditioned to be a simple directed graph (see Sect. 1.4 for the definition of the model). The parameter n D of several real-world networks was compared with the average of this parameter over the randomized copies. (Generating a large number of random copies provides an average n D that is close to the expectation of the random n D by the Law of Large Numbers.) Their results suggested that for random graphs given by the above model, the degrees essentially determine n D .
The first part of our Theorem 3 shows that for a random directed graph G given by the random configuration model with fixed in-and out-degrees, the difference between the parameter n D of the random G and the expectation of n D is small with large probability. This result confirms the phenomenon observed in [10]: with large probability, the parameter n D of a randomized graph is close to the average, even with the randomization used in [10], see Corollary 1. Our theorem compared with the results in [10] also shows that the examined real-world networks could have been produced by a process that results in a random graph with distribution given by the random configuration model with fixed in-and out-degrees. Our theorem can also be used to substitute generating random networks in order to show concentration.
The second part of Theorem 3 shows that even the total degrees of the network encode the controllability parameter n D if we assume that the orientation of the edges are independent. In this model we only fix the total degrees of the vertices, generate the random undirected graph, and orient each edge independently. We proved that for this model the parameter n D of the random graph G is close to the expectation of n D with large probability. We can use this theorem only for graphs generated by the above algorithm. Such graphs have the property that the in-and out-degrees have the same distribution.
(2) Let G be a random directed network on n vertices given by the random configuration model conditioned on the event that the total degrees of the vertices are d 1 , . . . , d n . Then the controllability parameter n D (G) of G satisfies Corollary 1 (Concentration of the controllability parameter in conditioned graphs) Let the random directed graph G defined as in Part (1) of Theorem 3 and letḠ have the same distribution, but conditioned to be a simple graph. Then the controllability parameter ofḠ is concentrated around E(n D (G)): Our Theorem 4 confirms the observations of [10] that the parameter n D converges for some particular network models when the size of the networks tends to infinity. In fact, Part (1) shows that the expectation of the parameter n D converges for any sequence of directed graphs that converges in the local weak sense. There are several network models that are known to perform this type of convergence, e.g., Erdős-Rényi random graphs, random d regular graphs, networks given by the random configuration model, preferential attachment graphs (see Sect. 1.4 for the definitions and convergence). Part (2) and (3) implies that the graph sequences listed above have an even stronger property: their controllability parameter n D converges almost surely to a constant. We present these results in Corollaries 4, 3, 2 in Sect. 3.2.1 and Part (3) of Theorem 4. For the first three networks one can derive the limit of n D (G n ) = 1 − m(G n ) using the formula of Theorem 2 in [6], see Corollaries 4, 2 and Remark 6 in Sect. 3.2.1.
It was observed in [10] that the nodes with low degree are more likely to be driver nodes, i.e., nodes with in-degree zero in the maximal size directed matching. The method of the proof of the first part of our Theorem 4 shows that this feature of the driver nodes follows naturally from the construction of a maximal size matching: the nodes with higher degrees are more likely to be matched. Theorem 4 (Almost sure convergence of the controllability parameter for scale-free graphs) (1) Let G n be a sequence of random directed finite graphs that converges to a random rooted graph (G, o) in the local weak sense. Then E(n D (G n )) converges, namely where the infimum is taken over all directed matchings M of G such that the distribution of (G, M, o) is unimodular, and V + (M) denotes the set of the heads of the edges in M.
(2) Let G n be a sequence of undirected finite graphs defined on a common probability space that converges almost surely in the local weak sense and let # » G n be a sequence of random directed graphs obtained from G n by giving each edge a random orientation independently. Then n D ( (3) Let G n be the sequence of random directed graphs given by the preferential attachment rule. Then n D (G n ) converges almost surely to the constant lim n→∞ E(n D (G n )).

Notations
We always consider locally finite graphs, with directed or undirected edges. We allow multiple edges and loops. Given the graphs G and G we denote by G G and (G, o) (G , o) that the two graphs are isomorphic and rooted isomorphic, respectively. We write deg G x for the degree of a vertex x in a graph G. If the graph G is directed then denote by deg in G x and deg out G x the in-and out-degree of the vertex x. Given a directed edge e = (x, y) we call x the tail and y the head of the edge. Given a set F of edges let V (F) be the set of vertices that are incident to an edge in F. Let V − (F) and V + (F) be the set of the tails and the heads of the edges in F, respectively. Let B G (x, n) := {y ∈ V (G) : dist G (x, y) ≤ n} be the ball of radius n around a vertex x in the graph G induced by the graph metric. Given a (multi)set F (of edges or vertices) we denote by |F| the number of elements of the set (counted with multiplicity). Let [n] be the set {1, . . . , n}. Given a random graph G we denote by P G the probability with respect to its distribution.

Directed Matchings and Graph Convergence
First we define directed matchings and the matching ratio of directed graphs which are closely related to the controllability of the network. For possibly disconnected graphs (for instance Erdős-Rényi graphs or graphs defined by the random configuration model, see Sect. 1.4), there is another natural way to define the directed matching ratio. Viewing them as a unimodular random graph, one takes a uniformly chosen random root, and only keeps the connected component of this root. Then one could define the matching ratio as the size of the maximal matching of this component divided by the size of the component. Contrary to connected graphs, this later definition can give a random variable even if we consider deterministic but disconnected graphs. The reason of using Definition 1 in this paper is coming from our motivating applications in controllability. In a finite directed graph the minimum number of nodes needed to control the network equals the number of vertices that have in-degree 0 in a maximal directed matching M max (which equals |V (G)| − |M max (G)|); see [10]. We are thus interested in the directed matching ratio m(G) of a finite directed graph G provided by Definition 1, which takes the proportion of vertices of the (possibly disconnected) network that are not needed to control the dynamics of the system.
In this section we describe the relationship between the matching ratio of directed and undirected graphs. We further define the local weak convergence of graph sequences.
Remark 1 There is a natural bijection between the directed matchings of G and the matchings of G which preserves the size of the matching, namely if M is a directed matching of G then Recall, that a matching M of G has maximal size if and only if there is no augmenting path in G for M. By an augmenting path of length k we mean a sequence of disjoint vertices We examine sequences of networks that have bounded average degrees. Benjamini and Schramm [2] introduced a notion of convergence for such graph sequences:

Definition 3 (Local weak convergence of graphs)
We say that the sequence (G n , o) of locally finite random rooted graphs converge to the locally finite connected random graph (G, o) in the local weak sense if for any positive integer r and any finite rooted graph (H , o) we have

Remark 2
By the local weak convergence of a sequence G n of non-rooted finite graphs we always mean the convergence of the sequence with a root chosen uniformly at random among the vertices.
For some of the examined graph sequences the following stronger property holds as well: Definition 4 (Almost sure local weak convergence) Let G n be a sequence of finite (directed) random graphs defined on a common probability space (if we do not specify the probability space, then we always consider the product space). We say that G n converges almost surely in the local weak sense if almost every realizations of the sequence (G n ) (with respect to the probability measure of the common probability space) satisfy that the sequence of the deterministic graphs converges in the local weak sense.
Finite random graphs with a uniformly chosen root and random rooted graphs that are local weak limits of (random) finite graphs, satisfy the so-called Mass Transport Principle, see [2], Sect. 3.2. The class of graphs that obeys this principle are called unimodular graphs.

Definition 5 (Unimodular graphs) A random rooted (directed, labeled) graph (G, o)
is called unimodular if it obeys the Mass Transport Principle: for every measurable real valued function f on the class of locally finite graphs with an ordered pair of vertices that satisfies Directed matchings and hence the matching ratio of a finite directed graph G can be examined using the bipartite representation G as mentioned in Remark 1. In the next proposition, we analyze the relationship between a convergent graph sequence and its bipartite representation.

Proposition 1 If a sequence G n of random directed graphs converges to the random rooted directed graph (G, o), then the bipartite representations G n converge to
The converse does not hold: the convergence of the sequence of bipartite representations G n does not imply the convergence of G n . In fact, there are different random directed rooted Proof Denote the distribution of B G n (o, r ) and B G (o, r ) in the space of locally finite rooted directed graphs by μ n,r and μ r , respectively. Similarly, denote the distribution of B G n (o , r ) and B G (o , r ) in the space of locally finite rooted graphs by μ n,r and μ r , respectively. The random uniform root o of a bipartite representation G n of a finite directed graph G n is o − or o + with probability 1/2-1/2, where o is a uniform random root of G. It follows that μ n,r = 1/2μ n,r ,o − + 1/2μ n,r ,o + , where μ n,r ,o − and μ n,r ,o + are the distributions of B G n (o − , r ) and B G n (o + , r ), respectively. The first statement of the remark follows.
An example to the second statement is the following. Let G 1 be the graph with vertex set V (G 1 ) = Z and edge set E(G 1 ) = {(2k, 2k − 1), (2k, 2k + 1) : k ∈ Z}, i.e., the usual graph of Z with an alternating orientation to the edges. Let the random root o 1 be 2k or 2l − 1 for some k, l ∈ Z with probability 1/2-1/2 (the isomorphism class of (G 1 , o) does not depend on the actual choice of the integers k and l). This graph is the limit of the cycles C 2n with 2n vertices and edges with alternating orientations. Let G 2 be the one-point graph without edges with probability 1/2 and with probability 1/2 let G 2 be the infinite regular tree with in-and out-degrees 2. This graph is the limit of the sequence of random graphs on n vertices where with probability 1/2 there are no edges and with probability 1/2 the graph is uniformly randomly chosen from the set of graphs on n vertices with all in-and out-degrees 2. Then (G 1 , o 1 ) and (G 2 , o 2 ) are both isomorphic to the random graph that is the one-point graph without edges or Z with probability 1/2-1/2.

Canonical Network Models and Their Limits
Some of the examined graph sequences converge to the so-called unimodular Galton-Watson tree.
Definition 6 (Unimodular Galton-Watson tree) Let ξ be a non-negative integer valued random variable with Eξ < ∞. The unimodular Galton-Watson tree with offspring distribution ξ (denoted by U GW (ξ )) is a random rooted tree with root o. We say that a vertex y is the child of the vertex x if they are adjacent and dist(y, is given by the following recursive definition: Let the directed unimodular Galton-Watson tree # » U GW (ξ ) be the random rooted directed graph obtained from U GW (ξ ) by orienting each edge independently. Now we present the network models examined in this paper. For each model first we define the non-directed model and present the known results on the local weak limit of the sequence, then we give the definition of the directed versions and the local weak limit of them.

Erdős-Rényi Random Graphs
The Erdős-Rényi random graphs G n,c/n are defined in the following way: consider the complete graph on n vertices and keep each edge with probability c/n or delete it with probability 1 − c/n independently from each other. The resulting random graph is G n,c/n .
The local weak limit of G n,c/n is U GW (Poi(c)), that is the Galton-Watson tree with Poisson(c) offspring distribution. In fact, for almost every realization of the sequence G n,c/n , that sequence of deterministic graphs converges to U GW (Poi(c)) as well, see Theorem 3.23 in [5].
We define the directed Erdős-Rényi random graphs #» G n,c/n by orienting each edge of G n,c/n uniformly at random independently for the edges. The local weak limit of this sequence is

Random d-Regular Graphs
Let G n be the random graph chosen uniformly at random from the set of graphs on the vertex set [n] with all degrees equal d. It is standard, that the local weak limit of G n as n → ∞ is the infinite d-regular tree T d . In fact, the random graphs G n converge almost surely to T d . This follows from the almost sure convergence of the more general class of graphs given by the random configuration model.
There are two natural ways to define random directed regular graphs. The first one is if G n is a uniformly chosen directed graph on [n] such that each vertex has in-and out-degrees d. The local weak limit is a regular tree with in-and out-degrees d. The second way to define directed graphs G n is if we choose a uniform random non-directed d-regular graph on [n] and orient each edge uniformly at random independently from each other. This model is a special case of the random configuration model defined in the sequel. The limit of that graph sequence is the d-regular tree with independently oriented edges.
The next two graphs have become increasingly important in applications, because they grab important characteristics of real-world networks (scale-free networks). This is the reason why in [10], which was motivated by applications of controllability, these graphs were studied.

Random Configuration Model
We fix a non-negative integer valued probability distribution ξ . We define the (multi)graph G n in the following way: let ξ 1 , . . . , ξ n be i.i.d. variables with distribution ξ . Given ξ 1 , . . . , ξ n let E := {(k, j) : k ∈ [n], j ∈ [ξ k ]} be the set of the half-edges. Let R be a uniform random perfect matching of the set E (if |E| is odd, then put off one half-edge uniformly at random before choosing a perfect matching). Then R defines the random (multi)graph G n = G n (R) on [n]. One can also consider the random graphḠ n by conditioning the random configuration model to give a simple graph.
If E(ξ 2 ) < ∞, then G n converge to U GW (ξ ) in the local weak sense (see Theorem 3.15 in [5]). Furthermore, if E(ξ p ) < ∞ with some p > 2, then for almost every realization of the sequence G n , the local weak limit of that deterministic graph sequence is U GW (ξ ), and the same holds forḠ n ; see Theorem 3.28 in [5] or Theorem 7.
If we want to define a directed graph, then we orient each edge uniformly at random independently from the other edges. We get the same distribution if after fixing the degree sequence ξ 1 , . . . , ξ n we select a subset E T ⊆ E of size |E|/2 uniformly at random.

Preferential Attachment Graphs
The notion of preferential attachment graphs was introduced by Barabási and Albert in [1] and the precise construction was given by Bollobás and Riordan in [4]. There are several versions of the definition of this family of random graphs which have turned out to be asymptotically the same: they all converge to the same infinite limit graph; see [3]. Although in the original definitions the preferential attachment graphs are not directed, there is a natural way to give each edge an orientation and these orientations extend to the limit graph as well.
We will use the following definition from [3] completed with the natural orientation of the edges: fix a positive integer r and α ∈ [0, 1). For each n the random graph G n = G PA r ,α,n is a graph on the vertex set [n] defined by the following recursion: let G 0 be the graph with one vertex and no edges. Given G n−1 we construct G n by adding the new vertex n and r new edges with tails n. We choose the heads w 1 , . . . w r of the new edges independently from each other in the following way: with probability α we choose w j uniformly at random among [n − 1], and with probability 1 − α we choose w j proportional to deg G n−1 . Note that each vertex except the starting vertex has out-degree r and each vertex has a random in-degree with mean converging to r .
Berger et al. proved in [3] that the local weak limit of G PA r ,α,n as n → ∞ is the Pólya-point graph with parameters r and α. This graph is a unimodular random infinite tree with directed edges; see [3], Sect. 2.3 for the definition.

Concentration of the Matching Ratio in Randomized
Networks-Proof of Theorem 1 In this section we prove Theorem 1, which gives a quantitative version of the following experimental observation of Liu et al. in [10]: if we consider a large directed graph, and randomize the edges in such a way that does not change the in-and out-degrees of the graph, then the matching ratio does not alter significantly. Part (1) of Theorem 1 shows the concentration for randomized graphs with the in-and out-degrees left unchanged. This is the result that was observed through simulations in [10]. Part (2) of the theorem shows that a very similar concentration phenomenon holds even after a randomization that can change the in-and out-degrees but keeps the total degrees unchanged for every vertex. In particular, Theorem 1 shows that if a graph sequence satisfies that the mean of the degree sequence is bounded with probability tending to 1 (as n → ∞), then the directed matching ratios of the graphs with randomized edges are concentrated around their mean. First we need a lemma that shows that modifying a (directed) graph just around a few vertices cannot alter the size of the maximal matching too much.

Lemma 1
Adding some new edges with a common endpoint to an undirected finite graph or adding edges with a common head (or common tail) to a directed finite graph can increase the size of the maximal matching by at most one.
Proof For directed graphs the statement follows from the undirected case, using the bipartite representation (see Definition 2). For undirected graphs let F be the set of new edges with common endpoint x and let G 2 be the graph with vertex set V (G) and edge set E(G 2 ) = E(G) ∪ F. If M 2 is a maximal size directed matching of G 2 , then there is at most one edge in M 2 ∩ F by the definition of the matching. Then M 2 \ F is a matching of G, hence |M max (G)| ≥ |M 2 | − 1.
Before proving the proposition, we state a version of the Azuma-Hoeffding inequality (see [13], Theorem 13.2), that we will use in this paper.
Theorem 5 (Azuma-Hoeffding inequality) Let X 1 , . . . , X n be a series of martingale differences. Then The proof of Theorem 1 uses similar methods to that of Corollary 3.27 in [5], which implies the concentration of matching ratio for undirected graphs.

Proof of Theorem 1
We prove both parts of the theorem in the following way: we define random variables X k , k ∈ [e(G)] which form a series of martingale differences and satisfy e(G) k=1 X k = n m(G)−E(m(G)) . We will show that there is an almost sure bound |X k | ≤ 2, hence we have by the Azuma-Hoeffding inequality P (|m (G(N )) − E(m(G(N )))| > ε) = P |X 1 + · · · + X e(G) | > εn Part (1) The variables X k clearly form a series of martingale differences, and we claim that |X k | ≤ 2 almost surely for all k ∈ [e(G)].

Fix an arbitrary partial matching
For each S ∈ N k−1 there is a unique f (S) ∈ N k and for each S ∈ N k the size of the set For any S ∈ N k−1 the graphs G(S) and G( f (S)) differ by at most four edges in such a way that the size of the set of the heads of these vertices is at most two. By Lemma 1 we have in this case |M max (G(S))| − |M max (G( f (S)))| ≤ 2 which combined with (3) proves the bound |X k | ≤ 2.
Part (2). Recall the notations and the first definition of the directed random configuration model from Sect.
is the set of half-edges that are paired by the partial matching R[k − 1]. Let F 0 be the trivial σ -algebra, let F k be the σ -algebra generated by R[k] and define We claim that |X k | ≤ 2 almost surely for all k, which implies the statement of the theorem. Let F 0 be any fixed partial matching of E consisting of k ordered pairs. We will show that For any pair (S, S ) ∈ S the graphs G(S) and G(S ) differ by at most four edges in such a way that both of the graphs can be obtained from the same graph by adding at most two edges to it. By Lemma 1 we have in this case |M max (G(S))| − |M max (G(S ))| ≤ 2 which combined with (5) proves the bound |X k | ≤ 2.

Convergence of the Matching Ratio-Proof of Theorem 2
The goal of this section is to prove the convergence of the directed matching ratio for convergent sequences of random directed graphs. This convergence is understood in the stronger sense of almost sure convergence, as we will see, but the proof will often proceed through showing convergence in expectation and then concentration. For a fixed deterministic non-directed graph sequence that is locally convergent when a uniform root is taken, the convergence of the matching ratio is proved by Elek and Lippner in [8] if there is a uniform bound on the degrees and by Bordenave, Lelarge and Salez in [6] in the unbounded case. To prove the results of Liu et al. in [10], we need to generalize these results to directed random graphs. In Sect. 3.1 we use the method of Elek and Lippner to prove Theorem 6 on the convergence of the expected value of the directed matching ratio of sequences of random graphs. In Definition 7 we give an extension of the definition of the expected matching ratio to unimodular random rooted graphs. By Theorem 1 in [6] and our Theorem 6 our definition of the expected matching ratio equals twice the parameter γ defined in [6].
In Sect. 3.2 we prove the almost sure convergence of the directed matching ratios for the network models defined in Sect. 1.4.

Convergence of the Mean of the Matching Ratio-Proof of Part (1) of Theorem 2
Elek and Lippner proved that the non-directed matching ratio converges if G n is a convergent sequence of finite deterministic graphs with uniformly bounded degree; see [8], Theorem 1. There are three properties of our examined models, that do not let us apply this theorem directly: our graphs do not have bounded degrees, and they are directed and random graphs. Although the degrees are not bounded in the examined models of convergent graph sequences, the expected value of the degree of the uniform random root of the random graphs has a uniform bound in each model. In Theorem 6 we prove the convergence of the mean of the matching ratio for convergent sequences of random directed graphs using the method of Elek and Lippner.
One can extend the (expected) matching ratio to the class of unimodular random (directed) graphs in a natural way. For finite random graphs, the following definition gives the expected value of the matching ratio. (Matching ratio of an infinite graph and unimodular matchings) Let (G, o) be a unimodular random (directed) rooted graph. Then the (expected) matching ratio of (G, o) is

Definition 7
where V (+) (M) denotes the set of the endpoints of the edges in M in the undirected case and the set of the heads of the edges of M in the directed case, and the supremum is taken over all random (directed) matchings of G such that the distribution of (G, M, o) is unimodular. Matchings with this property will be called unimodular matchings.

Theorem 6 Let G n be a sequence of random finite (directed) graphs that converges to the random (directed) rooted graph (G, o) that has finite expected degree. Then E(m(G n )) converges, namely
To prove Theorem 6, we follow the method of [8]. The main differences to that proof come from the lack of uniform bound on the degrees. We will define the matchings M(T ) in Lemma 2 as factor of IID, which helps us handle the case of unbounded degrees. For graphs with unbounded degrees, Lemma 4.1 of [8] does not apply, hence we will have to proceed through Lemma 4.
where ε > 0, r is any positive integer, H is any finite rooted (directed) graph with labels The factor f in the above definition should be interpreted as a rule that gives the new labels of G. It follows from the measurability of f that a factor of IID process is locally defined in the sense that we can reconstruct the new value of the label at the root up to an arbitrary small error if we know the graph structure and the labels up to a small enough error in the neighborhood of a large enough radius.
We note, that given a unimodular random rooted graph (G, o) and a factor of IID process (X a ) on G, the distribution of the labeled rooted graph (G, (X a ), o) is unimodular as well. In particular, every factor of IID matching M of a unimodular graph satisfies that (G, M, o) is unimodular.

Lemma 2 (1) For any locally finite graph G and any T > 0 there is a factor of IID matching M(T ) that has no augmenting paths of length at most T .
(2) If (G, o) is a random unimodular rooted graph, then

Remark 4
The above lemma holds for directed graphs as well: the statements of the lemma remain true for the pre-images of the matchings M(T ) by the bijection defined in Remark 1.
The proof of part (1) of Lemma 2 is similar to that of Lemma 2.2 of [8], but for the sake of completeness we present it here. The main difference is that for graphs with unbounded degrees we cannot define the matchings M(T ) using Borel colorings, which were used in [8]. To handle the case of unbounded degrees we define M(T ) as factor of IID matchings. Our language is also different, although all the claims stated for Borel matchings in [8] hold for factor of IID matchings as well.
We need the following lemma for the proof of part (2) of Lemma 2.

Lemma 3 Let (G, o) be a unimodular random rooted graph. Then if a unimodular matching M of G satisfies that there are no augmenting paths of length at most k, then
Proof We show that for every ε and k, any unimodular matching M that has no augmenting path of length at most k satisfies This implies the statement of the lemma. Let M ε be a fixed unimodular matching that satisfies Consider the symmetric difference M M ε , that is a disjoint union of paths and cycles, which alternately consists of edges of M and M ε by the definition of matchings. We will bound P(o ∈ V (M ε ) \ V (M)) from above by 1/k, which implies (6) by This gives the desired bound on P(o ∈ V (M ε ) \ V (M)).

Proof of Lemma 2
We assign to each vertex x of G a uniform random [0, 1]-label c(x). First we note that with probability 1 all the labels are different, so we can assume this property. Furthermore, we can decompose each label c(x) into countably many labels (c i, j (x)) ∞ i, j=0 whose joint distribution is IID uniform on [0,1]. First we construct for j ≥ 2. Since the labels are uniform in [0, 1], we get a partition with probability one. We define the matchings M n (T ) in the following way. Let M 0 (T ) = M(T − 1) (and the empty matching if T = 1) and let k(n) be a fixed sequence that consists of positive integers and contains each of them infinitely many times. To define M n (T ) we improve the matching M n−1 (T ) in all the balls B(x, 3T ) with x ∈ V T ,k(n) : we improve using the augmenting path of length at most T lying in B(x, 3T ) with the maximal sum of c T ,0 -labels of the vertices and we repeat this as long as there are short augmenting paths. The number of vertices in B(x, 3T ) that are incident to edges of the matching increases in each step, hence we can make only a finite number of improvements in each ball. Since for all n the balls in {B(x, 3T ) :∈ V T ,k(n) } are disjoint, M n (T ) is a well defined matching for every n and T .
Let M(T ) be the edge-wise limit of M n (T ) as n → ∞. We claim that M(T ) is well defined and has no augmenting paths of length at most T . Indeed, an edge e = {x, y} changes its status of being in the matching or not only if there is an improvement in B(x, 3T ). Such an improvement increase the number of vertices incident to edges of the matching in B(x, 3T ), which is bounded above by the number of vertices in the ball, thus the number of changes is bounded above as well. The lack of short augmenting paths follows trivially from the construction of M(T ).
We note that every factor of IID matching M of a unimodular random rooted graph (G, o) satisfies that (G, M, o) is unimodular, hence Lemma 3 implies the second statement of the lemma.
Since we do not assume the existence of a uniform bound on the degrees, we need a lemma that plays the role of Lemma 4.1 of [8]. A possible way to view the statement of the lemma is the following: whenever we color a δ "fraction" of the vertices red, less than an ε "fraction" of vertices will have a red vertex in distance at most n.
Fix ε and let D = D(ε) be the smallest positive integer that satisfies E 1 {deg o>D} deg o < ε/4. We define the following mass transport: , and let f (x, y, ω) = 0 otherwise. Then by the Mass Transport Principle Proof of Theorem 6 First we note that by Remark 1 and Proposition 1 it is enough to prove the theorem for non-directed graphs. Denote the distribution of the limit graph (G, o) endowed with IID uniform labels c(x) by μ. Fix T and let ε T > 0 be such that if an event H satisfies μ(H ) < ε T , then μ(H 2T +1 ) < 1/T , as provided by Lemma 4. Let M(T ) be a matching as defined in Lemma 2.
We define the following events: let Now we give all vertices of G n uniform random [0,1] labels independently and denote the joint distribution of G n and the labels by μ n . We define the random matching M T (G n ) using the labels and the sets B(Y i, j ): let an edge {x, y} be in

It follows by Lemma 3 that lim
Denote by Q T the event that there is an augmenting path for M T of length less than T starting from the root. Let Q T (G n ) be the random set of vertices v of G n such that (G n , v) ∈ Q T and let q T (G n ) := |Q T (G n )| |V (G n )| . The event (G n , x) ∈ Q T depends on B G n (x, r + 2T + 1) by the definition of M T . Furthermore, in the limiting graph G, an augmenting path of length less than T can start from o only if there is a vertex x on that path with (G, hence E(q T (G n )) < 2/T for n large enough. We have by Lemma 2.1 of [8], that Taking expectation in (7) with respect to μ n , we have for n large enough that where o is a uniform random vertex of G n . Since the event {o ∈ V (M T (G n ))} depends only on the (r (T ) + 1)-neighborhood of x, the convergence of the graph sequence implies

Almost Sure Convergence of the Directed Matching Ratio
We will examine the network models described in Sect. 1.4. As referred there, each model has a local weak limit, hence Theorem 6 shows that the expected values of the directed matching ratios converge. In this section we will show that almost sure convergence holds as well.
First we note that the local weak convergence of a sequence G n of random graphs defined on a common probability space does not imply automatically that the sequence converges almost surely in the local weak sense (see Definition 4), as shown by the next example. Let G n be the path of length n 2 or the n × n square grid, with probability 1/2-1/2. Let the joint distribution of the sequence G n given by the product measure. Then G n converges in the local weak sense to the infinite rooted graph G which is Z or Z 2 with probability 1/2-1/2, but there is almost surely no local weak limit of the deterministic graph sequence given by the product measure. If a sequence G n of finite random graphs converges almost surely in the local weak sense, then Theorem 6 implies the almost sure convergence of the matching ratio, which will be the case for some of the examined sequences.

Remark 5
Skorokhod's Representation Theorem states that for a weakly convergent sequence μ n → μ of probability measures on a complete separable metric space S there is a probability space ( , F , P) and S-valued random variables X n and X with distributions μ n and μ, respectively, such that X n → X almost surely.
One could think that Skorokhod's Theorem could be applied for the graph sequences that we consider, and get the convergence of the matching ratio for almost every sequence, using Theorem 6. This argument does not work for our purpose, because in Skorokhod's Theorem, the coupling between the finite graphs is coming from the theorem, while in the case of the preferential attachment graphs there is given a joint probability space by construction, that contains them all.
We present two distinct methods to prove the existence of the almost sure limit of the matching ratio of a convergent graph sequence G n . The first one can be applied for the random graph models of Sect. 1.4 that are defined by giving the edges independent orientations.
We use this method in Sect. 3.2.1 to prove part (2) of Theorem 2. We show in Lemma 5 that if we give the edges of a converging deterministic graph sequence uniform random orientations, then the obtained graph sequence converges almost surely in the local weak sense (see Definition 4) to the same limiting graph with randomly oriented edges. Applying this result to the sequences of Erdős-Rényi random graphs and the random configuration model, which are known to converge almost surely in the non-directed case, the almost sure convergence of the matching ratio follows by Theorem 6.
We apply the approach with the second type of argument to preferential attachment graphs in Sect. 3.2.2. The first method does not apply to this class of graphs, because the orientations of the edges are not independent and we cannot start from an a priory almost sure convergence of the undirected graph sequence. We will show that the matching ratio of G n is concentrated around its expected value, which together with Theorem 6 on the convergence of the mean of the matching ratio implies the almost sure convergence.

Directed Versions of Almost Surely Convergent Graph Sequences-Proof of Part
(2) of Theorem 2 In this section we prove Part (2) of Theorem 2. As a consequence, we have that the directed matching ratios of sequences of random regular graphs, graphs given by the random configuration model and Erdős-Rényi random graphs converge almost surely, see Corollary 3, Theorem 2 and Corollary 4, respectively. First we prove Lemma 5 on the almost sure convergence of a sequence of random directed graphs (see Definition 4) obtained from a convergent deterministic graph sequence by giving independent uniform orientation to the edges. This lemma implies Part (2) of Theorem 2.
The graph sequences examined in this section are known to converge almost surely in the undirected case. It follows by Part (2) of Theorem 2 that their directed matching ratios converge almost surely. By our Proposition 1 and Theorem 2 in [6] on the limit of the matching ratio of convergent graph sequences, one can compute the value of the limit of the directed matching ratio when the limit is a unimodular Galton-Watson tree. In Corollaries 3 and 4 we also present the results given by this argument.
Lemma 5 Let G n be a sequence of deterministic undirected graphs on n vertices that converges to the random rooted graph (G, o) in the local weak sense. Let # » G n be the sequence of random directed graphs obtained from G n by giving a random uniform orientation to each edge uniformly independently. Then the sequence # » G n converges almost surely in the local weak sense to ( #» G, o), which is the random rooted graph obtained from (G, o) by orienting each edge independently.

Proof of Theorem 2 Part (2) Consider a sequence
# » G n of random directed graphs obtained by giving a uniform random orientations to the edges of a sequence of undirected random graphs G n that converges almost surely in the local weak sense to the limit graph (G, o). We have by Lemma 5, that The proof of Lemma 5 essentially follows the proof of Proposition 2.2 in [7]. The main difference is that we had to generalize the proof to graph sequences without a uniform bound on the degrees. for all large enough n with probability at least 1 − δ. Since ε and δ was arbitrary, this implies (8).
The directed versions of the first three graph models of Sect. 1.4 are given by orienting the edges of the non-directed versions independently. We use the following consequence of Theorem 3.28 in [5] for the almost sure convergence of the directed random configuration model (see Sect. 1.4 for the definition): Theorem 7 ([5], Theorem 3.28) If G n is sequence of random undirected graphs given by the random configuration model with degree distribution ξ satisfying E(ξ p ) < ∞ for some p > 2, then the sequence G n converges to U GW (ξ ) almost surely in the local weak sense. U GW (ξ ) has distribution U GW (Binom(ξ, 1/2)), hence the limit of the matching ratio can also be expressed as the expected matching ratio of a non-directed unimodular graph.
Corollary 2 (Almost sure convergence of the directed matching ratio of the random configuration model) Let ξ be a non-negative integer valued random variable with E(ξ p ) < ∞ for some p > 2. Let G n be a sequence of random directed graphs given by the random configuration model with degree distribution ξ , or let G n be the graph given by the same rule but conditioned to be a simple graph. Then The sequence of random directed d-regular graphs is a special case of the random configuration model (with degree distribution ξ being constant d). The connected component of the root o of the bipartite representation T d has distribution U GW (Binom(d, 1/2)), hence we have the following: Corollary 3 (Almost sure convergence of the directed matching ratios of directed random regular graphs) Let G n be the sequence of random d-regular graphs on n vertices with randomly oriented edges. Then the matching ratios converge almost surely to the constant lim n→∞ m(G n ) = m E U GW (Binom(d, 1/2)) .

Remark 6
The constants m E U GW (Binom(d, 1/2)) or m E ( # » U GW (ξ )) = m E U GW (Binom(ξ, 1/2)) equal 1 − max t∈[0,1] F(t) by Theorem 2 in [6], where in the definition of the function F we use φ(t) = 1+t For directed Erdős-Rényi graphs one can compute the exact value of the almost sure limit of the matching ratio, using the results of [9] or Theorem 2 in [6]. U GW (Poi(2c)) has distribution U GW (Poi(c)), which is the almost sure local weak limit of the non-directed Erdős-Rényi random graphs G n,c/n with parameter c. It is known (see [9] or Theorem 2 in [6]), that for this graph sequence lim n→∞ m(G n,c/n ) equals the right hand side of (10) almost surely. By Remark 3 we have lim n→∞ m(G n,c/n ) = m E (U GW (Poi(c))) = m E ( # » U GW (Poi(2c))).

Preferential Attachment Graphs-Proof of Part (3) of Theorem 2
In this section we show that the directed matching ratio of a graph sequence given by the preferential attachment rule converges almost surely, see Theorem 8. The orientations of the edges of this class of graphs are given naturally by the recursive definition, and differ significantly from the independent random orientation. Thus we cannot apply the results of Sect. 3.2.1. This sequence also does not satisfy the assumption of [10] that the distributions of the in-and out-degrees are the same (which was assumed to simplify the calculations made there), hence the value of the limit of the matching ratio for this class was not examined in that paper. However, the almost sure convergence of the directed matching ratios holds for this class of graph sequences as well, as we show in the next theorem.
Theorem 8 (Almost sure convergence of the matching ratio of preferential attachment graphs) Let G n be a random graph sequence obtained by the preferential attachment rule. Then m(G n ) converges almost surely, namely lim n→∞ m(G n ) = lim n→∞ E(m(G n )) almost surely.
We will prove the concentration of the matching ratios around their expected value, which together with the results of [3] on the local weak convergence of G n and Theorem 6 on the convergence of the mean of the matching ratio implies the statement.
Remark 7 It follows from the concentration shown in the proof, that the almost sure local weak convergence holds for any joint distribution of the graphs G n .
Proof of Theorem 8 Fix n and denote by G n [k] the subgraph of G n spanned by the vertices {1, . . . , k}. Let We will show that |X k | ≤ 2r almost surely for all k ∈ [n]. Since Y k := E |M max (G n )| G n [k] is a martingale, we can apply the Azuma-Hoeffding inequality (Theorem 5) to the random variables X k . It follows that for any c > 0 we have P (|m(G n ) − E(m(G n ))| > c) = P (|X 1 + · · · + X n | > cn)