Stirling complexes

In this paper we study natural reconfiguration spaces associated to the problem of distributing a fixed number of resources to labeled nodes of a tree network, so that no node is left empty. These spaces turn out to be cubical complexes, which can be thought of as higher-dimensional geometric extensions of the combinatorial Stirling problem of partitioning a set of named objects into non-empty labeled parts. As our main result, we prove that these Stirling complexes are always homotopy equivalent to wedges of spheres of the same dimension. Furthermore, we provide several combinatorial formulae to count these spheres. Somewhat surprisingly, the homotopy type of the Stirling complexes turns out to depend only on the number of resources and the number of the labeled nodes, not on the actual structure of the tree network.


Stirling complexes
1.1.Motivation.Consider the situation where n unique resources need to be distributed among m locations.Clearly, subject to the only condition that n ⩾ m, this can be done in many different ways.Specifically, the number of solutions is equal to m! n m , where n m is the Stirling number of the second kind, which is a classical combinatorial function, counting the number of ways n objects can be partitioned into m non-empty groups, see [GKP, Kn, S].
Imagine furthermore, that the locations, to which the resources are distributed, are connected by a tree network, and that each resource can be shifted from its location to a neighboring one.Simultaneous multiple shifts of different resources are allowed, as long as at any point of this shifting procedure there remain some resources, which are not being moved, in each node.We would like to model this situation by introducing a higher-dimensional parameter space which encodes the interplay of such shifts.In what follows we introduce a family of combinatorial cubical complexes, which fulfill this task.We shall call these complexes the Stirling complexes.
In recent years topology has increasingly been used in applications, most notably in data analysis, see [Ca] and the references therein.The idea of using higher-dimensional cell complexes to record transformations of combinatorial objects has been a further major thread in the tapestry of applied topology.For instance, a family of prodsimplicial complexes has been constructed in [BaK06], see also [BaK07,Ko07,Ko08], to find topological obstructions to graph colorings, a famously notorious problem.Another example is provided by the so-called protocol complexes, which have been introduced as a part of the topological approach to questions in theoretical distributed computing, see [HKR] and the numerous references therein.Optimally, such constructions provide deeper insight into the original combinatorial questions, yielding at the same time interesting, often highly symmetric families of combinatorial cell complexes.
In what follows, we shall use standard facts and terminology of graph theory, as well as algebraic topology.If the need arises, the reader is invited to consult [Har] for graph theory, and [FFG,Fu,GH,Hat,Ko08,Ko20,Mu] for algebraic topology.
1.2.Definition of the Stirling complexes.Let m be an arbitrary integer, m ⩾ 2, and let T be an arbitrary tree on m vertices, labeled with numbers 1 through m.This tree models our network.
Assume furthermore we have n ⩾ m.We can view T as a 1-dimensional simplicial complex, which leads us to considering the cubical complex T n .Let us make the following observations about this complex.
• The cubes of T n are indexed by the n-tuples c = (c 1 , . . ., c n ), where each c i is either a vertex or an edge of T .• The dimension of c is equal to the number of c i 's which are edges.Accordingly, the vertices of T n are indexed by the n-tuples of the vertices of T , the dimension of T n is equal to n, and the top-dimensional cubes are indexed by the n-tuples of the edges.• The boundary cubes of c are obtained by replacing edges in the indexing n-tuple with adjacent vertices.The number of replaced edges is precisely the codimension of the corresponding boundary cube.
We are now ready to define our main objects of study.
since this is the maximal number of resources which can be assigned to the edges of T .
To see this, first choose d resources among n, then assign each resource to one of the m − 1 edges, and then finally distribute the rest of the resources to the nodes, so that no node is left empty.This gives us the following formula for the Euler characteristic: (1.1) In what follows, we shall derive a better formula for χ(Str(T, n)).Example 1.The first interesting example is Str(T, m + 1).The dimension of this Stirling complex is 1, so it is a graph.The numerical data of this graph is the following.
• The number of vertices of Str(T, m + 1) is The vertices of Str(T, m + 1) are indexed by the (m + 1)-tuples of the vertices of T , with one vertex repeating twice and all other vertices occurring exactly once.• As a graph Str(T, m + 1) has (m − 1)(m + 1)! edges; the edges are indexed by (m + 1)-tuples consisting of one edge and m vertices of T , with each vertex repeating exactly once.Accordingly, the Euler characteristic of this Stirling complex is given by It is easy to see using a direct argument that Str(T, m + 1) is always connected.
Therefore it is homotopy equivalent to a wedge of 1 2 (m − 2)(m + 1)! + 1 circles.Consider now the special case when m = 4. Let T 1 be the tree with one vertex of degree 3 and 3 leaves.Let T 2 be the string with 3 edges: it has 2 vertices of degree 2 and 2 leaves.Both Str(T 1 , 5) and Str(T 2 , 5) are connected and have 240 vertices and 360 edges.However, these two graphs are different: Str(T 1 , 5) has 60 vertices with valency 6, and the rest of the vertices with valency 2, whereas all vertices of Str(T 2 , 5) have valency 2 or 4. We see therefore that, while topology of Str(T 1 , 5) and Str(T 2 , 5) is the same, the spaces themselves depend on the actual tree structure of T 1 and T 2 .
Example 2. Next, consider the cubical complexes Str(T, m + 2), for m ⩾ 2. These are 2-dimensional.The number of vertices is given by The number of edges is given by Finally, the number of squares is given by So, Example 3. Switching to considering the small values of m.Set m := 2, so T is just an edge.The complex Str(T, n) is a cubical subdivision of the (n − 2)-dimensional sphere.Str(T, 3) is a hexagon.Str(T, 4) is a rhombic dodecahedron, whose f-vector is (14, 24, 12).
In general the f-vector of Str(T, n), when T is a single edge, is (f 0 , . . ., f n−2 ), where The cubical complex Str(T, n) can be obtained by starting with an n-cube K and then deleting two opposite vertices a and b, together with all smaller cubes in K containing a or b.The author is not aware whether there exists some established terminology for these complexes, beyond the cases n = 3 and n = 4.

The topology of the Stirling complexes
2.1.The formulation of the main theorem.Somewhat surprisingly, our main theorem implies that the homotopy type of the Stirling complexes Str(T, n) only depends on n and on the number of vertices in T , not on the actual tree structure.
Theorem 2.1.Assume T is a tree with m vertices, m ⩾ 2, and n is an integer, n ⩾ m.The cubical complex Str(T, n) is homotopy equivalent to a wedge of (n − m)-dimensional spheres.
Let f(m, n) denote the number of these spheres.Then f(m, n) is given by the following formula In particular, we have Table 2.1 gives the values of f(m, n) for small m and n.It is interesting to think about the implications of Theorem 2.1 for the original problem of resource distribution.Clearly, the fact that Str(T, n) is connected, when n > m, means that, starting from any distribution one can get to any other one by moving the resources.When n > m+1, the space Str(T, n) is simply connected.This means that when two distributions are fixed, any two redistribution schemes from the first distribution to the second one, are homotopic, i.e., there is a simultaneous n \ m 2 3 4 5 6 . . .
redistribution scheme, connecting the two.Even higher connectivity of Str(T, n) means the presence of these higher-dimensional redistribution schemes.Finally, the fact that the homotopy of Str(T, n) is not trivial in the top dimension means that in this dimension there is a number of fundamentally different higher-dimensional redistribution schemes.The number f(m, n) tells us, in a certain sense, just how many of these different schemes there are.
Let us make a few comments on the numerical side.First, by Euler-Poincaré formula, Equation (1.1) could be used instead of Equation (2.1), although the latter is clearly simpler.
Second, let SF(m, n) denote the number of surjective functions from We can then rewrite Equation (2.1) as follows.Proposition 2.2.For all n ⩾ m ⩾ 2, we have Proof.As a simple corollary of the principle of inclusion-exclusion we have the following well-known formula Substituting the right hand side of Equation (2.3) into Equation (2.2), and using the Pascal triangle addition rule for the binomial coefficients, shows that it is equivalent to Equation (2.1).□ Finally, for future reference, we record the following fact.
Proof.This follows from the following well-known polynomial identity where x is a variable, by substituting x := m + 1. □ Proposition 2.3 shows that Equation (2.1) holds for m = n.

2.2.
Relaxing the occupancy requirement.Our proof of Theorem 2.1 proceeds by induction.As it often happens in such situations, it is opportune to deal with a more general class of complexes.In our case, we relax the requirement that each node must have at least one allocated resource.
Definition 2.4.For any cell c of T n , we define Let S be an arbitrary subset of the vertex set of T .We define Str(T, S, n) to be the subcomplex of T n , consisting of all cells c whose support contains S.
Note, that whenever b, c ∈ T n are cubes, such that b ⊆ c, we have supp c ⊆ supp b.In other words, the support of a cell c either stays the same or increases when taking the boundary.This implies that the cubical complex Str(T, S, n) is well-defined.
Extreme values for S give us two special cases: • for S = V(T ), we have Str(T, S, n) = Str(T, n); • for S = ∅, we have Str(T, S, n) = T n , which is contractible as a topological space.
Rather than attacking Theorem 2.1 directly, we shall prove the following, more general result.
Theorem 2.5.The complex Str(T, S, n) is homotopy equivalent to a wedge of (n − |S|)dimensional spheres.The number of spheres is f(|S|, n).
Clearly, Theorem 2.1 is a special case of Theorem 2.5, where S = V(T ).

Homotopy colimits
3.1.The diagrams of topological spaces.Our strategy to prove Theorem 2.5 is to decompose the spaces Str(T, S, n) into simpler pieces and then to manipulate this decomposition, while preserving the homotopy type of the total space.Although there are different ways to formulate our argument, we find it handy to phrase it using the language of homotopy colimits.Let us introduce the corresponding terminology, see also [BoK, Hat, V].
We assume that the reader is familiar with basic category theory, [ML, Mi].Recall, that given a poset P, we can always view P as a category so that • the objects of that category are precisely the elements of P; • for any two elements p, q ∈ P, such that p ⩾ q, there exists a unique morphism from p to q.
The composition rule in this category is clearly uniquely defined, since there is at most one morphism between any two objects.
Recall that Top denotes the category of topological spaces and continuous maps.
Definition 3.1.Assume, we are given a poset P, and we view it as a category.A functor from P to Top is called a diagram of topological spaces over P.
Specifically, a diagram D is a collection of topological spaces D(p), where p ∈ P, together with continuous maps D p,q : D(p) → D(q), where p > q.These maps are subject to the condition D q,r • D p,q = D p,r , whenever p > q > r.
3.2.Homotopy colimits of diagrams over P T .Let T be a an arbitrary tree with m vertices, where m ⩾ 2. We assume that the vertices are indexed by the set [m] = {1, . . ., m}.A poset P T is defined as follows: • the elements of P T are indexed by the vertices and the edges of T ; • the partial order on P T given by saying that each edge is larger than its adjacent vertices.This poset has 2m − 1 elements.The elements indexed by the vertices are minimal, while the elements indexed by the edges are maximal, and each one is larger than exactly 2 minimal elements.
A diagram D of topological spaces over P T is then given by the following data, subject to no further conditions: • spaces D(v) for all vertices of T ; • spaces D(e) for all edges of T ; • continuous maps D e,v : D(e) → D(v), whenever v is a vertex adjacent to the edge e.
Definition 3.2.Assume D is a diagram of topological spaces over a poset P T .We define the homotopy colimit of D, denoted hocolim D, as the quotient space where the equivalence relation ∼ is generated by (x, 0) ∼ D e,v (x), and (x, 1) ∼ D e,w (x), whenever x ∈ D(e), e = (v, w), v < w.
Let us mention that the notion of homotopy colimit can be defined more generally, including homotopy colimits of diagrams of topological spaces over arbitrary posets.Here, we restrict ourselves to Definition 3.2, which will be sufficient for our purposes.
3.3.Homotopy independence of the homotopy colimits of diagrams of CW complexes over P T .From now on, we assume that the spaces D(p) are CW complexes, for all p ∈ P T , and the maps D e,v are cellular.The next proposition says that changing these maps up to homotopy does not change the homotopy type of the homotopy colimit.Proposition 3.3.Assume D and E are diagrams of CW complexes over P T , such that (1) D(p) = E(p), for all p ∈ P T ; (2) the maps D e,v and E e,v are homotopic, whenever e is an edge of T , and v is a vertex adjacent to e. Then hocolim D and hocolim E are homotopy equivalent.
Proof.Since T is finite, it is enough to consider the case where D e,v and E e,v coincide, for all, but one single instance of an edge e and a vertex v.
Decompose the tree T into a union of trees T ′ and T ′′ , such that the intersection of T ′ and T ′′ is vertex v, v is a leaf of T ′ , and T ′ contains the edge e, see Figure 3.1.Let D ′ be the diagram of CW complexes on P T ′ , which is a restriction of D with a slight change at v. Specifically, it is defined as follows: • for any vertex w ∈ V(T ′ ), we have D ′ (w) := D(w), if w v; D(e), otherwise.• D ′ (r) = D(r), for all r ∈ E(T ′ ); • for any edge r ∈ E(T ′ ) and an adjacent vertex w, we have Note that X and Y are CW complexes, and A is a CW subcomplex of X. Set f := D e,v and g := E e,v .Clearly, hocolim D is obtained from Y by attaching X over f, whereas hocolim E is obtained from Y by attaching X over g.We assumed that f is homotopic to G. It is then a general fact, see e.g.[Hat], that the homotopy type of the adjunction space does not change, when the attachment map is replaced by a homotopic one.This implies that hocolim D and hocolim E are homotopy equivalent.□ 3.4.Special homotopy colimits.As above, let T be an arbitrary tree with at least 2 vertices.Let us fix a nonempty subset S ⊆ V(T ).Assume we have a diagram of CW complexes over P T satisfying the following conditions: • D(v) are single points, for all v ∈ S; • D(e) = X, for all e ∈ E(T ), and D(v) = X, for any v S, where X is some fixed CW complex; • the maps D e,v are identity maps, for all v S. Proposition 3.4.Under the conditions above, the homotopy colimit of D is homotopy equivalent to the wedge of |S| − 1 copies of susp X.
Proof.The proof is by induction on the number of vertices of T .
The induction base is when m = 2.We have two cases.Case 1.If S = 1, then hocolim D is a cone over X, hence contractible.Case 2. If S = 2, then hocolim D is obtained by taking a cylinder over X and shrinking each of the end copies of X to a point.This is precisely the suspension space susp X.
From now on we can assume m ⩾ 3. We break our argument in the following cases.Case 1. Assume there exists an internal vertex v ∈ T , such that v ∈ S. Let e 1 , . . ., e k be the edges adjacent to v, k ⩾ 2.
Cutting T at v will decompose T into the trees T 1 , . . ., T k , v is a leaf in each of them, and e i is adjacent to v in T i , for all i = 1, . . ., k; see Figure 3  Each homotopy colimit hocolim D i has a marked point x i corresponding to the copy of D(v).The homotopy colimit hocolim D is obtained by gluing the homotopy colimits hocolim D i together along these points, for i = 1, . . ., k. Accordingly, see that . Since each T i has fewer vertices than T , we know by the induction assumption that hocolim D i is homotopy equivalent to |S i | − 1 copies of susp X. Accordingly, (3.1) implies that hocolim D is homotopy equivalent to a wedge of |S| − 1 copies of susp X. Case 2. All the vertices in S are leaves of T , and there exists a further leaf w S. Assume w is connected to the vertex u.Since m ⩾ 3 and all the vertices in S are leaves, we must have u S. Let T ′ be the tree obtained from T by deleting w and the adjacent edge.Let D ′ be the restriction of D to T ′ .By induction assumption hocolim D ′ is homotopy equivalent to a wedge of |S| − 1 copies of susp X.The space hocolim D is obtained from hocolim D ′ by attaching a cylinder with base X at one of its ends.Clearly hocolim D ′ is a strong deformation of hocolim D, so the latter is also homotopy equivalent to a wedge of |S| − 1 copies of susp X. Case 3. The set S is precisely the set of all leaves of T .Since m ⩾ 3, we have at least 3 leaves.Fix v ∈ S. Say v is connected to w by an edge.We have w S. Let T ′ be the tree obtained from T by deleting v, and let D ′ be the restriction of D to T ′ .The topological space hocolim D is obtained from hocolim D ′ by attaching a cone over X = D(w).Let u ∈ S be any other leaf of T , u v.There is a unique path inside of T ′ connecting w with u.The homotopy colimit of the restriction of D to that path is a cone with apex at D(u) and base at D(w).This cone lies inside hocolim T ′ , therefore the inclusion map D(w) → hocolim D ′ is trivial.It follows that, up to homotopy equivalence, attaching a cone over D(w) to hocolim D ′ is the same as wedging hocolim D ′ with susp X.The result now follows by induction.□ Let us now consider a little more general diagrams.These satisfy the same conditions outside of S, however, for any v ∈ S, the spaces D(v) are now arbitrary connected CW complexes, and each D e,v maps everything to some point in D(v), whenever e is an adjacent edge.In this case, Proposition 3.4 can be generalized as follows.
Proposition 3.5.Under the conditions above the homotopy colimit of D is homotopy equivalent to the wedge (2) c n = v, and there exists 1 ⩽ k ⩽ n − 1, such that c k = v; (3) c n = w, and there exists 1 It is easy to see that this set of cells is closed under taking the boundary, hence the subcomplex B e is well-defined.Furthermore, the complex Str(T, S, n) is the union of the subcomplexes D(v), for v ∈ V(T ), and B e , for e ∈ E(T ).To see this just take any cube (c 1 , . . ., c n ) and sort it according to the value of c n .
Recording the value of c n separately, we can see that, as a cubical complex, each B e is isomorphic to the direct product of Str(T, S, n − 1) with the closed interval [0, 1].This can be seen as a cylinder with base Str(T, S, n − 1).The entire complex Str(T, S, n) is obtained by taking the disjoint union of D(v), for v ∈ V(T ), and connecting them by these cylinders.For each cylinder B e , e = (v, w), its bases are identified with corresponding subcomplexes of D(v) and D(w) by assigning c n := v or c n := w.These are precisely the maps D e,v and D e,w .Comparing this gluing procedure with the definition of hocolim D we see that we obtain a homeomorphic space.□ 4.2.The proof of the main theorem.We are now ready to show our main result.
Proof of Theorem 2.5.First, when |S| = n, the complex Str(T, S, n) is a disjoint union of n! points.This can be viewed as a wedge of n!−1 copies of a 0-dimensional sphere, so the result follows from Proposition 2. (1) If v S, the cubical complex D(v) is isomorphic to Str(T, S, n − 1), and the map D e,v is the identity map.(2) If v ∈ S, the cubical complex D(v) is isomorphic to Str(T, S \ v, n − 1).This is because we know that c n = v, so there is no need to request that v is occupied by some other resource.By induction assumption, the space Str(T, S\v, n−1) is homotopy equivalent to a wedge of spheres of dimension In particular, it is (n − |S| − 1)-connected.Therefore, the map D e,v is homotopic to a trivial map, which takes everything to a point.
Then for all (m, n) ∈ Γ , the value f(m, n) is given by Equation (2.1), which we rewrite as We do that simply by comparing the coefficients of α n−1 on each side of Equation (4.3).For α = m − 1, the coefficient on each side is m − 1.For α = 1, . . ., m − 2, we need to show that This follows from the formula We finish with an open question.
Open Question 1.Let T be a tree with a single internal vertex of valency r, where r ⩾ 2, and let n be any integer, n ⩾ r + 1.The symmetric group S r acts on T by permuting its r leaves.This induces an S r -action on the Stirling complex Str(T, n), and hence also an S raction on H n−r−1 (Str(T, n); R).It would be interesting to decompose this representation of S r into irreducible ones.

Definition 1. 1 .•
Given a tree T with m ⩾ 2 vertices, and a positive integer n, the Stirling complex Str(T, n) is the subcomplex of T n consisting of all n-tuples c = (c 1 , . . ., c n ), such that each vertex of T occurs as an entry in c at least once.Since the condition of Definition 1.1 is preserved by taking the boundary, the Stirling complexes are well-defined.The following facts hold for Stirling complexes.If n < m, the condition in Definition 1.1 cannot be fulfilled, so Str(T, n) is empty in this case.• The complex Str(T, m) consists of m! vertices, indexed by all permutations of the set [m] = {1, . . ., m}. • In general, the vertices of Str(T, n) are indexed by all ways to partition the set [n] into m labeled parts.Accordingly, the number of vertices of Str

1. 3 .
Examples.To acquaint ourselves with the Stirling complexes, let us consider a few further examples.

Figure 1
Figure 1.1.Examples of Str(T, n), when T is an edge.

Figure 3
Figure 3.1.Decomposition of the tree T .

Figure 3
Figure 3.2.Cutting the tree T at v.
3. Assume from now on that n ⩾ |S| + 1.By Proposition 4.1 we can replace Str(T, S, n) by hocolim D. Consider now a map D e,v : D(e) → D(v).By induction, we know that D(e) = Str(T, S, n − 1) is homotopy equivalent to a wedge of spheres of dimension n − 1 − |S|.We make 2 observations.
3 to shift our consideration to the diagram D ′ , which is obtained from D by replacing the maps D e,v by trivial ones, whenever v ∈ S.This diagram has the same homotopy type as D. On the other hand, it now satisfies the conditions of Proposition 3.5, where the connectivity of the spaces D(v) is a consequence of the fact that n ⩾ |S| + 1.It follows from that proposition that hocolim D ≃ ∨ v∈S D(v) ∨ Ω susp Str(T, S, n − 1), where |Ω| = |S| − 1.Counting spheres on both sides, we obtain the recursive formulaf(|S|, n) = (|S| − 1)f(|S|, n − 1) + |S|f(|S| − 1, n − 1).The validity of the formula Equation (2.1) now follows from Proposition 4.3.□ Remark 4.2.After this paper was submitted for publication, a shorter proof of theorem 2.5 was found by one of the referees.It is included in the appendix.Proposition 4.3.Let Γ = {(m, n) ∈ Z × Z | n ⩾ m ⩾ 2}.Assume we have a function f : Γ → Z, which satisfies the following:(1) for all n > m ⩾ 3 we have recursive formula (4.1) f(m, n) = (m − 1)f(m, n − 1) + mf(m − 1, n − 1); Clearly, the recursive rule Equation (4.1) together with the boundary conditions defines the values of the function of the function f(−, −) uniquely.Therefore, to show that f is given by the formula Equation (4.2) we just need to know that this formula satisfies our boundary conditions and the recursion.Substituting m = 2 into Equation (4.2) immediately yields 1 on the right hand side, as there is only one summand, with α = 1.The case m = n follows from Proposition 2.3.To show that Equation (2.1) satisfies the recursion Equation (4 .2.Let D i be the restriction of D to T i , for i = 1, . . ., k.