in order to study complex systems such as the world wide web ( www ) we propose a model for generating a simple directed random graph with prescribed degree distributions .
the ability to match degree distributions to real graphs is perhaps the first characteristic one would desire from a model , and although several models that accomplish this for undirected graphs have been proposed in the recent literature @xcite , not much has been done for the directed case . in the www example that motivates this work ,
vertices represent webpages and the edges represent the links between them .
empirical studies ( e.g. , @xcite ) suggest that both the _ in - degree _ and _ out - degree _ , number of links pointing to a page and the number of outbound links of a page , respectively , follow a power - law distribution , a characteristic often referred to as the _ scale - free _ property .
the model we propose in this paper is closely related to the work in @xcite for undirected graphs , where given a probability distribution @xmath0 , the goal is to provide an algorithm to generate a simple random graph whose degree distribution is approximately @xmath0 .
two of the models presented in @xcite , as well as the model in @xcite , are in turn related to the well - known configuration model @xcite , where vertices are given stubs or half - edges according to a degree sequence @xmath2 and these stubs are then randomly paired to form edges . to obtain a prescribed degree distribution ,
the degree sequence @xmath2 is chosen as i.i.d .
random variables having distribution @xmath0 .
this method allows great flexibility in terms of the generality of @xmath0 , which is very important in the applications we have in mind .
the most general of the results presented here require only that the degree distributions have finite @xmath3th moment , and are therefore applicable to a great variety of examples , including the www .    for a directed random graph
there are two distributions that need to be chosen , the in - degree and out - degree distributions , denoted respectively @xmath4 and @xmath5 .
the in - degree of a node corresponds to the number of edges pointing to it , while the out - degree is the number of edges pointing out . to follow the ideas from @xcite , we propose to draw the in - degree and out - degree sequences as i.i.d .
observations from distributions @xmath0 and @xmath1 . unlike the undirected case where the only main problem with this approach is that the sum of the degrees might not be even , which is necessary to draw an undirected graph , in the directed case
the corresponding condition is that the sum of the in - degrees and the sum of the out - degrees be the same . since the probability that two i.i.d .
sequences will have the same sum , even if their means are equal , converges to zero as the number of nodes grows to infinity , the first part of the paper focuses on how to construct valid degree sequences without significantly destroying their i.i.d . properties .
once we have valid degree sequences the problem is how to obtain a simple graph , since the random pairing may produce self - loops and multiple edges in the same direction .
this problem is addressed in two ways , the first of which consists in showing sufficient conditions under which the probability of generating a simple graph through random pairing is strictly positive , which in turn suggests repeating the pairing process until a simple graph is obtained .
the second approach is to simply erase the self - loops and multiple edges of the resulting graph . in both cases
, one must show that the degree distributions in the final simple graph remain essentially unchanged .
in particular , if we let @xmath6 be the probability that a randomly chosen node from a graph of size @xmath7 has in - degree @xmath8 , and let @xmath9 be the corresponding probability for the out - degree , then we will show that , @xmath10 as @xmath11 .
we also prove a similar result for the empirical distributions .    the question of whether a given pair of in- and out - degree sequences @xmath12 is graphical , i.e. , from which it is possible to draw a simple directed graph , has been recently studied in @xcite , where algorithms to realize such graphs have also been analyzed .
random directed graphs with arbitrary degree distributions have been studied in @xcite via generating functions , which can be used to formalize concepts such as  in - components " and  out - components " as well as to estimate their average size .
models of growing networks that can be calibrated to mimic the power - law behavior of the www have been analyzed using statistical physics techniques in @xcite .
the approach followed in this paper focuses on one hand on the generation of in- and out - degree sequences that are close to being i.i.d . and that are graphical with high probability , and on the other hand on providing conditions under which a simple graph can be obtained through random pairing . the directed configuration model with ( close to ) i.i.d .
degree sequences , although not a growing network model , has the advantage of being analytically tractable and easy to simulate .
the rest of the paper is organized as follows . in section [ s.degreesequences ]
we introduce a model to construct in- and out - degree sequences that are very close to being two independent sequences of i.i.d .
random variables having distributions @xmath0 and @xmath1 , respectively , but whose sums are the same ; in the same spirit as the results in @xcite we also show that the suggested method produces with high probability a graphical pair of degree sequences . in subsection [ ss.repeat ]
we prove sufficient conditions under which the probability that the directed configuration model will produce a simple graph will be bounded away from zero , and show that conditional on the resulting graph being simple , the degree sequences have asymptotically the correct distributions . in subsection [ ss.erase ]
we show that under very mild conditions , the process of simply erasing self - loops and multiple edges results in a graph whose degree distributions are still asymptotically @xmath0 and @xmath1 .
as mentioned in the introduction , the goal of this paper is to provide an algorithm for generating a random directed graph with @xmath7 nodes with the property that its in - degrees and out - degrees have some prespecified distributions @xmath0 and @xmath1 , respectively .
moreover , we would like the resulting graph to be _ simple _ , that is , it should not contain self - loops or multiple edges in the same direction .
the two models that we propose are based on the so - called configuration or pairing model , which produces a random undirected graph from a degree sequence @xmath13 . in @xcite
the prescribed degree distribution is obtained by drawing the degree sequence @xmath2 as i.i.d .
random variables from that distribution .
more details about the configuration model can be found in section [ s.configurationmodel ] .
following the same idea of using a sequence of i.i.d .
random variables to generate the degree sequence of an undirected graph , the natural extension to the directed case would be to draw two i.i.d .
sequences from given distributions @xmath0 and @xmath1 .
we note that in the undirected setting the two main problems with this approach are : 1 ) that the sum of the degrees may be odd , in which case it is impossible to draw a graph , and 2 ) that there may not exist a simple graph having the prescribed degree sequence . the first problem is easily fixed by either sampling the i.i.d .
sequence until its sum is even ( which will happen with probability 1/2 asymptotically ) , or simply adding one to the last random number in the sequence . the second problem , although related to the verification of graphicality criteria ( e.g. , the erds - gallai criterion @xcite ) , turns out to be negligible as the number of nodes goes to infinity , as the work in @xcite shows . for directed graphs a graphicality criterion also exists , and
the second problem turns out to be negligible for large graphs just as in the undirected case .
nonetheless , the equivalent of the first problem is now that the potential in - degree and out - degree sequences must have the same sum , which is considerably harder to fix . before proceeding with the formulation of our proposed algorithm we give some basic definitions which will be used throughout the paper .
we denote by @xmath14 a directed graph on @xmath7 nodes or vertices , @xmath15 , connected via the set of directed edges @xmath16 .
we say that @xmath14 is _ simple _ if any pair of nodes are connected by at most one edge in each direction , and if there are no edges in between a node and itself .
the in - degree @xmath17 , respectively , out - degree @xmath18 , of node @xmath19 is the total number of edges from other nodes to @xmath20 , respectively , from @xmath20 to other nodes .
the pair of sequences @xmath21 of nonnegative integers is called a _ bi - degree - sequence _ if @xmath17 and @xmath18 correspond to the in - degree and out - degree , respectively , of node @xmath20 .
[ d.bi-degree-sequence ] a bi - degree - sequence @xmath22 is said to be _ graphical _ if there exists a simple directed graph @xmath14 on the set of nodes @xmath23 such that the in - degree and out - degree sequences together form @xmath22 . in this case
we say that @xmath24 realizes the bi - degree - sequence .    in view of these definitions
our goal is to generate the sequences @xmath25 and @xmath26 from i.i.d .
samples of given distributions @xmath4 and @xmath27 , respectively . both @xmath0 and @xmath1
are assumed to be probability distributions with support on the nonnegative integers with a finite common mean @xmath28 .
note that although the strong law of large numbers ( slln ) guarantees that if we simply sample i.i.d .
random variables @xmath29 from @xmath0 and , independently , i.i.d .
random variables @xmath30 from @xmath1 , then @xmath31 it is also true that in general @xmath32 one potential idea to fix the problem is to sample one of the two sequences , say the in - degrees , as i.i.d .
observations @xmath29 from @xmath0 and then sample the second sequence from the conditional distribution @xmath1 given that its sum is @xmath33 .
this approach has the major drawback that this conditional distribution may be ill - behaved , in the sense that the probability of the conditioning event , the sum being equal to @xmath34 , converges to zero in most cases .
it follows that we need a different mechanism to sample the degree sequences .
the precise algorithm we propose is described below ; we focus on first sampling two independent i.i.d .
sequences and then add in- or out - degrees as needed to match their sums .    the following definition will be needed throughout the rest of the paper .
we say that a function @xmath35 is slowly varying at infinity if @xmath36 for all fixed @xmath37 .
a distribution function @xmath0 is said to be regularly varying with index @xmath38 , @xmath39 , if @xmath40 with @xmath35 slowly varying .
we will also use the notation @xmath41 to denote convergence in distribution , @xmath42 to denote convergence in probability , and @xmath43 to refer to the positive integers .
we assume that the target degree distributions @xmath0 and @xmath1 have support on the nonnegative integers and have common mean @xmath44 . moreover , suppose that there exist slowly varying functions @xmath45 and @xmath46 such that @xmath47 for all @xmath48 , where @xmath49 .
we refer the reader to @xcite for all the properties of slowly varying functions that will be used in the proofs .
however , we do point out here that the tail conditions in ensure that @xmath0 has finite moments of order @xmath50 for all @xmath51 , and @xmath1 has finite moments of order @xmath50 for all @xmath52 . the constant @xmath53 will play an important role throughout the paper .
the algorithm is given below .    1 .
fix @xmath54 .
2 .   sample an i.i.d .
sequence @xmath29 from distribution @xmath0 ; let @xmath55 .
3 .   sample an i.i.d .
sequence @xmath56 from distribution @xmath1 ; let @xmath57 .
4 .   define @xmath58 . if @xmath59 proceed to step 5 ; otherwise repeat from step 2 .
choose randomly @xmath60 nodes @xmath61 without remplacement and let @xmath62 where @xmath63    \(i ) this algorithm constructs a bi - degree - sequence @xmath64 having the property that @xmath65 .
( ii ) note that we have used the capital letters @xmath66 and @xmath67 to denote the in - degree and out - degree , respectively , of node @xmath68 , as opposed to using the notation @xmath17 and @xmath18 from definition [ d.bi-degree-sequence ] ; we do this to emphasize the randomness of the bi - degree - sequence itself .
( iii ) clearly , neither @xmath69 nor @xmath70 are i.i.d .
sequences , nor are they independent of each other , but we will show in the next section that asymptotically as @xmath7 grows to infinity they have the same joint distribution as @xmath71 .
( iv ) we will also show that the condition in step 4 has probability converging to one .
( v ) note that we always choose to add degrees , rather than fixing one sequence and always adjust the other one , to avoid having problems with nodes with in- or out - degree zero .
we now provide some results about the asymptotic behavior of the bi - degree - sequence obtained from the algorithm we propose .
the first thing we need to prove is that the algorithm will always end in finite time , and the only step where we need to be careful is in step 4 , since it may not be obvious that we can always draw two independent i.i.d .
sequences satisfying @xmath72 in a reasonable amount of time .
the first lemma we give establishes that this is indeed the case by showing that the probability of satisfying condition @xmath72 converges to one as the size of the graph grows .
all the proofs in this section can be found in subsection [ ss.degreesequencesproofs ] .
[ l.differencelimit ] define @xmath73 , then @xmath74    since the sums of the in - degrees and out - degrees are the same , we can always draw a graph , but this is not enough to guarantee that we can draw a simple graph .
in other words , we need to determine with what probability will the the bi - degree - sequence @xmath64 be graphical , and to do this we first need a appropriate criterion , e.g. , a directed version of the erds - gallai criterion for undirected graphs .
the following result ( corollary 1 on p. 110 in @xcite ) gives necessary and sufficient conditions for a bi - degree - sequence to be graphical ; the original statement is for more general @xmath75-graphs , where up to @xmath75 parallel edges in the same direction are allowed . the notation @xmath76 denotes the cardinality of set @xmath77 .
[ thm : graphical - condition ] given a set of @xmath7 vertices @xmath78 , having bi - degree - sequence @xmath79 , a necessary and sufficient condition for @xmath22 to be graphical is    1 .
@xmath80 , and 2 .
@xmath81 for any @xmath82 .
we now state a result that shows that for large @xmath7 , the bi - degree - sequence @xmath64 constructed in subsection [ ss.algorithm ] is with high probability graphical .
related results for undirected graphs can be found in @xcite , which includes the case when the degree distribution has infinite mean .
[ thm : always - graphical ] for the bi - degree - sequence @xmath64 constructed in section [ ss.algorithm ] we have @xmath83    the second property of @xmath64 that we want to show is that despite the fact that the sequences @xmath84 and @xmath85 are no longer independent nor individually i.i.d .
, they are still asymptotically so as the number of vertices @xmath7 goes to infinity .
the intuition behind this result is that the number of degrees that need to be added to one of the i.i.d .
sequences @xmath86 or @xmath87 to match their sum is small compared to @xmath7 , and therefore the sequences @xmath84 and @xmath85 are _ almost _ i.i.d . and independent of each other .
this feature makes the bi - degree - sequence @xmath64 we propose an approximate equivalent of the i.i.d .
degree sequence considered in @xcite for undirected graphs .
[ t.weakconvergence ] the bi - degree - sequence @xmath64 constructed in subsection [ ss.algorithm ] satisfies that for any fixed @xmath88 , @xmath89 as @xmath11 , where @xmath90 and @xmath87 are independent sequences of i.i.d .
random variables having distributions @xmath0 and @xmath1 , respectively .    to end this section ,
we give a result that establishes regularity conditions of the bi - degree - sequence @xmath64 which will be important in the sequel .
[ p.mainconditions ] the bi - degree - sequence @xmath64 constructed in subsection [ ss.algorithm ] satisfies @xmath91 @xmath92 , \qquad \frac{1}{n } \sum_{i=1}^n d_i \stackrel{p}{\longrightarrow } e[\xi_1 ] , \qquad \text{and } \qquad \frac{1}{n } \sum_{i=1}^n n_id_i \stackrel{p}{\longrightarrow } e[\gamma_1 \xi_1],\ ] ] as @xmath11 , and provided @xmath93 < \infty$ ] , @xmath94 , \qquad \text{and } \qquad \frac{1}{n } \sum_{i=1}^n d_i^2 \stackrel{p}{\longrightarrow } e[\xi_1 ^ 2],\ ] ] as @xmath11 .
in the previous section we introduced a model for the generation of a bi - degree - sequence @xmath64 that is close to being a pair of independent sequences of i.i.d .
random variables , but yet has the property of being graphical with probability close to one as the size of the graph goes to infinity .
we now turn our attention to the problem of obtaining a realization of such sequence , in particular , of drawing a simple graph having @xmath64 as its bi - degree - sequence .
the approach that we follow is a directed version of the _ configuration model_. the configuration , or _ pairing model _ , was introduced in @xcite and @xcite , although earlier related ideas based on symmetric matrices with @xmath95 entries go back to the early 70 s ; see @xcite for a survey of the history as well as additional references .
the configuration model is based on the following idea : given a degree sequence @xmath96 , to each node @xmath20 , @xmath97 , assign @xmath18 stubs or half - edges , and then pair half - edges to form an edge in the graph by randomly selecting with equal probability from the remaining set of unpaired half - edges .
this procedure results in a multigraph on @xmath7 nodes having @xmath98 as its degree sequence , where the term multigraph refers to the possibility of self - loops and multiple edges .
although this algorithm does not produce a multigraph uniformly chosen at random from the set of all multigraphs having degree sequence @xmath98 , a simple graph uniformly chosen at random can be obtained by choosing a pairing uniformly at random and discarding the outcome if it has self - loops or multiple edges @xcite .
the question that becomes important then is to estimate the probability with which the pairing model will produce a simple graph .
for the undirected graph setting we have described , such results were given in @xcite for regular @xmath99-graphs ( graphs where each node has exactly degree @xmath99 ) , and in @xcite for general graphical degree sequences .
from the previous discussion , it should be clear that it is important to determine conditions under which the probability of obtaining a simple graph in the pairing model is bounded away from zero as @xmath11 .
such conditions are essentially bounds on the rate of growth of the maximum ( minimum ) degree and/or the existence of certain limits ( see , e.g. , @xcite ) .
the set of conditions given below is taken from @xcite , and we include it here as a reference for the directed version discussed in this paper .
[ cond.regularityundirected ] given a degree sequence @xmath96 , let @xmath100}$ ] be the degree of a randomly chosen node , i.e. , @xmath101 } = k ) = \frac{1}{n } \sum_{i=1}^n 1(d_i = k).\ ] ]    1 .
_ weak convergence .
_ there exists a finite random variable @xmath102 taking values on the positive integers such that @xmath103 } \rightarrow d , \qquad n \to \infty.\ ] ] 2 .
_ convergence of the first moment .
_ @xmath104 } ] = e[d].\ ] ] 3
.   _ convergence of the second moment .
_ @xmath105})^2 ] = e[d^2].\ ] ]    it is straightforward to verify that if the degree sequence is chosen as an i.i.d .
sample @xmath70 from some distribution @xmath0 on the positive integers having finite first moment , then parts ( a ) and ( b ) of condition [ cond.regularityundirected ] are satisfied , and if @xmath0 has finite second moment then also part ( c ) is satisfied ; the adjustment made to ensure that the sum of the degrees is even , if needed , can be shown to be negligible .
condition [ cond.regularityundirected ] guarantees that the probability of obtaining a simple graph in the pairing model is bounded away from zero ( see , e.g. , @xcite ) , in which case we can obtain a uniformly simple realization of the ( graphical ) degree sequence @xmath2 by repeating the random pairing until a simple graph is obtained .
when part ( c ) of condition [ cond.regularityundirected ] fails , then an alternative is to simply erase the self - loops and multiple edges .
these two approaches give rise to the _ repeated _ an _ erased _ configuration models , respectively .
having given a brief description of the configuration model for undirected graphs , we will now discuss how to adapt it to draw directed graphs .
the idea is basically the same , given a bi - degree - sequence @xmath22 , to each node @xmath20 assign @xmath17 inbound half - edges and @xmath18 outbound half - edges ; then , proceed to match inbound half - edges to outbound half - edges to form directed edges . to be more precise , for each unpaired inbound half - edge of node @xmath20 choose randomly from all the available unpaired outbound half - edges , and if the selected outbound half - edge belongs to node , say , @xmath106 , then add a directed edge from @xmath106 to @xmath20 to the graph ; proceed in this way until all unpaired inbound half - edges are matched .
the following result shows that conditional on the graph being simple , it is uniformly chosen among all simple directed graphs having bi - degree - sequence @xmath22 .
all the proofs of section [ s.configurationmodel ] can be found in subsection [ ss.configurationmodelproofs ] .
[ p.uniformity ] given a graphical bi - degree - sequence @xmath22 , generate a directed graph according to the directed configuration model .
then , conditional on the obtained graph being simple , it is uniformly distributed among all simple directed graphs having bi - degree - sequence @xmath22 .
the question is now under what conditions will the probability of obtaining a simple graph be bounded away from zero as the number of nodes , @xmath7 , goes to infinity .
when this probability is bounded away from zero we can repeat the random pairing until we draw a simple graph : the repeated model ; otherwise , we can always erase the self - loops and multiple edges in the same direction to obtain a simple graph : the erased model .
these two models are discussed in more detail in the following two subsections , where we also provide sufficient conditions under which the the probability of obtaining a simple graph will be bounded away from zero .
we end this section by mentioning that another important line of problems related to the drawing of simple graphs ( directed or undirected ) is the development of efficient simulation algorithms , see for example the recent work in @xcite using importance sampling techniques for drawing a simple graph with prescribed degree sequence @xmath2 ; similar ideas should also be applicable to the directed model .      in this section
we analyze the directed configuration model using the bi - degree - sequence @xmath64 constructed in subsection [ ss.algorithm ] . in order to do
so we will first need to establish sufficient conditions under which the probability that the directed configuration model produces a simple graph is bounded away from zero as the number of nodes goes to infinity . since this property does not directly depend on the specific bi - degree - sequence @xmath64
, we will prove the result for general bi - degree - sequences @xmath22 satisfying an analogue of condition [ cond.regularityundirected ] .
as one may expect , we will require the existence of certain limits related to the ( joint ) distribution of the in - degree and out - degree of a randomly chosen node .
also , since the sequences @xmath107 and @xmath2 need to have the same sum , we prefer to consider a sequence of bi - degree - sequences , i.e. , @xmath108 where @xmath109 , since otherwise the equal sum constraint would greatly restrict the type of sequences we can use ( e.g. , @xmath110 for all @xmath111 ) .
the corresponding version of condition  [ cond.regularityundirected ] is given below .
[ cond.regularitydirected ] given a sequence of bi - degree - sequences @xmath108 satisfying @xmath112 let @xmath113 } , d^{[n]})$ ] denote the in - degree and out - degree of a randomly chosen node , i.e. , @xmath114 } , d^{[n ] } ) = ( i , j ) ) = \frac{1}{n } \sum_{k=1}^n 1(m_{nk } = i , d_{nk } = j).\ ] ]    1 .
_ weak convergence .
_ there exist finite random variables @xmath115 and @xmath116 taking values on the nonnegative integers and satisfying @xmath117 = e[\xi ]   > 0 $ ] such that @xmath118 } , d^{[n ] } ) \rightarrow ( \gamma , \xi ) , \qquad n \to \infty.\ ] ] 2 .   _
convergence of the first moments .
_ @xmath119 } ] = e[\gamma ] \qquad \text{and } \qquad \lim_{n\to\infty } e[d^{[n ] } ] = e[\xi].\ ] ] 3
.   _ convergence of the covariance .
_ @xmath120 } d^{[n ] } ] = e[\gamma \xi].\ ] ] 4 .
_ convergence of the second moments .
_ @xmath121})^2 ] = e[\gamma^2 ] \qquad \text{and } \qquad \lim_{n\to\infty } e [ ( d^{[n]})^2 ] = e[\xi^2].\ ] ]    we now state a result that says that the number of self - loops and the number of multiple edges produced by the random pairing converge jointly , as @xmath11 , to a pair of independent poisson random variables . as a corollary
we obtain that the probability of the resulting graph being simple converges to a positive number , and is therefore bounded away from zero .
the proof is an adaptation of the proof of proposition 7.9 in @xcite .
consider the multigraph obtained through the directed configuration model from the bi - degree - sequence @xmath122 , and let @xmath123 be the number of self - loops and @xmath124 be the number of multiple edges in the same direction , that is , if there are @xmath125 ( directed ) edges from node @xmath20 to node @xmath106 , they contribute @xmath126 to @xmath124 .
[ p.poissonlimit ] ( poisson limit of self - loops and multiple edges ) if @xmath108 satisfies condition  [ cond.regularitydirected ] with @xmath117 = e[\xi ] = \mu > 0 $ ] , then @xmath127 as @xmath11 , where @xmath128 and @xmath129 are two independent poisson random variables with means @xmath130}{\mu } \qquad \text{and } \qquad \lambda_2 = \frac { e[\gamma(\gamma-1 ) ] e[\xi(\xi-1)]}{2 \mu^2},\ ] ] respectively .    since the probability of the graph being simple is @xmath131
, we obtain as a consequence the following theorem .
[ t.probsimple ] under the assumptions of proposition [ p.poissonlimit ] , @xmath132    it is clear from proposition [ p.mainconditions ] that condition [ cond.regularitydirected ] is satisfied by the bi - degree - sequence @xmath64 proposed in subsection [ ss.algorithm ] whenever @xmath0 and @xmath1 have finite variance .
this implies that one way of obtaining a simple directed graph on @xmath7 nodes is by first sampling the bi - degree - sequence @xmath64 according to subsection [ ss.algorithm ] , then checking if it is graphical , and if it is , use the directed pairing model to draw a graph , discarding any realizations that are not simple . alternatively , since the probability of @xmath64 being graphical converges to one , then one could skip the verification of graphicality and re - sample @xmath64 each time the pairing needs to be repeated .
the last thing we show in this section is that the degree distributions of the resulting simple graph will have with high probability the prescribed degree distributions @xmath0 and @xmath1 , as required . more specifically , if we let @xmath133 be the bi - degree - sequence of the final simple graph obtained through the repeated directed configuration model with bi - degree - sequence @xmath64
, then we will show that the joint distribution @xmath134 converges to @xmath135 , and the empirical distributions , @xmath136 converge in probability to @xmath137 and @xmath138 , respectively .
the same result was shown in @xcite for the undirected case with i.i.d .
degree sequence @xmath85 .
[ p.repeateddistr ] for the repeated directed configuration model with bi - degree - sequence @xmath64 , as constructed in subsection [ ss.algorithm ] , we have :    1 .   @xmath139 as @xmath11 , @xmath140 , and 2 .   for all @xmath141
, @xmath142    note that by the continuous mapping theorem , ( a ) implies that the marginal distributions of the in - degrees and out - degrees , @xmath143 converge to @xmath144 and @xmath145 , respectively .
the same arguments used in the proof also give that the joint empirical distribution converges to @xmath135 in probability .
in this section we consider the erased directed configuration model , which is particularly useful when the probability of drawing a simple graph converges to zero as the number of nodes increases , which could happen , for example , when condition  [ cond.regularitydirected ] ( d ) fails . given a bi - degree - sequence @xmath22 ,
the erased model consists in first obtaining a multigraph according to the directed configuration model and then erase all self - loops and merge multiple edges in the same direction into a single edge , with the result being a simple graph .
note that the graph obtained through this process no longer has @xmath22 as its bi - degree - sequence .    as for the repeated model , let @xmath146 be the bi - degree - sequence of the simple graph obtained through the erased directed configuration model with bi - degree - sequence @xmath64 .
define the joint distribution @xmath147 and the empirical distributions , @xmath148 the following result is the analogue of proposition [ p.repeateddistr ] for the erased model .
[ p.eraseddistr ] for the erased directed configuration model with bi - degree - sequence @xmath64 , as constructed in subsection [ ss.algorithm ] , we have :    1 .   @xmath139 as @xmath11 , @xmath140 , and 2 .   for all @xmath141 , @xmath142
in this section we give the proofs of all the results in the paper .
we divide the proofs into two subsections , one containing those belonging to section [ s.degreesequences ] and those belonging to section [ s.configurationmodel ] . throughout the remainder of the paper we use the following notation : @xmath149 if @xmath150 , @xmath151 if @xmath152 , and @xmath153 if @xmath154 .
suppose now that @xmath159 = \infty$ ] , which implies that @xmath160 $ ] .
let @xmath161 , define @xmath162 , @xmath163 , and let @xmath164 be a sequence of i.i.d .
random variables having distribution @xmath165 .
then , @xmath166 \right| + n|e[\tilde
z_1]|   > n^{1-\kappa+\delta_0 } \right ) + p\left ( \max_{1\leq i \leq n } |z_i| > t_n
\right ) .\end{aligned}\ ] ] by the union bound , @xmath167 as @xmath11 , which converges to zero by basic properties of slowly varying functions ( see , e.g. , proposition  1.3.6 in @xcite ) . next , note that since @xmath168 = 0 $ ] , @xmath169| = \frac{| e [ z_1 1(|z_1| > t_n ) ] |}{p(|z_1| \leq
t_n ) } \leq \frac{e [ |z_1| 1(|z_1| > t_n ) ] } { p(|z_1| \leq t_n ) } \leq ( 1+o(1 ) )   \left ( t_n p(|z_1| > t_n ) + \int_{t_n}^\infty p(|z_1| >
z ) dz \right).\ ] ] to estimate the integral note that @xmath170 where in the third step we used proposition 1.5.10 in @xcite . now note that @xmath171 from where it follows that @xmath169| = o\left ( n^{-\kappa - \epsilon(\theta^{-1}-1 ) } ( l_f(t_n ) + l_g(t_n ) )   \right ) = o\left ( n^{-\kappa + \delta_0 }   \right)\ ] ] as @xmath11 . in view of this , we can use chebyshev s inequality to obtain @xmath172 \right| + n|e[\tilde z_1]|   > n^{1-\kappa+\delta_0 }
\right ) \leq \frac{{{\rm var } \mspace{1mu}}(\tilde z_1)}{n^{1 - 2(\kappa-\delta_0 ) } ( 1+o(1))}.\ ] ] finally , to see that this last bound converges to zero note that @xmath173 = \frac{1}{p(|z_1|
\leq t_n ) } e [ z_1 ^ 2 1(|z_1| \leq t_n ) ] \leq ( 1+o(1 ) ) e\left [ |z_1|^{\theta^{-1}-\epsilon }   \right ] t_n^{2-\theta^{-1}+\epsilon},\end{aligned}\ ] ] where @xmath174 < \infty$ ] by the remark following .
we conclude that is of order @xmath175 as @xmath11 .
this completes the proof .
[ l.sumsorderstats ] let @xmath176 be an i.i.d . sequence of nonnegative random variables having distribution function @xmath23 , and let @xmath177 denote the @xmath68th order statistic .
then , for any @xmath178 , @xmath179 \leq \int_0^\infty \min\left\ { n \overline{v}(x ) , k \right\ } dx.\ ] ]    note that @xmath180 = \int_0^\infty p(x^{(i ) } > x ) \ , dx = \int_0^\infty \sum_{j = n - i+1}^n \binom{n}{j } \overline{v}(x)^j v(x)^{n - j } dx,\ ] ] from where it follows @xmath181 & = \sum_{i = n - k+1}^n \sum_{j = n - i+1}^n \binom{n}{j } \int_0^\infty   \overline{v}(x)^j v(x)^{n - j } dx \\ & =   \sum_{j=1}^{n } \min\{j , k\ } \binom{n}{j } \int_0^\infty \overline{v}(x)^{j } v(x)^{n - j }
dx \\ & = \int_0^\infty e\left [   \min\ { b(n , \overline{v}(x ) ) , k \ } \right ] dx,\end{aligned}\ ] ] where @xmath182 is a binomial@xmath183 random variable .
since the function @xmath184 is concave , jensen s inequality gives @xmath185
\leq \min\left\ { e [ b(n , \overline{v}(x ) ) ] , k \right\ } = \min\left\ { n\overline{v}(x ) , k \right\}.\ ] ]    since by construction @xmath186 , it follows from theorem  [ thm : graphical - condition ] that it suffices to show that @xmath187 fix @xmath188 and use the union bound to obtain @xmath189 by conditioning on how many of the @xmath67 are larger than @xmath190 we obtain that is bounded by @xmath191 where @xmath192 was defined in lemma [ l.differencelimit ] .
now note that by the union bound we have @xmath193 as @xmath11 , where the last step follows from lemma [ l.differencelimit ] and basic properties of slowly varying functions ( see , e.g. , chapter 1 in @xcite ) .    next , to analyze let @xmath194 and note that we can write it as @xmath195 where @xmath196 is the @xmath68th smallest of @xmath197 .
now let @xmath198 = \overline{g}(0 ) > 0 $ ] and split the last probability as follows @xmath199 to bound use @xmath200 for all @xmath201 and chebyshev s inequality to obtain @xmath202 while the union bound gives that is bounded by @xmath203 where @xmath204 . for the second probability the union bound again gives @xmath205 as @xmath11 .
finally , by markov s inequality and lemma [ l.sumsorderstats ] , @xmath206 \leq \frac{1}{b_n p(\mathcal{d}_n ) } \sum_{i = n - k_n+1}^n e [ \gamma^{(i ) } + 1 ] \\
& \leq \frac{1}{b_n p(\mathcal{d}_n ) } \left (   \int_0^\infty \min\left\ { n \overline{f}(x ) , k_n \right\ } dx + k_n \right ) \\ & = a_0^{-1 } ( 1 + o(1 ) ) \int_0^\infty \min\left\ { \overline{f}(x ) , n^{(1+\epsilon)/\beta - 1 } \right\ } dx + o(1 )   \\ & \leq a_0^{-1 } ( 1+o(1 ) ) \left ( n^{(1+\epsilon)/\beta-1 } + \int_1^\infty \min\left\ { k x^{-\alpha+\epsilon } , n^{(1+\epsilon)/\beta-1 } \right\ } dx \right ) + o(1 ) \\ & = o(1 ) + o\left ( \int_1^\infty \min\left\ { x^{-\alpha+\epsilon } , n^{(1+\epsilon)/\beta-1 } \right\ } dx \right)\end{aligned}\ ] ] as @xmath11 , where @xmath207 .
since @xmath208 the proof is complete .
let @xmath209 $ ] , @xmath210 , be a continuous bounded function , and let @xmath211 be defined as in lemma [ l.differencelimit ] . then , @xmath212 - e\left [ u(\eta_1 , \dots , \eta_r , \xi_1 , \dots , \xi_s ) \right ] \right| \notag \\ &
= \left|   e\left [ u(\gamma_{i_1}+\tau_{i_1 } , \dots , \gamma_{i_r}+\tau_{i_r } , \xi_{j_1 } + \chi_{j_1 } , \dots , \xi_{j_s } + \chi_{j_s } ) | \mathcal{d}_n \right ] - e\left [ u(\gamma_{i_1 } , \dots , \gamma_{i_r } , \xi_{j_1 } , \dots , \xi_{j_s } ) \right ]    \right| \notag \\ & \leq   \left|    e\left [ u(\gamma_{i_1}+\tau_{i_1 } , \dots , \gamma_{i_r}+\tau_{i_r } , \xi_{j_1 } + \chi_{j_1 } , \dots , \xi_{j_s } + \chi_{j_s } ) -u(\gamma_{i_1 } , \dots , \gamma_{i_r } , \xi_{j_1 } , \dots , \xi_{j_s } ) | \mathcal{d}_n \right ]    \right| \label{eq : nochi } \\ & \hspace{5 mm } + \left|    e\left [ u(\gamma_{i_1 } , \dots , \gamma_{i_r } , \xi_{j_1 } , \dots , \xi_{j_s } ) | \mathcal{d}_n \right ] - e\left [ u(\gamma_{1 } , \dots , \gamma_{r } , \xi_{1 } , \dots , \xi_{s } ) \right ]    \right| .
\label{eq : conditional}\end{aligned}\ ] ] let @xmath213 .
since @xmath214 is bounded then is smaller than or equal to @xmath215 \\ & \leq 2 m p\left ( \left .
t \geq 1 \right| \mathcal{d}_n \right ) \leq 2 m \left ( \sum_{t = 1}^r p ( \tau_{i_t } = 1 | \mathcal{d}_n )   + \sum_{t=1}^s p(\chi_{j_t } = 1| \mathcal{d}_n ) \right ) \\ & = \frac{2m}{p(\mathcal{d}_n ) } \left ( \sum_{t=1}^r e [ 1(\tau_{i_t } = 1 , \mathcal{d}_n ) ] + \sum_{t=1}^s   e [ 1 ( \chi_{j_t } = 1 , \mathcal{d}_n ) ] \right).\end{aligned}\ ] ] to compute the last expectations let @xmath216 and note that @xmath217 = e [ 1(\mathcal{d}_n ) e[1(\chi_{j_t } = 1 ) | \mathcal{f}_n ] ] = e\left [ 1(\mathcal{d}_n , \delta_n \geq 0 ) \frac{\binom{n-1}{\delta_n-1}}{\binom{n}{\delta_n } }   \right ] = e\left [ 1(\mathcal{d}_n , \delta_n \geq 0 ) \frac{\delta_n}{n }   \right],\ ] ] and symmetrically , @xmath218 = e\left [ 1(\mathcal{d}_n , \delta_n < 0 ) \frac{|\delta_n|}{n }   \right],\ ] ] from where it follows that is bounded by @xmath219 + \sum_{t=1}^s e\left [ \left .
\frac{|\delta_n|}{n } 1(\delta_n < 0 ) \right| \mathcal{d}_n \right ]   \right ) \leq 2 m ( r+s ) n^{-\kappa+\delta_0 } = o(1)\ ] ] as @xmath11 .
to analyze we first note that by lemma [ l.differencelimit ] , @xmath220 as @xmath11 , hence @xmath221 & = \frac{1}{p(\mathcal{d}_n ) } e\left [ u(\gamma_{1 } , \dots , \gamma_r , \xi_{1 } , \dots , \xi_s ) 1(\mathcal{d}_n ) \right ] \\ & = e\left [ u(\gamma_{1 } , \dots , \gamma_r , \xi_{1 } , \dots , \xi_s ) 1(\mathcal{d}_n ) \right ] + o(1).\end{aligned}\ ] ] therefore , is equal to @xmath222 + o(1 ) \right| \leq m p(\mathcal{d}_n^c ) + o(1 ) \to 0\end{aligned}\ ] ] as @xmath11 , which completes the proof .
fix @xmath223 and let @xmath224 . for the first limit fix @xmath225 and
note that by the union bound , @xmath226 where in the last step we used chebyshev s inequality .
clearly , @xmath227 , and since by lemma [ l.differencelimit ] @xmath220 as @xmath11 , then the second term converges to zero . to analyze the first term note that at most one of @xmath228 or @xmath229 can be one , hence , @xmath230 as @xmath11 .
next , for the average degrees we have @xmath231 \right| > \epsilon
\right ) & = p\left ( \left .   \left| \frac{1}{n } \sum_{i=1}^n ( \gamma_i+ \tau_i ) - e[\gamma_1 ] \right| > \epsilon
\right| \mathcal{d}_n \right ) \notag \\ & \leq p\left ( \left . \left| \frac{1}{n } \sum_{i=1}^n \gamma_i - e[\gamma_1 ] \right| + \frac{|\delta_n|}{n }   > \epsilon
\right| \mathcal{d}_n \right ) \notag \\ & \leq \frac{1}{p(\mathcal{d}_n ) } p\left ( \left| \frac{1}{n } \sum_{i=1}^n \gamma_i - e[\gamma_1 ] \right| + n^{-\kappa+\delta_0 }   > \epsilon
\right )   ,   \label{eq : in - degreewl}\end{aligned}\ ] ] symmetrically , @xmath232
\right| > \epsilon
\right ) & \leq \frac{1}{p(\mathcal{d}_n ) } p\left ( \left| \frac{1}{n } \sum_{i=1}^n \xi_i   - e[\xi_1 ] \right| + n^{-\kappa+\delta_0 } > \epsilon
\right ) , \label{eq : out - degreewl}\end{aligned}\ ] ] and since @xmath233 for all @xmath97 , @xmath234 \right| > \epsilon \right ) & = p\left ( \left .
\left| \frac{1}{n } \sum_{i=1}^n ( \gamma_i \xi_i + \tau_i \xi_i + \gamma_i \chi_i - e[\gamma_1 \xi_1 ] \right|    > \epsilon
\right| \mathcal{d}_n \right ) \notag \\ & \leq p\left ( \left .
\left| \frac{1}{n } \sum_{i=1}^n \gamma_i \xi_i   - e[\gamma_1 \xi_1 ] \right| + \sum_{i=1}^n ( \tau_i \xi_i + \gamma_i \chi_i )     > \epsilon
\right| \mathcal{d}_n \right ) \notag \\ & \leq \frac{1}{p(\mathcal{d}_n ) } p\left (   \left| \frac{1}{n } \sum_{i=1}^n \eta_i \xi_i   - e[\gamma_1 \xi_1 ] \right|   + n^{-\kappa+\delta } > \epsilon
\right ) \label{eq : mix - degreeswl } \\ & \hspace{5 mm } +    p\left ( \left . \frac{1}{n } \sum_{i=1}^n ( \tau_i \xi_i + \gamma_i \chi_i ) > n^{-\kappa+\delta } \right|
\mathcal{d}_n   \right ) , \label{eq : chiandeta}\end{aligned}\ ] ] for any @xmath235 . by lemma [ l.differencelimit ]
, @xmath236 converges to one , and by the weak law of large numbers ( wlln ) we have that each of , and converges to zero as @xmath11 , as required . to see that converges to zero use markov s inequality to obtain @xmath237}{n^{-\kappa+\delta } }
= \frac{e [ ( \tau_1 \xi_1 + \gamma_1 \chi_1 ) 1(\mathcal{d}_n)]}{p(\mathcal{d}_n ) n^{-\kappa+\delta}}. \label{eq : mixedproducts}\end{aligned}\ ] ] now let @xmath216 to compute @xmath238 = e [ ( \xi_1 e[\tau_1 | \mathcal{f}_n ] + \gamma_1e[\chi_1| \mathcal{f}_n ] ) 1(\mathcal{d}_n ) ] \leq e\left [ \left ( \xi_1 + \gamma_1   \right ) \frac{|\delta_n|}{n } 1(\mathcal{d}_n ) \right ] \leq 2\mu n^{-\kappa+\delta_0},\ ] ] which implies that converges to zero .
finally , provided that @xmath93 < \infty$ ] , the wlln combined with the arguments used to bound give @xmath239 \right|
\right ) & \leq \frac{1}{p(\mathcal{d}_n ) } p\left ( \left| \frac{1}{n } \sum_{i=1}^n \gamma_i^2 - e[\gamma_1 ^ 2 ] \right| +   \frac{1}{n } \sum_{i=1}^n ( 2\gamma_i \tau_i + \tau_i^2 ) > \epsilon , \mathcal{d}_n
\right )   \\ & \leq   \frac{1}{p(\mathcal{d}_n ) } p\left ( \left| \frac{1}{n } \sum_{i=1}^n \gamma_i^2 - e[\gamma_1 ^ 2 ] \right| + n^{-\kappa+\delta } > \epsilon \right ) \\ & \hspace{5 mm } +   p\left ( \left .   \frac{1}{n } \sum_{i=1}^n ( 2\gamma_i \tau_i + \tau_i^2 ) > n^{-\kappa+\delta } \right| \mathcal{d}_n
\right ) \\ & \leq o(1 ) + \frac{e [ ( 2\gamma_1 + 1)\tau_1| \mathcal{d}_n]}{n^{-\kappa+\delta } } \\ & \leq o(1 ) + \frac{e[2\gamma_1 + 1]}{p(\mathcal{d}_n ) n^{\delta-\delta_0}},\end{aligned}\ ] ] and symmetrically , @xmath240 \right| > \epsilon
\right ) \to 0,\ ] ] as @xmath11 .
this subsection contains the proofs of proposition [ p.uniformity ] , which establishes the uniformity of simple graphs , propositions [ p.poissonlimit ] and [ p.repeateddistr ] , which concern the repeated directed configuration model , and proposition [ p.eraseddistr ] which refers to the erased directed configuration model .
suppose @xmath241 and @xmath98 have equal sum @xmath242 , and number the inbound and outbound half - edges by @xmath243 .
the process of matching half edges in the configuration model is equivalent to a permutation @xmath244 of the numbers @xmath245 where we pair the @xmath68th inbound half - edge to the @xmath246th outbound half - edge , with all @xmath247 permutations being equally likely .
note that different permutations can actually lead to the same graph , for example , if we switch the position of two outbound half - edges of the same node , so not all multigraphs have the same probability .
nevertheless , a simple graph can only be produced by @xmath248 different permutations ; to see this note that for each node @xmath20 , @xmath249 , we can permute its @xmath17 inbound half - edges and its @xmath18 outbound half - edges without changing the graph . it follows that since the number of permutations leading to a simple graph is the same for all simple graphs , then conditional on the resulting graph being simple , it is uniformly chosen among all simple graphs having bi - degree - sequence @xmath22 .
next , we give the proofs of the results related to the repeated directed configuration model . before proceeding with the proof of proposition [ p.poissonlimit ] we give the following preliminary lemma , which will be used to establish that under condition [ cond.regularitydirected ] the maximum in- and out - degrees can not grow too fast .
define @xmath255 and note that @xmath0 and @xmath256 are both distribution functions with support on the nonnegative integers .
define the pseudoinverse operator @xmath257 and let @xmath258 where @xmath259 is a uniform(0,1 ) random variable .
it is easy to verify that @xmath260 and @xmath261 have distributions @xmath256 and @xmath0 , respectively .
furthermore , the assumptions imply that @xmath262 as @xmath11 and @xmath263 = \sum_{j=0}^\infty j \frac{1}{n } \sum_{k=1}^n 1(a_{nk } = j ) = \frac{1}{n } \sum_{k=1}^n \sum_{j=0}^\infty j 1(a_{nk } = j ) = \frac{1}{n } \sum_{k=1}^n a_{nk } \to e[x]\ ] ] as @xmath11 , where the exchange of sums is justified by fubini s theorem .
now note that by fatou s lemma , @xmath264
\geq e\left [ \liminf_{n \to \infty } x_n 1(x_n \leq \sqrt{n } ) \right ] = e[x],\ ] ] which implies that @xmath265 = 0.\ ] ] finally , @xmath266 = \sum_{j= \lfloor \sqrt{n } \rfloor + 1}^\infty j \frac{1}{n } \sum_{k=1}^n 1(a_{nk } = j ) = \frac{1}{n } \sum_{k=1}^n \sum_{j = \lfloor \sqrt{n } \rfloor
+ 1}^\infty j 1(a_{nk } = j ) = \frac{1}{n } \sum_{k=1}^n a_{nk } 1(a_{nk } > \sqrt{n}),\ ] ] from where it follows that @xmath267 which in turn implies that @xmath268    following the proof of proposition 7.9 in @xcite , we define the random variable @xmath269 to be the total number of pairs of multiple edges in the same direction , e.g. , if from node @xmath20 to node @xmath106 there are @xmath125 edges , their contribution to @xmath269 is @xmath270 .
note that @xmath271 , with strict inequality whenever there is at least one pair of nodes having three or more multiple edges in the same direction .
we claim that @xmath272 as @xmath11 , which implies that @xmath273 as @xmath11 .
to prove the claim start by defining indicator random variables for each of the possible self - loops and multiple edges in the same direction that the multigraph can have .
for the self - loops we use the notation @xmath274 to define @xmath275 and for the pairs of multiple edges in the same direction we use @xmath276 to define @xmath277 the sets of possible vectors @xmath278 and @xmath279 are given by @xmath280 respectively .
it follows from this notation that @xmath281      we now proceed to prove that @xmath283 , where @xmath128 and @xmath129 are independent poisson random variables with means @xmath284 and @xmath285 , respectively . to do this we use theorem 2.6 in @xcite which says that if for any @xmath286 @xmath287 = \lambda_1^p \lambda_2^q,\ ] ] where @xmath288 , then @xmath289 as @xmath11 . to compute the expectation we use theorem 2.7 in @xcite , which gives @xmath290 = \sum_{{\bf u}_1 , \dots , { \bf u}_p \in \mathcal{i } } \sum_{{\bf w}_1 , \dots , { \bf w}_q \in \mathcal{j } } p\left(i _ { { \bf u}_{1 } } = \dots = i _ { { \bf u}_{p } } = j _ { { \bf w}_{1 } } = \dots = j _ { { \bf w}_{q } } = 1\right),\ ] ] where the sums are taken over all the @xmath75-permutations , respectively @xmath291-permutations , of the distinct indices in @xmath292 , respectively @xmath293 .
next , by the fact that all stubs are uniformly paired , we have that @xmath294 unless there is a conflict in the attachment rules , i.e. , one stub is required to pair with two or more different stubs within the indices @xmath295 and @xmath296 , in which case @xmath297 therefore , from we obtain @xmath298 & \leq \sum_{{\bf u}_{1}, ... ,{\bf u}_{p}\in\mathcal{i } } \sum_{{\bf w}_{1}, ...
,{\bf w}_{q}\in\mathcal{j } } \frac{1}{\prod_{i=0}^{p+2q-1}(l_{n}-i ) } \notag   \\   & = \frac{|\mathcal{i}| ( |\mathcal{i}| - 1 ) \cdots ( |\mathcal{i}| - p+1 )   |\mathcal{j}| ( |\mathcal{j}| -1 ) \cdots ( |\mathcal{j}| - q+1 ) } { l_{n}(l_{n}-1)\cdots(l_{n}-(p+2q-1 ) ) } ,   \label{eq : ub_factorialmoment}\end{aligned}\ ] ] where @xmath76 denotes the cardinality of set @xmath77 .
now note that @xmath299 by lemma [ l.maximumgrowth ] and condition [ cond.regularitydirected ] we have @xmath300 as @xmath11 .
hence , it follows from condition [ cond.regularitydirected ] that @xmath301+o(1 ) , \\
\frac{|\mathcal{j}|}{n^2 } & = \frac{1}{2 } e[\gamma(\gamma-1 ) ] e[\xi(\xi-1 ) ] + o(1 ) , \qquad \text{and } \\
\frac{n}{l_n } & = \frac{1}{\mu } + o(1)\end{aligned}\ ] ] as @xmath11 .
since @xmath75 and @xmath291 remain fixed as @xmath11 , we have @xmath302 & = \left ( \lim_{n\rightarrow \infty } \frac{|\mathcal{i}|}{n } \right)^{p }      \left ( \lim_{n\rightarrow \infty}\frac{|\mathcal{j}|}{n^2 } \right)^{q }      \left ( \lim_{n\rightarrow \infty}\frac{n}{l_n } \right)^{p+2q}\\ & = \left({e[\gamma\xi]}\right)^{p } \left ( \frac{e[\gamma(\gamma-1 ) ] e[\xi(\xi-1)]}{2 } \right)^{q } \left ( \frac{1}{\mu } \right)^{p+2q } = \lambda_1^{p}\lambda_2^{q}.\end{aligned}\ ] ] to prove the matching lower bound , we note that occurs exactly when there is a conflict in the attachment rules . each time a conflict happens , the numerator of decreases by one .
therefore , @xmath303 & = \frac{|\mathcal{i}| ( |\mathcal{i}| - 1 ) \cdots ( |\mathcal{i}| - p+1 )   |\mathcal{j}| ( |\mathcal{j}| -1 ) \cdots ( |\mathcal{j}| - q+1 ) } { l_{n}(l_{n}-1)\cdots(l_{n}-(p+2q-1 ) ) } \\ & \hspace{5 mm } - \sum_{{\bf u}_{1}, ...
,{\bf u}_{p}\in\mathcal{i } } \sum_{{\bf w}_{1}, ... ,{\bf w}_{q}\in\mathcal{j } } \frac{1({\bf u}_1 , \dots , { \bf u}_p , { \bf w}_1 , \dots , { \bf w}_q \text { have a conflict})}{\prod_{i=0}^{p+2q-1}(l_{n}-i ) } \\ & = \lambda_1^p \lambda_2^q   -   \frac{1}{(\mu n)^{p+2q } } \sum_{{\bf u}_{1}, ... ,{\bf u}_{p}\in\mathcal{i } } \sum_{{\bf w}_{1}, ... ,{\bf w}_{q}\in\mathcal{j } } 1({\bf u}_1 , \dots , { \bf u}_p , { \bf w}_1 , \dots , { \bf w}_q \text { have a conflict } ) + o(1)\end{aligned}\ ] ] as @xmath11 . to bound the total number of conflicts note that there are three possibilities
:      we now discuss each of the cases separately . for conflicts of type ( a )
suppose there is a conflict between the self - loops @xmath304 and @xmath305 ; the remaining @xmath306 self - loops and @xmath291 pairs of multiple edges can be chosen freely . then the number of such conflicts is bounded by @xmath307 , hence it suffices to show that the total number of conflicting pairs @xmath308 is @xmath309 as @xmath11 .
now , to see that this is indeed the case , first choose the node @xmath20 where the conflicting pair is ; if the conflict is that an outbound stub is assigned to two different inbound stubs then we can choose the problematic outbound stub in @xmath310 ways and the two inbound stubs in @xmath311 ways , whereas if the conflict is that an inbound stub is assigned to two different outbound stubs then we can choose the problematic inbound stub in @xmath312 ways and the two outbound stubs in @xmath313 ways .
thus , the total number of conflicting pairs is bounded by @xmath314    for conflicts of type ( b ) suppose there is a conflict between the self - loop @xmath304 and the pair of multiple edges @xmath315 ; choose the remaining @xmath316 self - loops and @xmath317 multiple edges freely .
then , the number of such conflicts is bounded by @xmath318 , and it suffices to show that the number of conflicting pairs @xmath319 is @xmath320 as @xmath11 .
similarly as in case ( a ) , an outbound stub of node @xmath20 can be paired to a self - loop and a multiple edge to node @xmath106 in @xmath321 ways , and an inbound stub of node @xmath20 can be paired to a self - loop and a multiple edge from node @xmath106 in @xmath322 ways , and so the total number of conflicting pairs is bounded by @xmath323    finally , for conflicts of type ( c ) we first fix @xmath324 and @xmath315 and choose freely the remaining @xmath75 self - loops and @xmath325 multiple edges , which can be done in less than @xmath326 ways .
it then suffices to show that the number of conflicting pairs @xmath327 is @xmath328 as @xmath11 .
a similar reasoning to that used in the previous cases gives that the total number of conflicting pairs is bounded by @xmath329        to prove part ( a ) note that for any @xmath140 , @xmath331 since the @xmath332 are identically distributed .
now let @xmath333 and condition on @xmath334 to obtain @xmath335,\ ] ] from where it follows that @xmath336}{p(\mathcal{s}_n ) }    \right| + \left| p(n_1 = i , d_1 = j ) - f_i g_j   \right| \\ & \leq   e\left [   \left| \frac{p(\mathcal{s}_n | \mathcal{g}_n)}{p(\mathcal{s}_n ) } - 1 \right| \right ]   + \left| p ( n_1 = i , d_1 = j ) - f_i g_j \right|.\end{aligned}\ ] ] theorem [ t.weakconvergence ] gives that the second term converges to zero , and for the first term use theorem [ t.probsimple ] to obtain that both @xmath337 and @xmath338 converge to the same positive limit , so by dominated convergence , @xmath339 \leq e\left [   \lim_{n \to
\infty } \left| \frac{p(\mathcal{s}_n | \mathcal{g}_n)}{p(\mathcal{s}_n ) } - 1 \right| \right ] = 0.\ ] ]    for part ( b ) we only show the proof for @xmath340 since the proof for @xmath341 is symmetrical . note that @xmath340 is a quantity defined on @xmath330 .
fix @xmath223 and use the union bound to obtain @xmath342 by theorem [ t.probsimple ] and lemma [ l.differencelimit ] , @xmath337 and @xmath236 are bounded away from zero , so we only need to show that the numerators converge to zero .
the arguments are the same as those used in the proof of proposition  [ p.mainconditions ] ; for use chebyshev s inequality to obtain that @xmath343 as @xmath11 , and for @xmath344 which also converges to zero .
this completes the proof .
finally , the last result of the paper , which refers to the erased directed configuration model , is given below . since the technical part of the proof is to show that the probability that no in - degrees or out - degrees of a fixed node are removed during the erasing procedure , we split the proof of proposition [ p.eraseddistr ] into two parts .
the following lemma contains the more delicate step .
[ l.survivingstubs ] consider the graph obtained through the erased directed configuration model using as bi - degree - sequence @xmath64 , as constructed in subsection [ ss.algorithm ] .
let @xmath345 and @xmath346 be the number of inbound stubs and outbound stubs , respectively , that have been removed from node @xmath347 during the erasing procedure . then
, @xmath348    we only show the result for @xmath345 since the proof for @xmath346 is symmetric .
define the set @xmath349 and note that in order for all the inbound stubs of node @xmath347 to survive the erasing procedure , it must have been that they were paired to outbound stubs of @xmath350 different nodes from @xmath351 . before we proceed
it is helpful to recall some definitions from section [ s.degreesequences ] , @xmath352 , @xmath33 , @xmath353 , @xmath354 , and @xmath355 , where @xmath356 ; also , @xmath90 and @xmath87 are independent sequences of i.i.d .
random variables having distributions @xmath0 and @xmath1 , respectively . now fix @xmath357 and let @xmath333 .
then , since @xmath358 , @xmath359 \geq e\left [ \left .
p\left ( e^+ = 0   \right| \mathcal{g}_n \right ) 1(1\leq n_1 \leq n^\epsilon ) \right ] + p(n_1 = 0 ) \notag \\ & = e\left [   \frac{1(1 \leq n_1 \leq n^\epsilon ) } { l_n ! } \sum_{(i_1 , i_2 , \dots , i_{n_1 } ) \in \mathcal{p}^+_n } d_{i_1 } d_{i_2 } \cdots d_{i_{n_1 } }    ( l_n - n_1 ) !    \right ]   + p(n_1 = 0 ) \notag \\ & \geq   e\left [   \left .
\frac{1(1\leq \gamma_1+\tau_1 \leq n^\epsilon ) } { l_n ! } \sum_{(i_1 , i_2 , \dots , i_{(\gamma_1+\tau_1 ) } ) \in \mathcal{p}^+_n } \xi_{i_1 } \xi_{i_2 } \cdots \xi_{i_{(\gamma_1+\tau_1 ) } }    ( l_n - \gamma_1 - \tau_1 ) !   \right|
\mathcal{d}_n \right ]   \notag \\
& \hspace{5 mm } + p(n_1 = 0 ) \notag \\ & \geq e\left [ \left .
\frac{1(1 \leq \gamma_1 \leq n^\epsilon ) 1(\tau_1 = 0)}{(l_n)^{\gamma_1 } } \sum_{(i_1 , i_2 , \dots , i_{\gamma_1 } ) \in \mathcal{p}^+_n } \xi_{i_1 } \xi_{i_2 } \cdots \xi_{i_{\xi_1 } }   \right| \mathcal{d}_n    \right ] + p(n_1 = 0 ) .
\label{eq : outboundsurvive}\end{aligned}\ ] ] next , condition on @xmath216 and note that @xmath360 it follows that the expectation in is equal to @xmath361 \\
& \geq e\left [ \left .
\frac{\gamma_n}{\gamma_n+|\delta_n| } \cdot \frac{1(1 \leq \gamma_1 \leq n^\epsilon ) } { ( \gamma_n + |\delta_n|)^{\gamma_1 } } \sum_{(i_1 , i_2 , \dots , i_{\gamma_1 } ) \in \mathcal{p}^+_n } \xi_{i_1 } \xi_{i_2 } \cdots \xi_{i_{\gamma_1 } } \right| \mathcal{d}_n     \right ] \\ & \geq e\left [ \left .
\frac{1(1 \leq \gamma_1 \leq n^\epsilon ) \gamma_n}{(\gamma_n + n^s)^{\gamma_1 + 1 } } \sum_{(i_1 , i_2 , \dots , i_{\gamma_1 } ) \in \mathcal{p}^+_n } \xi_{i_1 } \xi_{i_2 } \cdots \xi_{i_{\gamma_1 } } \right| \mathcal{d}_n     \right ] \end{aligned}\ ] ] @xmath362    \right ] \\ & = \frac{1}{p(\mathcal{d}_n ) } e\left [ 1(1 \leq \gamma_1 \leq n^\epsilon ) \frac{(n-1)!}{(n-1-\gamma_1 ) !
n^{\gamma_1 } }   e\left [ \left .
\frac { 1(\mathcal{d}_n ) \gamma_n n^{\gamma_1 } } { ( \gamma_n + n^s)^{\gamma_1 + 1 } } \cdot \xi_{1 } \xi_{2 } \cdots \xi_{\gamma_1 } \right| \gamma_1 \right ]    \right].\end{aligned}\ ] ]    it follows by fatou s lemma , lemma [ l.differencelimit ] and theorem [ t.weakconvergence ] that @xmath363 \right ] + p(\gamma_1 = 0).\end{aligned}\ ] ] next , define the function @xmath364 as @xmath365 , \\\end{aligned}\ ] ] and note that it only remains to prove that for all @xmath366 , @xmath367 .
now let @xmath368 and note that @xmath369 - p(\gamma_{n-1 } < an ) \\ & \hspace{5 mm } - e\left [   1(\gamma_{n-1 } \geq an ) \left| \frac{(\gamma_{n-1}+t ) n^t}{(\gamma_{n-1}+t + n^s)^{t+1 } } - \frac{1}{\mu^t } \right| \xi_1 \xi_2 \cdots \xi_t \right ] .
\end{aligned}\ ] ] the slln and bounded convergence give @xmath370 and @xmath371 \\
& \leq e\left [ \xi_1 \xi_2 \cdots \xi_t \limsup_{n \to \infty }   \left| \frac{(\gamma_{n-1}+t ) n^t}{(\gamma_{n-1}+t + n^s)^{t+1 } } - \frac{1}{\mu^t } \right|   \right ] = 0,\end{aligned}\ ] ] from where it follows that @xmath372 .\ ] ] the last step is to condition on @xmath373 and use fatou s lemma again to obtain @xmath374   \\ & = \liminf_{n\to \infty } e\left [   \frac { \xi_1 \xi_2 \cdots \xi_t    } { \mu^t }   p(|\gamma_{n-1 } + t - \xi_{n }   | \leq n^s | \xi_1 , \dots , \xi_t ) \right ] \\
& \geq   e\left [   \frac { \xi_1 \xi_2 \cdots \xi_t    } { \mu^t } \liminf_{n\to \infty } p ( |\gamma_{n-1 } + t - \xi_{n}| \leq n^s | \xi_1 , \dots , \xi_t ) \right ] .\end{aligned}\ ] ] finally , by the same reasoning used in the proof of lemma [ l.differencelimit ] , we obtain @xmath375 since @xmath376 /\mu
^t = 1 $ ] , this completes the proof .    to prove part ( a ) note that since the @xmath377 are identically distributed , then @xmath378
it follows that @xmath379 by theorem [ t.weakconvergence ] we have that @xmath380 , as @xmath11 , and for the remaining term note that @xmath381 \notag \\ & \leq e\left [ \left| 1(d_1^{(e ) } = j ) - 1(d_1 = j ) \right| \right ]   + e \left [ \left| 1(n_1^{(e ) } = i ) - 1(n_1 = i ) \right| \right ] .
\label{eq : eraseddifferences } \end{aligned}\ ] ] to bound the expectations in let @xmath345 and @xmath346 be the number of inbound stubs and outbound stubs , respectively , that have been removed from node @xmath347 during the erasing procedure .
then , @xmath382 & \leq p\left ( e^- \geq 1 \right ) \quad \text{and } \\ e \left [ \left| 1(n_1^{(e ) } = i ) - 1(n_1 = i ) \right| \right ] & \leq p\left ( e^+ \geq 1 \right).\end{aligned}\ ] ] by lemma [ l.survivingstubs ] , @xmath383 which completes the proof of part ( a ) .    for part ( b ) we only show the proof for @xmath340 , since the proof for @xmath341 is symmetrical .
fix @xmath223 and use the triangle inequality and the union bound to obtain @xmath384 from the proof of proposition [ p.repeateddistr ] , we know that the second probability converges to zero as @xmath11 , and for the first one use markov s inequality to obtain @xmath385 \\ & \leq \frac{2}{\epsilon } p(e^- \geq 1 ) \to 0,\end{aligned}\ ] ] as @xmath11 , by lemma [ l.survivingstubs ] .
j.  kleinberg , r.  kumar , r.  raghavan , s.  rajagopalan , and a.  tomkins .
, volume 1627 of _ lecture notes in computer science _ , chapter the web as a graph : measurements , models , and methods , pages 117 .
springer - verlag , 1999 .