This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

The Curvature of Graph Products

Oliver Knill Department of Mathematics
Harvard University
Cambridge, MA, 02138
(Date: July 18, 2021)
Abstract.

We show that the curvature KGH(x,y)K_{G*H}(x,y) at a point (x,y)(x,y) in the strong product GHG*H of two finite simple graphs is equal to the product KG(x)KH(y)K_{G}(x)K_{H}(y) of the curvatures.

Key words and phrases:
Graph theory, Arithmetic
1991 Mathematics Subject Classification:
05CXX, 68R10

1. The product formula

1.1.

If GG is a finite simple graph with simplex generating function fG(t)=1+f0t+f1t2++fdtd+1f_{G}(t)=1+f_{0}t+f_{1}t^{2}+\cdots+f_{d}t^{d+1}, where fkf_{k} counts the number of complete sub-graphs of GG of dimension kk, the curvature of a vertex xx is defined as KG(x)=10fS(x)(s)𝑑sK_{G}(x)=\int_{-1}^{0}f_{S(x)}(s)\;ds, where S(x)S(x) is the unit sphere of xx, the graph generated by the vertices directly adjacent to xx. Integrating out, the curvature is

K(x)=1f0(S(x))2+f1(S(x))3f2(S(x))4+.K(x)=1-\frac{f_{0}(S(x))}{2}+\frac{f_{1}(S(x))}{3}-\frac{f_{2}(S(x))}{4}+\cdots\;.

The Gauss Bonnet formula [2] is χ(G)=xK(x)\chi(G)=\sum_{x}K(x). The relation appeared first in [17], we explored it in [2] also in Gauss-Bonnet and in particular in a discrete manifold situations. The general Gauss-Bonnet is proven by distributing each term χ(G)=kω(k)\chi(G)=\sum_{k}\omega(k) with ω(k)=(1)dim(k)\omega(k)=(-1)^{{\rm dim}(k)} from a simplex kk with dim(k)+1{\dim}(k)+1 vertices to each vertex in xx, giving each weight dim(k)+1{\rm dim}(k)+1. This Euler handshake argument works for any multi-linear valuation [8].

1.2.

If G,HG,H are two graphs, the strong product GHG*H of GG and HH has as vertices the Cartesian product V(G)×V(H)V(G)\times V(H) of V(G)V(G) and V(H)V(H). Two vertices (a,b),(c,d)(a,b),(c,d) in GHG*H are connected if both projections onto G,HG,H are either an edge in G,HG,H or a vertex in G,HG,H. Together with the discrete union, augmented to an additive group, we get a commutative and associative ring, the Shannon ring of graphs. All quantities like Euler characteristic, curvature or later also the indices iG(x)i_{G}(x) are extended to this ring with χ(A)=χ(A),KG(x)=KG(x)\chi(-A)=\chi(A),K_{-G}(x)=-K_{G}(x). Our result is:

Theorem 1.

KGH(x,y)=KG(x)KH(y)K_{G*H}(x,y)=K_{G}(x)K_{H}(y).

1.3.

Since no simple relations between simplex generating functions of G,HG,H and GHG*H exist, we have not managed yet o get a direct combinatorial proof of this identity. For example, if GG is a complete graph K4K_{4} with ff-vector (4,6,4,1)(4,6,4,1) and HH is a star graph with ff-vector (5,4)(5,4), then the strong product has the ff-vector (20,94,212,277,224,112,32,4)(20,94,212,277,224,112,32,4). Instead, we will show the identity integral geometrically. Curvature is also an expectation of Poincaré-Hopf indices iG,g(x)i_{G,g}(x) [3, 12]. It turns out then that the indices iG,g(x),iH,h(y)i_{G,g}(x),i_{H,h}(y) multiply and give iGH,gh(x,y)i_{G*H,g*h}(x,y). Taking expectations proves the curvature relation.

1.4.

If g(x)g(x) is a scalar function on vertices of GG which is locally injective (=coloring), meaning g(x)g(y)g(x)\neq g(y) if x,yx,y are adjacent in GG, then the Poincaré-Hopf index of gg at xx is ig(x)=1χ(Sg(x))i_{g}(x)=1-\chi(S_{g}(x)), where Sg(x)={yS(x),g(y)<g(x)}S_{g}(x)=\{y\in S(x),g(y)<g(x)\}. The Poincaré-Hopf formula is χ(G)=xig(x)\chi(G)=\sum_{x}i_{g}(x). Similarly as in the Gauss-Bonnet formula, this can be proven by pushing the value ω(x)\omega(x) to the vertex set. But unlike in Gauss-Bonnet, where it is distributed equally, it is pushed onto the vertex in the complete subgraph graph xx, where gg is maximal. For any probability space (Ω,𝒜,P)(\Omega,\mathcal{A},P) of locally injective functions, the index expectation K(x)=E[ig(x)]K(x)={\rm E}[i_{g}(x)] is a curvature. In particular, if (Ω,P)=(x[1,1],x(dx/2))(\Omega,P)=(\prod_{x}[-1,1],\prod_{x}(dx/2)) is a product probability space, then the index expectation is the curvature defined above.

1.5.

An immediate consequence of the product formula is that the Euler characteristic of strong products multiply, a fact which can also be verified using cohomology: If pG(t)=k=0dbk(G)tkp_{G}(t)=\sum_{k=0}^{d}b_{k}(G)t^{k} is the Poincaré polynomial of GG encoding the Betti numbers bk(G)b_{k}(G) then χ(G)=pG(1)\chi(G)=p_{G}(-1) is the Euler characteristic by Poincaré-Hopf. And the Künneth formula implies that Gp(G)G\to p(G) is a ring homomorphism from the Shannon ring to an integer polynomial ring. Of course, this assumes that cohomology is also extended naturally to negative graphs bk(G)=bk(G)b_{k}(-G)=-b_{k}(G). The Künneth formula can be verified quite readily by seeing bkb_{k} as the dimension of the kernel of the Hodge Laplacian restricted to kk-forms. In the strong product the cup product of cohomology is swiftly implemented on the harmonic forms: if ff is a harmonic pp-form and gg is a harmonic qq form, then dfgd^{*}fg is a harmonic (p+q)(p+q)-form. We could get from [13] to [7] without chain homotopy but replace it with the fact that for two arbitrary simplices, the connection graph of G×HG\times H and the Barycentric graph of G×HG\times H are homotopic.

1.6.

We can also compare the product formula Theorem 1 in the context of discrete manifolds. Given two simplicial complexes G,HG,H which are discrete manifolds, then G×HG\times H is a set of sets but not a simplicial complex. We can associate to GG a connection graph GG^{\prime} and to HH a connection graph HH^{\prime} and to G×HG\times H a connection graph (G×H)=GH(G\times H)^{\prime}=G^{\prime}\star H^{\prime}. So, we have for any simplicial complex a natural curvature at every set which has a graph theoretical interpretation and that the curvature K(x,y)=K(x)K(y)K(x,y)=K(x)K(y) again has a graph theoretical interpretation.

1.7.

The theorem can be extended. This becomes clear when one looks at the proof. One way to extend it is to use curvatures defined by arbitrary probability spaces ΩG\Omega_{G} and ΩH\Omega_{H} on functions on G,HG,H and take the product probability space ΩG×ΩH\Omega_{G}\times\Omega_{H} for GHG*H. The curvature K(x)K(x) applies for the Euler characteristic xω(x)\sum_{x}\omega(x) of GG, where ω(x)=(1)dim(x)\omega(x)=(-1)^{{\rm dim}(x)} and the sum is over all complete sub-graphs xx of GG.

1.8.

Limitations appear when leaving properties which are homotopy invariant. There is also a curvature for the Wu characteristic

ω(G)=xyω(x)ω(y)=xK(x),\omega(G)=\sum_{x\sim y}\omega(x)\omega(y)=\sum_{x}K(x)\;,

where the sum to the left is taken over all intersecting simplices x,yx,y written as xyx\sim y for having a non-empty intersection. But the product formula for the Wu curvature does not hold any more. This is no surprise as unlike Euler characteristic, Wu characteristic is not a homotopy invariant but this is of advantage as it leads to a cohomology which can distinguish homotopic but not equivalent fiber bundles [10].

2. The proof

2.1.

It might be that a direct combinatorial check is difficult because we do not have a simple relation between the ff-vectors fGf_{G} and fHf_{H} or ff-functions fG(t)f_{G}(t) and gG(t)g_{G}(t). Similarly as when we struggled 10 years ago to prove that the curvature of discrete (2d1)(2d-1)-dimensional manifolds is constant zero (this is not even defined in the continuum as the Gauss-Bonnet-Chern formula only applies for even dimensional manifolds), we will use integral geometric tools. In the case of odd-dimensional discrete manifolds, we found first an integral geometric proof which could also be done by Dehn-Sommerville considerations [11]. Here however, we deal with a result which holds for all finite simple graphs. Integral geometry [6, 4] might remain as the most elegant approach.

2.2.

The key is to show that the unit sphere S(x,y)S(x,y) at a point (x,y)(x,y) of G×HG\times H is homotopic to the join S(x)S(y)S(x)\oplus S(y). For the join, of two graphs, the simplex generating functions multiply. We need however to go through some homotopy deformation of the unit spheres S(x,y)S(x,y) to see them as the join of S(x)S(x) and S(y)S(y). This pretty much restricts the result to quantities like Euler characteristic which are homotopy invariant. Now as has been known also since half a century, Euler characteristic is the only linear valuation [8] on which has this property. (Homotopy invariance implies invariance under Barycentric refinements for which we know the Barycentric refinement operator explicitly and have it only one eigenvalue 11 which corresponds an eigenvector corresponding to the Euler characteristic.)

2.3.

The actually formula which holds for any finite simple graphs G,HG,H with vertices xV(G)x\in V(G) and yV(H)y\in V(H). Let B(x)B(x) the unit ball of xx, the graph generated by the union of S(x)S(x) and xx.

Lemma 1 (Cylinder relation).

The unit sphere S(x,y)S(x,y) of a vertex (x,y)(x,y) in GHG*H satisfies S(x,y)=S(x)B(y)B(x)S(y)S(x,y)=S(x)*B(y)\cup B(x)*S(y) with intersection set S(x)S(y)S(x)*S(y).

Proof.

This is a direct consequence of the definition of the product. Given a point (a,b)(a,b) in GHG*H which is in S(x,y)S(x,y), then necessarily, aa is in B(x)B(x) and bb is in B(y)B(y). But since (a,b)(a,b) is different from (x,y)(x,y), we either axa\neq x which means we are in S(x)B(y))S(x)*B(y)) or then byb\neq y which means we are in B(x)S(y)B(x)*S(y). ∎

Lemma 2 (Cylinder to Join).

S(x)B(y)B(x)S(y)S(x)*B(y)\cup B(x)*S(y) is homotopic to S(x)S(y)S(x)\oplus S(y), where \oplus is the Zykov join.

Proof.

Every unit ball is a ball (defined as a sphere in which a point is removed) and so contractible. Since B(x)B(x) and B(y)B(y) are contractible, we can deform each of them to a point. What end up with a situation, where every point of S(x)S(x) is connected to every point of S(y)S(y). ∎

2.4.

A picture to visualize is to see S(x,y)S(x,y) as the boundary of a closed cylindrical can. In that case, S(x)S(x) is a 11-circle and S(y)S(y) is a 0-circle consisting of two points. The set S(x)B(y)S(x)*B(y) is the cylindrical mantle of the can. The set B(x)S(y)B(x)*S(y) are the top and bottom lids to the can. To make the deformation, deform the height of the can to zero. Lift the center of the top lid and the center of the bottom lid to get a union of two lids. Now deforming B(y)B(y) to S(y)S(y) will lead to a graph consisting of two unions of S(x)S(x) and S(y)S(y) where each point in S(y)S(y) is connected to every point in S(x)S(x).

2.5.

Let us write \oplus for the join. From the “cylinder to join” lemma we can assume that S(x,y)=S(x)S(y)S(x,y)=S(x)\oplus S(y). But the same also applies to the stable part Sgh(x,y)=Sg(x)Sh(y)S_{gh}^{-}(x,y)=S_{g}^{-}(x)\oplus S_{h}^{-}(y). But this implies then that the indices tensor multiply. We started to work on the simplex generating function in [1]. (It is just a sort of shifted Euler polynomial.)

Proposition 1.

iGH,gh(x,y)=iG,g(x)iH,h(y)i_{G*H,gh}(x,y)=i_{G,g}(x)i_{H,h}(y).

Proof.

In general, for any graphs G,HG,H, we have (1χ(G))(1χ(H))=(1χ(GH))(1-\chi(G))(1-\chi(H))=(1-\chi(G\oplus H)), where GHG\oplus H is the join. This simply follows from the fact that if xx is a (k1)(k-1)-simplex in GG and yy is a (l1)(l-1)-simplex in HH, then (x+y)(x+y) is a (k+l1)(k+l-1)-simplex in G+HG+H. The formula (1χ(SGH,gh(x)))=(1χ(SG,g(x)))(1χ(SH,h(x)))(1-\chi(S_{G*H,g*h}(x)))=(1-\chi(S_{G,g}(x)))(1-\chi(S_{H,h}(x))) follows now from SGH,gh(x,y)S_{G*H,g*h}(x,y) being homotopic to the join of SG,g(x)S_{G,g}(x) and SG,h(y)S_{G,h}(y) and that the Euler characteristic is a homotopy invariant. We have SGH(x,y)=BG(x)SH(y)SG(x)BH(y)S_{G*H}^{-}(x,y)=B_{G}^{-}(x)*S_{H}^{-}(y)\cup S_{G}^{-}(x)*B_{H}^{-}(y), which is homotopic to the join of SHS_{H}^{-} and SGS_{G}^{-}. ∎

2.6.

The proof of the theorem is now straight forward:

Proof.

Take the expectation of the relation given in the Proposition and make use of the fact that the two random variables X(g)=iG,g(x)X(g)=i_{G,g}(x) and Y(h)=iH,h(y)Y(h)=i_{H,h}(y) are independent. The expectation of the product is the product of the expectations. Here is a bit more formal derivation:
a) The random variables gX(g),hY(y)g\to X(g),h\to Y(y) are independent.
b) K(x)=E[X],K(y)=E[Y]K(x)={\rm E}[X],K(y)={\rm E}[Y]
c) K(x,y)=E[XY]=E[X]E[Y]K(x,y)={\rm E}[XY]={\rm E}[X]{\rm E}[Y]. ∎

3. Remarks

3.1.

The Lefschetz fixed point theorem for graphs or simplicial complexes [5] assures that the Lefschetz number χ(G,T)\chi(G,T) (the super trace of TT induced on harmonic forms) of a graph endomorphism T:GGT:G\to G is equal to the sum xFiT(x)\sum_{x\in F}i_{T}(x) of indices of all fixed simplices T(x)=xT(x)=x. The index is ω(x=(1)dim(x)sign(T:xx)\omega(x=(-1)^{{\rm dim}(x)}{\rm sign}(T:x\to x). A special case is the Brouwer fixed point theorem: if GG is homotopic to 11 as then, the Lefschetz number is 11 so that there is at least one simplex xx that is fixed. An other special case is if T:GGT:G\to G is the identity, where the Lefschetz number is the Euler characteristic and iT(x)=ω(x)i_{T}(x)=\omega(x). In that case, χ(G)=xω(x)\chi(G)=\sum_{x}\omega(x) is the definition of Euler characteristic. It is a bit easier to see that the Lefschetz number is compatible with the Shannon product. In the next section, we show why. The key reason is that the cup product implementation on cohomology is by Hodge directly implementable using harmonic forms. As Whitney also realized there is nothing mysterious about the cup product in cohomology: kk-forms are functions on complete sub-graphs with (k+1)(k+1)-elements. The Hodge Laplacian is block diagonal and induces maps on the finite dimensional vector spaces of kk forms. Now, if gg is a harmonic pp form and hh is a harmonic qq form, then the tensor product g(x)h(y)g(x)h(y) is a function on complete p+1+q+1p+1+q+1 graphs but dghd^{*}gh is now a harmonic (p+q)(p+q)-form. This will imply that the Lefschetz number is compatible with the Shannon product.

3.2.

Given two finite simple graphs G,HG,H and two graph endomorphisms T:GG,S:HHT:G\to G,S:H\to H. Then this induces a natural endomorphism on GHG*H as follows: if T:V(G)V(G)T:V(G)\to V(G) and S:V(H)V(H)S:V(H)\to V(H) are the induced maps on vertex sets: then the map TS(v,w)=(T(v),S(w))T*S(v,w)=(T(v),S(w)) is a map on vertices of GHG*H and is again a graph endomorphism on GHG*H. The fixed point sum x=TS(z)iTS(z)\sum_{x=T*S(z)}i_{T*S}(z) is equal to (x=T(x)iT(x))(y=S(y)iS(y)(\sum_{x=T(x)}i_{T}(x))(\sum_{y=S(y)}i_{S}(y). The reason is that every fixed simplex zz of TST*S becomes after projection onto GG or HH a fixed point of TT or SS respectively. Also the Lefschetz number is multiplicative χ(GH,TS)=χ(G,T)χ(H,S)\chi(G*H,T*S)=\chi(G,T)\chi(H,S), as one can see by diagonalizing each T:Hk(G)Hk(G)T:H^{k}(G)\to H^{k}(G) and then see that if T:gk=λkgkT:g_{k}=\lambda_{k}g_{k} on Hk(G)H^{k}(G) and S:hl=μlhlS:h_{l}=\mu_{l}h_{l} then TS:dgkhl=λkμldgkhlT*S:d^{*}g_{k}h_{l}=\lambda_{k}\mu_{l}d^{*}g_{k}h_{l}. If gkg_{k} was a pp-form and hlh_{l} was a qq-form, then dgkhld^{*}g_{k}h_{l} is (p+q)(p+q)-form. The super traces of T,ST,S induced on cohomology (kernels of Hodge Laplacians on pp-forms) therefore multiply. If L(G,T)=p=0(1)ptr(T|Hp(G)Hp(G))=p(1)pkλk,pL(G,T)=\sum_{p=0}(-1)^{p}{\rm tr}(T|H^{p}(G)\to H^{p}(G))=\sum_{p}(-1)^{p}\sum_{k}\lambda_{k,p} and L(H,S)=q=0(1)qtr(T|Hq(H)Hq(H))=q(1)qlμl,qL(H,S)=\sum_{q=0}(-1)^{q}{\rm tr}(T|H^{q}(H)\to H^{q}(H))=\sum_{q}(-1)^{q}\sum_{l}\mu_{l,q}, then L(GH,TS)=p,q(1)p+qk,lλk,pμl,qL(G*H,T*S)=\sum_{p,q}(-1)^{p+q}\sum_{k,l}\lambda_{k,p}\mu_{l,q}.

3.3.

The Cartesian product of two even-dimensional Riemannian manifolds M×NM\times N is a manifold which has Gauss-Bonnet-Chern curvature KM×N(x,y)=KM(x)KN(y)K_{M\times N}(x,y)=K_{M}(x)K_{N}(y), the product of the curvatures of the individual parts. The curvature KM(x)K_{M}(x) is the index expectation E[iM,g(x)]{\rm E}[i_{M,g}(x)] of Poincaré-Hopf indices of Morse functions gg obtained by Nash-embedding MM into an ambient Euclidean space and restricting a linear function to MM. The product formula for curvature could then be derived from the fact that giM,g(x)g\to i_{M,g}(x) and giN,g(y)g\to i_{N,g}(y) are independent random variables in the product probability space. This approach gives a Gauss-Bonnet formula for any probability space on Morse functions. The Gauss-Bonnet Chern version is a special symmetric form in which the probability space of Morse functions is rotationally symmetric.

3.4.

The probabilistic approaches to curvature does not require the curvature to be smooth at all in the manifold case. It could be a divisor for example, like the Poincaré-Hopf indices themselves, which correspond to probability spaces with one point only. If Ω(M),Ω(N)\Omega(M),\Omega(N) are probability spaces and ig(G),ih(G)i_{g}(G),i_{h}(G) divisor-valued random variables, then ig(G),iH(G)i_{g}(G),i_{H}(G) are independent (they become independent random variables after applying a test function: take a finite subset UU of vertices and sum up the ig(G)i_{g}(G) values over UU). In classical Riemannian geometry, one can derive the product formula also from the fact that the Riemann curvature tensor Rijkl(x,y)R_{ijkl}(x,y) at a point (x,y)(x,y) is block diagonal, if the basis in Tx,yM×NT_{x,y}M\times N is adapted to the product because the sectional curvatures Rijkl(x,y)R_{ijkl}(x,y) are then 0 if eiTxMe_{i}\in T_{x}M and eje_{j} in TyNT_{y}N and the basis is an orthonormal basis. We once explored the possibility to to deform a positive curvature manifold so that its index expectation curvature which is positive. [14, 15] were attempts in this direction.

3.5.

Assume now that M,NM,N are discrete pp and qq-manifolds, (where with a discrete pp-manifold we mean a finite simple graph for which all of the unit spheres is a (p1)(p-1)-sphere), we have a Cartesian product in which pairs (x,y)(x,y) are vertices, where xx is a complete sub-graph of MM and NN is a complete subgraph of NN and two points (a,b),(c,d)(a,b),(c,d) are connected if either ac,bda\subset c,b\subset d or ac,bda\supset c,b\supset d. This product is related to the Stanley-Reisner product, when a complex is represented as a polynomial ring and has the property that M×NM\times N is still a manifold. However, the curvature is not the product of the curvatures of MM and NN. The product is also not associative. The only initial drawback of the strong product of two manifolds is no more a manifold. This is not a problem but an opportunity to widen up the notion of discrete d-manifold. One possibility is to require that every unit sphere is homotopic to a (d1)(d-1)-sphere, an other is to allow also unit-spheres which are contractible. We will write about this in some other work.

3.6.

The curvature value K(x)K(x) is defined for all finite simple graphs GG and as in the continuum, the curvature is the index expectation of Poincaré-Hopf indices iG,gi_{G,g}. This is all very general, holding for all finite simple graphs. The continuum in the form of compact Riemannian manifold MM can be seen as a limiting case. Given h>0h>0, and a finite dense enough set of points VV in MM we get a graph by connect points which are close enough d(x,y)<hd(x,y)<h. For example, if n=e1/hn=e^{1/h} are chosen independently then the discrete curvature averaged over a ball of radius 1/h\sqrt{1/h} converges for h0h\to 0 to the classical curvature. We will have to give here more details but the reason is that both the finite graph as well as the compact manifold can both be embedded isometrically into a large dimensional Euclidean space EE. Take in both cases the same probability space of linear functions in EE (which carries a natural Haar measure). The Poincaré-Hopf indices of GG and MM now are very close. In the graph case, the expectation gives the Levit curvature we deal with. In the manifold case, the expectation has to produce Gauss-Bonnet-Chern.

3.7.

The strong product of Shannon [18] was not introduced in a geometric setting at first but as a tool in communication theory. It leads to a nice ring [9] which even can be topologically completed. It shows remarkable compatibility both on topological and spectral level [16]. The strong product GHG*H is often homotopic to a manifold [13] if GG, HH are manifolds. This means that GHG*H is a generalized manifold in which every unit sphere is homotopic to a sphere. The Shannon product is compatible with cohomology which is visible from the fact that the map mapping GG to the Poincaré-polynomial pG(t)=kbk(G)tkp_{G}(t)=\sum_{k}b_{k}(G)t^{k} is a ring homomorphism from the ring (𝒵,+,,0,1)(\mathcal{Z},+,*,0,1) of graphs to the ring [t]\mathbb{Z}[t] of integer polynomials. This requires to extend cohomology to negative graphs as bk(G)=bk(G)b_{k}(-G)=-b_{k}(G). In any case, we have a remarkable compatibility of the Shannon ring both with topology as well as differential geometry.

4. Code

4.1.

The following code computes the curvature, as well as the Poincaré-Hopf indices with respect to some random function.

Generate[A_]:=Sort[Delete[Union[Sort[Flatten[Map[Subsets,A],1]]],1]];
Whitney[G_]:=Generate[FindClique[G, Infinity, All]]; NH=NeighborhoodGraph;
Fvector[G_]:=If[Length[VertexList[G]]==0,{},Delete[BinCounts[Map[Length,Whitney[G]]],1]];
Ffunction[G_,t_]:=Module[{f=Fvector[G]},1+Sum[f[[k]] t^k,{k,Length[f]}]];
EulerChi[G_]:=Module[{f=Fvector[G]},Sum[f[[k]](-1)^(k+1),{k,Length[f]}]];
S[G_,x_]:=Module[{H=NH[G,x]},If[Length[VertexList[H]]<2,Graph[{}],VertexDelete[H,x]]];
Curvature[G_,v_]:=Module[{G1,vl1,n1,k,u},G1=S[G,v];vl1=VertexList[G1]; n1=Length[vl1];
u=Fvector[G1]; 1+Sum[u[[k]]*(-1)^k/(k+1),{k,Length[u]}]];
Curvatures[G_]:=Module[{vl=VertexList[G]},Table[Curvature[G,vl[[k]]],{k,Length[vl]}]];
RandFunction[G_]:=Table[Random[],{Length[VertexList[G]]}];
Indices[G_,g_]:=Module[{v=VertexList[G],w,H,T,u},
Table[ T=S[G,v[[k]]]; u=VertexList[T]; w={};
Do[If[g[[j]]<g[[k]] && MemberQ[u,v[[j]]],w=Append[w,v[[j]]]],{j,Length[v]}];
H=Subgraph[T,w]; 1-EulerChi[H],{k,Length[v]}]]
StrongProduct[G_,H_]:=Module[{v,e={},e1,e2,q,
vG=VertexList[G],vH=VertexList[H],eG=EdgeList[G],eH=EdgeList[H]},
eG=Table[Sort[{eG[[k,1]],eG[[k,2]]}],{k,Length[eG]}];
eH=Table[Sort[{eH[[k,1]],eH[[k,2]]}],{k,Length[eH]}];
v=Partition[Flatten[Table[{vG[[k]],vH[[l]]},{k,Length[vG]},{l,Length[vH]}]],2];
Do[If[v[[k,2]]==v[[l,2]]&&MemberQ[eG,Sort[{v[[k,1]],v[[l,1]]}]],
e=Append[e,v[[k]]->v[[l]]]],{k,Length[v]},{l,Length[v]}];
Do[If[v[[k,1]]==v[[l,1]]&&MemberQ[eH,Sort[{v[[k,2]],v[[l,2]]}]],
e=Append[e,v[[k]]->v[[l]]]],{k,Length[v]},{l,Length[v]}];
e1=Table[{eG[[k,1]],eH[[l,1]]}->{eG[[k,2]],eH[[l,2]]},{k,Length[eG]},{l,Length[eH]}];
e2=Table[{eG[[k,1]],eH[[l,2]]}->{eG[[k,2]],eH[[l,1]]},{k,Length[eG]},{l,Length[eH]}];
q=Flatten[Union[e,e1,e2]]; UndirectedGraph[Graph[v,q]]];
TensProduct[g_,h_]:=Flatten[Table[g[[k]] h[[l]],{k,Length[g]},{l,Length[h]}]];
G=RandomGraph[{8,12}]; g=RandFunction[G]; KG=Curvatures[G]; IG=Indices[G,g];
H=RandomGraph[{7,17}]; h=RandFunction[H]; KH=Curvatures[H]; IH=Indices[H,h];
GH=StrongProduct[G,H]; gh=TensProduct[g,h]; KK=Curvatures[GH];II=Indices[GH,gh];
{TensProduct[IG,IH]==II, TensProduct[KG,KH]==KK, Total[KK]==Total[II]==EulerChi[GH]}

When increasing parameters, finding the list of all complete sub-graphs can be hard to compute. Note that as usual, grabbing code from the PDF does not work. But the source code can as usual be copy pasted from the LaTeX source on the ArXiv:

4.2.

The following code does compute the simplex generating function and so also the number of all complete sub-graphs for any kk recursively using Gauss-Bonnet. While the above version is faster, the following computation is timeless and does not invoke any clique computations. It is elegant but in general slow. It could allow however to push the threshold of possible computations larger. Assume for example you have a graph for which your favorite clique finding algorithm finds the clique generating function for all unit spheres, then one can get the clique generating function of GG.

NH=NeighborhoodGraph; f[G_,t_]:=Module[{v=VertexList[G],e=EdgeList[G],n,w},n=Length[v];
If[e=={},1+n*t,1+Integrate[Sum[w=v[[k]];f[VertexDelete[NH[G,w],w],s],{k,n}],{s,0,t}]]];
S[G_,x_]:=Module[{H=NH[G,x]},If[Length[VertexList[H]]<2,Graph[{}],VertexDelete[H,x]]];
Curvature[G_,x_]:=Module[{f0=f[S[G,x],t]}, Integrate[f0,{t,-1,0}]];
Curvatures[G_]:=Module[{V=VertexList[G]},Table[Curvature[G,V[[k]]],{k,Length[V]}]];
G=RandomGraph[{30,100}]; f0=f[G,t]; EulerChi = 1-f0 /. t->-1; K=Curvatures[G];
Print[EulerChi==Total[K]]; Print[K];
Refer to caption
Figure 1. An example of two graphs. Above we see the curvatures, below the indices taken with a random function.

References

  • [1] O. Knill. The average simplex cardinality of a finite abstract simplicial complex. https://arxiv.org/abs/1905.02118, 1999.
  • [2] O. Knill. A graph theoretical Gauss-Bonnet-Chern theorem.
    http://arxiv.org/abs/1111.5395, 2011.
  • [3] O. Knill. A graph theoretical Poincaré-Hopf theorem.
    http://arxiv.org/abs/1201.1162, 2012.
  • [4] O. Knill. On index expectation and curvature for networks.
    http://arxiv.org/abs/1202.4514, 2012.
  • [5] O. Knill. A Brouwer fixed point theorem for graph endomorphisms. Fixed Point Theory and Appl., 85, 2013.
  • [6] O. Knill. Curvature from graph colorings.
    http://arxiv.org/abs/1410.1217, 2014.
  • [7] O. Knill. The Künneth formula for graphs.
    http://arxiv.org/abs/1505.07518, 2015.
  • [8] O. Knill. Gauss-Bonnet for multi-linear valuations.
    http://arxiv.org/abs/1601.04533, 2016.
  • [9] O. Knill. On the arithmetic of graphs.
    https://arxiv.org/abs/1706.05767, 2017.
  • [10] O. Knill. The cohomology for Wu characteristics.
    https://arxiv.org/abs/1803.1803.067884, 2018.
  • [11] O. Knill. Dehn-Sommerville from Gauss-Bonnet.
    https://arxiv.org/abs/1905.04831, 2019.
  • [12] O. Knill. More on Poincaré-Hopf and Gauss-Bonnet. https://arxiv.org/abs/1912.00577, 2019.
  • [13] O. Knill. Complexes, Graphs, Homotopy, Products and Shannon Capacity.
    https://arxiv.org/abs/2012.07247, 2020.
  • [14] O. Knill. Integral geometric Hopf conjectures. https://arxiv.org/abs/2001.01398, 2020.
  • [15] O. Knill. On index expectation curvature for manifolds. https://arxiv.org/abs/2001.06925, 2020.
  • [16] O. Knill. Remarks about the arithmetic of graphs.
    https://arxiv.org/abs/2106.10093, 2021.
  • [17] N. Levitt. The Euler characteristic is the unique locally determined numerical homotopy invariant of finite complexes. Discrete Comput. Geom., 7:59–67, 1992.
  • [18] C. Shannon. The zero error capacity of a noisy channel. IRE Transactions on Information Theory, 2:8–19, 1956.