Markov Processes Involving q -LCB- Stirling Numbers Davide Crippa Klaus Simon Paul Trunz Abstract In this paper we consider the Markov process defined by P1 ; 1 = 1 ; Pn ; ` = -LRB- 1 ? > = n ; ` -RRB- ? Pn ? 1 ; ` + > = n ; ` ? 1 ? Pn ? 1 ; ` ? 1 for transition probabilities > = n ; ` = q ` and > = n ; ` = qn ? 1 . We give closed forms for the distributions and the moments of the underlying random variables . Thereby we observe that the distributions can be easily described in terms of q -LCB- Stirling numbers of the second kind . Their occurrence in a purely time dependent Markov process allows a natural approximation for these numbers through the normal distribution . We also show that these Markov processes describe some parameters related to the study of random graphs as well as to the analysis of algorithms . 1 Introduction In this paper we will study the Markov process defined by P1 ; 1 = 1 Pn ; ` = for ` = 2 f 1 ; : : : ; n g and -LRB- 1 -RRB- Pn ; ` = -LRB- 1 ? > = n ; ` -RRB- Pn ? 1 ; ` + > = n ; ` ? 1 Pn ? 1 ; ` ? 1 otherwise ; where Pn ; ` is the probability distribution of the underlying random variable at discrete time n and > = n ; ` is the transition probability from state ` to state ` + 1 at time n . In particular we will consider some special choices of transition probabilities for which the random variable described by the process assumes a concrete interpretation . The motivation behind this work arises from the average case analysis of combinatorial algorithms , in particular the Simon algorithm -LSB- Sim88 , CS94 -RSB- for computing the transitive closure on acyclic digraphs and the so -LCB- called \ Approximate Counting Algorithm '' -LRB- see -LSB- Fla85 , Mor78 -RSB- -RRB- , a method for \ keeping approximate counts of large numbers in small registers '' . In -LSB- Sim88 -RSB- two variants of the above process have been analyzed , namely : > = n ; ` = 1 ? q ` and > = n ; ` = q ` : For the first transition probability , the underlying random variable models the size of the transitive closure of a node in the random acyclic digraph Gn ;p . Closed forms for its distribution and moments involving q -LCB- hypergeometric series are given in -LSB- SCC93 -RSB- . The second one describes the width of a greedy constructed decomposition of Gn ;p into node disjoint paths -LSB- Sim88 -RSB- as well as the value of the counting register in the \ Approximate Counting Algorithm '' . Flajolet -LSB- Fla85 -RSB- showed that the distribution of this random variable is given by Pn ; ` = ` ? 1 X j = 0 -LRB- ? 1 -RRB- j q -LRB- j2 -RRB- -LRB- 1 ? q ` ? j -RRB- n ? 1 -LRB- q -RRB- j -LRB- q -RRB- ` ? j ? 1 : After having introduced some definitions in Section 2 , in Section 3.1 we will simplify this expression to Pn ; ` = -LRB- 1 ? q -RRB- n ? ` q -LRB- ` 2 -RRB- S2 -LRB- ` ; n ? ` -RRB- ; where S2 -LRB- n ; h -RRB- denotes the q -LCB- Stirling number of the second kind -LSB- Gou61 -RSB- , and we will present closed forms for the first two moments , results which are missing in -LSB- Sim88 -RSB- and -LSB- Fla85 -RSB- . As a nice byproduct we will observe that the same process also models the size of a greedy clique and the size of a greedy stable set . In Section 3.2 then we will deal with another distribution describing the random variable counting number of sources -LRB- or sinks -RRB- in a random acyclic digraph . In this case the transition probability will be given by > = n ; ` = qn ? 1 ; which will lead to Pn ; ` = -LRB- 1 ? q -RRB- n ? ` q -LRB- n2 -RRB- S2 -LRB- ? n ; n ? ` -RRB- : -LRB- 2 -RRB- Note that in this case the transition probability is only dependent on the time n . This allows a simple approximation for the discrete time process , leading to the well -LCB- known backward equation of Kolmogorov -LRB- see -LSB- Fel71 , Volume II , Diffusion Processes -RSB- , -LSB- Gne80 -RSB- -RRB- : @f -LRB- n ; ` -RRB- @n = ? a -LRB- n ; ` -RRB- @f -LRB- n ; ` -RRB- @ ` + 1 2 b -LRB- n ; ` -RRB- @ 2f -LRB- n ; ` -RRB- @ ` 2 -LRB- 3 -RRB- In our case we have a -LRB- n ; ` -RRB- = a -LRB- n -RRB- and b -LRB- n ; ` -RRB- = b -LRB- n -RRB- ; conditions which allow to reduce -LRB- 3 -RRB- to @f -LRB- n ; ` -RRB- @n = 1 2 @ 2f -LRB- n ; l -RRB- @ ` 2 ; whose solution is given by the normal distribution . This approximation together with -LRB- 2 -RRB- results in an approximation for the q -LCB- Stirling numbers of the second kind . 2 Some Definitions In the following let G = -LRB- V ; E -RRB- be a graph with a set of vertices V and a set of edges E ? V ? V . Without loss of generality we will assume that the graph does not contain loops -LRB- i.e. edges with two equal endpoints -RRB- . In later sections we will present some interpretations of the Markov process -LRB- 1 -RRB- related to random graphs . Let us therefore introduce the following model :1 1For more details on random graphs see -LSB- Pal85 -RSB- . Definition 1 The probability space of graphs Gn ;p is defined as the set of graphs with vertex set V = f1 ; : : : ; ng and edge set E = f fi ; jg j i ; j 2 V ; i < > j g for an undirected , E = f -LRB- i ; j -RRB- j i ; j 2 V ; i < > j g for a directed and E = f -LRB- i ; j -RRB- j i ; j 2 V ; i < j g for a directed , acyclic graph , where every edge occurs independently with probability p 2 -LRB- 0 ; 1 -RRB- . In the following we will use the convention of writing q instead of 1 ? p. Throughout this paper we will deal with the so -LCB- called q -LCB- notation , a pure numbertheoretical notation which seems to be the appropriate tool to deal with our kind of problems . Let us therefore introduce the following definitions .2 ffl The q -LCB- shifted factorial is defined for any integer n by -LRB- A ; q -RRB- 0 ? -LRB- A -RRB- 0 = 1 ; -LRB- 4 -RRB- -LRB- A ; q -RRB- n ? -LRB- A -RRB- n = n ? 1 Y j = 0 -LRB- 1 ? A qj -RRB- : -LRB- 5 -RRB- Whenever no misunderstanding can arise , by the q -LCB- shifted factorials as well as by the following q -LCB- formulae we will drop the q. ffl The q -LCB- natural numbers are defined for any integer n by -LSB- n -RSB- q ? -LSB- n -RSB- = 1 ? qn 1 ? q : -LRB- 6 -RRB- ffl The q -LCB- Stirling numbers of the first kind are defined for integers n ; k as the sum of the ? nk ? products with k different factors which may be formed from the first n q -LCB- natural numbers -LSB- 1 -RSB- ; -LSB- 2 -RSB- ; : : : ; -LSB- n -RSB- -LRB- for k = we will define them as 1 -RRB- . We will follow the notation of Gould -LSB- Gou61 -RSB- and denote them by S1 -LRB- n ; k ; q -RRB- ? S1 -LRB- n ; k -RRB- . As an illustration let us compute a few examples : S1 -LRB- 3 ; 0 -RRB- = -LSB- 1 -RSB- = 1 -LRB- definition -RRB- S1 -LRB- 3 ; 1 -RRB- = -LSB- 1 -RSB- + -LSB- 2 -RSB- + -LSB- 3 -RSB- = 3 + 2 q + q2 S1 -LRB- 3 ; 2 -RRB- = -LSB- 1 -RSB- -LSB- 2 -RSB- + -LSB- 1 -RSB- -LSB- 3 -RSB- + -LSB- 2 -RSB- -LSB- 3 -RSB- = 3 + 4 q + 3 q2 + q3 ffl Similarly , the q -LCB- Stirling numbers of the second kind , denoted by S2 -LRB- n ; k ; q -RRB- ? S2 -LRB- n ; k -RRB- , are defined for integers n ; k as the sum of the ? n + k ? 1 k ? products , each with k factors -LRB- repeated factors allowed -RRB- , which may be formed from the first n q -LCB- natural numbers -LSB- 1 -RSB- ; -LSB- 2 -RSB- ; : : : ; -LSB- n -RSB- -LRB- for k = they will be also defined as 1 -RRB- . Again let us compute a few examples : S2 -LRB- 2 ; 0 -RRB- = -LSB- 1 -RSB- = 1 -LRB- definition -RRB- S2 -LRB- 2 ; 1 -RRB- = -LSB- 1 -RSB- + -LSB- 2 -RSB- = 2 + q S2 -LRB- 2 ; 2 -RRB- = -LSB- 1 -RSB- -LSB- 1 -RSB- + -LSB- 1 -RSB- -LSB- 2 -RSB- + -LSB- 2 -RSB- -LSB- 2 -RSB- = 3 + 3 q + q2 S2 -LRB- 2 ; 3 -RRB- = -LSB- 1 -RSB- -LSB- 1 -RSB- -LSB- 1 -RSB- + -LSB- 1 -RSB- -LSB- 1 -RSB- -LSB- 2 -RSB- + -LSB- 1 -RSB- -LSB- 2 -RSB- -LSB- 2 -RSB- + -LSB- 2 -RSB- -LSB- 2 -RSB- -LSB- 2 -RSB- = 4 + 6 q + 4 q2 + q4 2For more details on these topics see -LSB- GR90 -RSB- , -LSB- HW89 -RSB- and -LSB- Gou61 -RSB- . While these definitions are quite simple , they soon become useless because of the large number of terms involved . Let us therefore present recurrences which are more practical in many circumstances : S1 -LRB- n ; k -RRB- = S1 -LRB- n ? 1 ; k -RRB- + -LSB- n -RSB- S1 -LRB- n ? 1 ; k ? 1 -RRB- -LRB- 7 -RRB- S2 -LRB- n ; k -RRB- = S2 -LRB- n ? 1 ; k -RRB- + -LSB- n -RSB- S2 -LRB- n ; k ? 1 -RRB- -LRB- 8 -RRB- The relationship between q -LCB- Stirling numbers of the first kind and q -LCB- Stirling numbers of the second kind is given by S1 -LRB- ? n ? 1 ; k ; 1 = q -RRB- = qk S2 -LRB- n ; k ; q -RRB- -LRB- 9 -RRB- S2 -LRB- ? n ? 1 ; k ; 1 = q -RRB- = qk S1 -LRB- n ; k ; q -RRB- -LRB- 10 -RRB- which can be regarded as definition of q -LCB- Stirling numbers for negative coefficient n. ffl Finally we will define the broken Lambert series as Ln -LRB- q -RRB- def = nX ` = 1 q ` 1 ? q ` ; -LRB- 11 -RRB- notice that the usual Lambert Series , L1 -LRB- q -RRB- , corresponds to the generating function of the divisor -LCB- function . 3 The Markov Process In this section we will consider the Markov process -LRB- 1 -RRB- for two particular transition probabilities , namely > = n ; ` = q ` and > = n ; ` = qn ? 1 : The process with the former one defines a random variable whose distribution was provided in closed form by Flajolet -LSB- Fla85 -RSB- . In Section 3.1 we will simplify this result to an expression involving q -LCB- Stirling numbers and we will also provide closed forms for the first two moments . In Section 3.2 then we will consider the Markov process with the second transition probability . A graphtheoretical interpretation for the underlying random variable will be given together with closed forms for its distribution and moments . 3.1 Transition Probability > = n ; ` = q ` A possible graphtheoretical interpretation for the random variable defined by the process -LRB- 1 -RRB- with transition probability > = n ; ` = q ` is given by the so -LCB- called chain decomposition of a graph . Definition 2 For an acyclic digraph G we inductively define a -LRB- greedy -RRB- chain decomposition as a partition Z = Z1 + ? ? ? + Zk of V satisfying : 1 . For n = 1 the partition Z contains only the path Z1 = 1 . 2 . Let n > = 2 and Z = Z1 + ? ? ? + Z ` be the partition of G not containing the node n . Then either one of the paths Zi ; 1 < = i < = ` , can be extended to n or there is no Zi for which there is an edge between the last vertex of Zi and n . In the first case we extend that Zi to n and in the second one a new path Z ` +1 containing only the node n is added to Z . We say then that G has a decomposition of width k . We will denote by Kn the width of the chain decomposition of a graph belonging to the Gn ;p class ; further we will write Kn ; ` for the probability of having Kn = ` . It is now easy to show that Kn ; ` satisfies the following recursion : K1 ; 1 = 1 and Kn ; ` = -LRB- 1 ? q ` -RRB- Kn ? 1 ; ` + q ` ? 1 Kn ? 1 ; ` ? 1 : -LRB- 12 -RRB- Consider the process in which we build a Gn ;p graph Gn from a graph Gn ? 1 through addition of the node n ; then in Gn we will have ` chains if in Gn ? 1 either there are already ` chains and the node n is connected to at least one of the chain ends , or there are only ` ? 1 chains and n is not connected to any of their ends . The corresponding probabilities are Kn ? 1 ; ` -LRB- 1 ? q ` -RRB- and Kn ? 1 ; ` ? 1 q ` ? 1 ; and thus Kn ; ` satisfies the recursion -LRB- 12 -RRB- . In -LSB- Fla85 -RSB- the following closed form for the distribution Kn ; ` was found using other , mainly analytical , techniques : Kn ; ` = ` ? 1 X j = 0 -LRB- ? 1 -RRB- j q -LRB- j2 -RRB- -LRB- 1 ? q ` ? j -RRB- n ? 1 -LRB- q -RRB- j -LRB- q -RRB- ` ? j ? 1 : -LRB- 13 -RRB- We will simplify this to Theorem 3 The probability Kn ; ` that in Gn ;p the chain decomposition has width ` is given by Kn ; ` = -LRB- 1 ? q -RRB- n ? ` q -LRB- ` 2 -RRB- S2 -LRB- ` ; n ? ` -RRB- -LRB- 14 -RRB- Proof . We will prove -LRB- 14 -RRB- by induction on n. Considering first that K1 ; 1 = 1 , the case n = 1 is established . With -LRB- 12 -RRB- we find further for n > = 2 : Kn ; ` = -LRB- 1 ? q ` -RRB- Kn ? 1 ; ` + q ` ? 1 Kn ? 1 ; ` ? 1 I.H. = -LRB- 1 ? q ` -RRB- -LRB- 1 ? q -RRB- n ? ` ? 1 q -LRB- ` 2 -RRB- S2 -LRB- l ; n ? ` ? 1 -RRB- + q ` ? 1 -LRB- 1 ? q -RRB- n ? ` q -LRB- ` ? 12 -RRB- S2 -LRB- ` ? 1 ; n ? ` -RRB- = -LRB- 1 ? q -RRB- n ? ` q -LRB- ` 2 -RRB- -LRB- -LSB- ` -RSB- S2 -LRB- ` ; n ? ` ? 1 -RRB- + S2 -LRB- ` ? 1 ; n ? ` -RRB- -RRB- | -LCB- z -RCB- -LRB- 8 -RRB- = S2 -LRB- ` ; n ? ` -RRB- : ut In Figure 1 we have plotted the evolving distribution for different values of q . We clearly see that expectation and variance both rise with increasing values of q. kdist .50.5 . .98 . eps 83 ? 66 mm 0.1 0.2 0.3 0.4 10 20 30 40 50 Figure 1 : The evolving distribution of the number of chains in a random acyclic digraph with 50 vertices . The values for q are 0.5 , 0.7 , 0.9 , 0.95 , 0.98 -LRB- from left to right -RRB- . Next we will find closed forms for the first two moments of Kn . Let us start by considering the probability generating function of Kn . Lemma 4 The probability generating function gn -LRB- z -RRB- def = nX ` = 1 z ` Kn ; ` of the random variable Kn has the following closed form : gn -LRB- z -RRB- = n ? 1 X ` = 0 ? n ? 1 ` ? -LRB- ? q -RRB- ` z -LRB- z -RRB- ` : -LRB- 15 -RRB- Proof . Let us define G -LRB- t ; y -RRB- = X n > = 1 ` > = 0 Kn ; ` +1 tn y ` : -LRB- 16 -RRB- Then we have G -LRB- t ; y -RRB- = t + X n > = 2 ` > = 0 Kn ; ` +1 tn y ` = t + X n > = 1 ` > = 0 Kn +1 ; ` +1 tn +1 y ` -LRB- 12 -RRB- = t + X n > = 1 ` > = 0 -LRB- -LRB- 1 ? q ` +1 -RRB- Kn ; ` +1 + q ` Kn ; ` -RRB- tn +1 y ` = t + t G -LRB- t ; y -RRB- ? t q G -LRB- t ; y q -RRB- + y q t G -LRB- t ; y q -RRB- so that G -LRB- t ; y -RRB- = t 1 ? t ? t q -LRB- 1 ? q -RRB- 1 ? t G -LRB- t ; y q -RRB- : Iteration finally yields G -LRB- t ; y -RRB- = X n > = 0 -LRB- ? 1 -RRB- n tn +1 qn -LRB- y -RRB- n -LRB- 1 ? t -RRB- n +1 : -LRB- 17 -RRB- Accordingly we get gn -LRB- z -RRB- = X ` > = 1 z ` Kn ; ` = z X ` > = 1 z ` Kn ; ` +1 = z G -LRB- t ; z -RRB- tn z = z X ` > = 0 -LRB- ? 1 -RRB- ` t ` +1 q ` -LRB- z -RRB- ` -LRB- 1 ? t -RRB- ` +1 tn = z X ` > = 0 X h > = 0 -LRB- ? 1 -RRB- ` t ` + h +1 ? ` + hh ? q ` -LRB- z -RRB- ` tn = z X ` > = 0 -LRB- ? 1 -RRB- ` ? n ? 1 ` ? q ` -LRB- z -RRB- ` : ut From -LRB- 15 -RRB- we can easily derive the expectation and the second moment of Kn . Theorem 5 The expected value of Kn is given by E -LSB- Kn -RSB- = 1 + n ? 1 X ` = 1 ? n ? 1 ` ? -LRB- ? 1 -RRB- ` ? 1 q ` -LRB- q -RRB- ` ? 1 -LRB- 18 -RRB- and the second moment by E -LSB- -LRB- Kn -RRB- 2 -RSB- = E -LSB- Kn -RSB- + 2 n ? 1 X ` = 1 -LRB- ? 1 -RRB- ` +1 q ` -LRB- q -RRB- ` ? 1 ? n ? 1 ` ? -LRB- 1 ? L ` ? 1 -LRB- q -RRB- -RRB- : -LRB- 19 -RRB- Proof . To prove this theorem we notice that '' d dz gn -LRB- z -RRB- # z = 1 = '' nX ` = 1 ` z ` ? 1Kn ; ` # z = 1 = E -LSB- Kn -RSB- and '' d2 dz2 gn -LRB- z -RRB- # z = 1 = '' nX ` = 1 ` -LRB- ` ? 1 -RRB- z ` ? 2Kn ; ` # z = 1 = E -LSB- -LRB- Kn -RRB- 2 -RSB- ? E -LSB- Kn -RSB- : In gn -LRB- z -RRB- the only term containing z is z -LRB- z -RRB- ` so that we only need to determine the first two derivatives of this term . For ` = we have '' d dz z -LRB- z -RRB- 0 # z = 1 = '' d dz z # z = 1 = 1 and for ` > = 1 we find '' d dz z -LRB- z -RRB- ` # z = 1 = '' d dz z -LRB- 1 ? z -RRB- -LRB- zq -RRB- ` ? 1 # z = 1 = -LRB- q -RRB- ` ? 1 : zThereby we denote the coefficient of tn . On the other hand we observe for the second derivative '' d2 dz2 z -LRB- z -RRB- ` # z = 1 = '' d2 dz2 z -LRB- 1 ? z -RRB- -LRB- zq -RRB- ` ? 1 # z = 1 = '' d dz -LRB- 1 ? 2 z -RRB- -LRB- zq -RRB- ` ? 1 + z -LRB- 1 ? z -RRB- d dz -LRB- zq -RRB- ` ? 1 ! # z = 1 = ? 2 -LRB- q -RRB- ` ? 1 ? 2 '' z d dz -LRB- zq -RRB- ` ? 1 # z = 1 | -LCB- z -RCB- ? -LRB- q -RRB- ` ? 1 ` ? 1 X j = 1 qj 1 ? qj = ? -LRB- q -RRB- ` ? 1 -LRB- 2 ? 2 L ` ? 1 -LRB- q -RRB- -RRB- : Expressions -LRB- 18 -RRB- and -LRB- 19 -RRB- follow directly therefrom . ut Note that we can model the number of vertices in a greedy constructed stable set using the same probability process . Instead of dealing with the end vertices of a chain we look at the vertices in the stable set . Further , if we substitute q with p we can also model the number of vertices in a greedy constructed maximal clique using a dual argument . kdisexp50 .70.100 . eps 66 ? 52 mm 20 40 60 80 100 0.2 0.4 0.6 0.8 1 kdisvar50 .70.100 . eps 66 ? 52 mm 2 4 6 8 10 12 0.2 0.4 0.6 0.8 1 Figure 2 : The evolving expectation -LRB- left -RRB- and variance for the number of chains . In Figure 2 we have plotted the evolution of the expectation and the variance of Kn for a random graph with 50 -LRB- lowest curves -RRB- , 70 and 100 nodes . 3.2 Transition Probability > = n ; ` = qn ? 1 In this section we will consider the Markov process -LRB- 1 -RRB- with the transition probability > = n ; ` = qn ? 1 : It turns out that the random variable modeled by this process has another graphtheoretical interpretation , namely the number of sources in a random acyclic digraph . Definition 6 A node v in a digraph G is called a source if it does not have any predecessor . We will denote by Sn the number of sources in a random acyclic digraph drawn from the Gn ;p class . Furthermore we denote by Sn ; ` the probability of having exactly ` sources in such a graph . Again it is not difficult to show that Sn ; ` satisfies the Markov process -LRB- 1 -RRB- with transition probability > = n ; ` = qn ? 1 : -LRB- 20 -RRB- Consider in fact the process in which we build a graph Gn from Gn ? 1 through addition of the node n . The graph Gn can have exactly ` sources if in Gn ? 1 either there exist only ` ? 1 sources and no node of Gn ? 1 is connected to n , or there are already ` sources and there is at least a node in Gn ? 1 connected to n . The corresponding probabilities are Sn ? 1 ; ` ? 1 qn ? 1 and Sn ? 1 ; ` -LRB- 1 ? qn ? 1 -RRB- ; proving therefore what we have asserted . At this point we can show : Theorem 7 Let G be a random acyclic digraph drawn from the Gn ;p model . Then the random variable Sn counting the number of sources in G has the following distribution , expectation and variance : Sn ; ` = -LRB- 1 ? q -RRB- n ? ` q -LRB- n2 -RRB- S2 -LRB- ? n ; n ? ` -RRB- -LRB- 21 -RRB- E -LSB- Sn -RSB- = -LSB- n -RSB- -LRB- 22 -RRB- and Var -LSB- Sn -RSB- = -LSB- n -RSB- q ? -LSB- n -RSB- q2 -LRB- 23 -RRB- Proof . We first prove -LRB- 21 -RRB- by induction on n. For n = 1 the equation is satisfied , so let us assume n > = 2 . Using -LRB- 1 -RRB- and -LRB- 20 -RRB- we get Sn ; ` = -LRB- 1 ? qn ? 1 -RRB- Sn ? 1 ; ` + qn ? 1 Sn ? 1 ; ` ? 1 I.H. = -LRB- 1 ? qn ? 1 -RRB- -LRB- 1 ? q -RRB- n ? ` ? 1 q -LRB- n ? 12 -RRB- S2 -LRB- ? n + 1 ; n ? ` ? 1 -RRB- + qn ? 1 -LRB- 1 ? q -RRB- n ? ` q -LRB- n ? 12 -RRB- S2 -LRB- ? n + 1 ; n ? ` -RRB- = -LRB- 1 ? q -RRB- n ? ` q -LRB- n2 -RRB- -LSB- n ? 1 -RSB- qn ? 1 S2 -LRB- ? n + 1 ; n ? ` ? 1 -RRB- + S2 -LRB- ? n + 1 ; n ? ` -RRB- ! -LRB- 8 -RRB- = -LRB- 1 ? q -RRB- n ? ` q -LRB- n2 -RRB- -LSB- n ? 1 -RSB- qn ? 1 S2 -LRB- ? n + 1 ; n ? ` ? 1 -RRB- + S2 -LRB- ? n ; n ? ` -RRB- + -LSB- ? n + 1 -RSB- S2 -LRB- ? n + 1 ; n ? ` ? 1 -RRB- ? = -LRB- 1 ? q -RRB- n ? ` q -LRB- n2 -RRB- ? S2 -LRB- ? n ; n ? ` -RRB- + ? -LSB- n ? 1 -RSB- qn ? 1 + -LSB- ? n + 1 -RSB- ? | -LCB- z -RCB- S2 -LRB- ? n + 1 ; n ? ` ? 1 -RRB- ? : Let us now define the random variables Vi ; 1 < = i < = n , taking value 1 if node i is a source and otherwise . Vi has therefore a Bernoulli distribution with probability qi ? 1 , namely the probability that node i is a source in G. Accordingly we get E -LSB- Vi -RSB- = qi ? 1 and Var -LSB- Vi -RSB- = qi ? 1 -LRB- 1 ? qi ? 1 -RRB- : This leads immediately to E -LSB- Sn -RSB- = E -LSB- nX i = 1 Vi -RSB- = nX i = 1 E -LSB- Vi -RSB- = nX i = 1 qi ? 1 = 1 ? qn 1 ? q = -LSB- n -RSB- : On the other hand , the Vi 's are pairwise independent random variables and hence we get Var -LSB- Sn -RSB- = nX i = 1 Var -LSB- Vi -RSB- = nX i = 1 qi ? 1 -LRB- 1 ? qi ? 1 -RRB- = 1 ? qn 1 ? q ? 1 ? -LRB- q2 -RRB- n 1 ? q2 = -LSB- n -RSB- q ? -LSB- n -RSB- q2 : ut We have plotted in Figure 3 the evolution of the distribution representing the number of sources in a random acyclic digraph with 50 vertices and q going from 0.5 to 0.98 . source50 .5 . .98 . eps 83 ? 66 mm 0.1 0.2 0.3 0.4 10 20 30 40 50 Figure 3 : The evolving distribution of the number of sources in a random acyclic digraph with 50 vertices . The values for q are 0.5 , 0.7 , 0.9 , 0.95 , 0.98 -LRB- from left to right -RRB- . sourcesexp50 .70.100 . eps 66 ? 52 mm 20 40 60 80 0.2 0.4 0.6 0.8 1 sourcesvar50 .70.100 . eps 66 ? 52 mm 5 10 15 20 0.2 0.4 0.6 0.8 1 Figure 4 : The evolving expectation -LRB- left -RRB- and variance for the number of sources . In Figure 4 we have plotted the evolution of the expectation and the variance of Sn for a random graph with 50 -LRB- lowest curves -RRB- , 70 and 100 nodes . In this section we have presented a distribution which describes the number of sources in a random directed acyclic graph . Note that for symmetry reasons the same process can also be used to describe the number of sinks in a random acyclic digraph . This holds even though the process which describes the number sinks is completely different from the process describing the number sources . 4 Approximations In this section we will consider the approximation of the discrete distribution Sn ; ` by a function f -LRB- n ; ` -RRB- , continuous in both variables . The classical example for this kind of approach is the binomial distribution BIN -LRB- n ; p -RRB- Bn ; ` = n ` ! p ` -LRB- 1 ? p -RRB- n ? ` -LRB- 24 -RRB- which can be approximated by the normal distribution N -LRB- ? ; oe2 -RRB- Nn ; ` = 1 p2 ss oe2 exp ` ? ? oe2 ! -LRB- 25 -RRB- with expectation ? = np and variance oe2 = p -LRB- 1 ? p -RRB- n : A simple approach leading to these results comes from the interpretation of the normal distribution as a diffusion process . One dimensional diffusion processes can by described by the partial differential equation @f -LRB- x ; t -RRB- @t = ? a -LRB- x ; t -RRB- @f -LRB- x ; t -RRB- @x + 1 2 b -LRB- x ; t -RRB- @ 2f -LRB- x ; t -RRB- @x2 ; -LRB- 26 -RRB- known as Kolmogorov backward equation -LRB- see -LSB- Fel71 -RSB- -RRB- . Let Y -LRB- t -RRB- be a random variable describing the position of a particle at time t and let f -LRB- x ; t -RRB- be the probability function of Y -LRB- t -RRB- . Further let the random variable Yx ; t -LRB- o -RRB- describe the position of the particle at time o > = t on the condition that Y -LRB- t -RRB- = x . Then f -LRB- x ; t -RRB- satisfies equation -LRB- 26 -RRB- and the coefficients a -LRB- x ; t -RRB- and b -LRB- x ; t -RRB- are given by a -LRB- x ; t -RRB- = lim ? t ! 0 1 ? t E -LSB- Yx ; t -LRB- t + ? t -RRB- ? Yx ; t -LRB- t -RRB- -RSB- -LRB- 27 -RRB- b -LRB- x ; t -RRB- = lim ? t ! 0 1 ? t E -LSB- -LRB- Yx ; t -LRB- t + ? t -RRB- ? Yx ; t -LRB- t -RRB- -RRB- 2 -RSB- : -LRB- 28 -RRB- From a physical point of view a -LRB- x ; t -RRB- represents the mean speed value of Y -LRB- t -RRB- at position x and b -LRB- x ; t -RRB- is proportional to the mean kinetic energy of the system . The simplest nontrivial case in which we can solve equation -LRB- 26 -RRB- is given by a -LRB- x ; t -RRB- = and b -LRB- x ; t -RRB- = 1 ; reducing the Kolmogorov equation to @f -LRB- x ; t -RRB- @t = 1 2 @ 2f -LRB- x ; t -RRB- @x2 : -LRB- 29 -RRB- This process describes the Brownian motion and in this case the solution of -LRB- 29 -RRB- is the normal distribution N -LRB- 0 ; 1 -RRB- . The connection between a Markov process of type -LRB- 1 -RRB- and a diffusion process arises from the interpretation of n as time and ` as position . Then the Markov process corresponds to a diffusion process -LRB- see -LSB- Ris84 -RSB- -RRB- with a -LRB- n ; ` -RRB- ss > = n ; ` and b -LRB- n ; ` -RRB- ss > = n ; ` : Unfortunately equation -LRB- 26 -RRB- is not easy to solve in the general case . However , if a and b are dependent only on the time and not on the position , i.e. a -LRB- t ; x -RRB- = a -LRB- t -RRB- and b -LRB- t ; x -RRB- = b -LRB- t -RRB- ; then we can apply a variable substitution to -LRB- 26 -RRB- -LRB- see -LSB- Gne80 , x53 , x54 -RSB- -RRB- and reduce it to -LRB- 29 -RRB- , whose solution will be given by N -LRB- ? ; oe2 -RRB- . This is exactly the case for the random variable Sn . As we already have closed forms for its expectation and variance it seems natural to use them in the normal distribution . Accordingly we get Sn ; ` ss 1 q 2 ss Var -LSB- Sn -RSB- exp ? 1 2 -LRB- ` ? E -LSB- Sn -RSB- -RRB- 2 Var -LSB- Sn -RSB- ! = 1 q 2 ss -LRB- -LSB- n -RSB- q ? -LSB- n -RSB- q2 -RRB- exp ? 1 2 -LRB- ` ? -LSB- n -RSB- -RRB- 2 -LSB- n -RSB- q ? -LSB- n -RSB- q2 ! : This together with the exact formula -LRB- 21 -RRB- for the distribution results in the following approximation for the q -LCB- Stirling numbers of the second kind : S2 -LRB- ? n ; ` -RRB- ss -LRB- 1 ? q -RRB- ? ` q ? -LRB- n2 -RRB- 1 q 2 ss -LRB- -LSB- n -RSB- q ? -LSB- n -RSB- q2 -RRB- exp ? 1 2 -LRB- ` ? -LSB- n -RSB- -RRB- 2 -LSB- n -RSB- q ? -LSB- n -RSB- q2 ! : -LRB- 30 -RRB- largeSource50 .5.9 . eps 83 ? 66 mm 0.1 0.2 0.3 0.4 10 20 30 40 50 Figure 5 : Source distribution and its approximation in a graph with 50 nodes for q = :5 -LRB- left curves -RRB- and q = :9 . This approximation for Sn ; ` seems to be pretty good as we can see in Figure 5 . However , there are some remarks to be done . While the distribution is very well approximated for values of ` such that Sn ; ` is significantly above 0 , the approximation becomes too small for values of ` such that Sn ; ` is close to 0 . In the latter case the approximation may deviate from the correct value by several orders of magnitude . This is still a very small difference in absolute terms , but if we let ~ Sn ; ` be the value computed with the approximation formula , then the relative error , computed as Sn ; ` ? ~ Sn ; ` ~ Sn ; ` ; may be a very large factor . In Figure 6 we have plotted the absolute and relative error between the distribution and the approximation for n = 50 and q = :9 -LRB- see Figure 5 -RRB- . abserror .9 . eps 66 ? 52 mm -0.006 -0.004 -0.002 0.002 0.004 0.006 10 20 30 40 50 relerror .9 . eps 66 ? 52 mm -1 1 2 3 10 20 30 40 50 Figure 6 : Absolute -LRB- left -RRB- and relative -LRB- right -RRB- error between the source distribution and its approximation for n = 50 , q = :9 . In Figure 7 we have plotted relative difference between the q -LCB- Stirling numbers of the second kind and their approximation . qstirreldiff .50 . eps 76 ? 60 mm -1 1 2 3 10 20 30 40 50 Figure 7 : Relative difference between q -LCB- Stirling numbers of the second kind and their approximation for n = 50 and q = :9 . As we can see , the situation for the q -LCB- Stirling numbers is similar . The approximation is pretty accurate around the expected value of the source distribution , but the accuracy is rather poor in the regions where the source distribution has values close to 0 . If we look at Figure 4 it becomes clear that expectation and variance become larger for values of q near 1 . As a large variance implies a flat curve , for values of q close to 1 there will be a good number of values ` for which Sn ; ` is sufficiently large . On the other hand , for values of q significantly deviating from 1 the approximation becomes inaccurate for most of the ` -LCB- values . Nonetheless , for graph theory purposes the values of q close to 1 are the most interesting , since we usually deal with sparse graphs . 5 Concluding Remarks In this paper we have studied the random variable described by a general Markov process for two particular transition probabilities . It turns out that the distributions of these two random variables can be easily described in terms of q -LCB- Stirling numbers of the second kind . As far as we know this is the first time that these numbertheoretical functions arise in conjunction with a probability distribution . One of the two random variables , the number of sources in a random acyclic digraph , has a transition probability which is only time dependent . This has allowed us to determine an approximation for its distribution through the normal distribution , leading finally to an approximation for some q -LCB- Stirling numbers of the second kind . By the transform -LRB- 9 -RRB- we get then an approximation for some q -LCB- Stirling numbers of the first kind . Although these approximations are not satisfactory over all range of parameters , they definitely represent a first approach to the approximation of q -LCB- Stirling numbers , a result that would be very meaningful to the theory of q-hypergeometric series . Aknowledgments : The authors would like to express their gratitude to Prof. George E. Andrews for a fruitful discussion of these results . References -LSB- CS94 -RSB- D. Crippa and K. Simon . q -LCB- Distributions in Random Graphs : Transitive Closure and Reduction . Technical report , ETH Zurich , Dept. of Computer Science , 1994 . -LSB- Fel71 -RSB- W. Feller . An Introduction to Probability Theory and Its Applications , volume 1 . John Wiley & Sons , 3 . edition , 1971 . -LSB- Fla85 -RSB- P. Flajolet . Approximate Counting : A Detailed Analysis . BIT , 25:113 -LCB- 134 , 1985 . -LSB- Gne80 -RSB- B. Gnedenko . Lehrbuch der Wahrscheinlichkeitsrechnung , volume 274 . Verlag Harri Deutsch , 1980 . -LSB- Gou61 -RSB- H.W. Gould . The q -LCB- Stirling Numbers of First and Second Kinds . Duke Mathematical Journal , 28:281 -LCB- 289 , 1961 . -LSB- GR90 -RSB- G. Gasper and M. Rahman . Basic Hypergeometric Series . Cambridge University Press , 1990 . -LSB- HW89 -RSB- G. Hardy and E. Wright . An Introduction to the Theory of Numbers . Oxford Science Publications , 1989 . -LSB- Mor78 -RSB- R. Morris . Counting Large Numbers of Events in Small Registers . Communications of the ACM , 21 -LRB- 10 -RRB- :840 -LCB- 842 , 1978 . -LSB- Pal85 -RSB- E.M. Palmer . Graphical Evolution . Wiley-Interscience , 1985 . -LSB- Ris84 -RSB- H. Risken . The Fokker -LCB- Planck Equation . Springer -LCB- Verlag , 1984 . -LSB- SCC93 -RSB- K. Simon , D. Crippa , and F. Collenberg . On the Distribution of the Transitive Closure in Random Acyclic Digraphs . Lecture Notes in Computer Science , 726:345 -LCB- 356 , 1993 . -LSB- Sim88 -RSB- K. Simon . Improved Algorithm for Transitive Closure on Acyclic Digraphs . Theoretical Computer Science , 58:325 -LCB- 346 , 1988 .

B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O

approximate counting
markov processes
random graphs