1 Introduction

Cohomology theories of directed graphs (shortly, digraphs) have become extremely important tools and are, nowadays, of central interest for the mathematical and scientific community. This is mainly due to the emergence of new techniques in Topological Data Analysis, which hinge on (co)homological and homotopical methods.

In this paper, we are concerned with a cohomology theory of digraphs called multipath cohomology [7] and denoted by \(\textrm{H}_{\mu }^*\). This is defined as the poset homology [7, 8] of the path poset (cf. [22]). More abstractly, multipath cohomology can be seen as a functor cohomology, or as a cellular cohomology [9]—see [7, Sect. 6] for a comparison. The main advantage of using poset homology over functor/cellular cohomology is its amenability to computations. In view of the discussion in [7, Sect. 6], the computations provided here yield information about the functor and cellular cohomology groups of (a mild modification of) path posets.

The goal of this paper is to analyse how the combinatorics of the path poset may affect multipath cohomology. As a by-product, we develop a number of techniques that can be used to explicitly compute \(\textrm{H}_{\mu }^*\) with coefficients in a field. A first application is the following theorem (see Theorem 5.9);

Theorem 1.1

Let \(\texttt{L}\) be an oriented linear graph and \({\mathbb {K}}\) be a field. Then, there exist integers h, \(k_1,\dots ,k_h\), which are combinatorially determined by \(\texttt{L}\), such that the multipath cohomology of \(\texttt{L}\) is trivial if \(k_i\equiv 0 \mod 3\) and \(1 \le i< h\); otherwise, multipath cohomology decomposes as the tensor product of graded modules, as follows

$$\begin{aligned} \quad \textrm{H}_{\mu }^{* + h - 1}(\texttt{L};{\mathbb {K}})= \textrm{H}_{\mu }^*\left( \texttt{A}_{3\lfloor k_1/3 \rfloor }; {\mathbb {K}}\right) \otimes \dots \otimes \textrm{H}_{\mu }^*\left( \texttt{A}_{3\lfloor k_{h-1}/3 \rfloor }; {\mathbb {K}}\right) \otimes \textrm{H}_{\mu }^*(\texttt{A}_{k_h} ; {\mathbb {K}}) \ , \end{aligned}$$

where each factor

$$\begin{aligned} \textrm{H}_{\mu }^k(\texttt{A}_n; {\mathbb {K}}) = {\left\{ \begin{array}{ll} {\mathbb {K}}&{} \mathrm{{if }}\, n=3(k-1)+2 \,\,\mathrm{{ or }}\, n=3k,\\ 0 &{} \mathrm{{otherwise}} \\ \end{array}\right. } \end{aligned}$$

is the multipath cohomology group of an alternating graph \(\texttt{A}_n\) – cf. Fig. 1.

Fig. 1
figure 1

An alternating graph on \(n+1\) vertices. The edge between \(v_{n -1} \) and \(v_{n}\) can be oriented either way depending on the parity of n

This result, together with the methods involved in its proof, proves that the multipath cohomology of a digraph captures relevant combinatorial information. Among other implications, our computations reveal the non-triviality of multipath cohomology, in the sense of the following theorem (see Proposition 4.17);

Theorem 1.2

The multipath cohomology \(\textrm{H}_{\mu }^*(-;{\mathbb {K}})\) with coefficients in a field \({\mathbb {K}}\) can be supported in arbitrarily high degree and can be of arbitrarily high dimension.

Our interest in the combinatorial properties of the path poset is not limited to the purpose of understanding multipath cohomology groups, but it extends to its connections with the so-called monotone properties. A property of (di)graphs is called monotone if it is preserved under deletion of edges—e.g. being acyclic, being a forest, etc.—and the study of the homotopy type of simplicial complexes associated with monotone properties of (di)graphs is a central topic in combinatorial topology; see, for instance, the classical papers [1, 6, 13, 23], as well as the more recent works [4, 17, 19]. The study of a simplicial complex associated with the path poset fits into this framework.

In the last part of the paper, we describe the relationship between multipaths and simplicial complexes. We show that for a given digraph \(\texttt{G} \), there exists a simplicial complex \(X(\texttt{G} )\) whose (reduced) simplicial cohomology is the multipath cohomology of \(\texttt{G} \)—see Theorem 6.5;

Theorem 1.3

For each \(n \ge 0\), the multipath cohomology group \(\textrm{H}_\mu ^n(\texttt{G} ;{\mathbb {K}})\) of \(\texttt{G} \) is isomorphic to the ordinary homology \(\widetilde{\textrm{H}}^{n-1}(X(\texttt{G} );{\mathbb {K}})\).

In virtue of this theorem, we reinterpret some of our combinatorial results—for instance, we reprove a Mayer–Vietoris theorem for multipath cohomology. Then, we turn to the question of which simplicial complexes arise as multipath complexes. Among others, we observe that all wedges of spheres of the same dimension can be obtained in this way (Example 6.9 and Proposition 6.12). It remains open the problem of whether all wedges of spheres, or more complicated spaces, can be realised as \(X(\texttt{G} )\)—cf. Questions 6.13 and 6.15.

1.1 On the combinatorial techniques

The construction of multipath cohomology with arbitrary coefficients (algebras and bimodules) is quite abstract. One first associates to a digraph \(\texttt{G} \) its path poset. Then, using the fact that every poset can be seen as a category, certain abstract categorical constructions can be used to define the multipath cohomology of \(\texttt{G} \). In this process, the combinatorial information provided by the graph is somehow obscured. However, when restricting to coefficients in the base ring, instead of a general algebra, computations can be carried over the path poset. It becomes therefore useful to develop combinatorial tools to study path posets. We rely on the gluing construction \(\nabla \) (cf. Definition 3.2) to provide the description of a path poset in terms of simpler path posets (cf. Theorem 3.5). The decomposition in terms of the gluing construction \(\nabla \), together with a Mayer–Vietoris type result for multipath cohomology, provides useful acyclicity criteria (Criteria A and B). These criteria can be applied to compute explicitly the cohomology of a number of graphs, see Table 1.

Table 1 Some digraphs and their respective multipath cohomologies

We also develop a deletion–contraction type result for multipath cohomology with coefficients in an algebra A (Theorem 5.10). This result allows us to give a recursive formula for the (graded) Euler characteristic of \(\texttt{A}_n\), which shows how the complexity of multipath cohomology increases in case \(A\ne R\), and to prove the analogue of [18, Lemma 3.3]—see Corollary 5.12. We conclude by noting that Corollary 5.12 can be proved, in case A is commutative, by using the deletion–contraction long exact sequence in chromatic homology [11].

1.2 Conventions

Typewriter font, e.g. \(\texttt{G} \), \(\texttt{H} \), etc., are used to denote finite graphs (both directed and unoriented). All base rings are assumed to be unital and commutative, and algebras are assumed to be associative. Unless otherwise stated, R denotes a principal ideal domain, \({\mathbb {K}}\) is a field, A is a unital R-algebra, and all tensor products \(\otimes \) are assumed to be over the base ring R. Given a cochain complex \(C^*\), we denote by \(C^*[i]\) the shifted complex \(C^{*+i}\). General references for graph theory, algebra, and algebraic topology are [15, 26] and [14], respectively.

2 Basic notions

In this section, we review some basic notions on (directed) graphs and posets, and recall the construction of multipath cohomology. Then, we specialise the general construction to the case of multipath cohomology with coefficients in a field \({\mathbb {K}}\)en lieu of a general algebra A.

2.1 Digraphs and posets

Recall that a directed graph \(\texttt{G} \), often shortened to digraph, is a pair of finite sets \((V(\texttt{G} ),E(\texttt{G} ))\), called vertices and edges, where \(E(\texttt{G} ) \subseteq \{ V(\texttt{G} )\times V(\texttt{G} ) \setminus \{ (v,v)\ |\ v\in V(\texttt{G} ) \}\). Unless otherwise stated, we will refer to digraphs, simply, as graphs. When dealing with (un)directed graphs, i.e. graphs for which the edges are not oriented, the adjective “(un)oriented” will be explicitly stated. The forthcoming definitions for digraphs apply verbatim to unoriented graphs by discarding the orientation of the edges. Note that two vertices v and w in a digraph can share at most two edges: (vw) and (wv).

By definition, an edge of a digraph is an ordered set of two distinct vertices, say \(e =(v,w)\). The vertex v is called the source of e, while the vertex w is called the target of e. The source and target of an edge e will be denoted by s(e) and t(e), respectively. If a vertex v is either a source or a target of an edge e, we will say that e is incident to v. Furthermore, we say that \(v \in V(\texttt{G} )\) is a sink (resp. a source) if for every \(e\in E(\texttt{G} )\) incident to v we have \(v = t(e)\) (resp. \(v = s(e)\)). Finally, a digraph \(\texttt{G} \) with n edges is a sink (resp. a source) over n vertices if it has a unique sink (resp. source), and every edge in \(\texttt{G} \) is incident to it.

Fig. 2
figure 2

Linear source and sink

A morphism of digraphs from \(\texttt{G} _1\) to \(\texttt{G} _2\) is a function \(\phi :V(\texttt{G} _1)\rightarrow V(\texttt{G} _2)\) such that:

$$\begin{aligned} e = (v,w) \in E(\texttt{G} _1)\ \Longrightarrow \ \phi (e) :=(\phi (v),\phi (w)) \in E(\texttt{G} _2)\ . \end{aligned}$$

A morphism of digraphs is called regular if it is injective as a function.

A sub-graph H of a graph G is a graph such that \(V(\texttt{H} )\subseteq V(\texttt{G} )\) and \(E(\texttt{H} )\subseteq E(\texttt{G} )\), and in such case we write \(\texttt{H} \le \texttt{G} \). If \(\texttt{H} \le \texttt{G} \) and \(\texttt{H} \ne \texttt{G} \) we say that H is a proper sub-graph of \(\texttt{G} \), and we write \(\texttt{H} < \texttt{G} \).

Definition 2.1

If \(\texttt{H} \le \texttt{G} \) and \(V(\texttt{H} ) = V(\texttt{G} )\), we say that H is a spanning sub-graph of \(\texttt{G} \).

Given a proper spanning sub-graph \(\texttt{H} < \texttt{G} \), we can find an edge \(e\in E(\texttt{G} )\setminus E(\texttt{H} )\). The spanning sub-graph of G obtained from H by adding an edge e is simply denoted by \(\texttt{H} \cup e\).  

We now review some basic notions about partially ordered sets. A partially ordered set, or simply poset, is a pair \((S,\triangleleft )\) consisting of a set S and a partial order \(\triangleleft \) on S. A morphism of posets \(f:(S,\triangleleft )\rightarrow (S',\triangleleft ')\) is a strictly monotone map of sets.

Example 2.2

The standard Boolean poset \({\mathbb {B}}(n)\) (of size \(2^{n}\)) is the poset \((\wp (\{ 0,\ldots , n -1\}),\subset )\), where \(\wp \) denotes the power set—i.e. the set of all subsets. A poset is called a Boolean poset, if it is isomorphic to the standard Boolean poset \({\mathbb {B}}(n)\), for some n.

Example 2.3

Let \(\texttt{G} \) be a digraph with n edges. The poset \((SSG(\texttt{G} ),<)\) of spanning subgraphs of \(\texttt{G} \) is given by all the spanning subgraphs of \(\texttt{G} \) with order relation given by the property of being a subgraph. The associated covering relation \(\prec \) can be described as follows:

$$\begin{aligned} \texttt{H} \prec \texttt{H} ' \Longleftrightarrow \exists \ e\in E\left( \texttt{H} '\right) \setminus E(\texttt{H} ) : \texttt{H} '= \texttt{H} \cup e \ . \end{aligned}$$

Then, \((SSG(\texttt{G} ),<)\) is a Boolean poset isomorphic to \({\mathbb {B}}(n)\)—see also [7, Example 2.14].

Given a partial order \(\triangleleft \) on a set S, there is an associated covering relation \({\widetilde{\triangleleft }}\), given by \(x\ {\widetilde{\triangleleft }}\ y\) if, and only if, \(x \triangleleft y\) and there is no z such that \(x\triangleleft z\), \(z\triangleleft y\). In order to visually represent posets associated to digraphs, we use covering relations and the associated Hasse graphs. Recall that the Hasse graph \(\texttt{Hasse}(S,\triangleleft )\) of a poset \((S,\triangleleft )\) is the graph whose vertices are the elements of S and such that (xy) is an edge if, and only if, \(x\,{\widetilde{\triangleleft }}\, y\). Each morphism of digraphs \(\phi :\texttt{Hasse}(S,\triangleleft )\rightarrow \texttt{Hasse}\left( S',\triangleleft '\right) \) induces a morphism of posets \(\phi :(S,\triangleleft )\rightarrow \left( S',\triangleleft '\right) \). We remark that not all morphisms of posets arise this way. Recall also that, given a poset \((S,\triangleleft )\), a sub-poset is a subset \(S'\subseteq S\) with the order relation \(\triangleleft _{| S'\times S'}\) induced by \(\triangleleft \).

Definition 2.4

A sub-poset \((S',\triangleleft _{| S'\times S'})\) is called downward closed with respect to \((S,\triangleleft )\), if whenever \(h\triangleleft h'\) and \(h'\in S^\prime \), then \(h\in S^\prime \).

Essential to the construction of multipath cohomology are the following properties:

Definition 2.5

Let \((S,\triangleleft )\) be a poset and \((S',\triangleleft _{| S'\times S'})\) be a sub-poset of \((S,\triangleleft )\).

  1. (1)

    We say that \((S,\triangleleft )\) is squared if for each triple \(x,y,z\in S'\) such that z covers y and y covers x, there is a unique \(y'\ne y\) such that z covers \(y'\) and \(y'\) covers x. Such elements x, y, \(y'\), and z will be called a square in S.

  2. (2)

    We say that \((S',\triangleleft _{| S'\times S'})\) is faithful if the covering relation in \(S'\) induced by \(\triangleleft _{| S'\times S'}\) is the restriction of the covering relation in S induced by \(\triangleleft \);

Note that Boolean posets are squared and that the property of being squared or faithful is preserved under intersections [7, Proposition 2.21]. Furthermore, downward closed sub-posets are faithful, and each downward closed sub-poset of a squared poset is also squared.

If \((S,\triangleleft _S)\) and \((S',\triangleleft _{S'})\) are posets, then their product poset is the set \(S \times S'\) with the relation

$$\begin{aligned} (x_1,x_2)\triangleleft _{S\times S'}(y_1,y_2) \Longleftrightarrow (x_1,x_2)=(y_1,y_2) \text{ or } x_1 \triangleleft _S y_1 \text{ and } x_2 \triangleleft _{S'} y_2. \end{aligned}$$
(1)

The definition of product poset is essential to introduce the cone of a poset. Let P be a poset.

Definition 2.6

The cone of P, denoted by \({\mathfrak {Cone}~}P\), is the product poset \(P \times {\mathbb {B}}(1)\).

As \({\mathbb {B}}(1)\) is (isomorphic to) the poset on the set \(\{0,1\}\) with the relation \(0<1\), the cone \({\mathfrak {Cone}~}P\) can also be seen as \(P \times \{0,1\}\). The covering relation in \({\mathfrak {Cone}~}P\) can be explicitly described; an element (ai) is covered by (bj) if and only if \(i=j\) and \(a \triangleleft b\) or \(i<j\) and \(a=b\).

2.2 Path posets

We introduce one of the main tools in the definition of multipath cohomology of directed graphs, the path poset associated with a directed graph \(\texttt{G} \). By a simple path in G , we mean a sequence of edges \(e_1,\ldots ,e_n\) of G such that \(s(e_{i+1})=t(e_i)\) for \(i=1,\dots ,n-1\), and no vertex is encountered twice, i.e. if \(s(e_i) = s(e_j)\) or \(t(e_i) = t(e_j)\), then \(i=j\), and is not a cycle, i.e. \(s(e_1)\ne t(e_n)\). A connected component of G is a sub-graph \(\texttt{H} \) of G whose geometric realisation (as CW-complex) \(|\texttt{H} |\) is connected. Following [22], a multipath of \(\texttt{G} \) is a spanning sub-graph such that each connected component is either a vertex or its edges admit an ordering such that it is a simple path. The set of multipaths of \(\texttt{G} \) has a natural partially ordered structure:

Definition 2.7

The path poset of \(\texttt{G} \) is the poset \((P(\texttt{G} ),<)\) associated to \(\texttt{G} \), that is, the set of multipaths of G ordered by the relation of “being a sub-graph”.

Observe that the order relation makes sense, because each multipath is a subgraph of \(\texttt{G} \).

Remark 2.8

The path poset \(P(\texttt{G} )\) is a downward closed subposet of a Boolean poset—the Boolean poset of all spanning subgraphs. Therefore, it is faithful and squared.

When the partial order on \(P(\texttt{G} )\) is not specified, we will always implicitly assume it to be the order relation <. Moreover, with abuse of notation, we will also write \(P(\texttt{G} )\) instead of \((P(\texttt{G} ),<)\). We now provide some examples of path posets—cf. [7, Sect. 2].

Example 2.9

Consider the coherently oriented linear graph \(\texttt{I}_n\) with n edges—Fig. 3. Then, \((P(\texttt{I}_n), < )\) is isomorphic to the Boolean poset \({\mathbb {B}}(n)\). Let \(\texttt{P}_n\) be the coherently oriented polygonal graph with \(n+1\) edges—Fig. 4. Then, \((P(\texttt{P}_n) ,<)\), is isomorphic to the Boolean poset \({\mathbb {B}}(n)\) minus its maximum.

Fig. 3
figure 3

The coherently oriented linear graph \(\texttt{I}_n\)

Fig. 4
figure 4

The coherently oriented polygonal graph \(\texttt{P}_n\)

2.3 Multipath cohomology

Given a special type of poset coherently assigned to each digraph and a choice of a sign assignment on it (see Definition 2.10), one can define a cohomology theory for directed graphs—see [7]. Let \({\mathbb {Z}}_2\) be the cyclic group on two elements.

Definition 2.10

A sign assignment on a poset \((S,\triangleleft )\) is an assignment of elements \(\epsilon _{x,y}\in {\mathbb {Z}}_2\) to each pair of elements \(x,y\in S\) with \(x\ {\widetilde{\triangleleft }}\ y\), such that the equation

$$\begin{aligned} \epsilon _{x,y} + \epsilon _{y,z} \equiv \epsilon _{x,y'} + \epsilon _{y',z} + 1 \mod 2 \end{aligned}$$
(2)

holds for each square \(x\ {\widetilde{\triangleleft }}\ y, y'\ {\widetilde{\triangleleft }}\ z\).

A priori, the existence of a sign assignment on a given poset is not clear. For a cohomological sufficient condition for a sign assignment on a given poset, see [7, Sect. 3.2]. For the poset of spanning sub-graphs—or, better, for any Boolean poset—and their sub-posets, a sign assignment can be easily described—see [12]. More generally, one may ask when two sign assignments on a given poset are isomorphic. We refrain here from giving the definition of isomorphism of sign assignments—cf. [7, Definition 3.13]—but in cases of interest to us, all sign assignments are isomorphic—cf. [7, Theorem 3.16 and Corollary 3.17].

Recall that the length of a graph \(\texttt{G} \), denoted by \(\textrm{lenght}(\texttt{G} )\), is the number of edges in \(\texttt{G} \).

Definition 2.11

Let P be a finite poset with a minimum m. The level \(\ell (x)\) of \(x\in P\) is the minimal length among all simple paths joining x to the minimum in \(\texttt{Hasse}(P)\).

If \(P= P(\texttt{G} )\) is the path poset of a graph, then the level and the length coincide. More generally, if P is a faithful sub-poset of \(SS(\texttt{G} )\), the notion of level of an element \(\texttt{H} \in P\) can be extended as follows:

$$\begin{aligned} \ell (\texttt{H} ) = \# E(\texttt{H} ) + \# V(\texttt{H} ) - \min \{ \# E(\texttt{H} ') + \# V(\texttt{H} ') \mid \texttt{H} '\in P \} \ . \end{aligned}$$

For the rest of the section, R denotes a commutative ring with identity, and A an associative unital R-algebra. An ordered digraph is a digraph with a fixed ordering of the vertices.

Let \(\texttt{G} \) be an ordered graph and let \(v_0\in V(\texttt{G} )\) be the minimum with respect to the given ordering. Given a multipath \(\texttt{H} <\texttt{G} \), to each connected component of \(\texttt{H} \) we associate a copy of A. Then, we take the ordered tensor product. More concretely, if \(c_0<\dots <c_k\) is the set of ordered connected components of \(\texttt{H} \), we define:

$$\begin{aligned} {\mathcal {F}}_{A}(\texttt{H} ):={A_{c_{0}}} \otimes _R \cdots \otimes _R A_{c_k}\ , \end{aligned}$$
(3)

where all the modules are labelled by the respective component.

Assume \(\texttt{H} ' = \texttt{H} \cup e\). We define the source \(s(e,\texttt{H} )\) (resp. target \(t(e,\texttt{H} )\)) of e in \(\texttt{H} \) as the index of the connected component of \(\texttt{H} \) containing the source (resp. target) of e. Denote by \(c_0\),...,\(c_{k}\) the ordered components of \(\texttt{H} \), denote by \(c'_0\),...,\(c'_{k-1}\) the ordered components of \(\texttt{H} '\), and assume that the addition of e merges \(c_i\) and \(c_j\). Then, for each \(h=0,\ldots ,k-1\), there is a natural identification

$$\begin{aligned} c'_h = {\left\{ \begin{array}{ll} c_h &{} \text {if } 0\le h<i \text { or } i< h< j;\\ c_i \cup e \cup c_j &{}\text {if } h =i; \\ c_{h+1} &{}\text {if } j\le h<k.\end{array}\right. } \end{aligned}$$
(4)

for some \(0\le i < j \le k\). Using this identification, we define \( \mu _{\texttt{H} \prec \texttt{H} '}:{\mathcal {F}}_{A}(\texttt{H} ) \longrightarrow {\mathcal {F}}_{A}(\texttt{H} ')\) as

$$\begin{aligned} \mu _{\texttt{H} \prec \texttt{H} '}(a_0 \otimes \cdots \otimes a_k)= & {} a_{0} \otimes \cdots \otimes a_{s(e,\texttt{H} )-1} \otimes a_{s(e,\texttt{H} )}\cdot a_{t(e,\texttt{H} )} \otimes a_{s(e,\texttt{H} )+1} \\ {}{} & {} \otimes \cdots \otimes \widehat{a_{t(e,\texttt{H} )}} \otimes \cdots \otimes a_{k-1} \otimes a_{k} \end{aligned}$$

where \( \widehat{a_{t(e,\texttt{H} )}} \) indicates that \(a_{t(e,\texttt{H} )}\) is missing. Let \(\epsilon \) be a sign assignment on \(P(\texttt{G} )\). We can now define the cochain groups

together with the differential

It has been proved that \((C_\mu ^*(\texttt{G} ;A),d^*)\) is a cochain complex [7, Theorem 4.10]. Furthermore, the path poset \(P(\texttt{G} )\) is squared and faithful by Remark 2.8; hence, the homology groups of \((C_\mu ^*(\texttt{G} ;A),d^*)\) do not depend on the sign assignment \(\epsilon \) used in the definition of \((C_\mu ^*(\texttt{G} ;A),d^*)\) and on the choice of the ordering on \(V(\texttt{G} )\) [7, Corollary 3.18 & Proposition 4.11]. We are ready to give the definition of the multipath cohomology of a directed graph:

Definition 2.12

The multipath cohomology \(\textrm{H}_{\mu }^*(\texttt{G} ; A)\) of a digraph \(\texttt{G} \) with with coefficients in an algebra A is the homology of the cochain complex \((C^{*}_{\mu }(\texttt{G} ; A),d^*)\).

Observe that, when A is the ring R, the tensor products in Eq. (3) simply give \({\mathcal {F}}_{R}(\texttt{H} )= {R_{c_{0}}} \otimes _R \cdots \otimes _R R_{c_k}\cong R\), for each multipath \(\texttt{H} <\texttt{G} \). The isomorphism between the tensor powers of R and R itself is given by multiplication \(\mu \), and therefore, the differential can be written as:

Identifying \({\mathcal {F}}_{R}(\texttt{H} )\) with a copy of R gives us a set of linearly independent generators \(\{ b_{\texttt{H} } \}_{\texttt{H} }\) (as free R-module) for \(C_\mu ^*(\texttt{G} ;R)\) indexed by multipaths.

If \(\phi :\texttt{G} _1 \rightarrow \texttt{G} _2\) is a regular morphism of digraphs, then it induces (functorially) a morphism of posets \(P\phi :P({\texttt{G} _1}) \rightarrow P({\texttt{G} _2})\), as it sends multipaths of \(\texttt{G} _1\) to multipaths of \(\texttt{G} _2\). We obtain a (controvariant) morphism of cochain complexes \(\phi ^*:C_\mu ^*(\texttt{G} _2;A) \rightarrow C_\mu ^*(\texttt{G} _1;A)\) where we fixed a sign assignment on \(P({\texttt{G} _2})\) and we considered the sign on \(P({\texttt{G} _1})\) by restriction.

We conclude the section with the computation of the multipath cohomology of the coherently oriented linear graph;

Example 2.13

Consider the coherently oriented linear graph \(\texttt{I}_n\) of length n, illustrated in Fig. 3. Then, its multipath cohomology \(\textrm{H}_{\mu }^*(\texttt{I}_n; {\mathbb {K}})\) is trivial [7, Example 4.20].

3 A combinatorial description of path posets

The aim of this section is to give a combinatorial description of the path poset associated with a directed graph \(\texttt{G} \); we show that the path poset can be constructed by gluing together simpler path posets associated with (suitable) subgraphs of \(\texttt{G} \). In the follow up, we will deal with disconnected graphs. A straightforward observation is that the multipath cohomology of disconnected graphs is the tensor product of the multipath cohomologies:

Remark 3.1

Let \(\texttt{G} \) be the disjoint union of connected digraphs \(\texttt{G} _1, \dots , \texttt{G} _n\). Then, the path poset \(P(\texttt{G} )\) is the product \( P({\texttt{G} _1}) \times \dots \times P({\texttt{G} _n})\)—cf. Eq. (1). Hence, the multipath cohomology of \(\texttt{G} \) splits as the graded tensor product:

$$\begin{aligned} \textrm{H}_{\mu }^*(\texttt{G} ;{\mathbb {K}})=\textrm{H}_{\mu }^*(\texttt{G} _1;{\mathbb {K}}) \otimes \dots \otimes \textrm{H}_{\mu }^*(\texttt{G} _n;{\mathbb {K}}) \ . \end{aligned}$$

In particular, if \(\textrm{H}_{\mu }^*(\texttt{G} _i;{\mathbb {K}})=0\) for some \(i \in \{1, \dots , n\}\), then \(\textrm{H}_{\mu }^*(\texttt{G} ;{\mathbb {K}})=0\).

We introduce a gluing operation for directed graphs.

Definition 3.2

(Gluing) Let \(\texttt{G} , \texttt{G} _1, \texttt{G} _2\) be digraphs, and \(\imath _1:\texttt{G} \rightarrow \texttt{G} _1\) and \(\imath _2:\texttt{G} \rightarrow \texttt{G} _2\) be regular morphisms. The gluing of \(\texttt{G} _1\) and \(\texttt{G} _2\) along \(\texttt{G} \) is the digraph \(\nabla _{\texttt{G} } (\texttt{G} _1, \texttt{G} _2)\) defined as follows:

  1. (1)

    \(V(\nabla _\texttt{G} (\texttt{G} _1, \texttt{G} _2)):=V(\texttt{G} _1) \sqcup V(\texttt{G} _2) / \sim \), where \(x \sim y\) if, and only if, either \(x=y\) or \(x\in \imath _1(\texttt{G} )\), \(y\in \imath _2(\texttt{G} )\), and \(\imath _1^{-1}(x)=\imath _2^{-1}(y)\);

  2. (2)

    \(([v],[w])\in E(\nabla _\texttt{G} (\texttt{G} _1, \texttt{G} _2))\) if, and only if, there exist \( v'\in [v]\), \( w'\in [w]\), and \(i\in \{1,2\}\) such that \((v',w') \in E(\texttt{G} _i) \), where \([\cdot ]\) denotes an equivalence class with respect to \(\sim \).

Roughly speaking, \(\nabla _{\texttt{G} } (\texttt{G} _1, \texttt{G} _2)\) is the graph obtained from \(\texttt{G} _1\) and \(\texttt{G} _2\) by identifying the vertices and edges belonging to the image of \(\texttt{G} \).

When clear from the context and for ease of notation, we denote the edge ([v], [w]) in the set \(E(\nabla _\texttt{G} (\texttt{G} _1, \texttt{G} _2))\) as (vw). For a given graph \(\texttt{G} \), the operation \(\nabla _{\texttt{G} }(-,-)\) is commutative and associative up to isomorphism of digraphs. Let \({{\textbf {Digraph}} }\) be the category of digraphs and regular morphisms of digraphs. We can reinterpret the gluing as a categorical pushout:

Remark 3.3

The operation \(\nabla _{\texttt{G} }(-,-)\) is the categorical push-out—cf. [16, Sect. III.3]—in the category \({{\textbf {Digraph}} }\). Since \(\nabla _\texttt{G} (\texttt{G} _1, \texttt{G} _2)\) is an object of \({{\textbf {Digraph}} }\), and since the inclusions of \(\texttt{G} _1\) and \(\texttt{G} _2\) in \(\nabla _\texttt{G} (\texttt{G} _1, \texttt{G} _2)\) are regular morphisms of digraphs, we have a commutative square

figure b

in \({{\textbf {Digraph}} }\). Note that \(V(\nabla _\texttt{G} (\texttt{G} _1, \texttt{G} _2))\) is the push-out of \(V(\texttt{G} _1)\) and \(V(\texttt{G} _2)\) along \(V(\texttt{G} )\) in the category \({{\textbf {Set}} }\) of sets. Now, given another digraph \(\texttt{G} '\) such that the square

figure c

commutes, then we get a function \(V(\nabla _\texttt{G} (\texttt{G} _1, \texttt{G} _2))\rightarrow V(\texttt{G} ')\) since \(V(\nabla _\texttt{G} (\texttt{G} _1, \texttt{G} _2))\) is a push-out in \({{\textbf {Set}} }\). Such a function extends to a map of digraphs by definition of morphism of digraphs, which is injective as it is composition of injective functions.

If \(\texttt{G}'\) is a digraph, and \(\imath :\texttt{G} ' \rightarrow \nabla _{\texttt{G} } (\texttt{G} _1, \texttt{G} _2)\) and \(\jmath :\texttt{G} ' \rightarrow \texttt{G} _3\) are regular morphisms, we define:

$$\begin{aligned} \nabla _{\texttt{G} ',\texttt{G} } (\texttt{G} _1, \texttt{G} _2, \texttt{G} _3):=\nabla _{\texttt{G} '}(\nabla _{\texttt{G} } (\texttt{G} _1, \texttt{G} _2),\texttt{G} _3) \ . \end{aligned}$$

In general, if \(\texttt{G} _1, \dots , \texttt{G} _n\) is a family of digraphs such that for every \(k<n\) there exist a (regular) morphisms of digraphs \(\imath _k:\texttt{G} \rightarrow \texttt{G} _k\) we will denote \(\nabla _{\texttt{G} ,\dots , \texttt{G} } (\texttt{G} _1, \dots , \texttt{G} _n)\) by \(\nabla _{\texttt{G} } (\texttt{G} _1, \dots \texttt{G} _n)\). Note that \(\nabla _{\texttt{G} } (\texttt{G} _1, \dots \texttt{G} _n)\) does not depend, up to isomorphism of digraphs, on the order of the digraphs \(\texttt{G} _1, \dots \texttt{G} _n\), whereas \(\nabla _{\texttt{G} ',\texttt{G} } (\texttt{G} _1, \texttt{G} _2, \texttt{G} _3)\) might.

Definition 3.4

The gluing of two posets \(P_1\) and \(P_2\) along a common subposet P is the poset, denoted by \(\nabla _{P}(P_1,P_2)\), whose Hasse diagram is the gluing of \(\texttt{Hasse}(P_1)\) and \(\texttt{Hasse}(P_2)\) along \(\texttt{Hasse}(P)\).

Observe that the gluing does not commute with the operation of taking path posets. To see it, let \(\texttt{G} _1\) be the graph

figure d

and \(\texttt{G} _2\) the graph

figure e

and consider the gluing \(\texttt{G} \) of \(\texttt{G} _1\) and \(\texttt{G} _2\) over

figure f

. Then, the poset \(P(\texttt{G} )\) is isomorphic to the Boolean poset \({\mathbb {B}}(3)\), whose Hasse diagram is (the 1-skeleton of) a 3-dimensional cube. On the other hand, the Hasse diagram of \(\nabla _{P(\texttt{G} )} (P(\texttt{G} _1), P(\texttt{G} _2))\) is the gluing of two copies of \(\texttt{Hasse}({\mathbb {B}}(2))\) along a copy of \(\texttt{Hasse}({\mathbb {B}}(1))\)—that is two (empty) squares attached along an edge.

We now relate the path poset of a graph to the gluing of the path posets certain subgraphs. First, for a vertex \(v \in V(\texttt{G} )\), consider the set \(E_v\) of edges \(e_1, \dots e_n\) in \(\texttt{G} \) incident to v, ordered so that \(v = t(e_i)\), for \(i = 1,\dots , k\), and \(v = s(e_j)\), for \(j = k+1 ,\dots , n\). Denote by \(\texttt{G} _v^{k}\) the graph obtained by deleting the edges \(e_{1}, \dots e_{k}\) from \(\texttt{G} \), and set \(\texttt{G} _v^{(h)} :=\texttt{G} _v^{k} \cup e_h\).

Theorem 3.5

If the vertex v is a target for \(k\ge 2\) edges, then

$$\begin{aligned} P(\texttt{G} )\cong \nabla _{P({\texttt{G} _{v}^{k}})} \left( P\left( \texttt{G} _v^{(1)}\right) , \dots , P\left( \texttt{G} _v^{(k)}\right) \right) \ . \end{aligned}$$

In other words, the path poset \(P(\texttt{G} )\) is isomorphic to an iterated gluing of the path posets of the subgraphs \(\texttt{G} _v^{(1)}\),...,\(\texttt{G} _v^{(k)}\) over the path poset of \({\texttt{G} _v^{k}}\).

Proof

We recall that, if \(\texttt{G} '\) is a subgraph of a digraph \(\texttt{G} \), then every multipath in \(P(\texttt{G} ')\) can be seen as a multipath in \(P(\texttt{G} )\). This means that \(P(\texttt{G} ')\) can be seen as an downward closed (and, in particular, faithful) subposet of \(P(\texttt{G} )\).

To prove the theorem, we want to produce an isomorphism of posets

$$\begin{aligned} P(\texttt{G} )\cong \nabla _{P\left( {\texttt{G} _v^{k}}\right) } \left( P\left( \texttt{G} _v^{(1)}\right) , \dots , P\left( \texttt{G} _v^{(k)}\right) \right) . \end{aligned}$$

First, we start by identifying the underlying sets, and then, we proceed with proving that the respective poset structures are isomorphic.

For the rest of the proof, denote by T the set \(\{ e \in E(\texttt{G} ) \mid t(e) = v \}\). Let \(\texttt{H} \) be a multipath in \(P(\texttt{G} )\). We have two possible cases:

  1. Case 1:

    \(\texttt{H} \) does not contain any edge in T. Then, all simple paths in \(\texttt{H} \) are simple paths in \(\texttt{G} _v^{k}\), and thus, \(\texttt{H} \in P\left( \texttt{G} _v^{k}\right) \).

  2. Case 2:

    \(\texttt{H} \) contains an edge \(e_h \in T\). In this case, \(\texttt{H} \) cannot contain any other \(e_j \in T\). Therefore, we have \(\texttt{H} \in P\left( \texttt{G} _v^{(h)}\right) \setminus P\left( \texttt{G} _v^{k}\right) \).

On the other hand, observe that any multipath \(\texttt{H} \in \nabla _{P\left( \texttt{G} _v^{k}\right) }\left( P\left( \texttt{G} _v^{(1)}\right) , \dots , P\left( \texttt{G} _v^{(k)}\right) \right) \) can be identified with either an element of \(P\left( \texttt{G} _v^{(j)}\right) \setminus P\left( \texttt{G} _v^{k}\right) \), for some \(j\in \{1,\ldots ,k\}\), or with an element of the poset \(P\left( \texttt{G} _v^{k}\right) \). Thus, we have a way to uniquely identify \(\texttt{H} \) with an element of \(P(\texttt{G} )\) and, consequently, the underlying sets of \(P(\texttt{G} )\) and \(\nabla _{P\left( \texttt{G} _v^{k}\right) }\left( P\left( \texttt{G} _v^{(1)}\right) , \dots , P\left( \texttt{G} _v^{(k)}\right) \right) \). With abuse of notation, we denote this element again by \(\texttt{H} \).

Now, we want to prove that the general multipath \(\texttt{H} \) covers the same elements both in \(P(\texttt{G} )\) and \(\nabla _{P\left( \texttt{G} _v^{k}\right) }\left( P\left( \texttt{G} _v^{(1)}\right) , \dots , P\left( \texttt{G} _v^{(k)}\right) \right) \). This is obvious if \(\texttt{H} \) is a multipath of \(P\left( \texttt{G} _v^{k}\right) \). Assume that \(\texttt{H} \) is in \(P(\texttt{G} ) \setminus P\left( \texttt{G} _v^{k}\right) \). Then, there exists a unique \(e_j \in T\) such that \(e_j \in \texttt{H} \). A multipath covered by \(\texttt{H} \) is then a multipath in \(P\left( \texttt{G} _v^{(j)}\right) \), and consequently, the same covering relations hold in \(\nabla _{P\left( \texttt{G} _v^{k}\right) }\left( P\left( \texttt{G} _v^{(1)}\right) , \dots , P\left( \texttt{G} _v^{(k)}\right) \right) \). Finally, if \(\texttt{H} \in \nabla _{P\left( \texttt{G} _v^{k}\right) }\left( P\left( \texttt{G} _v^{(1)}\right) , \dots , P\left( \texttt{G} _v^{(k)}\right) \right) \), then all the elements covered by \(\texttt{H} \) are contained in \(P\left( \texttt{G} _v^{(j)}\right) \) and it is possible to conclude the proof because \(P\left( \texttt{G} _v^{(j)}\right) \) in an downward closed subposet of \(P(\texttt{G} )\). \(\square \)

4 Applications to multipath cohomology

In this section, we prove a Mayer–Vietoris-type theorem and some aciclicity criteria for multipath cohomology with coefficients in a field.

4.1 The cohomology of the cone construction

Recall first that a poset \(P=(S,\triangleleft )\) can be seen as a category \({{{\textbf {P}} }}\). Given a functor \({\mathcal {F}}\) from \({{{\textbf {P}} }}\) to the category of vector spaces, with some mild assumptions on P, there are well-defined cohomology groups \(\textrm{H}^*({{{\textbf {P}} }};{\mathcal {F}})\) of \({{{\textbf {P}} }}\) with coefficients in \({\mathcal {F}}\)—cf. [7, Theorem 3.7]—which, when \(P=P(\texttt{G} )\) is the path poset of a digraph \(\texttt{G} \), gives the multipath cohomology.

We denote by \((C^*(P; {\mathbb {K}}),\partial _P)\) the cochain complex \((C^*_{{\mathcal {F}}_{{\mathbb {K}}}}(P),\partial )\) associated with a poset P (and level \(\ell \)) and to the functor \({\mathcal {F}}_{{\mathbb {K}}}\) assigning a copy of \({\mathbb {K}}\) to each object of \({{{\textbf {P}} }}\) and the identity \({\mathbb {K}}\rightarrow {\mathbb {K}}\) to each arrow. Analogously, we denote by \(\textrm{H}^*(P;{\mathbb {K}})\) the cohomology groups of the cochain complex \((C^*(P; {\mathbb {K}}),\partial _P)\). Recall that for a map \(f:(A,\partial _A)\rightarrow (B,\partial _B)\) of cochain complexes, the mapping cone \({\textrm{Cone}} f\) is the cochain complex defined in degree n as \(({\textrm{Cone}} f)^n:=A^{n+1}\oplus B^n\) and differential

$$\begin{aligned} \partial :=\begin{pmatrix} \partial _{A}[1] &{} 0\\ f[1] &{} \partial _B \end{pmatrix} \end{aligned}$$

where \(\partial _A[1]\) and f[1] represent the differential \(\partial _A\) and the morphism f shifted by one.

Theorem 4.1

Let \(\texttt{G} \) be a digraph. Then, we get an isomorphism of cochain complexes

$$\begin{aligned} C^*({\mathfrak {Cone}~}P(\texttt{G} );{\mathbb {K}}) \cong {\textrm{Cone}}\left( \textrm{Id}_{C^*_\mu (\texttt{G} ;{\mathbb {K}})}\right) {[-1]} \end{aligned}$$

where \({\textrm{Cone}}\left( {\textrm{Id}}_{C^*_\mu (\texttt{G} ;{\mathbb {K}})}\right) \) represents the mapping cone of the identity map on the cochain complex \(C^*_\mu (\texttt{G} ;{\mathbb {K}})\). Consequently, we have \(\textrm{H}^*({\mathfrak {Cone}~}P(\texttt{G} );{\mathbb {K}})= 0\).

To simplify the notation, we drop the reference to \({\mathbb {K}}\) in the proof of the theorem.

Proof

Recall that the cone of a poset P is the product poset \(P\times {\mathbb {B}}(1)\)—cf. Definition 2.6. Consider the partition \(P(\texttt{G} )\times \{ 0 \} \sqcup P(\texttt{G} )\times \{ 1\} = {\mathfrak {Cone}~}P(\texttt{G} )\). Furthermore, we also have that \( \ell _{{\mathfrak {Cone}~}P(\texttt{G} )}(\texttt{H} ,i)= \ell _{P(\texttt{G} )\times \{ i \}}(\texttt{H} ,i) + i = \ell _{P(\texttt{G} )}(\texttt{H} ) + i\), for \(i\in \{ 0,1\}\). As a consequence, we have the isomorphism of graded \({\mathbb {K}}\)-vector spaces

$$\begin{aligned} C^*({\mathfrak {Cone}~}P(\texttt{G} )) \cong C^*(P(\texttt{G} )\times \{0\})\oplus C^*(P(\texttt{G} )\times \{1\})[-1] \end{aligned}$$

where \(C^*(P(\texttt{G} ))[-1]\) denotes the complex \(C^*(P(\texttt{G} ))\) shifted by one. In turn, we have an isomorphism of posets \(P(\texttt{G} )\cong P(\texttt{G} )\times \{ i\}\), for \(i=0,1\), given by the identification \(\texttt{H} \mapsto (\texttt{H} ,i)\). These identifications induce the isomorphism of graded \({\mathbb {K}}\)-vector spaces

$$\begin{aligned} C^{*}(P(\texttt{G} )\times \{0\})\oplus C^{*-1}(P(\texttt{G} )\times \{1\})\cong C_{\mu }^{*}(\texttt{G} )\oplus C_{\mu }^{*-1}(\texttt{G} ) ={\textrm{Cone}}\left( \textrm{Id}_{C^*_\mu (\texttt{G} ;{\mathbb {K}})}\right) [-1] . \end{aligned}$$

Now, we have to show that the above isomorphism commutes with the differentials. The differential \(\partial \) of \({\textrm{Cone}}\left( \textrm{Id}_{C^*_\mu (\texttt{G} ;{\mathbb {K}})}\right) [-1]\) is defined as

$$\begin{aligned} \partial :=\begin{pmatrix} \partial _{\mu } &{} 0\\ \textrm{Id}_{C^*_\mu (\texttt{G} ;{\mathbb {K}})} &{} \partial _{\mu }[-1] \end{pmatrix} \end{aligned}$$

where \((\partial _{\mu }[{-1}])^n :=(-1)^n\partial _{\mu }^{{n-1}}\). The differential of \(C^*({\mathfrak {Cone}~}P(\texttt{G} )) \) can be explicitly written:

$$\begin{aligned} \partial _{{\mathfrak {Cone}~}P(\texttt{G} )}(e_{(\texttt{H} , i)}) = (1-i)e_{(\texttt{H} ,1)}+\sum _{\texttt{H} \prec \texttt{H} '} (-1)^{\epsilon (\texttt{H} ,\texttt{H} ') + i}e_{(\texttt{H} ',i)} \end{aligned}$$

where \(\epsilon (\texttt{H} ,\texttt{H} ')\) is a sign assignment on \(P(\texttt{G} )\) and \(e_{(\texttt{H} , i)}\) is the generator of \(C^*(P(\texttt{G} )\times \{i\})\) associated with the multipath \(\texttt{H} \) in \(\texttt{G} \). It is easy to check that \(\epsilon '((\texttt{H} ,i),(\texttt{H} ',j)) :=\epsilon (\texttt{H} ,\texttt{H} ') + i\) is a sign assignment on \({\mathfrak {Cone}~}P(\texttt{G} )\).

The isomorphism \(C^*({\mathfrak {Cone}~}P(\texttt{G} )) \cong {\textrm{Cone}}\left( \textrm{Id}_{C^*_\mu (\texttt{G} ;{\mathbb {K}})}\right) [-1]\) described above commutes with these differentials, concluding the proof of the first part of the statement. The vanishing result follows from the classical properties of the mapping cone of chain complexes [25]. \(\square \)

We observe that the second part of Theorem 4.1 can be alternatively proved using discrete Morse theory—see [14, Chapter 11] for an introduction; if we consider the edges in \(\texttt{Hasse}({\mathfrak {Cone}~}P(\texttt{G} )))\) with source in \( P(\texttt{G} )\times \{ 0\}\) and target in \(P(\texttt{G} )\times \{ 1\}\), then these form an acyclic matching ([14, Definition 11.1]) whose edges are incident to all vertices of the graph \(\texttt{Hasse}({\mathfrak {Cone}~}P(\texttt{G} ))\). It follows from the definitions and [14, Theorem 11.24] that the homology of \(C^*({\mathfrak {Cone}~}P(\texttt{G} );{\mathbb {K}})\) is trivial.

4.2 A Mayer–Vietoris theorem

The goal of this subsection is to prove a result which is the analogue, in the framework of multipath cohomology, of the classical Mayer–Vietoris theorem. In the classical statement, given a decomposition of a topological space as union of two subspaces, there is an induced long exact sequence of (co-)homology groups featuring also their intersections. In the setting of multipath cohomology, the rôle played by unions of topological spaces is given by the gluing of posets. Recall that, for \(\phi :\texttt{G} '\rightarrow \texttt{G} \), we have an induced morphism of posets \(P\phi :P(\texttt{G} ')\rightarrow P(\texttt{G} )\)—see [7, Remark 2.33]. Furthermore, [7, Proposition 5.11] gives us a map between the multipath cochain complex of a graph \(\texttt{G} \) and the multipath cochain complex of a sub-graph \(\texttt{G} _1\).

Theorem 4.2

Let \(\texttt{G} , \texttt{G} _1, \texttt{G} _2\) be directed graphs, and \(i_1:\texttt{G} \rightarrow \texttt{G} _1\) and \(i_2:\texttt{G} \rightarrow \texttt{G} _2\) be regular morphisms of digraphs. Then, we have a short exact sequence of cochain complexes

$$\begin{aligned} 0\rightarrow & {} C^*(\nabla _{P(\texttt{G} )} (P(\texttt{G} _1), \, P(\texttt{G} _2));{\mathbb {K}}) \xrightarrow {I^*} C_{\mu }^*( \texttt{G} _1;{\mathbb {K}})\oplus C_{\mu }^*(\texttt{G} _2;{\mathbb {K}})\nonumber \\&\xrightarrow {J^*}&C_{\mu }^*( \texttt{G} ; {\mathbb {K}})\rightarrow 0 \end{aligned}$$
(5)

inducing the long exact sequence

of cohomology groups.

Proof

We first observe that, as a consequence of the definition of gluing—cf. Definition 3.2\(P(\texttt{G} _1)\) and \(P(\texttt{G} _2)\) are isomorphic to subposets of \(\nabla _{P(\texttt{G} )} (P(\texttt{G} _1), \, P(\texttt{G} _2))\); call \(\jmath _1\) and \(\jmath _2\) these isomorphisms. The inclusions of graphs \(i_1:\texttt{G} \rightarrow \texttt{G} _1\) and \(i_2:\texttt{G} \rightarrow \texttt{G} _2\) induce morphisms of posets \(\imath _1:P(\texttt{G} ) \rightarrow P(\texttt{G} _1) \) and \(\imath _2:P(\texttt{G} ) \rightarrow P(\texttt{G} _2) \). All the resulting morphisms fit into the following commutative square of posets

figure g

and induce a commutative diagram of cochain complexes:

figure h

Now, for every \(n\in {\mathbb {N}}\), consider the maps

$$\begin{aligned} I^n :=\imath ^n_1 \oplus \imath ^n_2 :C^n(\nabla _{P(\texttt{G} )} (P(\texttt{G} _1), \, P({\texttt{G} _2}));{\mathbb {K}}) \rightarrow C_{\mu }^n(\texttt{G} _1;{\mathbb {K}}) \oplus C_{\mu }^n(\texttt{G} _2;{\mathbb {K}}) \ , \end{aligned}$$

and

$$\begin{aligned} J^n :=\jmath ^n_1 - \jmath ^n_2 :C_{\mu }^n(\texttt{G} _1;{\mathbb {K}}) \oplus C_{\mu }^n(\texttt{G} _2;{\mathbb {K}}) \rightarrow C_{\mu }^n(\texttt{G} ;{\mathbb {K}}) \ . \end{aligned}$$

We proceed with proving that the sequence of complexes in Eq. (5) is exact. The cochain complexes \(C^*(\nabla _{P(\texttt{G} )} (P(\texttt{G} _1), \, P_{G_2});{\mathbb {K}})\), \(C_{\mu }^n(\texttt{G} _1;{\mathbb {K}})\), and \(C_{\mu }^n(\texttt{G} _2;{\mathbb {K}})\) have bases indexed by the elements of the corresponding poset (namely, \(\nabla _{P(\texttt{G} )} (P(\texttt{G} _1), \, P_{G_2})\), \(P(\texttt{G} _1)\), and \(P(\texttt{G} _2)\), respectively). We denote by \(b_\texttt{H} \) the element of each of these bases corresponding to the multipath \(\texttt{H} \).

With this notation, a generic element x of \(C^n(\nabla _{P(\texttt{G} )} (P(\texttt{G} _1), \, P_{G_2});{\mathbb {K}})\) is of the form

$$\begin{aligned} x = \sum _{\texttt{H} \in P(\texttt{G} )} \alpha _{\texttt{H} } b_{\imath _{1}\circ \jmath _1(\texttt{H} )} + \sum _{\texttt{H} ' \in P(\texttt{G} _1)\setminus \jmath _1(P(\texttt{G} ))} \beta _{\texttt{H} '} b_{\imath _{1}(\texttt{H} ')} + \sum _{\texttt{H} '' \in P(\texttt{G} _2)\setminus \jmath _2(P(\texttt{G} ))} \gamma _{\texttt{H} '} b_{\imath _{2}(\texttt{H} '')} \end{aligned}$$

with \(\ell (\texttt{H} ) =\ell (\texttt{H} ') =n\). Note that \(\imath _{1}\circ \jmath _1 = \imath _{2}\circ \jmath _2\), thus \( b_{\imath _{1}\circ \jmath _1(\texttt{H} )} = b_{\imath _{2}\circ \jmath _2(\texttt{H} )}\) for each \(\texttt{H} \in P(\texttt{G} )\). We are now ready to verify that \(I^n\) is injective. With respect to the basis above, we can write

$$\begin{aligned} { I^n(x) = \left( \sum _{\texttt{H} \in P(\texttt{G} )} \alpha _{\texttt{H} } b_{\jmath _1(\texttt{H} )} + \sum _{\texttt{H} ' \in P(\texttt{G} _1)\setminus \jmath _1(P(\texttt{G} ))} \beta _{\texttt{H} '} b_{\texttt{H} '}, \sum _{\texttt{H} \in P(\texttt{G} ) } \alpha _{\texttt{H} } b_{\jmath _2(\texttt{H} )} + \sum _{\texttt{H} '' \in P(\texttt{G} _2)\setminus \jmath _{2}(P(\texttt{G} )) } \gamma _{\texttt{H} ''} b_{\texttt{H} ''}\right) } \ . \end{aligned}$$

It follows that \(I^n(x) = 0\) if and only if all the coefficients \(\alpha _\texttt{H} \), \(\beta _\texttt{H} \) and \(\gamma _{\texttt{H} '}\), and thus, x are zero.

It is left to show that \(J^n\) is surjective and that \(\textrm{Ker}(I^n) = \textrm{Im}(J^n)\). First, we write \(J^n\) explicitly, as follows;

$$\begin{aligned} J^n\left( \sum _{\texttt{H} ' \in P(\texttt{G} _1)} \alpha _{\texttt{H} '} b_{\texttt{H} '} , \sum _{\texttt{H} '' \in P(\texttt{G} _2)} \beta _{\texttt{H} ''} b_{\texttt{H} ''}\right) = \sum _{\texttt{H} \in P(\texttt{G} )} (\alpha _{\jmath _1(\texttt{H} )} - \beta _{\jmath _2(\texttt{H} )} )b_{\texttt{H} } \ . \end{aligned}$$

Now, for \(J^n(x)\) to be zero, we must have that \(\alpha _{\jmath _1(\texttt{H} )} = \beta _{\jmath _2(\texttt{H} )}\), for all \(\texttt{H} \in P(\texttt{G} )\), independently on the values of \(\alpha _{\texttt{H} '}\) and \(\beta _{\texttt{H} ''}\) for \(\texttt{H} '\notin \jmath _1(P(\texttt{G} ))\), and \(\texttt{H} '' \notin \jmath _2(P(\texttt{G} ))\). It follows that the kernel \(J^n\) is precisely the image of \(I^n\). Finally, \(J^n\) is clearly surjective, concluding the proof. \(\square \)

The following observation is straightforward:

Remark 4.3

Under the assumptions of Theorem 4.2, if \(\texttt{G} _1\) and \(\texttt{G} _2\) have trivial multipath cohomology, then \(\textrm{H}^{n}(\nabla _{P(\texttt{G} )} (P(\texttt{G} _1), \, P(\texttt{G} _2));{\mathbb {K}})\) is isomorphic to \(\textrm{H}_{\mu }^{n-1}(\texttt{G} ;{\mathbb {K}})\) for all n.

By iterated applications of the Mayer–Vietoris long exact sequence for the multipath cohomology, we obtain the corollary:

Corollary 4.4

Let \(\texttt{G} _1, \dots , \texttt{G} _n\) be digraphs and suppose that for all \(j\in \{1,\dots ,n\}\) there exists a regular morphism \(i_j:\texttt{G} \rightarrow \texttt{G} _j \). If all the cohomology groups \(\textrm{H}_{\mu }^*(\texttt{G} ;{\mathbb {K}})\) and \(\textrm{H}_{\mu }^*(\texttt{G} _j;{\mathbb {K}})\) vanish for all j, then

$$\begin{aligned} \textrm{H}^*\left( \nabla _{P(\texttt{G} )} (P(\texttt{G} _1), \dots P(\texttt{G} _n));{\mathbb {K}}\right) =0 \ . \end{aligned}$$

In the next subsection, we apply the results shown in this subsection to obtain vanishing criteria for multipath cohomology.

4.3 Acyclicity criteria and examples

The aim of this subsection is to find sufficient conditions on a graph \(\texttt{G} \), for \(\textrm{H}_{\mu }^*(\texttt{G} ;{\mathbb {K}})\) to be trivial. Using the same notation as in Theorem 3.5, we obtain the first vanishing criterion;

Criterion A

Assume that a digraph \(\texttt{G} \) satisfies the following conditions:

  1. (1)

    There exists a vertex v that is the target (or source) of \(k \ge 2\) edges;

  2. (2)

    The graphs \(\texttt{G} _v^{(1)},\dots ,\texttt{G} _v^{(k)}, \texttt{G} _v^{k} \) have trivial multipath cohomology.

Then, \(\textrm{H}_{\mu }^*(\texttt{G} ;{\mathbb {K}})=0\).

Proof

By Theorem 3.5, we have the isomorphism of posets

$$\begin{aligned} P(\texttt{G} )\cong \nabla _{P\left( {\texttt{G} _v^{k}}\right) } \left( P\left( \texttt{G} _v^{(1)}\right) , \dots , P\left( \texttt{G} _v^{(k)}\right) \right) \ . \end{aligned}$$

Then, the statement follows from Corollary 4.4. \(\square \)

At a first glance, Criterion A looks quite technical. However, it can easily applied in practice.

Example 4.5

Let \(\texttt{G} \) be the graph shown in Fig. 5. Recall from Example 2.13 that a coherent linear graph has trivial cohomology. Then, by applying Criterion A, we get that \(\textrm{H}_{\mu }^*(\texttt{G} ;{\mathbb {K}})=0\).

Fig. 5
figure 5

A graph with n edges with target v glued to a linear graph

Criterion A says that we can infer the vanishing of multipath cohomology by looking at smaller pieces in the graph. Our second criterion is based on the existence of suitably “embedded” subgraphs. To formalise this, we need the notion of \(\nu \)-equivalence.

Definition 4.6

A morphism of directed graphs \(\phi :\texttt{G} \rightarrow \texttt{G} '\) is a \(\nu \)-equivalence away from a (possibly empty) set of vertices \(V \in V(\texttt{G} )\), if the valence of \(v \in V(\texttt{G} )\) is the same as the valence of \(\phi (v) \in V(\texttt{G} ')\), for every \(v \in V(\texttt{G} ) \setminus V\).

Note that a \(\nu \)-equivalence \(\phi :\texttt{G} \rightarrow \texttt{G} '\) away from an empty set of vertices is just the inclusion of \(\texttt{G} \) as a connected component of \(\texttt{G} '\).

Fig. 6
figure 6

A graph \(\texttt{G} \) and two copies of \(\texttt{I}_3\) inside it. The morphism of digraphs \(\phi _{r}\), whose image is the red copy of \(\texttt{I}_3\), is a \(\nu \)-equivalence away from \(v_0\) and \(v_3\), while morphism of digraphs \(\phi _{b}\), whose image is the blue copy of \(\texttt{I}_3\), is a \(\nu \)-equivalence away from \(v_1\) and \(v_2\)

Example 4.7

Let \(\texttt{G} \) be the graph in Fig. 6, and denote by \(\texttt{I}_3\) the linear digraph illustrated in Fig. 3, with vertices labelled as in the aforementioned figure. Consider the morphisms of digraphs \( \phi _{b},\phi _{r}:\texttt{I}_3 \rightarrow \texttt{G} , \) defined as follows: \(\phi _{b}(v_i) = w_i\), for each \(i\in \{0,1,2,3\}\), and

$$\begin{aligned} \phi _{r}(v_i) = {\left\{ \begin{array}{ll} w_1 &{} \text {if }i=0; \\ z_i &{} \text {if }i=1,2;\\ w_2 &{} \text {if }i=3.\end{array}\right. } \end{aligned}$$

Then, \(\phi _b\) is a \(\nu \)-equivalence away from \(v_1\) and \(v_2\), while \(\phi _b\) is so, away from \(v_0\) and \(v_3\).

In order to state our next criterion, we need a new family of graphs \(\texttt{H} _{n,m}\), illustrated in Fig. 7.

Fig. 7
figure 7

The graph \(\texttt{H} _{n,m}\)

Criterion B

Let \(\texttt{G} \) be a digraph and assume that there exists a \(\nu \)-equivalence \(\phi :\texttt{H} _{n,m} \rightarrow \texttt{G} \) away from \(w_1,\ldots ,w_n\) and \(x_1,\ldots ,x_m\). If \((\phi (v_0),\phi (v_1))\) is not contained in any coherently oriented cycleFootnote 1 of \(\texttt{G} \), then \(\textrm{H}_{\mu }^*(\texttt{G} ;{\mathbb {K}})=0\).

Proof

Denote by e the edge \((\phi (v_0),\phi (v_1))\) of \(\phi (\texttt{H} _{n,m})\) and set \(\texttt{G} ':=\texttt{G} \setminus \{e\}\). We want to show that the poset \(P(\texttt{G} )\) is isomorphic to the cone \({\mathfrak {Cone}~}P(\texttt{G} ')\). Consider the following subset of the path poset: \(P(\texttt{G} )_0:=\{\texttt{H} \in P(\texttt{G} )\mid e \notin \textrm{H}\}\) and \(P(\texttt{G} )_1:=\{\texttt{H} \in P(\texttt{G} )\mid e \in \textrm{H}\}\) endowed with the poset structure induced by \(P(\texttt{G} )\). We claim that \(P(\texttt{G} )_i \cong P(\texttt{G} ')\times \{ i \} \subset {\mathfrak {Cone}~}P(\texttt{G} ')\), for \(i=0,1\). The isomorphism \(P(\texttt{G} )_0 \cong P(\texttt{G} ')\) is clear. Now, to identify \(P(\texttt{G} )_1\) with \(P(\texttt{G} ')\times \{1\}\) we observe that:

  1. (1)

    The edge e is coherently oriented with the other edges in \(\phi (\texttt{H} _{n,m})\),

  2. (2)

    No multipath contains two edges of the form \((\phi (x_i),\phi (v_1))\) nor contains two edges of the form \((\phi (v_1),\phi (w_i))\),

  3. (3)

    And e is not contained in a coherently oriented cycle.

It follows that \(\texttt{H} \cup e\) is a multipath for every \(\texttt{H} \in P(\texttt{G} )_0\), which implies that the map sending \(\texttt{H} \in P(\texttt{G} )_0\) to \(\texttt{H} \cup e \in P(\texttt{G} )_1\) is well-defined. Note that this map is also a bijection and that it preserves the inclusions, i.e. if \(\texttt{H} \prec \texttt{H} ' \in P(\texttt{G} )_0\), then \(\texttt{H} \cup e \prec \texttt{H} '\cup e \in P(\texttt{G} )_1\). Consequently, we have a sequence of isomorphism of posets \(P(\texttt{G} )_1 \cong P(\texttt{G} )_0 \cong P(\texttt{G} ')\times \{ 0 \} \cong P(\texttt{G} ')\times \{ 1 \}\). To complete the proof that \(P(\texttt{G} ) \cong {\mathfrak {Cone}~}P(\texttt{G} ')\), we have to check that, under the above chain of identifications, a covering relation between two elements \(\texttt{H} \in P(\texttt{G} )_0\) and \(\texttt{H} ' \in P(\texttt{G} )_1\) corresponds uniquely to a covering relation between the corresponding elements \((\texttt{H} ,0) \in P(\texttt{G} ')\times \{0\}\) and \((\texttt{H} ' \setminus \{e\},1)\in P(\texttt{G} ')\times \{1\}\). This follows directly from the description of the covering relation in \({\mathfrak {Cone}~}P(\texttt{G} ')\). As a consequence, the posets \(P(\texttt{G} )\) and \({\mathfrak {Cone}~}P(\texttt{G} ')\) are isomorphic. From Theorem 4.1, it follows \(\textrm{H}_{\mu }^*(\texttt{G} ;{\mathbb {K}})=0\). \(\square \)

Remark 4.8

Criterion B also holds if either \(n =0\) or \(m=0\). In these cases, we say that the graph \(\texttt{G} \) has a coherent tail. With this terminology, we can restate the special case of Criterion B when either \(n=0\) or \(m=0\) as follows; if \(\texttt{G} \) has a coherent tail, then \(\textrm{H}_{\mu }^*(\texttt{G} ;{\mathbb {K}})=0\).

We now provide some examples.

Example 4.9

An arborescent graph (or arborescence) is a directed graph in which there is a vertex r, called root, and there is exactly one directed path from r to any other vertex. If an arborescent graph \(\texttt{T}\) has a vertex at distance 2 from the root (i.e. the unique path joining them has length 2), then up to orientation reversing of the edges there is a \(\nu \)-equivalence \(\texttt{H} _{0,m}\rightarrow \texttt{T}\) away from \(v_0\), for some \(m>0\) . Applying Criterion B, we get \(\textrm{H}_{\mu }^*(\texttt{T};{\mathbb {K}})=0\).

Fig. 8
figure 8

The graph \(\texttt{O}_n\)

Example 4.10

Let \(\texttt{O}_n\) be the graph in Fig. 8, and set \(v= v_3\), \(e_1 = (v_3,v_2)\), and \(e_2 = (v_3,v_1)\). Using the same notation of Criterion A, we have that \(\texttt{G} ^2_v\) and \(\texttt{G} _v^{(1)}\) have a coherent tail, while there is a \(\nu \)-equivalence \(\texttt{I}_3 (\cong \texttt{H} _{1,1}) \rightarrow \texttt{G} ^{(2)}_{v}\) whose image is the sub-graph with edges \((v_3,v_1),(v_1,v_0),(v_0, v_2)\). Thus, by Criterion B, \(\texttt{G} ^2_v\), \(\texttt{G} _v^{(1)}\), and \(\texttt{G} _v^{(2)}\) have trivial cohomology. By Criterion A, it follows that \(\textrm{H}_{\mu }^{*}(\texttt{O}_n;{\mathbb {K}}) =0\).

Another class of graphs, important to us, is given by the dandelion graphs:

Definition 4.11

Let \(\texttt{D}_{n,m}\) the graph on \((n+m+1)\) vertices, and \((m+n)\) edges defined as follows:

  1. (1)

    \(V(\texttt{D}_{n,m}) = \{ v_{0}, w_{1} ,\ldots ., w_{n}, x_{1},\ldots , x_{m} \}\);

  2. (2)

    \(E(\texttt{D}_{n,m}) = \{ (w_i,v_0), (v_{0},x_j) \mid i=1,\ldots ,n; j=1,\ldots ,m \}\).

The digraph \(\texttt{D}_{n,m}\) is called a dandelion graph.

Fig. 9
figure 9

The graph \(\texttt{D}_{3,2}\)

In other words, we have a single \((m+n)\)-valent vertex \(v_0\), all remaining vertices are univalent, there are n edges with target \(v_0\), and there are m edges with source \(v_0\)—cf. Fig. 9.

Remark 4.12

If we reverse the orientation of all the edges in \(\texttt{D}_{k,n-k}\), we obtain \(\texttt{D}_{n-k,k}\). Then, we have an isomorphism \(P(\texttt{D}_{k,n-k}) \cong P(\texttt{D}_{n-k,k})\); hence, \(\textrm{H}_{\mu }^n(\texttt{D}_{k,n-k};{\mathbb {K}}) \cong \textrm{H}_{\mu }^n(\texttt{D}_{n-k,k};{\mathbb {K}})\) for all n.

The dandelion digraph \(\texttt{D}_{n,0}\) is a source with n edges, and the dandelion digraph \(\texttt{D}_{0,n}\) is a sink with n edges. The dandelion digraph \(\texttt{D}_{1,1}\) is the 2-step graph \(\texttt{I}_2\).

Remark 4.13

If \(\texttt{G} \) is a source or a sink with \(n\ge 2\) edges, then \(\dim \textrm{H}_{\mu }^1(\texttt{G} ;{\mathbb {K}})=n-1\) and \(\dim \textrm{H}_{\mu }^i(\texttt{G} ;{\mathbb {K}})=0\) for \(i\ne 1\); in fact the path poset of a sink (or a source) with n edges is given by a single multipath of length 0, and n multipaths of length 1. It follows that, in the case at hand, the multipath chain complex is very simple:

$$\begin{aligned} 0 \rightarrow C_{\mu }^0(\texttt{D}_{0,n};{\mathbb {K}}) \cong {\mathbb {K}}\overset{d^0}{\longrightarrow }\ C_{\mu }^1(\texttt{D}_{0,n};{\mathbb {K}}) \cong {\mathbb {K}}^n \rightarrow 0. \end{aligned}$$

Furthermore, the map \(d^0\) is injective (since \(d^0\) is the map \(x\mapsto (\pm x,\ldots ., \pm x)\) for an appropriate choice of signs), giving trivial cohomology in degree 0 and a cohomology group of dimension \(n-1\) in degree 1.

An immediate consequence of Remark 4.13 is that we can have multipath cohomology groups of arbitrary dimension (as \({\mathbb {K}}\)-vector space).

Proposition 4.14

Let \(n\ge 1\) be an integer. Then, \(\textrm{H}_{\mu }^*(\texttt{D}_{1,n-1};{\mathbb {K}}) = 0\).

Proof

Note that \(\texttt{D}_{1,0}= \texttt{I}_1\) and that \(\texttt{D}_{1,n-1} = \texttt{H} _{0,n-1}\). In the former case, the cohomology is trivial by direct computation. In the latter case, the cohomology is trivial by Criterion A, as \(\texttt{D}_{1,n-1}\) has a coherent tail—cf. Remark 4.8. \(\square \)

Proposition 4.15

Let \(n > 2\) and \(k>0\) be two integers such that \(n>k\). Then, we have

$$\begin{aligned} \textrm{H}_{\mu }^i(\texttt{D}_{k,n-k};{\mathbb {K}}) \cong {\left\{ \begin{array}{ll} {\mathbb {K}}^{(k-1)(n-k-1)} &{} \text {if }\,\, i=2\\ 0 &{} \text {otherwise}. \end{array}\right. } \end{aligned}$$

Proof

We proceed by induction on n. If \(n=3\), Proposition 4.14 and Remark 4.12 imply \(\textrm{H}_{\mu }^*(\texttt{D}_{2,1};{\mathbb {K}})\cong \textrm{H}_{\mu }^*(\texttt{D}_{1,2};{\mathbb {K}}) =0\). Now, set \(\texttt{G} = \texttt{D}_{k,n-k}\) and \(v = v_0\). By Theorem 3.5, we have

$$\begin{aligned} P(\texttt{D}_{k,n-k})\cong & {} \nabla _{P(\texttt{D}_{0,n-k})}\underbrace{\left( P(\texttt{D}_{1,n-k}),\dots , P(\texttt{D}_{1,n-k})\right) }_{\text {{ k} copies}}\\ {}\overset{(*)}{\cong } & {} \nabla _{P(\texttt{D}_{0,n-k})}\left( P(\texttt{D}_{1,n-k}),P(\texttt{D}_{k-1,n-k})\right) \end{aligned}$$

where the isomorphism marked with \((*)\) follows from the associativity of the gluing (and from Theorem 3.5). By applying Theorem 4.2 and the inductive hypothesis, it follows that \(\textrm{H}_{\mu }^i(\texttt{D}_{k,n-k};{\mathbb {K}}) =0\) for \(i\ge 3\), and that the sequence

$$\begin{aligned} 0 \rightarrow \textrm{H}_{\mu }^1(\texttt{D}_{0,n-k};{\mathbb {K}}) \rightarrow \textrm{H}_{\mu }^2(\texttt{D}_{k,n-k};{\mathbb {K}}) \rightarrow \textrm{H}_{\mu }^2(\texttt{D}_{k-1,n-k};{\mathbb {K}}) \rightarrow 0\ , \end{aligned}$$

is exact. The assertion is now immediate from the fact that the dimension function is additive on short exact sequences. \(\square \)

We conclude the section showing that there exist directed graphs with multipath cohomology of arbitrary high rank in arbitrary high degree.

Fig. 10
figure 10

Configurations of a digraph \(\texttt{G} \) with subgraphs \(\nu \) equivalent away from \(v_0\) to \(\texttt{D}_{1,2}\) and \(\texttt{D}_{2,1}\)

Fig. 11
figure 11

The graph \(\texttt{G} '\) as subgraph of \(\texttt{G} \) in the two cases we consider

Lemma 4.16

Given a digraph \(\texttt{G} '\) with a vertex w of valence 1, there exists a digraph \(\texttt{G} \) such that \(\textrm{H}_{\mu }^*(\texttt{G} ';{\mathbb {K}})\cong \textrm{H}_{\mu }^{*-1}(\texttt{G} ;{\mathbb {K}})\).

Proof

Let \(e \in E(\texttt{G} ')\) be the only edge incident to w. We define \(\texttt{G} \) as follows; if \(s(e)=w\), glue a linear sink over w to \(\texttt{G} '\)—cf. Fig. 2, otherwise glue a linear source.

In the notations of Figs. 10 and 11, by Theorem 3.5 the path poset of \(\texttt{G} \) is the gluing of the path posets \(P(\texttt{G} _w^{(1)})\) and \(P(\texttt{G} _w^{(2)})\) over \(P(\texttt{G} ')\). By Remark 4.8, the subgraphs \( \texttt{G} _w^{(1)}\) and \( \texttt{G} _w^{(2)}\) have trivial cohomology; hence, by Remark 4.3, we have \(\textrm{H}_{\mu }^*(\texttt{G} ;{\mathbb {K}})=\textrm{H}_{\mu }^{*-1}(\texttt{G} ';{\mathbb {K}})\). \(\square \)

Observe that the digraph \(\texttt{G} \) constructed in Lemma 4.16 has again (at least) one vertex of valence 1 and consequently the construction can be iterated.

Proposition 4.17

For all \(i, n \in {\mathbb {N}}\), there exists a digraph \(\texttt{G} \) such that \(\textrm{dim }_{\mathbb {K}}\left( \textrm{H}_{\mu }^i(\texttt{G} ; {\mathbb {K}})\right) =n\).

Proof

The multipath cohomology of a sink graph \(\texttt{G} \) with \(n+1\) edges is concentrated in degree one, where it is \(\textrm{H}_{\mu }^1(\texttt{G} ;{\mathbb {K}})\cong {\mathbb {K}}^n\). By applying iteratively Lemma 4.16, we obtain digraphs \(\texttt{G} \) with \(\textrm{dim }_{\mathbb {K}}\left( \textrm{H}_{\mu }^i(\texttt{G} ; {\mathbb {K}})\right) =n\) for every i. \(\square \)

5 Oriented linear graphs

This section is devoted to the study of the multipath cohomology of oriented linear graphs. Firstly, we focus on the case of coefficients in a field \({\mathbb {K}}\). In this case, we achieve a complete description of their cohomology groups. Then, we analyse the general case of coefficients in a graded algebra A, and we prove some recursive formulae for the graded Euler characteristic.

5.1 Multipath cohomology of linear graphs

An oriented linear graph L (on n vertices) is a directed graph with vertices \(\{ v_0 ,\ldots , v_{n-1}\}\), such that, for all \(i\in \{1,\ldots ,n-1\}\), exactly one among \((v_i,v_{i-1})\) and \((v_{i-1},v_i)\) belongs to \(E(\texttt{L})\), and there are no other edges. An oriented linear graph \(\texttt{L}\) is called alternating if whenever \((v_{i-1},v_i)\in E(\texttt{L})\) for some \(i<n-1\), we have \((v_{i+1},v_i)\in E(\texttt{L})\) and, analogously, if \((v_{i},v_{i-1})\in E(\texttt{L})\), then \((v_{i},v_{i+1})\in E(\texttt{L})\). We denote by \(\texttt{A}_n\) an alternating linear graph on \(n+1\) vertices. Observe that the alternating graph \(\texttt{A}_n\) is unique up to orientation reversing.

Definition 5.1

A vertex of an oriented linear graph \(\texttt{L}\) is called unstable if it is both a source and a target, and stable otherwise. We denote by \(\textrm{SV}(\texttt{L})\) the set of stable vertices of \(\texttt{L}\).

Fig. 12
figure 12

The graphs \(\texttt{G} \), \(\texttt{G} ^{\prime }\), \(\texttt{G} ^{\prime \prime }\), and the relative orientations of \(e_1\) and \(e_2\)

Our aim is to show that the cohomology of an oriented linear graph \(\texttt{L}\) is related to the number of stable vertices in \(\texttt{L}\), and their relative distance.

Definition 5.2

Let \(v_i, \, v_j\) be vertices of an oriented linear graph \(\texttt{L}\). The distance \(d(v_i,v_j)\) is the length of the unique simple path, if it exists, between them, and it is set to \(-\infty \) otherwise.

For an oriented linear graph \(\texttt{L}\), the property D(k) is defined as follows:

$$\begin{aligned} D(k):\quad \forall \ v,w \in \textrm{SV}(\texttt{L}), \quad d(v,w)\le k \ . \end{aligned}$$
(6)

A disjoint union of oriented linear graphs satisfies the property D(k) if each component does. Observe that the set of oriented linear graphs is filtered by the above property; each linear graph satisfies D(k) for some k, and if \(\texttt{L}\) satisfies D(k), then it also satisfies \(D(k+1)\). Furthermore, the alternating graphs satisfy the property D(1), and they are the only connected graphs satisfying it. The graph \(\texttt{I}_n\) satisfies the property D(n). Observe that, if an oriented linear graph \(\texttt{L}\) satisfies the property D(n) for \(n>2\), then \(\texttt{L}\) has trivial cohomology. In fact, if there exists a pair of stable vertices at distance grater than 2, then there exists a \(\nu \)-equivalence \(f:\texttt{I}_3 \rightarrow \texttt{L}\) away from \(v_0, v_3 \in V(\texttt{I}_3)\); by Criterion B, \(\textrm{H}_{\mu }^*(\texttt{L}, {\mathbb {K}})=0\).

Remark 5.3

If \(\texttt{L}\) satisfies the property D(n), then each of its subgraphs also satisfies D(n).

By the above observations, a complete description of the multipath cohomology of oriented linear graphs can be achieved by studying graphs satisfying the property D(2). As a first step, we start with oriented linear graphs satisfying D(1). Since the cohomology of a disjoint union of linear graphs is the tensor product over its components (cf. Remark 3.1), we restrict to the case of connected ones, i.e. the alternating graphs.

Theorem 5.4

Let \(\texttt{A}_n\) be an alternating graph. Then, we have the following isomorphisms

$$\begin{aligned} \textrm{H}_{\mu }^*(\texttt{A}_n, {\mathbb {K}}) \cong \left\{ \begin{array}{lll} \textrm{H}_{\mu }^*(\texttt{A}_{n-1}, {\mathbb {K}}) &{} \text{ if } \; n \equiv 0 \mod 3,\\ 0 &{} \text{ if } \; n \equiv 1 \mod 3, \\ \textrm{H}_{\mu }^{*-1}(\texttt{A}_{n-2},{\mathbb {K}}) &{} \text{ if } \; n \equiv 2 \mod 3.\\ \end{array} \right. \end{aligned}$$
(7)

depending on the congruence class of n modulo 3.

Proof

We use the notation illustrated in Fig. 12, with \(\texttt{G} = \texttt{A}_n\). By Theorem 3.5, the path poset \(P(\texttt{A}_n)\) is isomorphic to \(\nabla _{P(\texttt{G} '')} (P(\texttt{G} \setminus \{{e_2}\}), P(\texttt{G} ')) \). Observe that \(P(\texttt{G} \setminus \{{e_2}\})\) is a cone over \(P(\texttt{G} '')\) and that we have isomorphisms of graphs \(\texttt{G} ' \cong \texttt{A}_{n-1}\) and \(\texttt{G} '' \cong \texttt{A}_{n-2} \). Consequently, there is an induced isomorphism

$$\begin{aligned} P(\texttt{A}_n)=P(\texttt{G} )\cong \nabla _{P(\texttt{A}_{n-2})} ({\mathfrak {Cone}~}P(\texttt{A}_{n-2}), P(\texttt{A}_{n-1})) \end{aligned}$$

of posets. Since the cohomology groups \(\textrm{H}_{\mu }^*({\mathfrak {Cone}~}P(\texttt{A}_{n-2});{\mathbb {K}})\) are all trivial, from Theorem 4.2 (applied to the gluing of \({\mathfrak {Cone}~}P(\texttt{A}_{n-2})\) and \(P(\texttt{A}_{n-1})\)) we obtain the following exact sequence:

$$\begin{aligned} \cdots \rightarrow \textrm{H}_{\mu }^i( P(\texttt{A}_{n-1});{\mathbb {K}})\rightarrow & {} \textrm{H}_{\mu }^i( P(\texttt{A}_{n-2});{\mathbb {K}}) \rightarrow \textrm{H}_{\mu }^{i+1}(P(\texttt{A}_{n}),{\mathbb {K}})\\ {}\rightarrow & {} \textrm{H}_{\mu }^{i+1}( P(\texttt{A}_{n-1});{\mathbb {K}}) \rightarrow \cdots \end{aligned}$$

A direct computation shows that the cohomology of the graphs \(\texttt{A}_n\) for \(n<5\) agrees with the isomorphisms in Eq. (7). The assertion now follows by an induction argument. \(\square \)

As a consequence, it is possible to obtain a precise description of the ranks of cohomology groups for alternating graphs:

Corollary 5.5

Let \(\texttt{A}_n\) be an alternating graph. Then,

$$\begin{aligned} \dim _{{\mathbb {K}}} \textrm{H}_{\mu }^k(\texttt{A}_n; {\mathbb {K}}) = {\left\{ \begin{array}{ll} 1 &{} \text{ if } n=3(k-1)+2 \text{ or } n=3k,\\ 0 &{} \text{ otherwise. } \\ \end{array}\right. } \end{aligned}$$

Before proceeding with our analysis of the cohomology of oriented linear graphs, we need the following definition.

Definition 5.6

Given a oriented linear graph \(\texttt{L}\), its reduction \(\textrm{Red }~\texttt{L}\) is the (possibly disconnected) spanning subgraph of \(\texttt{L}\), obtained as follows; for each maximal simple path on (the ordered set of) vertices \(\{v_h,\dots ,v_{h+m}\}\), delete all edges, but the one between \(v_{h+m-1}\) and \(v_{h+m}\).

Note that if a maximal simple path is an edge of \(\texttt{L}\), then it is still an edge of \(\textrm{Red }~\texttt{L}\).

Example 5.7

The reduction of \(\texttt{I}_n\) is the spanning subgraph of \(\texttt{I}_n\) with only edge \((v_{n-1},v_n)\). The reduction \(\textrm{Red }~\texttt{L}\) is isomorphic to \(\texttt{L}\) if, and only if, \(\texttt{L}\) is alternating.

Observe that, by construction, the digraph \(\textrm{Red }~\texttt{L}\) is the disjoint union of h connected components, where \(h-1\) is the number of edges deleted during the process of reduction.

We can linearly order the connected components of \(\textrm{Red}~\texttt{L}\) according to their minimal-index vertex. Denote by \(C_i\) the i-th component with respect to this order. Notice that \(\textrm{Red}~\texttt{L}\) satisfies D(1), thence for each \(i\in \{ 1 ,\ldots , h\}\) there is a \(k_{i}\ge 0\) such that \(C_i\cong \texttt{A}_{k_i}\).

Lemma 5.8

Let \(\texttt{L}\) be an oriented linear graph satisfying the property D(2), and let \(\texttt{A}_{k_1}, \dots , \texttt{A}_{k_h}\) be the connected components of \(\textrm{Red}~\texttt{L}\). If \(k_h \equiv 1 \mod 3\), then \(\textrm{H}_{\mu }^*(\texttt{L}; {\mathbb {K}})=0\).

Proof

Note that if \(\texttt{L}\) satisfies D(1), then it is an alternating graph, and the statement follows by Proposition 5.4. Suppose \(\texttt{L}\) satisfies D(2), but not D(1) and denote by \(w_0, \dots , w_{k_h}\) the vertices of \(\texttt{A}_{k_h}\). First, observe that, by Definition 5.6, if \(k_h=1\) or if \(|E(\texttt{L})|=k_h+1\), then the linear graph \(\texttt{L}\) has a coherent tail. Thus, \(\textrm{H}_{\mu }^*(\texttt{L}; {\mathbb {K}})=0\) by Remark 4.8.

In all the other cases, up to orientation reversing, the graph \(\texttt{L}\) contains a subgraph as in Fig. 13.

Fig. 13
figure 13

The sub-graph \(\texttt{A}_{k_h}\) inside \(\texttt{L}\). The edge \((w_{k_h -1}, w_{k_h})\) can be oriented either way depending on the parity of \(k_h\)

We can apply Theorem 3.5 choosing the vertex x illustrated in Fig. 13 and obtain the isomorphism

$$\begin{aligned} P(\texttt{L})\cong \nabla _{P(\texttt{L}''')}(P(\texttt{L}'), P(\texttt{L}'')) \ , \end{aligned}$$

where \(\texttt{L}'=\texttt{L}\setminus \{(w_0,x)\}\), \(\texttt{L}''=\texttt{L}\setminus \{(v,x)\}\) and \(\texttt{L}'''=\texttt{L}\setminus \{(w_0,x),(v,x) \}\). Now, Remark 4.8 implies \(\textrm{H}_{\mu }^*(\texttt{L}''; {\mathbb {K}})=0\). Furthermore, \(\textrm{H}_{\mu }^*(\texttt{L}'; {\mathbb {K}})=\textrm{H}_{\mu }^*(\texttt{L}'''; {\mathbb {K}})=~0\), since \(\texttt{L}'\) and \(\texttt{L}'''\) have \(\texttt{A}_{k_h}\) as a connected component—cf. Remark 3.1 and Proposition 5.4; in fact, \(w_{k_h}\) is univalent, since \(k_h\ne 0\). The statement now follows from Theorem 4.2. \(\square \)

Denote by \(\lfloor x \rfloor \) the integer part of x.

Theorem 5.9

Let \(\texttt{L}\) be an oriented linear graph satisfying the property D(2), but not D(1). Denote by \(\texttt{A}_{k_1}, \dots , \texttt{A}_{k_h}\) the connected components of \(\textrm{Red }~\texttt{L}\). Then,

  1. (1)

    If there exists an index \(j \in \{1, \dots h-1\}\) such that \(k_j \equiv 0 \mod 3\), then \(\textrm{H}_{\mu }^*(\texttt{L},{\mathbb {K}})=0\);

  2. (2)

    Otherwise, the cohomology groups of \(\texttt{L}\) decompose as

    $$\begin{aligned} \quad \textrm{H}_{\mu }^{* + h - 1}(\texttt{L};{\mathbb {K}})= \textrm{H}_{\mu }^*(\texttt{A}_{3\lfloor k_1/3 \rfloor }; {\mathbb {K}})\otimes \dots \otimes \textrm{H}_{\mu }^*(\texttt{A}_{3\lfloor k_{h-1}/3 \rfloor }; {\mathbb {K}})\otimes \textrm{H}_{\mu }^*(\texttt{A}_{k_h} ; {\mathbb {K}}) \ , \end{aligned}$$

    where \(\otimes \) here denotes the graded tensor product over \({\mathbb {K}}\).

Proof

We linearly order the edges \(e_1, \dots ,e_{h-1}\) in \(E(\texttt{L})\setminus E(\textrm{Red}~\texttt{L})\), i.e.  the edges in the complement of the components \(\texttt{A}_{k_1}, \dots , \texttt{A}_{k_h}\), according to their minimal-index vertex. The addition of \(e_i\) to \({\textrm{Red}}~L\) merges the component \(\texttt{A}_{k_i}\) with the component \(\texttt{A}_{k_{i+1}}\).

Fig. 14
figure 14

A possible sub-graph of \(\texttt{L}\)

Fig. 15
figure 15

Another possible sub-graph of \(\texttt{L}\)

  1. (1)

    To prove the first item, observe that if \(k_j \equiv 0 \mod 3\), then either \(\texttt{L}\) has a coherent tail (when \(k_1=0\)) or, up to orientation reversing, it contains a subgraph as in Fig. 14, where the vertices \(w_0, \dots , w_3\) are in \(\texttt{A}_{k_j}\).

    Now, if v is an univalent vertex of the graph \(\texttt{L}\), then \(\texttt{L}\) has a coherent tail of length two and, again, the cohomology groups \(\textrm{H}_{\mu }^*(\texttt{L},{\mathbb {K}})\) are trivial. In all remaining cases, \(\texttt{L}\) contains a subgraph as in Fig. 15.

    We are in the hypothesis of Theorem 3.5, choosing the vertex v, to decompose \(P(\texttt{L})\) as

    $$\begin{aligned} P(\texttt{L})\cong \nabla _{P(\texttt{L}''')}(P(\texttt{L}'), P(\texttt{L}'')) \ , \end{aligned}$$

    where \(\texttt{L}'=\texttt{L}\setminus \{(v,x)\}\), \(\texttt{L}''=\texttt{L}\setminus \{(v,y)\}\), and \(\texttt{L}'''=\texttt{L}\setminus \{(v,x), (v,y)\}\).

    The first assertion follows from Criterion A: \(\textrm{H}_{\mu }^*(\texttt{L}''; {\mathbb {K}})=0\) because \(\texttt{L}''\) contains a coherent tail, and the cohomologies \(\textrm{H}_{\mu }^*(\texttt{L}';{\mathbb {K}})\) and \(\textrm{H}_{\mu }^*(\texttt{L}'''; {\mathbb {K}})\) are both trivial in virtue of Lemma 5.8 and Remark 3.1.

  2. (2)

    The proof of second statement proceeds by induction. We are in the case \(k_j\not \equiv 0 \mod 3\) for \(j\in \{ 1 ,\dots , h-1\}\).

    The graph obtained from \(\texttt{L}\) by deleting \(e_1\) has two connected components \(\texttt{L}_1=\texttt{A}_{k_1}\) and \(\texttt{L}_2\). Observe that \(\texttt{L}_1\) and \(\texttt{L}_2\) are oriented linear graphs satisfying the property D(2)—cf. Remark 5.3. Since \(k_1\ne 0\), we have that \(\texttt{L}_1\) has at least one edge. Furthermore, by definition of the reduction, we can assume that \(e_1\) is contained in a linear subgraph of the form

    figure i

    or

    figure j

    with \(e\in E(\texttt{L}_1)\). By Theorem 3.5, we have the decomposition

    $$\begin{aligned} P(\texttt{L})\cong \nabla _{P((\texttt{L}_1 \sqcup \texttt{L}_2) \setminus \{e\} )}(P(\texttt{L}_1 \sqcup \texttt{L}_2), P(\texttt{L}\setminus \{e\})) \ . \end{aligned}$$

    Observe now that \( P(\texttt{L}\setminus \{e\}) \cong {\mathfrak {Cone}~}P\left( (\texttt{L}_1 \sqcup \texttt{L}_2) \setminus \{e\}\right) \), hence

    $$\begin{aligned} P(\texttt{L})\cong \nabla _{P(\texttt{A}_{k_1-1} \sqcup \texttt{L}_2)}\left( P(\texttt{A}_{k_1} \sqcup \texttt{L}_2), {\mathfrak {Cone}~}P(\texttt{A}_{k_1-1} \sqcup \texttt{L}_2) \right) \ . \end{aligned}$$

    Using Theorem 4.2, we get the following exact sequence

    (8)

    In the following, set first \(k_1=3j+1\). By Corollary 5.5 and Remark 3.1, the cohomology group \(\textrm{H}_{\mu }^i(\texttt{A}_{k_1} \sqcup \texttt{L}_2; {\mathbb {K}})\) is trivial. Analogously, the group \(\textrm{H}_{\mu }^i(\texttt{A}_{k_1-1} \sqcup \texttt{L}_2; {\mathbb {K}})\) is isomorphic to the product \(\textrm{H}_{\mu }^{j}(\texttt{A}_{k_1-1}; {\mathbb {K}})\otimes \textrm{H}_{\mu }^{i-j}(\texttt{L}_2; {\mathbb {K}})\). In the case \(k_1=3j+2\) instead, the group \(\textrm{H}_{\mu }^i(\texttt{A}_{k_1} \sqcup \texttt{L}_2; {\mathbb {K}})\) is isomorphic to the product \(\textrm{H}_{\mu }^{j+1}(\texttt{A}_{k_1}; {\mathbb {K}})\otimes \textrm{H}_{\mu }^{i-j-1}(\texttt{L}_2; {\mathbb {K}})\), and \(\textrm{H}_{\mu }^i(\texttt{A}_{k_1-1} \sqcup \texttt{L}_2; {\mathbb {K}})\) is trivial.

    As a consequence, using the Mayer Vietoris sequence in Eq. (8), we have

    $$\begin{aligned} \textrm{H}_{\mu }^{i+1}\left( \texttt{L}; {\mathbb {K}}\right) \cong {\left\{ \begin{array}{ll} \textrm{H}_{\mu }^{j}({\texttt{A}}_{k_1-1};{\mathbb {K}})\otimes \textrm{H}_{\mu }^{i-j}(\texttt{L}_2; {\mathbb {K}}) &{} \text{ if } k_1=3j+1,\\ \textrm{H}_{\mu }^{j+1}({\texttt{A}}_{k_1};{\mathbb {K}})\otimes \textrm{H}_{\mu }^{i-j}(\texttt{L}_2; {\mathbb {K}}) &{} \text{ if } k_1=3j+2\\ \end{array}\right. } \end{aligned}$$

    If \(k_1=3j+1\), we can rewrite the first isomorphism, using that the multipath cohomology of \({\texttt{A}}_{k_1-1} = \texttt{A}_{3j}\) is concentrated in cohomological degree j, as follows:

    $$\begin{aligned} \textrm{H}_{\mu }^{i+1}\left( \texttt{L}; {\mathbb {K}}\right)\cong & {} \left( \textrm{H}_{\mu }^{j}({\texttt{A}}_{k_1-1}, {\mathbb {K}})\otimes \textrm{H}_{\mu }^{i-j}(\texttt{L}_2, {\mathbb {K}})\right) \\ {}\cong & {} \bigoplus _{r+s = i} \left( \textrm{H}_{\mu }^{r}({\texttt{A}}_{3j}, {\mathbb {K}})\otimes \textrm{H}_{\mu }^{s}(\texttt{L}_2, {\mathbb {K}})\right) \end{aligned}$$

    On the other hand, if \(k_1=3j+2\), by Theorem 5.4 and Corollary 5.5, we obtain the isomorphism

    $$\begin{aligned} \textrm{H}_{\mu }^{i}\left( \texttt{L}; {\mathbb {K}}\right) \cong \textrm{H}_{\mu }^{j+1}({\texttt{A}}_{k_1}, {\mathbb {K}})\otimes \textrm{H}_{\mu }^{i-j -1}(\texttt{L}_2, {\mathbb {K}}) \cong \textrm{H}_{\mu }^{j}({\texttt{A}}_{3j}, {\mathbb {K}})\otimes \textrm{H}_{\mu }^{i-j-1}(\texttt{L}_2, {\mathbb {K}}). \end{aligned}$$

    Finally, we have also that

    $$\begin{aligned} \textrm{H}_{\mu }^{j}({\texttt{A}}_{3j}, {\mathbb {K}})\otimes \textrm{H}_{\mu }^{i-j-1}(\texttt{L}_2, {\mathbb {K}}) \cong \bigoplus _{r+s = i -1} \left( \textrm{H}_{\mu }^{r}({\texttt{A}}_{3j}, {\mathbb {K}})\otimes \textrm{H}_{\mu }^{s}(\texttt{L}_2, {\mathbb {K}})\right) \end{aligned}$$

    since the multipath cohomology of \({\texttt{A}}_{k_1-2} = \texttt{A}_{3j}\) is concentrated in degree j. We have shown that, in either case, we have

    $$\begin{aligned} \quad \textrm{H}_{\mu }^{*+1}\left( \texttt{L}; {\mathbb {K}}\right) \cong \bigoplus _{r+s = *} \left( \textrm{H}_{\mu }^{r}({\texttt{A}}_{3j}, {\mathbb {K}})\otimes \textrm{H}_{\mu }^{s}(\texttt{L}_2, {\mathbb {K}})\right) = \left( \textrm{H}_{\mu }^{*}({\texttt{A}}_{3j}, {\mathbb {K}})\otimes \textrm{H}_{\mu }^{*}(\texttt{L}_2, {\mathbb {K}})\right) . \end{aligned}$$

    The statement now follows by induction.

\(\square \)

5.2 Graded characteristic of linear graphs

We now analyse the cohomology of linear graphs from a different perspective; instead of considering multipath cohomology with coefficient in a field, we fix a principal ideal domain R as a base ring and take coefficients in a unital R-algebra A. We are interested in analysing the (graded) Euler characteristic in the case where A is graded. Firstly, let us prove a general result.

Theorem 5.10

Let \(\texttt{G} \), \(\texttt{G} ^{\prime }\), and \(\texttt{G} ^{\prime \prime }\) be three digraphs as illustrated in Fig. 12, and let A be a unital R-algebra. Then, one of the following holds:

  1. (1)

    If the edges \(e_1\) and \(e_2\) are coherently oriented, as in Fig. 12d, then the sequence

    $$\begin{aligned} 0 \rightarrow C_{\mu }^{*-1}(\texttt{G} ^\prime ;A) \longrightarrow C_{\mu }^*(\texttt{G} ; A ) \longrightarrow C_{\mu }^*(\texttt{G} ^\prime ;A) \otimes A \rightarrow 0 \end{aligned}$$

    is exact;

  2. (2)

    If the edges \(e_1\) and \(e_2\) are not coherently oriented, see Fig. 12e, then the sequence

    $$\begin{aligned} 0 \rightarrow C_{\mu }^{*-1}(\texttt{G} ^{\prime \prime };A)\otimes A \longrightarrow C_{\mu }^*(\texttt{G} ; A ) \longrightarrow C_{\mu }^*(\texttt{G} ^\prime ;A)\otimes A \rightarrow 0 \end{aligned}$$

    is exact;

where all tensor products are over R.

Proof

Before dwelling into the details of each case, we first discuss the general picture. Denote for simplicity by P, \(P'\), and \(P''\) the path posets of \(\texttt{G} \), \(\texttt{G} ^{\prime }\), and \(\texttt{G} ^{\prime \prime }\), respectively. We have an embedding of \(\texttt{G} ^\prime \) into \(\texttt{G} \) that induces (as a spanning subgraph, cf. Fig. 12c) an injective morphism of poset \(\imath :P' \rightarrow P\). We remark that \(\imath (P')\) is a downward closed faithful subposet of P and that the minimal length of an element in \(P\setminus \imath (P')\) is 1. By [7, Proposition 5.12], we have the following sequence of cochain complexes

$$\begin{aligned} 0 \rightarrow C^{*-1}_{{\mathcal {F}}_{A,A}}(P\setminus \imath (P')) \longrightarrow C^*_{{\mathcal {F}}_{A,A}}(P) \longrightarrow C^*_{{\mathcal {F}}_{A,A}}(P') \otimes A \rightarrow 0 \end{aligned}$$

which is exact. By definition, we have that \(C^*_{{\mathcal {F}}_{A,A}}(P) = C_{\mu }^*(\texttt{G} ; A )\) and \(C^*_{{\mathcal {F}}_{A,A}}(P') = C_{\mu }^*(\texttt{G} ' ; A )\).

To conclude, it is enough to identify the complex \(C^*_{{\mathcal {F}}_{A,A}}(P\setminus {\imath (P')})\). Observe that the elements of \(P\setminus \imath (P')\) are precisely the multipaths in \(\texttt{G} \) containing \(e_1\). The proof splits now in two cases;

  1. (1)

    If \(e_1\) and \(e_2\) are coherently oriented, then \(\texttt{H} \cup \{ e_1 \}\in P\setminus \imath (P')\) for each \(\texttt{H} \in \imath (P')\). Thus, we have an order-preserving bijection between \(P(\texttt{G} ^\prime )\) and \(P\setminus \imath (P')\), which also preserves the number of connected components. Therefore, we obtain the isomorphism

    $$\begin{aligned} C^*_{{\mathcal {F}}_{A,A}}(P\setminus \imath (P')) \cong C^*_{{\mathcal {F}}_{A,A}}(P') = C_{\mu }^*(\texttt{G} ^\prime ;A) \end{aligned}$$

    of cochain complexes;

  2. (2)

    If \(e_1\) and \(e_2\) are not coherently oriented, then a multipath which contains \(e_1\) cannot contain \(e_2\). Thus, we have an identification between multpaths in \(P\setminus \imath (P)\) and multipath in \(\texttt{G} ^{\prime \prime } \cup \{ e_1\}\), which gives the isomorphisms

    $$\begin{aligned} C^*_{{\mathcal {F}}_{A,A}}(P\setminus \imath (P')) \cong C^*_{{\mathcal {F}}_{A,A}}(P'') \otimes A = C_{\mu }^*(\texttt{G} ^{\prime \prime };A)\otimes A \ . \end{aligned}$$

    The tensor factor \(\otimes A\) arises from an extra connected component in each element of the poset \(P\setminus \imath (P')\) with respect to the corresponding element in \(P''\) (namely the edge \(e_1\)).

The statement is now immediate from the above identifications. \(\square \)

The short exact sequence in Theorem 5.10(1) holds also in a slightly different case;

Remark 5.11

Assume that the edges \(e_1\), \(e_2\), and \(e_3\) in \(\texttt{G} \) form a path and that \(e_2\) is not contained in any coherently oriented cycle in \(\texttt{G} \), then the sequence in Theorem 5.10(1) holds. In this case, the role of \(\texttt{G} '\) is played by the graph obtained from \(\texttt{G} \) by contracting the “middle edge” \(e_2\). Then, we have that

$$\begin{aligned} P(\texttt{G} )\setminus P(\texttt{G} \setminus \{ e_2\}) \cong P(\texttt{G} ') \quad \text {and} \quad P(\texttt{G} )\setminus P(\texttt{G} \setminus \{ e_2\}) \cong P(\texttt{G} \setminus \{ e_2\}) , \end{aligned}$$

where the first identification is given by contracting \(e_2\), while the second is given by deleting it. Note that, in the former case, the number of connected components of multipaths is preserved, while in the second case a multipath \(\texttt{H} \in P(\texttt{G} )\setminus P(\texttt{G} \setminus \{ e_2\})\) is sent to a multipath with one more connected component. At this point, the same reasoning as in the proof of Theorem 5.10 provides the desired exact sequence.

We can use Theorem 5.10 to reprove a result of Przytycki [18] which computes the cohomology of \(\texttt{I}_n\) (cf. [7, Corollary 7.5]). We observe that Przytycki obtains this result using the chromatic polynomial as intermediate step, while we prove it directly by induction. Moreover, the following corollary, if A is commutative, can also be proved as an application of the deletion-contraction exact sequence for the chromatic homology [11, Theorem 3.2].

Corollary 5.12

Let \(\texttt{I}_n\) be the coherently oriented linear graph (cf. Figure 3). For each (unital) R-algebra A, we have

$$\begin{aligned} \textrm{H}_{\mu }^*(\texttt{I}_n;A) = \textrm{H}_{\mu }^0(\texttt{I}_n;A), \end{aligned}$$

and

$$\begin{aligned} {\textrm{rank}}_R(\textrm{H}_{\mu }^*(\texttt{I}_n;A)) = {\textrm{rank}}_R(\textrm{H}_{\mu }^0(\texttt{I}_n;A)) = {\left\{ \begin{array}{ll}{\textrm{rank}}_R (A) ( {\textrm{rank}}_R (A) -1 )^n &{} n\ge 1 \\ {\textrm{rank}}_R (A) &{} n =0 \end{array}\right. }\ . \end{aligned}$$

Proof

The statement is true for \(\texttt{I}_0\), and it is easily proved for \(\texttt{I}_1\); in fact, we have

$$\begin{aligned} 0\rightarrow C^0_{\mu }(\texttt{I}_1;A) = A\otimes A \overset{d^0}{\longrightarrow } C^1_{\mu }(\texttt{I}_1;A) = A \rightarrow 0, \end{aligned}$$

where \(d^0\) is the map \(a\otimes b\mapsto ab\), which is surjective since A is unital.

We proceed by induction. Assume that the statement is true for \(n=k-1\). Then, we can apply Theorem 5.10 to \(\texttt{G} = \texttt{I}_k\), \(\texttt{G} ^\prime = \texttt{I}_{k-1}\), and \(e = (v_0,v_1)\)—cf. Fig. 3. From the inductive hypothesis, we obtain the exact sequences

$$\begin{aligned} 0 = {\textrm{H}}_{\mu }^{i-1}(\texttt{I}_{k-1};A) \rightarrow {\textrm{H}}_{\mu }^i(\texttt{I}_{k} ; A ) \rightarrow {\textrm{H}}_{\mu }^{i}(\texttt{I}_{k-1};A) = 0,\quad \text {for }i>1, \end{aligned}$$

and

$$\begin{aligned} 0 \rightarrow {\textrm{H}}_{\mu }^0(\texttt{I}_{k}; A ) \rightarrow \textrm{H}_{\mu }^0(\texttt{I}_{k-1};A) \otimes A \overset{\delta ^*}{\rightarrow }\ \textrm{H}_{\mu }^0(\texttt{I}_{k-1};A) \rightarrow {\textrm{H}}_{\mu }^1(\texttt{I}_{k} ; A ) \rightarrow 0, \end{aligned}$$
(9)

where \(\delta ^*(x\otimes 1) = x\). As a consequence, we have

  1. (1)

    \({\textrm{H}}_{\mu }^i(\texttt{I}_{k} ; A ) = 0\), for all \(i>1\);

  2. (2)

    The exact sequence in Eq. (9), since \(\delta ^*\) is surjective, splits into the exact sequences

    $$\begin{aligned} 0 \rightarrow {\textrm{H}}_{\mu }^0(\texttt{I}_{k}; A ) \rightarrow {\textrm{H}}_{\mu }^0(\texttt{I}_{k-1};A) \otimes A \overset{\delta ^*}{\rightarrow }\ {\textrm{H}}_{\mu }^0(\texttt{I}_{k-1};A) \rightarrow 0 \end{aligned}$$

    and

    $$\begin{aligned} 0 \rightarrow {\textrm{H}}_{\mu }^1(\texttt{I}_{k} ; A ) \rightarrow 0. \end{aligned}$$

Since the rank is additive on short exact sequencesFootnote 2, this concludes the proof. \(\square \)

Let R be a PID, and \(A^* = \bigoplus _{i\in {\mathbb {Z}}} A^i\) be a finitely generated \({\mathbb {Z}}\)-graded R-algebra. The graded dimension of A is the Laurent polynomial

$$\begin{aligned} \textrm{qdim}(A^*) :=\sum _{i\in {\mathbb {Z}}} \textrm{rank}_{R} (A^i)q^i \in {\mathbb {Z}}\left[ q,q^{-1} \right] \ , \end{aligned}$$

where \(\textrm{rank}_{R}(M)\) indicates the maximal number of non-torsion, linearly independent, elements. A graded algebra has, by definition, an homogeneous multiplication. As a consequence, the multipath cochain complex inherits from \(A^*\) a second \({\mathbb {Z}}\)-grading, which is preserved by the differential. This gives the multipath cohomology the structure of bi-graded cohomology theory. Define the graded Euler characteristic of a graph \(\texttt{G} \) (with respect to \(A^*\)) as

$$\begin{aligned} \chi _{{\textrm{gr}}} (\texttt{G} ;A^*) = \sum _{i,j\in {\mathbb {Z}}} (-1)^i \textrm{rank}_{R} \left( {\textrm{H}}_{\mu }^{i,j}(\texttt{G} ;A^*)\right) q^j \in {\mathbb {Z}}\left[ q,q^{-1} \right] \ . \end{aligned}$$

Note that if we evaluate \(\textrm{qdim}(A^*)\) (resp. \(\chi _{{\textrm{gr}}}\)) in \(q =1\), we obtain the rank of \(A^*\) as R-module (resp. the usual Euler characteristic \(\chi \)). It is well known that the Euler characteristic is additive under exact sequences, and the same holds for the graded Euler characteristicFootnote 3. With the above notation in place, the following corollary is an immediate consequence of Theorem 5.10.

Corollary 5.13

Let \(\texttt{G} \), \(\texttt{G} ^{\prime }\), and \(\texttt{G} ^{\prime \prime }\) be three digraphs as illustrated in Fig. 12. Let \(A^*\) be a finitely generated free \({\mathbb {Z}}\)-graded R-algebra with graded dimension \(\alpha = \textrm{qdim}(A^*)\).

  1. (1)

    If the edges \(e_1\) and \(e_2\) are coherently oriented (cf. Fig. 12d), then

    $$\begin{aligned} \chi _{{\textrm{gr}}} (\texttt{G} ;A^*) = (\alpha -1) \chi _{{\textrm{gr}}} (\texttt{G} ^\prime ;A^*). \end{aligned}$$
  2. (2)

    If the edges\(e_1\) and \(e_2\) are not coherently oriented (cf. Fig. 12e), then

    $$\begin{aligned} \chi _{{\textrm{gr}}} (\texttt{G} ;A^*) = \alpha \left( \chi _{{\textrm{gr}}} (\texttt{G} ^\prime ;A^* ) - \chi _{{\textrm{gr}}} (\texttt{G} ^{\prime \prime };A^*) \right) . \end{aligned}$$

Corollary 5.13 allows us to compute the (graded) characteristic of any oriented linear graph, recursively. We provide, as an example of this process, the graded characteristic of some alternating graphs.

Example 5.14

Let \(\texttt{A}_n\) be the alternating graph on n vertices, with \(n\ge 3\); by Corollary 5.13, the graded characteristic can be expressed as:

$$\begin{aligned} \chi _{{\textrm{gr}}} (\texttt{A}_n;A^*) = \alpha \left( \chi _{{\textrm{gr}}} (\texttt{A}_{n-1};A^* ) - \chi _{{\textrm{gr}}} (\texttt{A}_{n-2};A^*) \right) . \end{aligned}$$

For \(n=0\) and \(n=1\), the graded characteristic of \(\texttt{A}_n\) are \(\textrm{qdim}(A^*) =: \alpha \) and \(\alpha (\alpha -1)\), respectively. Some further examples are listed in Table 2.

Table 2 The graded Euler characteristic of some alternating linear graphs

The usual Euler characteristic over \(R = {\mathbb {K}}\) can be obtained by evaluating the graded Euler characteristic in \(\alpha =1\). Thus, by Corollary 5.5, \((\alpha -1)\) divides \(\chi _{{\textrm{gr}}} (\texttt{A}_n;A^*)\) if, and only if, \(n\equiv 1\) modulo 3. Observe that our computations are in perfect accordance with this fact.

Despite not having a closed formula for the graded Euler characteristics of alternating graphs, we can compute its associated generating function \(A(t)=\sum \chi _{{\textrm{gr}}}(\texttt{A}_n) t^n {\in ({\mathbb {Z}}[\alpha ])[[t]]}\) (cf. [27]). In fact, if we denote by \(S_h\) the classical shift for power series

$$\begin{aligned} S_{h}\left( \sum _{n=0}^{\infty } c_n t^{n}\right) = \sum _{n=0}^{\infty } c_{n+h} t^{n}\ , \end{aligned}$$

from Theorem 5.10 one obtains the relation \(S_2(A(t))=\alpha (S_1(A(t))-A(t))\). It is also immediate to see that

$$\begin{aligned} S_1(A(t))=\frac{A(t)-\alpha }{t} \ . \end{aligned}$$

Iterating \(S_1\) and using the fact that \(A(1)=A(0)(\alpha -1)\), one easily obtains that the ordinary generating function of the graded Euler characteristic of alternating graphs is

$$\begin{aligned} A(t)=\frac{\alpha (1-t)}{1 - \alpha t ( 1-t)} \ . \end{aligned}$$

Furthermore, in some special cases, we can actually obtain a closed formula.

Corollary 5.15

Let \(A^*\) be a free \({\mathbb {Z}}\)-graded R-algebra with graded dimension \(\alpha \in {\mathbb {Z}}\left[ q,q^{-1} \right] \). If \(\texttt{I}_n\) is the coherently oriented linear graph of length n, then

$$\begin{aligned} \chi _{{\textrm{gr}}} (\texttt{I}_n;A^*) = \alpha (\alpha - 1)^n\text {, for }n>0\text {,} \end{aligned}$$

and \(\chi _{{\textrm{gr}}} (\texttt{I}_0;A^*) = \alpha \).

From Remark 5.11 and Corollary 5.13, it follows that \((\alpha - 1)^{x}\) divides \(\chi _{{\textrm{gr}}}(\texttt{L})\), where x is the number of edges incident only to vertices which are either univalent or unstable. This, similar divisibility properties, and the decomposition shown in Theorem 5.4, seem to hint to the fact that \(\chi _{{\textrm{gr}}}(\texttt{L})\) is sensible to “dynamical properties” of the graph.

Question 5.16

Does it exist a closed formula for \(\chi _{{\textrm{gr}}}(\texttt{L})\), with \(\texttt{L}\) a linear graph, which features only dynamical data (e.g. stable and unstable vertices, change of stability, etc.) and the polynomial of an alternating \(\chi _{{\textrm{gr}}}(\texttt{A}_n)\) (n also depending on dynamical data)?

6 Relations with simplicial homology

In this section, we give a topological description of multipath cohomology. More specifically, we see that \(\textrm{H}_{\mu }^*(\texttt{G} ;R)\) is the ordinary cohomology of a certain simplicial complex \(X(\texttt{G} )\) associated with \(\texttt{G} \)—cf. Theorem 6.5. For instance, this approach leads to a reinterpretation of the Mayer–Vietoris exact sequence for multipath cohomology, in topological terms. Furthermore, we also discuss which simplicial complexes can be realised as \(X(\texttt{G} )\) for some \(\texttt{G} \).

6.1 Background material

Recall that a regular CW-complex is a CW-complex for which all the characteristic maps are homeomorphisms—cf. [5, Sect. 3]. Recall also that the face poset \({\mathcal {F}}(X)\) of a CW-complex X is the poset on the set of cells of X, ordered by containment and augmented with a minimum element \({\hat{0}}\) corresponding to the empty cell. A poset P with at least two elements is said to be a CW-poset if it has a minimum \({\hat{0}}\), and, for all \(x\in P\setminus {\hat{0}}\), the (geometric realisationFootnote 4 of the) interval \(({\hat{0}},x):=\{z\in P\mid {\hat{0}}<z<x\}\) is a sphere.

Example 6.1

A Boolean poset is a CW-poset. More generally, by [5, Proposition 2.6 (b)], every downward closed subposet of a Boolean poset is a CW-poset. By Remark 2.8, the path poset \(P(\texttt{G} )\) is a downward closed subposet of a Boolean poset; hence, it is a CW-poset.

A poset P is a CW-poset if, and only if, it is isomorphic to the face poset of a regular CW-complex—see [5, Proposition 3.1]. As a consequence, for a digraph \(\texttt{G} \) there exists a regular CW-complex \(X(\texttt{G} )\) whose face poset is isomorphic to \(P(\texttt{G} )\). We can actually be more specific. Recall that an (augmented abstract) simplicial complex K on a vertex set V is a simplicial complex augmented with a unique \((-1)\)-simplex given by the empty set \(\emptyset \).

Definition 6.2

Given a digraph \(\texttt{G} \), its multipath complex is the augmented abstract simplicial complex \(X(\texttt{G} )\) on \(E(\texttt{G} )\) whose k-simplices are given by the multipaths in \(\texttt{G} \) of length \(k-1\).

Since each spanning sub-graph of a multipath is a multipath, it is clear that \(X(\texttt{G} )\) is indeed an augmented abstract simplicial complex. Furthermore, we have the following observation.

Remark 6.3

A morphism of digraphs induces a morphism between the corresponding multipath complexes, which sends multipaths of length 1 to multipaths of length 1. It follows that for each morphism of digraphs \(\phi :\texttt{G} \rightarrow \texttt{G} '\) there is an associated simplicial map \(X(\phi ):X(\texttt{G} ) \rightarrow X(\texttt{G} ')\). Clearly, we have that \(X(\textrm{id}_{\texttt{G} })= \textrm{id}_{X(\texttt{G} )}\) and that \(X(\phi \circ \psi ) =X(\phi )\circ X(\psi )\). Hence, taking the multipath complex defines a functor \(X:{{\textbf { Digraph}} } \rightarrow {\textbf { SimpComp}}\) from the category of digraphs, and morphisms of digraphs, to the category of augmented abstract simplicial complexes, and simplicial maps.

We can give a more explicit description of \(X(\texttt{G} )\).

Construction of \(X(\texttt{G} )\)

We construct the CW-complex which has \(X(\texttt{G} )\) as face poset by explicitly describing its cells and their gluing maps. We start by associating to the empty multipath of \(\texttt{G} \), i.e. the set of vertices of \(\texttt{G} \), the empty simplex, i.e. the \((-1)\)-skeleton of \(X(\texttt{G} )\). We build the complex \(X(\texttt{G} )\) by attaching n-cells to the discrete set \(X(\texttt{G} )^0:=E(\texttt{G} )\), i.e. the 0-skeleton of \(X(\texttt{G} )\) is given by the set of edges of \(\texttt{G} \).

Suppose to have iteratively constructed the \((n-1)\)-skeleton \(X(\texttt{G} )^{(n-1)}\) of \(X(\texttt{G} )\). Each multipath \(\texttt{H} \) of length \(n+1\)—i.e. with \(n+1\) edges—is identified by edges \(e_{i_0},\dots ,e_{i_n}\) of \(\texttt{G} \); hence, by \(n+1\) points of \(X(\texttt{G} )^0\). We associate to \(\texttt{H} \) the (abstract) n-dimensional simplex \(\Delta _{\texttt{H} }^n :=[e_{i_0} , \cdots , e_{i_n}]\), which is an n-cell of \(X(\texttt{G} )^n\). In this way, each multipath \(\texttt{H} \) of length n gives an n-cell of \(X(\texttt{G} )\). Note that the multipath \(\texttt{H} \) can be obtained from exactly \(n+1\) (sub-)multipaths of length n, say \(\texttt{H} _0 ,\dots , \texttt{H} _n\), by adding an edge; more precisely, \(\texttt{H} _{j}\) is the multipath of \(\texttt{G} \) with edges \(e_{i_1}, \dots ,\widehat{e_{i_j}},\ldots ,e_{i_n}\), where \(\widehat{e_{i_j}}\) indicates that the edge \(e_{i_j}\) is not counted. The multipaths \(\texttt{H} _0 ,\dots , \texttt{H} _n\) correspond to \((n-1)\)-cells of \(X(\texttt{G} )\), and, moreover, the boundary \(\partial (\Delta _\texttt{H} ^n)\) of \(\Delta _\texttt{H} ^n\) can be identified with the union of its faces \(\Delta _{\texttt{H} _j}^{n-1}\). The characteristic map of \(\Delta _{\texttt{H} }^n\) is then defined by gluing each face \([e_{i_0}, \dots ,\widehat{e_{i_j}},\ldots ,e_{i_n}]\) in \(\partial (\Delta _\texttt{H} ^n)\) with the corresponding \((n-1)\)-cell in \(X(\texttt{G} )^{(n-1)}\). More generally, we glue the simplices \(\{ \Delta _{\texttt{H} }^n \}_{\textrm{lenght}(\texttt{H} ) =n+1}\) to \(X(\texttt{G} )^{(n-1)}\) by identifying the facets of each \(\Delta _{\texttt{H} }\) with the simplices \(\Delta _{\texttt{H} _0} ,\dots , \Delta _{\texttt{H} _n}\), concluding the construction of the n-skeleton, hence of \(X(\texttt{G} )\).

Observe that maximal simplices in \(X(\texttt{G} )\) correspond to maximal multipaths in \(P(\texttt{G} )\). Therefore, to construct the geometric realisation of \(X(\texttt{G} )\) we can proceed by finding the maximal multipaths in \(P(\texttt{G} )\), look at the intersection of each pair of maximal multipath, then glue the simplices associated with maximal multipaths along the faces determined by their intersections.

Example 6.4

In this example, we explicitly describe the geometric realisation of the simplicial complex \(X(\texttt{G} )\), for G the H-shaped digraph illustrated in Fig. 16. Observe that we have five 0-cells \(E^{0}_{01}\), \(E^{0}_{14}\), \(E^{0}_{21}\), \(E^{0}_{34}\), and \(E^{0}_{54}\), where the cell \(E^{0}_{ij}\) corresponds to the edge \((v_i,v_j)\). Each 1-cell in \(X(\texttt{G} )\) corresponds to a multipath of length two. Thus, there are precisely six 1-cells \(E^{1}_{01,14}\), \(E^{1}_{01,34}\), \(E^{1}_{01,54}\), \(E^{1}_{21,14}\), \(E^{1}_{21,34}\), and \(E^{1}_{21,54}\). The 1-cell \(E^{1}_{x,y}\) bounds the 0-cells \(E^0_x\) and \(E^0_y\).

Fig. 16
figure 16

The H digraph and its geometric realisation

Let K be an augmented abstract simplicial complex. The n-th reduced simplicial chain group \({\widetilde{C}}_n(K;R)\) (with coefficients in R) is the free R-module generated by all the n-simplices in K. We assume, from now on, a linear ordering \( v_1< v_2<\ldots < v_k\) of the 0-simplices of K to be fixed. Given an n-simplex in K, say \(\sigma = \{ v_{i_0},\ldots , v_{i_n}\}\), we denote \(\sigma \) as \([v_{i_0},\ldots ,v_{i_n}]\), where \(i_0< i_2<\ldots < i_n\), and define

$$\begin{aligned}{}[v_{i_{s(0)}},\ldots ,v_{i_{s(n)}}] : = (-1)^{\textrm{sgn}(s)} [v_{i_0},\ldots ,v_{i_n}], \end{aligned}$$

for each s in the symmetric group over \(\{ 0,\ldots ,n\}\). The n-th simplicial differential is defined as

$$\begin{aligned} \delta _n:{\widetilde{C}}_n(K;R) \longrightarrow {\widetilde{C}}_{n-1}(K;R) : [v_{i_0},\ldots ,v_{i_n}] \longmapsto \sum _{j=0}^{n} (-1)^j [v_{i_0},\ldots ,\widehat{v_{i_j}},\ldots ,v_{i_n}]\ , \end{aligned}$$

where the hat \({\widehat{x}}\) indicates that x is missing. The n-th reduced simplicial co-chain group is

$$\begin{aligned} {\widetilde{C}}^n(K;R) = {\textrm{Hom}}_R({\widetilde{C}}_n(K;R); R) \end{aligned}$$

and, given \(f\in C^{n+1}(K;R)\), we define the co-boundary map \(\delta \) by setting \( \delta ^n (f) = f(\delta _n(\sigma ))\).

6.2 Multipath cohomology is simplicial

Let \(X(\texttt{G} )\) be the multipath complex associated with the digraph \(\texttt{G} \), and let \({\mathbb {K}}\) be a field.

Theorem 6.5

The multipath cohomology \(\textrm{H}_\mu ^n(\texttt{G} ;{\mathbb {K}})\) of \(\texttt{G} \) is isomorphic to \(\widetilde{\textrm{H}}^{n-1} (X(\texttt{G} );{\mathbb {K}})\), that is, the reduced (simplicial) cohomology of \(X(\texttt{G} )\).

Note that in the isomorphism between the multipath cohomology of \(\texttt{G} \) and the simplicial cohomology of \(X(\texttt{G} )\) there is a shift of degree one.

Proof

Let X be a finite simplicial complex. The reduced simplicial cohomology cochain complex \({\widetilde{C}}^n (X;{\mathbb {K}})\) can be seen as the vector space over \({\mathbb {K}}\) generated by the duals of all simplices (including the empty simplex) of X, with co-boundary map \(\delta \) given by

$$\begin{aligned} \delta (\sigma ^*) = \sum _{\tau } (-1)^{\epsilon '(\tau ,\sigma )} \tau ^* \ , \end{aligned}$$

where \(\tau \) ranges among all simplices admitting \(\sigma \) as a face, and \(\epsilon '(\tau ,\sigma )\) is 0 or 1 depending on whether or not the orientation of \(\sigma \) matches with the orientation induced by \(\tau \)—for a more detailed construction, the reader can consult [14, Sect. 3.4.3].

By construction, the simplices of \(X(\texttt{G} )\) correspond to multipaths in \(\texttt{G} \); more precisely, the points of \(X(\texttt{G} )^0\) are the edges of \(\texttt{G} \), and the multipath \(\texttt{H} \) identified by the edges \(e_{i_1},\ldots , e_{i_n}\) corresponds to the simplex \([e_{i_1},\ldots , e_{i_n}]\). The vector space \(C^{n}_{\mu }(\texttt{G} ;{\mathbb {K}})\) has one generator \(b_{\texttt{H} }\) for each multipath \(\texttt{H} \) of length n, and the differential is given by

$$\begin{aligned} d(b_{\texttt{H} }) = \sum _{\texttt{H} ' \supset \texttt{H} } (-1)^{\epsilon (\texttt{H} ' , \texttt{H} )} b_{\texttt{H} '}, \end{aligned}$$

for a certain sign assignment \(\epsilon \). It follows that the correspondence \(b_{\texttt{H} } \mapsto [e_{i_1},\ldots , e_{i_n}]\), where \(\texttt{H} \) is identified by the edges \(e_{i_1},\ldots , e_{i_n}\), extends to an isomorphism of graded vector spaces which commutes with the differentials up to a sign. Note that a multipath of length n corresponds to an \((n-1)\)-dimensional simplex, which gives the shift in cohomological degree.

We conclude by observing that \(\epsilon '\) is a sign assignment on the face poset of \(X(\texttt{G} )\), which is isomorphic to \(P(\texttt{G} )\); in fact, the statement now follows from the uniqueness (up to isomorphism) of the sign assignment on the path posets [7, Corollary 3.17]. \(\square \)

An alternative way to associate to \(P(\texttt{G} )\) a simplicial complex \(X'(\texttt{G} )\), having the same cohomology groups as \(X(\texttt{G} )\), is to use the order complex \(\Delta (P(\texttt{G} ))\)—see [24]. It is a standard fact that, for a simplicial complex X, the realisation of \(\Delta ({\mathcal {F}}(X))\), that is the order complex of the face poset of X, is the barycentric subdivision of X. Consequently, \(X'(\texttt{G} )\) is the barycentric subdivision of \(X(\texttt{G} )\). It is well known that a simplicial complex and its barycentric subdivision have the same simplicial (co)homology. As an immediate consequence, we have the following corollary.

Corollary 6.6

The multipath cohomology \(\textrm{H}_\mu ^*(\texttt{G} ;{\mathbb {K}})\) is the reduced (simplicial) cohomology of the order complex \(\Delta (P(\texttt{G} ))\) associated with \(P(\texttt{G} )\).

Observe that the isomorphism of Theorem 6.5 is well-behaved in a functorial sense:

Remark 6.7

By Remark 6.2, associating the simplicial complex \(X(\texttt{G} )\) to a graph \(\texttt{G} \) is functorial with respect to morphisms of digraphs. Therefore, since taking cohomology groups is functorial with respect to simplicial maps, the isomorphism in cohomology provided by Theorem 6.5 induces a natural isomorphism of functors \(\eta :\textrm{H}_{\mu }^*(-;{\mathbb {K}}) \Rightarrow \widetilde{\textrm{H}}^{*-1}(-;{\mathbb {K}})\circ X\). More concretely, given a morphism of digraphs \(\phi :\texttt{G} \rightarrow \texttt{G} '\), we obtain the following square

figure k

that is commutative, with vertical arrows which are isomorphisms. This, in particular, extends the functoriality result [7, Theorem 1.3] also to non-regular morphisms of digraphs.

6.3 Mayer–Vietoris from the topological viewpoint

In this subsection, we reinterpret the Mayer–Vietoris-type theorem for multipath cohomology, that is Theorem 4.2, using the simplicial description given in Theorem 6.5.

Let X be a simplicial complex and assume that there are sub-complexesFootnote 5\(Y_1\) and \(Y_2\) such that:

  1. (1)

    \(X = Y_1 \cup Y_2\);

  2. (2)

    Their intersection of \(Y_1\) and \(Y_2\) is a sub-complex of X, \(Y_1\), and \(Y_2\);

then, we have a long exact sequence in (reduced) simplicial cohomology

$$\begin{aligned} \cdots \rightarrow \widetilde{\textrm{H}}^i(X;{\mathbb {K}})\longrightarrow & {} \widetilde{\textrm{H}}^i(Y_1;{\mathbb {K}}) \oplus \widetilde{\textrm{H}}^i(Y_2; {\mathbb {K}}) \longrightarrow \widetilde{\textrm{H}}^i(Y_1 \cap Y_2;{\mathbb {K}})\\\longrightarrow & {} \widetilde{\textrm{H}}^{i+1} (Y_1 \cap Y_2;{\mathbb {K}}) \rightarrow \cdots \end{aligned}$$

called Mayer–Vietoris sequence [10, Chapter 2.2]. Intuitively, this sequence “describes” the cohomology of the space X in terms of the cohomology of \(Y_1\), \(Y_2\), and \(Y_1 \cap Y_2\).

In Theorem 4.2, we obtained a similar sequence for path posets associated with regular morphisms of digraphs. We can actually use the correspondence between multipath and simplicial cohomologies to re-prove this result; we can interpret the path poset of a graph G as the face poset of a simplicial complex \(X(\texttt{G} )\). Furthermore, a downward closed sub-poset S of \(P(\texttt{G} )\) corresponds to (the face poset of) a sub-complex of \(X(\texttt{G} )\)—the correspondence being described by taking the simplices of \(X(\texttt{G} )\) given by the multipaths belonging to S. By Theorem 6.5, since we have \(\textrm{H}_{\mu }^{*}(\texttt{G} ;{\mathbb {K}}) \cong \widetilde{\textrm{H}}^{*-1}(X(\texttt{G} );{\mathbb {K}})\), we can replace the cohomology of spaces with the multipath cohomology of the corresponding graph with the corresponding multipath cohomology, obtaining the sequence in Theorem 4.2. To a more intimate level, and in a more abstract language, this is due to the fact that the gluing construction in Definition 3.2 represents the pushout in \({{\textbf {Digraph}} }\)—cf. Remark 3.3.

Remark 6.8

The Mayer–Vietoris long exact sequence in homology is classically obtained using the long exact sequence of the pair applied to homotopy pushouts [21, Theorem 6.3]. Since the gluing construction in Definition 3.2 gives a pushout diagram of graphs, it is reasonable to think that a Mayer–Vietoris long exact sequence can be obtained also for multipath cohomology. In fact, let \(\texttt{G} , \texttt{G} _1, \texttt{G} _2\) as in Definition 3.2; by Remark 3.3, the square

figure l

is a pushout square. Observe that also the square

figure m

is a pushout square of simplicial complexes, where \(X\coprod _{Z} Y\) indicates the gluing of X and Y along \(Z\hookrightarrow X,Y\). Furthermore, taking the face poset takes the square (\(\diamondsuit \)) to the pushout square (\(\spadesuit \)); i.e. \({\mathcal {F}}(X(\texttt{G} _1) \coprod _{X(\texttt{G} )} X(\texttt{G} _2)) = P(\texttt{G} _1) \nabla _{P(\texttt{G} )} P(\texttt{G} _2)\). As inclusions of simplicial complexes are cofibrations, the square (\(\diamondsuit \)) is (equivalent to) a homotopy pushout square. Hence, Diagram (\(\diamondsuit \)) gives rise to the Mayer–Vietoris long exact sequence in reduced cohomology. Naturality of Theorem 6.5, as in Remark 6.7, now gives the Mayer–Vietoris long exact sequence in multipath cohomology. In the light of the above discussion, we can think informally that “inclusions as downward closed sub-posets are cofibrations in the category of posets, and the corresponding nablas are actually homotopy pushouts”—for a more precise treatment of the homotopy theory of posets, see for example [20].

6.4 Realisability of path posets and examples

It is interesting to understand which simplicial complexes can be realised as \(X(\texttt{G} )\) for some digraph \(\texttt{G} \). In this subsection we investigate this problem and some of its consequences. First, we observe that all spheres can be realised.

Example 6.9

Let \(n\ge 1\) be a natural number. The boundary of the n-dimensional standard simplex \(\Delta ^{n}\) is homeomorphic to the \((n-1)\)-dimensional sphere \({\mathbb {S}}^{n-1}\); we argue that \(\partial \Delta ^{n} \) is the simplicial complex \( X(\texttt{P}_{n})\), where \(\texttt{P}_{n}\) is the coherently oriented polygonal graph on n vertices as illustrated in Fig. 4. By [7, Sect. 2.3], the path poset \(P(\texttt{P}_{n})\) is isomorphic (as posets) to the Boolean poset \({\mathbb {B}}(n+1) \) with its maximum removed. Note that the \((n+1)\)-Boolean poset \({\mathbb {B}}(n+1) \) is the face poset \({\mathcal {F}}(\Delta ^n)\) of \(\Delta ^{n}\). Hence, it follows that \(P(\texttt{P}_{n}) \) is the face poset of \(\Delta ^{n}\) minus its unique \((n+1)\)-dimensional cell, which turn to be precisely the sphere \(\partial \Delta ^n\cong {\mathbb {S}}^{n-1}\). As a consequence, by Theorem 6.5, we get

$$\begin{aligned} \textrm{H}_{\mu }^i (\texttt{P}_n;{\mathbb {K}}) \cong \widetilde{\textrm{H}}^{i-1}({\mathbb {S}}^{n-1};{\mathbb {K}}) \cong {\left\{ \begin{array}{ll} {\mathbb {K}}&{} \text { if } i = n, \\ 0 &{} \text { otherwise}\end{array}\right. } \end{aligned}$$

the computations of the cohomology of \(\texttt{P}_n\), with coefficients in \({\mathbb {K}}\), for every \(n\in {\mathbb {N}}\). Alternatively, this could have been obtained as a consequence of the isomorphism with Hochschild homology of \({\mathbb {K}}\)—cf. [7, Proposition 1.4].

Another example is given by the dandelion graphs; their multipath complexes (or, better, their geometric realisations) are homotopy equivalent to wedges of 1-dimensional spheres.

Example 6.10

Consider the dandelion graph \(\texttt{D}_{n,m}\) in Fig. 9. We assume \(nm>0\). The multipath complex of \(\texttt{D}_{n,m}\) is easily described as follows; we have two sets \(e_{1},\ldots ,e_{n}\) and \(e'_{1},\ldots ,e'_{m}\) of 0-cells in \(X(\texttt{D}_{n,m})\), and each \(e_i\) is joined with each \(e'_j\) by a 1-cell, and there are no other 1- or higher cells. Thus, \(X(\texttt{D}_{n,m})\) is the complete bipartite graph \(K_{n,m}\). It follows that

$$\begin{aligned} \textrm{H}_{\mu }^i (\texttt{D}_{n,m};{\mathbb {K}}) \cong {\widetilde{\textrm{H}}}^{i-1}(K_{n,m};{\mathbb {K}}) \cong {\left\{ \begin{array}{ll} {\mathbb {K}}^{(n-1)(m-1)} &{} i =2, \\ 0 &{} \text {otherwise}.\end{array}\right. } \end{aligned}$$

In fact, since \(K_{n,m}\) is a connected 1-dimensional complex, we have that: \({\widetilde{\textrm{H}}}^{0}(K_{n,m};{\mathbb {K}}) = 0\), and \(\textrm{rank}({\widetilde{\textrm{H}}}^{1}(K_{n,m};{\mathbb {K}}) )\) equals the number of edges minus the number of vertices plus one, which yields exactly \((n-1)(m-1)\).

It is yet not clear whether multipath cohomology can be supported in different degrees. In the next example, we show that this is also possible.

Example 6.11

Consider the graph \(\texttt{Q}\) to be the coherently oriented polygon \(\texttt{P}_3\) with a diagonal, as illustrated in Fig. 17.

Fig. 17
figure 17

The coherently oriented polygon \(\texttt{P}_3\) with a diagonal

The path poset associated with \(\texttt{Q}\) has multipaths of length at most 3, corresponding to having at most 2-simplices in the realisation of \(X(\texttt{Q})\). The realisation of the multipath complex associated with \(\texttt{P}_3\) is isomorphic to the 2-sphere \({\mathbb {S}}^2\), and adding the diagonal results in adding two 1-cells to \({\mathbb {S}}^2\). A depiction of the geometric realisation of \(X(\texttt{Q})\) is given in Fig. 18; we have decorated the vertices in the realisation corresponding to the edges \((v_1,v_2)\) and \((v_1,v_3)\) of \(\texttt{Q}\), all the others being interchangeable in the realisation.

Fig. 18
figure 18

The geometric realisation of \(X(\texttt{G} )\), where \(\texttt{G} \) is the graph in Fig. 17. In green is illustrated the boundary of a tetrahedron

The simplicial complex \(X(\texttt{G} )\) is homotopically equivalent to the wedge of \({\mathbb {S}}^2\) with a copy of \({\mathbb {S}}^1\), showing that the multipath cohomology

$$\begin{aligned} \textrm{H}_{\mu }^*(\texttt{Q};{\mathbb {K}}) \cong {\left\{ \begin{array}{ll} {\mathbb {K}}&{} \text { for } n = 2,\\ {\mathbb {K}}&{} \text { for } n = 3,\\ 0 &{} \text { otherwise.}\\ \end{array}\right. } \end{aligned}$$

of \(\texttt{Q}\) is nonzero in degrees 2 and 3 by Theorem 6.5.

Let \(\texttt{G} '\) be a digraph with a univalent vertex w. In Lemma 4.16, we have proved that there exists a graph \(\texttt{G} \), obtained by gluing a linear sink or source to w (cf. Fig. 10), such that \(\textrm{H}_{\mu }^*(\texttt{G} ;{\mathbb {K}}) \cong \textrm{H}_{\mu }^{*+1}(\texttt{G} ';{\mathbb {K}})\). Classically, this is the property of the suspensionFootnote 6\(\Sigma X\). In the proof of the next proposition we will see that these two constructions are related. Let \(\bigvee ^{k} {\mathbb {S}}^{n}\) be the wedge of k n-dimensional spheres.

Proposition 6.12

For all \(k, n \in {\mathbb {N}}\), there exists a graph \(\texttt{G} _{k,n}\) such that

$$\begin{aligned} \bigvee ^{k} {\mathbb {S}}^{n} \simeq | X(\texttt{G} _{k,n}) | \end{aligned}$$

where \(| X(\texttt{G} _{k,n}) |\) is the geometric realisation of the (abstract) simplicial complex \(X(\texttt{G} _{k,n})\).

Proof

Let \(\texttt{D}_{n,m}\) be a dandelion graph, cf. Definition 4.11 and Fig. 9. The geometric realisation of \(\texttt{G} _{k,0} :=\texttt{D}_{k+1,0}\) consists of \(k+1\) points, which can be seen as a wedge of k 0-spheres. In Example 6.10, we have shown that \(X(\texttt{D}_{k+1,2})\) for \(k>0\) is homotopy equivalent to a wedge of k 1-spheres. In order to get a wedge \(\bigvee ^{k} {\mathbb {S}}^{n}\) of higher dimensional spheres, it is enough to iteratively glue sinks or sources to \(\texttt{G} _{k,1} :=\texttt{D}_{k+1,2}\).

More precisely, we fix k and proceed by induction on n. We assume to have already constructed a graph \(\texttt{G} _{k,n}\), whose associated multipath complex is homotopic to a wedge of k n-dimensional spheres, and that it has a univalent vertex, say v. Now, we glue a source or a sink, depending on whether \(v = s(e)\) or \(v = t(e)\), for some edge \(e\in E(\texttt{G} _{k,n})\)—cf. Lemma 4.16 and Fig. 10. Define \(\texttt{G} _{k,n+1}\) to be the graph obtained this way. Note that \(\texttt{G} _{k,n+1}\) has at least two univalent vertices. Now, by Theorem 3.5 applied to v, the path poset of \(\texttt{G} _{k,n+1}\) is the gluing of two copies of \({\mathfrak {Cone}~}P(\texttt{G} _{k,n})\) (which are \(P\left( (\texttt{G} _{k,n})_v^{(1)}\right) \) and \(P\left( (\texttt{G} _{k,n})_v^{(2)}\right) \), in the notation of Theorem 3.5) glued along \(P(\texttt{G} _{k,n})\). This can be illustrated using the following pushout diagram

figure n

By passing to the geometric realisations of multipath complexes (see also Remark 6.8), we obtain the pushout diagram

figure o

of topological spaces, where \(*\) denotes the one point space. As the suspension of a wedge on k n-spheres is homotopy equivalent to a wedge of k \((n+1)\)-spheres, the statement follows. \(\square \)

The proposition says that wedges of spheres of the same dimension can be realised, up to homotopy, as multipath complexes of certain digraphs. It is therefore natural to ask whether wedges of spheres of different dimensions can also be realised as (geometric realisations of) multipath complexes. We have seen, in Example 6.11, that the wedge \({\mathbb {S}}^1\vee {\mathbb {S}}^2\) can be realised, but it is not clear whether all wedges of spheres can be:

Question 6.13

Can we realise, up to homotopy, all wedges of spheres? For example, can we realise a space homotopic to \({\mathbb {S}}^1 \vee \ldots \vee {\mathbb {S}}^1 \vee {\mathbb {S}}^0 \vee \ldots \vee {\mathbb {S}}^0\)?

We observe here that, if we allow the graphs to be disconnected, then it is possible to obtain also the topological join \(X(\texttt{G} ) *X(\texttt{G} ')\) of \(X(\texttt{G} )\) and \(X(\texttt{G} ')\); concretely, this can be realised as \(X(\texttt{G} \sqcup \texttt{G} ')\)—compare [14, Definition 2.16], and Remark 3.1. Note that the join of simplicial complexes commutes with the geometric realisation [14, Eq. (2.9)]. In particular, we can realise the suspension \(\Sigma X(\texttt{G} )\) of \(X(\texttt{G} )\) also as the multipath complex \(X(\texttt{G} \sqcup \texttt{A}_{2})\) [14, Example 2.32.(1)]. Realising joins allows us to obtain more complicated wedges of spheres giving a partial answer to the question above.

Example 6.14

The join commutes, up to homotopy, with the wedge operation, and it is well known that \({\mathbb {S}}^{n}*{\mathbb {S}}^{m} \simeq {\mathbb {S}}^{n+m+1}\)—cf. [2]. An immediate consequence of these facts is that

$$\begin{aligned} \bigvee ^{k}_{i=1} {\mathbb {S}}^{n_i} *\bigvee ^{h}_{j=1} {\mathbb {S}}^{m_j} \simeq \bigvee ^{k}_{i=1}\bigvee ^{h}_{j=1} {\mathbb {S}}^{n_i+m_j + 1} \ . \end{aligned}$$

For instance, we have shown in Example 6.11 that we can realise \({\mathbb {S}}^2 \vee {\mathbb {S}}^1\) as \(|X(\texttt{Q})|\), where \(\texttt{Q}\) is the square \(\texttt{P}_3\) with a diagonal. Therefore, we have that

$$\begin{aligned} {\mathbb {S}}^{5} \vee {\mathbb {S}}^{4} \vee {\mathbb {S}}^{4} \vee {\mathbb {S}}^{3} \simeq ({\mathbb {S}}^2 \vee {\mathbb {S}}^1)*({\mathbb {S}}^2 \vee {\mathbb {S}}^1)\simeq \vert X(\texttt{Q} \sqcup \texttt{Q}) \vert \ . \end{aligned}$$

Since all spaces we are able to realise are, up to homotopy, wedges of spheres, the following question arises naturally;

Question 6.15

Can we realise spaces which are not homotopic to wedges of spheres, e.g. the real projective spaces?

Before further discussing the realisability of simplicial complexes via path posets, we want to extend the category of digraphs. Recall that a multigraph, or quiver, is 4-uple (VEst) where V and E are finite sets, whose elements are called vertices and edges, respectively, while \( s,t :E \longrightarrow V \) are the source and target functions. To avoid self-loops we require \(t(e)\ne s(e)\), for all \(e\in E\). Clearly, all digraphs can be seen as multigraphs. The definition of path poset and multipath cohomology extends verbatim to multigraphs. Similarly, we have an isomorphism between multipath cohomology and simplicial homology of \(X(\texttt{G} )\).

Fig. 19
figure 19

A 1-dimensional complex X whose face poset is not a path poset

Proposition 6.16

There are simplicial complexes whose face poset cannot be realised as the path poset of any multigraph. In other words, the functor \(X:{{\textbf {Digraph}} } \rightarrow {{\textbf {SimpComp}} }\) (cf. Remark 6.3), or better its extesion to multigraphs, is not (essentiallyFootnote 7) surjective on objects.

Proof

Consider Fig. 19, it contains the picture of a geometric realisation of the simplicial complex, say X. The face poset of X consists of: the empty simplex \(\emptyset \), five 0-simplices, and six 1-simplices.

Assume, by the means of contradiction, that there exists a multigraph \(\texttt{G} \) such that \(X = X(\texttt{G} )\). It follows that \(\texttt{G} \) has five edges, six multipaths of length two, and no multipaths of higher length. Note that we cannot read the number of vertices from the path poset (and thence from \(X(\texttt{G} )\)). Moreover, adding a vertex with no edges does not change the path poset. Therefore, without loss of generality, we might assume that \(\texttt{G} \) has no connected components which are vertices.

We claim that the edges \(e_1\), \(e_2\), and \(e_5\), form a coherently oriented triangle in \(\texttt{G} \). We start by noticing that the sub-graph \(\texttt{T}\) of \(\texttt{G} \) given by the edges \(e_1\), \(e_2\), and \(e_5\) is connected. Either all pairs of edges among \(e_1\), \(e_2\), and \(e_5\) share a vertex, in which case \(\texttt{T}\) is connected, or there are \(e_i\) and \(e_j\), with \(i\ne j\) and \(i,j\in \{ 1,2,5\}\), do not share any vertex. In the latter case, both must share at least one vertex with \(e_k\), \(k\ne i,j\) and \(k\in \{ 1,2,5\}\). If not, we would have a multipath of length 3 given by \(e_1,e_2,e_5\). It follows that \(\texttt{T}\) is connected. The path poset of \(\texttt{T}\) is (isomorphic to) the sub-poset of \(P(\texttt{G} )\) given by multipaths with edges \(e_1\), \(e_2\), or \(e_5\). Pasting all the pieces together, we have that \(\texttt{T}\) is a connected graph with 3 edges whose path poset is a Boolean poset minus its maximum; hence, \(\texttt{T}\) is a coherently oriented triangle by [7, Proposition 2.37].

The same reasoning as above proves that the edges \(e_3\), \(e_4\), and \(e_5\), also form a coherently oriented triangle in \(\texttt{G} \). It follows that \(\texttt{G} \) must consist of two coherently oriented triangles glued at least along one edge (namely \(e_5\)). Now we can enumerate all possible \(\texttt{G} \)’s; these are illustrated, up to orientation reversal and exchanging in the roles of \(e_1\) and \(e_2\), and of \(e_3\) and \(e_4\), in Fig. 20.

Fig. 20
figure 20

Possible configurations for the graph \(\texttt{G} \)

In case (a), we have two multipaths of length 3, while in case (b) the 0-cells corresponding to \(e_4\) and \(e_3\) must be in the boundary of three 1-cells in \(X(\texttt{G} ) = X\). In either case, we get a contradiction, and the statement follows. \(\square \)

Note that, while the face poset of the simplicial complex in Fig. 19 cannot be realised as a path poset, we can realise the face poset of an homotopy equivalent space as a path poset (e.g. \(P(\texttt{D}_{2,3})\), cf. Example 6.10).