Some probabilistic trees with algebraic roots

In this article we consider several probabilistic processes defining random grapha. One of these processes appeared recently in connection with a factorization problem in the symmetric group. For each of the probabilistic processes, we prove that the probability for the random graph to be a tree has an extremely simple expression, which is independent of most parameters of the problem. This raises many open questions.


Introduction: an example
In this paper we consider several probabilistic processes defining a random graph. These processes were originally motivated by factorizations problems in the symmetric group investigated in [1]. Our main result is a formula, for each of the probabilistic processes, of the probability that the random graph is a tree. This probability formula turns out to be surprisingly simple, and is in particular independent of most parameters of the processes. This is reminiscent of the result of Kenyon and Winkler [3] about 2-dimensional Branched polymers. We conjecture that more results of this type should hold, but we were not able to prove them.
Before describing our results in full details, let us describe one particular case. Let k be a positive integer. Given a tuple S = (S 1 , . . . , S k−1 ) of k − 1 proper subsets of [k] := {1, 2, . . . , k}, we define G(S) as the digraph having vertex set [k] and arc set {a 1 , . . . , a k−1 }, where the arc a i has origin i and endpoint the unique integer j in [k] \ S i such that {i + 1, i + 2, . . . , j − 1} ⊆ S i , with the integers considered cyclically modulo k. For instance, if k = 7 and S 5 = {1, 3, 6, 7}, then the arc a 5 has origin 5 and endpoint 2. In Figure 1 we have drawn some digraphs G(S) in the case k = 3. We now fix a tuple p = (p 1 , . . . , p k ) of non-negative integers, and choose uniformly at random a tuple S = (S 1 , . . . , S k−1 ) of k − 1 proper subsets of [k] such that for all j ∈ [k] the integer j is contained in exactly p j of the subsets S 1 , . . . , S k−1 . This gives a random digraph G(S). One of the results proved in this paper is that the probability that G(S) is a tree (oriented toward the vertex k) is equal to 1 − p k /(k − 1). This result is unexpectedly simple, especially because it does not depend on the parameters p 1 , . . . , p k−1 .
Let us investigate in more detail the case k = 3 of the aforementioned result. The situation is represented in Figure 1 Figure 1. We represent above the three situations for which the digraph G(S) is a tree, with k = 3 and S = (S 1 , S 2 ).
the events leading to the trees represented in parts (a), (b), and (c) of Figure 1. For instance, Now it is not hard to check that the event C has the same probability as the event Moreover the events A, B and C ′ are disjoint and their union is But since S 1 is by definition a proper subset of {1, 2, 3}, the first condition in the above clause is always satisfied. It follows that as claimed. Observe that the individual probabilities of the trees represented in Figure 1 do depend on the value of p 1 and p 2 , but the sum of these probabilities is independent of p 1 and p 2 . The rest of the paper is organized as follows. In Section 2, we state the main results of the paper. In Section 3, we derive a generalization of the matrix-tree theorem tailored to our needs: it allows us to express the probability that our random graphs are trees as the probability of a "determinant of a matrix of events". In Section 5 we simplify the matrices of events corresponding to our different random processes. In Section 5, we compute the determinant of the matrices of events. This computation uses some sign reversing involutions. We conclude in Section 6 with some conjectures about another random process, and some open questions.

Main results
In this section we fix some notation and state our main results. We denote by |A| the cardinality of a set A. We denote A ⊎ B the disjoint union of two sets A, B. For an integer r and a tuple p = (p 1 , . . . , p k ) of non-negative integers, we denote by S p,r the set of tuples (S 1 , . . . , S r ) such that for all i ∈ [r], S i is a subset of [k] and for all j ∈ [k] the integer j is contained in exactly p j of the subsets S 1 , . . . , S r . We also denote by R p,r the set of tuples (S 1 , . . . , S r ) ∈ S p,r such that S i = [k] for all i ∈ [r].
We now define three ways of associating a digraph to a an element in S p,r , using three mappings α, β, γ. The mappings α, β, γ takes as argument an integer i ∈ [k] and a subset S ⊆ [k] and are defined as follows: The mappings α, β, γ are represented in Figure 2.

Figure 2.
Rules α, β, γ for creating an arc of the complete graph K k (an informal description of the rule is given between quotation marks where i means that i ∈ S).
We now use the mappings α, β, γ to define digraphs. Let S = (S 1 , . . . , S r ) ∈ S p,r , and let f be a surjection from [k − 1] to [r]. For ζ ∈ {α, β, γ}, we define G ζ (S, f ) to be the digraph with vertex set [k] and arc set A = {a 1 , . . . , a k−1 } where a i = (i, ζ(i, S f (i) )) for all i ∈ [k − 1]. For instance, the digraph G(S) defined in Section 1 corresponds to the case r = k − 1 and G(S) = G α (S, Id) where Id is the identity mapping from [k − 1] to [k − 1]. Observe that the graph G ζ (S, f ) has loops unless S ∈ R p,r .
We are now interested in the probability that the digraph G ζ (S, f ) is a tree. Observe that in this case the tree is oriented toward the vertex k (since every vertex in [k − 1] has one outgoing arc). Our main result is the following. Theorem 1. Let k and r be positive integers such that r < k, and let p = (p 1 , . . . , p k ) be a tuple of non-negative integers. Let S = (S 1 , . . . , S r ) be a uniformly random element of R p,r (supposing that this set is non-empty), and let f be a uniformly random surjection from [k − 1] to [r] independent from S. For ζ ∈ {α, β, γ}, let P ζ (p, r) be the probability that the random digraph G ζ (S, f ) is a tree. Then (a) P α (p, r) = 1 − p k /r. This is equal to the probability that k / ∈ S 1 . (b) P β (p, r) = |R q,r−1 |/|R p,r | where q = (p 1 , p 2 − 1, p 3 − 1, . . . , p k − 1). This is equal to the probability that S 1 = {2, 3, . . . , k}.
This is equal to the probability that Observe that the cardinality of R p,r appearing in Theorem 1 can be expressed as the The case (c) of Theorem 1 was needed to complete the combinatorial proof described in [1] of Jackson's formula [2]. Before embarking on the proof of Theorem 1, we make a few remarks. Remark 1. Theorem 1 can be stated in terms of uniformly random tuples S in S p,r instead of in R p,r . More precisely, for ζ ∈ {α, β, γ}, if S is a uniformly random tuple in S p,r , and f is a uniformly random surjection from [k − 1] to [r] independent from S, then the probability for the graph G ζ (S, f ) to be a tree is |Rp,r| |Sp,r| P ζ (p, r). This is simply because the graph G ζ (S, f ) is never a tree if S ∈ S p,r \ R p,r .
Remark 2. In the case r = k − 1, the result of Theorem 1, can be stated without referring to a random surjection f . Indeed, for S ∈ R p,r and ζ ∈ {α, β, γ}, let us define G ζ (S) as the graph G ζ (S, Id) where Id is the identity mapping from [k − 1] to [k − 1]. Then the probability P ζ (p, k−1) that the graph G ζ (S) is a tree has the same expression as in Theorem 1. For instance, the probability that G α (S) is a tree is 1 − p k /(k − 1), as claimed in Section 1. Indeed, in the particular case r = k − 1 of Theorem 1, the surjection f would be a bijection from [k − 1] to [k − 1] independent from S. But then the tuple (S f (1) , . . . , S f (k−1) ) has the same distribution as S = (S 1 , . . . , S k−1 ), hence the surjection f does not affect probabilities.
Remark 3. The results in Theorem 1 would hold for any probability distribution on the tuples S = (S 1 , . . . , S k ) of proper subsets of [k], provided that the probability of a tuple only depends on the total number of occurrences of each integer i ∈ [k]. For instance, the probability that G α (S, f ) is a tree would still be equal to the probability that k / ∈ S 1 for such a probability distribution. This result follows from Theorem 1 since one can always condition on the total number of occurrences of each integer i ∈ [k].

Remark 4.
A slightly weaker version of Theorem 1 can be obtained by not requiring the function f to be surjective. More precisely, for ζ ∈ {α, β, γ} and for any positive integer r, if S is a uniformly random tuple in R p,r , and f is a uniformly random function from [k − 1] to [r] independent from S, then the probability P ζ (p, r) that G ζ (S, f ) has the same expression as in Theorem 1. For instance, the probability that G α (S, f ) is a tree is 1 − p k /r. Indeed, this result follows from Theorem 1 by conditioning on the cardinality of the image Im(f ) of the function f , and by the number of occurrences of each integer i ∈ [k] in the subsets (S j ) j∈Im(f ) . It is actually this version of Theorem 1 (in the case ζ = γ) which was needed in [1].

A probabilistic analogue of the matrix-tree theorem
The matrix-tree theorem is a classical result giving the number of oriented spanning trees of a graph as a determinant; see e.g. [4]. In order to prove Theorem 1, it is tempting to consider the trees on the vertex set [k] as the spanning trees of the complete graph K k , and apply a suitable analogue of the matrix-tree theorem. In this section we develop the framework necessary to establish this suitable analogue.
We first recall the matrix-tree theorem (in its weighted, directed version). Let K n denote the complete digraph having vertex set [n] and arc set A = {(i, j), i = j}. We call spanning tree of K n rooted at n a set of arcs T ⊆ A not containing any cycle and such that every vertex i ∈ [n − 1] is incident to exactly one outgoing arc in T (this is equivalent to asking that T is a spanning tree of K n "oriented toward" the root vertex n). We denote by T n the set of spanning tree of K n rooted at n. Given some weights w(i, j) (taken in a commutative ring) for the arcs (i, j) ∈ A, one defines the weight of a tree T ∈ T n as w(T ) = (i,j)∈T w(i, j). The matrix-tree theorem states that Observe that the matrix-tree theorem gives results about the spanning trees of any digraph G with vertex set [n], because one can restrict its attention to the spanning trees of G simply by setting w(i, j) = 0 for all arcs (i, j) not in G. Observe also that the weights w(n, j) are actually irrelevant in (1).
We will now derive a generalization of the matrix-tree theorem. Let (Ω, A, P) be a probability space, where Ω is the sample set, A is the set of events (which is a σ-algebra on Ω), and P is the probability measure. In our applications, Ω will be a finite set and A will be the powerset P(Ω). Let n be a positive integer and let E = (E i,j ) i∈[n−1],j∈[n] be a matrix whose entries E i,j ∈ A are events. For a tree T ∈ T n , we define the probability of T as Now we aim at expressing T ∈Tn P(T ) as some kind of determinant, and this requires some notation. Let C[A] be the set of (formal) finite linear combinations of events, with coefficients in the field C (i.e., the free C-module with basis A). The elements of C[A] are called generalized events and are of the form λ 1 A 1 + · · · + λ s A s with λ 1 , . . . , λ s ∈ C and A 1 , . . . , A s ∈ A. We then define the ring R = (C[A], +, ∩). Here the intersection operation "∩" is defined to act distributively on C[A], that is, for all A, B, C ∈ A, we set A∩(B+C) = (A∩B)+(A∩C), and moreover for all λ ∈ C we set A∩(λ·B) = λ·(A∩B). We define the determinant of a matrix of generalized events M = (M i,j ) i,j∈[n] as det(M ) = π∈Sn ǫ(π) M 1,π(1) ∩ M 2,π(2) ∩ · · · ∩ M n,π(n) , where S n denotes the set of permutations of [n], and ǫ(π) is the sign of the permutation π.
We also extend the probability measure P from A to C[A] by linearity. More concretely, we set P(λ · A) = λ · P(C) and P(A + B) = P(A) + P(B). We call P-determinant of a matrix of generalized events M = (M i,j ) i,j∈ [n] , and denote by Pdet(M ), the probability of det(M ), that is, We can now state our generalization of the matrix-tree theorem. For a matrix E = (E i,j ) i∈[n−1],j∈[n] of generalized events, we define its reduced Laplacian matrix Observe that if the events E i,j are all independent, then P(T ) = ] so that Proposition 2 reduces to the usual matrix-tree theorem given in (1) for the weights w(i, j) = P(E i,j ).
Proof. The known combinatorial proofs of the matrix-tree theorem actually extend almost verbatim to give Proposition 2. We sketch one such proof, following [5], mainly for the reader's convenience.
By definition, Expanding the right-hand side of (2) leads to a sum over a set that we now describe. Let B n be the set of digraphs with vertex set [n] having exactly one outgoing (nonloop) arc at each vertex i = n, and no outgoing arc at vertex n. Let C n be the set of edge-colored digraphs that can be obtained from digraphs in B n by coloring edges in either in blue or red, in such a way that the blue edges form a disjoint union of simple directed cycles. We claim that where cycle(C) is the number of blue cycles of the colored digraph C. Indeed, the blue arcs of an element C ∈ C n encode a permutation π (the blue arcs are {(i, π(i)), for all i = π(i)}), the red arcs of C encode a summand in the expansion of i∈[n],i=π(i) j =i E i,j (the red arcs form a set of the form {(i, j), for all i = π(i) with j = i}), and the factor (−1) cycle(C) is equal to ǫ(π) · (−1) #{i, π(i) =i} . Now, the digraphs in B n are all the graphs made of a (possibly empty) tree oriented toward the vertex n together with a (possibly empty) set of directed cycles on which are possibly attached oriented trees. Moreover, if one sums the contribution of all the elements C ∈ C n corresponding to the same underlying graph B ∈ B n one gets 0 if there are some directed cycles (because these cycles can be colored either blue or red), and ∩ (i,j)∈B E i,j otherwise (because all the edges have to be red). This gives, and taking probability on both sides gives Pdet(L) = C∈Tn P(C).
Remark. Observe that more generally, for any commutative ring (R, +, ⊗), any abelian group (C, +), and any homomorphism P from (R, +) to (C, +), there is an analogue of the matrix-tree theorem which holds with the same proof: Before closing this section we define an equivalence relation on the set C[A] of generalized events. Let A 1 , . . . , A m , B 1 , . . . , B n be events in A, and let λ 1 , . . . , λ m , ν 1 . . . , ν n be complex numbers. We say that the generalized event For instance, for all E, F ∈ A, the generalized events E ∪ F and E + F − E ∩ F are equivalent. Also the event ∅ and the generalized event 0 are equivalent. It is easy to see that ∼ is an equivalence relation (symmetric, reflexive, transitive) and that if E ∼ F then P(E) = P(F ). Moreover, if . The preceding properties immediately imply the following result.
Lemma 3. If E and F are equivalent matrices of events, then they have the same P-determinant.
We fix r, k, and p as in Theorem 1. We define a probability space (Ω, A, P) in the following way: • Ω is the set of pairs (S, f ), where S is in S p,r and f is a surjection from [k − 1] to [r]. • A is the power set P(Ω), • P is the uniform distribution on Ω. We denote by Ω n the set of triples (S, f, π), where (S, f ) is in Ω and π is a permutation of [n]. For a matrix of events E = (E i,j ) i,j∈[n] we denote by Ω(E) the set of triples We now express the probabilities P ζ (p, r) defined in Theorem 1 as P-determinants. By definition, for ζ ∈ {α, β, γ}, P ζ (p, r) is the conditional probability, in the space (Ω, A, P), that the random digraph G ζ (S, f ) is a tree given that S = (S 1 , . . . , S r ) is in R p,r (equivalently, given that none of the subsets S 1 , . . . , S r is equal to [k]). Since the where T k is the set of spanning tree of K k rooted at k.
We will now use our generalization of the matrix-tree theorem.
Hence by Proposition 2, We will now define a matrix L ′ ζ equivalent to the reduced Laplacian L ζ . For t ∈ [r], and i, j in [k] we define the event I t i,j as follows: Observe we define the following generalized events Here and in the following, we consider the subscripts of the events I t i,j and J t i,j cyclically modulo k; for instance J t 0,j is understood as J t k,j .
It is easy to check that for ζ in {α, β, γ} and for all i Thus, by Lemma 3 the matrices L ′ ζ and L ζ have the same P-determinant. Our findings so far are summarized in the following lemma.
Next we derive simpler determinantal expressions for the probabilities P ζ (p, r).
Example. Let us illustrate Proposition 5 in the case ζ = α and k = 3. In this case, hence by definition of the P-determinant, Proposition 5 asserts that the probability P α (p, r) that the graph G α (S, f ) is a tree is equal to |Sp,r| |Rp,r| Pdet(M α ). We leave as an exercise to prove that the right-hand side of (5) is equal to |Rp,r| |Sp,r| × (1 − p 3 /r) as predicted by Theorem 1.
The rest of this section is devoted to the proof of Proposition 5. We first treat in detail the case ζ = α. Given Lemma 4 we only need to prove Pdet( . Since P-determinants are alternating in the columns of matrices, we can replace the jth column of L ′ α by the sum of its j first columns without changing the P-determinant. This gives, Next, by linearity of the P-determinant in the rows of the matrix, one gets i,j otherwise. We now show that only k of the subsets D contribute to the above sum. Proof. We assume that D contains two distinct integers a and b and want to show that Pdet(M D ) = 0. We will use the expression (3)  So far we have shown that Next, we observe that the set of triples (S, f, π) in Ω(M ∅ ) identifies with the set of triples (S, f, π ′ ) in Ω(M α ) such that π ′ (k) = k. Indeed, the correspondence is simply obtained by replacing the permutation π of [k − 1] by the permutation π ′ of [k] such that π ′ (k) = k, and π ′ (i) = π(i) for all i in [k − 1]. Similarly, for all a ∈ [k − 1], there is a bijection between the set of triples (S, f, π) in Ω(M {a} ) and the set of triples (S, f, π ′ ) in Ω(M α ) such that π ′ (a) = k. Indeed, the bijection is simply obtained by replacing the permutation π of [k − 1] by the permutation π ′ of [k] such that π ′ (a) = k, π ′ (k) = π(a) and π ′ (i) = π(i) for all i = a in [k − 1]. Observe that this bijection changes the sign of the permutation, hence This completes the proof of Proposition 5 in the case ζ = α. The proof of Proposition 5 in the case ζ = β (resp. ζ = γ), is exactly the same as the proof given above for ζ = α, except that the events I t i,j are replaced by J t i,j+1 (resp. J t i,j+1 − J t i−1,j+1 ).

Computing P-determinants using sign reversing involutions
In this section we complete the proof of Theorem 1 by computing the P-determinant of the matrices M ζ for ζ ∈ {α, β, γ}.

5.1.
Computing the P-determinant of the matrix M α . In this section we compute the P-determinant of the matrix M α .
Proposition 7. The P-determinant of the matrix M α defined in Proposition 5 is Note that Proposition 7 together with Proposition 5 prove the case (a) of Theorem 1. In order to prove Proposition 7, we first use the multilinearity of P-determinants with respect to rows. For a ∈ [k], we denote by M (a) = (M  Pdet (N (a) ).
We will now show that Pdet(M (k) ) = |R p,r | |S p,r | × (1 − p k /r), and Pdet(N (a) ) = 0 for all a ∈ {2, 3, . . . , k − 1}, thereby proving Proposition 7. Proof. Since all the entries in the last row of M (k) are equal to Ω, one gets Moreover, the only permutations π contributing to the sum are the identity π = Id k and the transposition π = (k − 1, k), which gives ) is equal to the probability of the event "for all i ∈ [k − 1], the subset S f (i) is a proper subset of [k] and k / ∈ S f (k−1) ". And since f is a surjection from [k − 1] to [r], this event is "the subsets S 1 , . . . , S r are proper subsets of [k] and k / ∈ S f (k−1) ". Thus Pdet(M (k) ) = P(S ∈ R p,r ) × P(k / ∈ S f (k−1) | S ∈ R p,r ).
Lastly, the conditional probability P(k / ∈ S f (k−1) | S ∈ R p,r ) is equal to 1 − p k /r since for any tuple S = (S 1 . . . , S r ) ∈ R p,r there are exactly p k of the r subsets S 1 , . . . , S r containing the integer k. and N a,D a,j are respectively "{a}∪ ]a, j] ⊆ S f (a−1) " and "]a, j] ⊆ S f (a) ". This implies that changing the permutation π into π ′ = π • (a − 1, a) and the surjection f into − 1, a) is the transposition of the integers a − 1 and a) will only change the requirement "a ∈ S f (a−1) " into "a ∈ S f (a) ". Now, this can be achieved by also transferring the element a from S f (a−1) to S f (a) ; and this is what is done in the proof of Lemma 11 below. However, this trick does not work for all triples (S, f, π) ∈ Ω(N a,D ) because the requirement "a ∈ S f (a−1) " might still hold for In those cases, one would think about changing π into π • (a − 1, b) instead; and this is the intuition behind the proof of Lemmas 12 and 13 below. However, this does not work in every case, and one has to deal with a few pathological cases on the side. We mention lastly that there exist matrices of generalized events having a non-zero P-determinant but whose (a−1)th and ath rows coincide with those of N a,D .
In order to prove Lemma 9 we need some notation. We fix an integer a ∈ {2, 3, . . . , k− 1} and a subset D ⊆ [a − 2] We define S k,a as the set of permutations π of [k] such that π(i) = i for all i ∈ [a − 2]. We also define some subsets K i,j of [k] by setting and (i, j) = (a − 1, a − 1). By definition, a triple (S, f, π) ∈ Ω k is in Ω(N a,D ) if and only if the permutation π is in S k,a , and for all i ∈ [k − 1] the subset K i,π(i) is contained in S f (i) . For π ∈ S k,a , f a surjection from [k − 1] to [r], and t ∈ [r] we define the subset Observe that a triple (S, f, π) ∈ Ω k is in Ω(N a,D ) if and only if the permutation π is in S k,a and for all t ∈ [r] the subset R f,π,t is contained in S t . Lastly for j ∈ so that R f,π,f (j) = H f,π,j ∪ K j,π(j) .
We will now show that W = X = Y = Z = 0.
Remark. In the particular case r = k − 1, the surjection f is a bijection and H f,π,j = ∅ for all j. Therefore, in this case X = Ω(N a,D ), while W = Y = Z = ∅.
Lemma 10. The sum W defined in (8) is equal to 0.
Lemma 11. The sum X defined in (8) is equal to 0.
Proof. We first define a mapping φ on X . Let (S, f, π) be in X . Note that a ∈ S f (a−1) (because a ∈ K a−1,π(a−1) ⊆ S f (a−1) ). We now denote by S ′ = (S ′ 1 , . . . , S ′ r ) the tuple obtained from S = (S 1 , . . . , S r ) by exchanging the presence or absence of the integer a between the subsets S f (a−1) and S f (a) . More precisely, S ′ = S if a ∈ S f (a) , and otherwise − 1, a), and π ′ = π • (a − 1, a). We observe the following identities: H f ′ ,π ′ ,a−1 = H f,π,a , and H f ′ ,π ′ ,a = H f,π,a−1 . (10) We will now prove that φ is an involution on X . Observe that this immediately implies that X = 0 because φ changes the sign of the permutation π.
Claim. The mapping φ is an involution on X .
Proof of the claim. Clearly, it suffices to prove that if (S, f, π) is in X then Equations (9) and (10) give Moreover, the set S ′ t does not differ from S t except maybe for the presence or absence of a, hence R f ′ ,π ′ ,t ⊆ S ′ t . Lastly, for t = f (a) = f ′ (a − 1), Equations (9) and (10) give is in X because of (10) (and the fact that (S, f, π) in X ). This completes the proof of the claim, hence X = 0.
Lemma 12. The sum Y defined in (8) is equal to 0.
Proof. We define a partition of Y by declaring that a triple (S, f, π) ∈ Y is in Next, we define a mapping φ on Y by setting φ(S, f, π) = (S, f, π ′ ), with and a ∈ K b,π(b) (such an integer b necessarily exists since a ∈ H f,π,a ). Since the mapping φ clearly changes the sign of the permutation π, showing that φ is an involution on Y would imply Y = 0. In the rest of this proof we show that φ is an involution on Y and in fact an involution on each of the subsets Y 1 , Y 2 , Y 3 . Claim 1. The mapping φ described above is an involution on Y 1 .

Claim 2. The mapping φ is an involution on Y 2 .
Proof of Claim 2. Let (S, f, π) be in Y 2 . We need to prove that (S, f, π ′ ) = φ(S, f, π) is in Y 2 and that b is also the greatest integer in We now show that (S, f, π ′ ) is in Ω (N a,D ), that is, R f,π ′ ,t ⊆ S t for all t ∈ [r]. First, for t = f (a), one has R f,π ′ ,t = R f,π,t ⊆ S t . Second, for t = f (a), we have Hence, S f (a) = [k] and R f,π ′ ,f (a) ⊆ S f (a) . Thus (S, f, π ′ ) is in Ω (N a,D ).
We now prove that (S, f, π ′ ) is in Y 2 . Let c be the unique integer in [k] \ H f,π,a such that ]c, a] ⊆ H f,π,a (the integer c necessarily exists since a ∈ H f,π,a = [k]). We will show (11) a ≤ π(k) < c ≤ b < k, and a ≤ π(b) < c.
Claim 3. The mapping φ is an involution on Y 3 .
Proof of Claim 3. Let (S, f, π) be in Y 3 . We need to prove that (S, f, a ≤ π(a) < b < k, and a ≤ π(b) < b.
Lemma 13. The sum Z defined in (8) is equal to 0.
Proof. The proof of Lemma 13 is very similar to the proof of Lemma 12 (actually, it is identical except "a" is replaced by "a − 1" in certain places). We first define a partition of Z by declaring that a triple (S, f, π) ∈ Z is in , and H f,π,a−1 ∪ K a−1,π(k) = [k], , and H f,π,a−1 ∪ K a−1,π(k) = [k], Next, we define a mapping φ on Z by setting φ(S, f, π) = (S, f, π ′ ), with −1) and a ∈ K b,π(b) (such an integer b necessarily exists since a ∈ H f,π,a−1 ). Since the mapping φ clearly changes the sign of the permutation π, showing that φ is an involution on Z would imply Z = 0. Actually, the proof that φ is an involution on each of the subsets Z 1 , Z 2 , and Z 3 is almost identical to the one of Lemma 12 (for instance, the identities (11) and (12) still hold with c the integer in [k] \ H f,π,a−1 such that ]c, a] ⊆ H f,π,a−1 ) and is left to the reader.

5.2.
Computing the P-determinant of the matrix M β . In this section we compute the P-determinant of the matrix M β .
Proposition 14. The P-determinant of the matrix M β defined in Proposition 5 is Note that Proposition 14 together with Proposition 5 prove the case (b) of Theorem 1. We now sketch the proof of Proposition 14 which is very similar to the proof of Proposition 7. We first use some column and row operations on the matrix M β . Let i,j if i = k and M ′ β,k,j = Ω. Since the matrix M ′ β is obtained from M β by reordering its columns cyclically we get  Figure 4, that is, M Pdet(N (a) ).
Lemma 15. The P-determinant of the matrix M (1) appearing in (14) is Proof. This proof is similar to the one of Lemma 8. One easily gets Moreover, the generalized event inside the argument of P(·) is clearly equivalent to the event "S f (1) = {2, 3, . . . , k} and for all i ∈ {2, . . . , k − 2}, S f (i) is a proper subset of [k]". This event is the same as "S f (1) = {2, 3, . . . , k} and S ∈ R p,r " which has probability We now fix a ∈ {2, 3, . . . , k − 1} and D ⊆ {a+ 1, . . . , k − 1} and proceed to prove that Pdet(N a,D ) = 0. We define S a k as the set of permutations π of [k] such that π(i) = i for all i > a. We also define some subsets . . , a}, and j ∈ [k] \ {i}. By definition, a triple (S, f, π) ∈ Ω k is in Ω (N a,D ), if and only if the permutation π is in S a k , and for all i We now define a partition of the set Ω(N a,D ), by declaring that a triple (S, f, π) ∈ Ω(N a,D ) is in • X if f (a − 1) = f (a), a / ∈ H f,π,a−1 , and a / ∈ H f,π,a , • Y if f (a − 1) = f (a), a / ∈ H f,π,a−1 , and a ∈ H f,π,a , We then show that W = X = Y = Z = 0.
The proof that W = 0 is identical to the proof of Lemma 10. The proof that X = 0 is identical to the proof of Lemma 11. It is done by defining a sign reversing involution φ on X . Explicitly, the mapping φ is defined on X by setting φ(S, f, π) = (S ′ , f ′ , π ′ ), where f ′ = f • (a − 1, a), and π ′ = π • (a − 1, a), and S ′ is obtained from S simply by exchanging the presence or absence of the integer a between the subsets S f (a−1) and S f (a) . The proof that φ is an involution on X is identical to the one given in the proof of Lemma 11.
The proof that Y = 0 is identical to the proof of Lemma 12. It is done by defining a sign reversing involution φ on Y. Explicitly, one considers the partition Y = Y 1 ⊎Y 2 ⊎Y 3 defined exactly as in the proof of Lemma 12. One then defines a mapping φ on Y by setting φ(S, f, π) = (S, f, π ′ ), where π ′ = π • (a, k) (resp. π ′ = π • (b, k), f (a) and a ∈ K b,π(b) . The fact that φ is an involution on Y (actually, on each of the subsets Y 1 , Y 2 , and Y 3 ) is identical to the one given in the proof of Lemma 12.
The proof that Z = 0 is again identical to the proof of Lemma 13. This completes the proof that Pdet(N a,D ) = 0 for all a ∈ {2, 3, . . . , k −1} and all D ⊆ {a+1, . . . , k −1}. This together with Lemma 15 complete the proof of Proposition 14, hence of the case (b) of Theorem 1.

5.3.
Computing the P-determinant of the matrix M γ . In this section we compute the P-determinant of the matrix M γ .
Lemma 16. The P-determinant of the matrix M γ defined in Proposition 5 is given by i,j+1 if i ∈ {a + 1, . . . , k}, and Q Proof of Corollary 17. By Proposition 14, Now for a ∈ [k − 1], permuting cyclically k − a times both the rows and the columns of the matrix Q (a) gives i+a,j+a+1 for i ∈ {k − a + 1, . . . , k − 1}, and R k,j = Ω. Now, by symmetry (obtained by replacing the integer i by i+a in the subsets S 1 , . . . , S r ), the P-determinant Pdet(T (a) ) is obtained from Pdet(M β ) by replacing p i by p i+a for all i ∈ [k], that is, the matrix of events defined by By the multilinearity of P-determinants with respect to the rows, We now show that only k of the subsets D contribute to the above sum.
Proof of the claim. We suppose that the subset D contains the integer a > 1 but not a − 1. We remark that the (a  − 1, a)). We want to prove that φ is an involution on Ω(M D ). Let (S, f, π) ∈ Ω k . It is clear that f • (a, a − 1) is a surjection from [k − 1] to [r] so that φ(S, f, π) is in Ω k . Moreover, it is easy to see from the above remark about the (a − 1)th and ath rows of M D that φ(S, f, π) is in Ω(M D ) (indeed the triple φ(S, f, π) satisfies the condition M D a−1,π(a−1) because (S, f, π) satisfies M D a,π(a) , and φ(S, f, π) satisfies M D a,π(a) because (S, f, π) satisfies M D a−1,π(a−1) ). Thus the mapping φ is an involution of Ω(M D ). Moreover, since the involution φ changes the sign of the permutation π we get Moreover, by definition M ∅ = Q (k) , and it is easy to see, by reordering the rows of M [a] , that for all a ∈ [k − 1] we have Pdet M [a] = (−1) a Pdet(Q (a) ). This completes the proof of Lemma 16, hence of the case (c) of Theorem 1.

Open questions and conjectures
This paper leaves open a few questions. First of all, the proof we obtained of Theorem 1 is not as elegant as we had hoped for, hence the following question: Question 18. Is there a more direct proof of Theorem 1? In particular, can one prove Theorem 1 without using the matrix-tree theorem?
Second, our use of the matrix-tree theorem (for which a "forest version" exists) suggests the following question: Question 19. For ζ ∈ {α, β, δ}, is there a simple expression for the probability that the random graph G ζ (S, f ) is a pseudo-forest, that is, a digraph in which the only cycles are loops (so that the connected components are trees oriented toward a vertex which has a loop)?
More importantly, Theorem 1 gives simple formulas for the probability that certain random graphs are trees. We stumbled over one of these formulas while studying a factorization problem in the symmetric group [1], but it is unclear how general this phenomenon is.
Question 20. Is there a more general theory encompassing Theorem 1?
We conclude with a few conjectures about a random digraph G δ defined analogously to G α , G β , and G γ . Let δ be the mapping taking as argument an integer i ∈ [k] and a subset S ⊆ [k] and defined by δ(i, S) = i if i ∈ S, and otherwise δ(i, S) is the integer j ∈ [k] \ S such that ]i, j − 1] ⊆ S. The mapping δ is represented in Figure 5.  Given a tuple S = (S 1 , . . . , S r ) in S p,r and a surjection f from [k − 1] to [r], we define G δ (S, f ) to be the digraph with vertex set [k] and arc set A = {a 1 , . . . , a k−1 } where a i = (i, δ(i, S f (i) )) for all i ∈ [k − 1]. The following conjecture suggests there is a simple expression for the probability that G δ (S, f ) is a tree.
Conjecture 21. Let k and r be positive integers such that r < k, and let p = (p 1 , . . . , p k ) be a tuple of non-negative integers. Let S = (S 1 , . . . , S r ) be a uniformly random element of R p,r (supposing that this set is non-empty), and let f be a uniformly random surjection from [k − 1] to [r] independent from S. Then the probability P δ (p, r) that the random digraph G δ (S, f ) is a tree is P δ (p, r) = |R p,r−1 | |R p,r | .
This is equal to the probability that S 1 = ∅.
Although we were unable to prove Conjecture 21, we obtained the following analogue of Proposition 5: Pdet(M δ ) = |R p,r−1 | |S p,r | .
One approach to try to prove (15) is to use the multilinearity of P-determinants.