{'fraction_non_alphanumeric': 0.036237471087124135, 'fraction_numerical': 0.008095605242868157, 'mean_word_length': 4.066731770833333, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Path homology theory of edge - colored graphs

: In this paper, we introduce the category and the homotopy category of edge - colored digraphs and construct the functorial homology theory on the foundation of the path homology theory provided by Grigoryan, Muranov, and Shing - Tung Yau. We give the construction of the path homology theory for edge colored graphs that follows immediately from the consideration of natural functor from the category of graphs to the subcategory of symmetrical digraphs. We describe the natural ﬁ ltration of path homology groups of any digraph equipped with edge coloring, provide the de ﬁ nition of the corresponding spectral sequence, and obtain commutative diagrams and braids of exact sequences.


Introduction
In this paper, we continue to study the homological properties of colored digraphs and graphs. It should be mentioned that, on the basic concepts of the path homology theory introduced in [1][2][3], the collection of path homology theories for vertex colored (di)graphs have been already constructed in [4].
The path homology theory is a homology theory for digraphs that computes the simplicial homology of a finite simplicial complex S if applied to its incidence digraph = G G S defined in the following way (see [1,3]). For a finite simplicial complex S, let V be the set of its simplexes. Consider a digraph = ( ) G V E , with the set of vertices V as above and the set of arrows E such that → σ τ is an arrow if and only if ⊂ τ σ. Then the path homology of the digraph G is naturally isomorphic to the simplicial homology of the simplicial complex S. The cohomology theory of digraphs that is dual to the path homology theory was introduced in previous studies [5][6][7][8]. This cohomology theory was motivated by the physical applications of discrete mathematics. This theory provides a differential calculus on digraphs and discrete sets which are considered as discretizations of topological spaces. Thus, various physical theories can be formulated on a discrete set analogous to the continuum case.
Recently, the path homology theory has been used in applications of the persistent homology to the various types of networks (see, for e.g., [9,10]). So in [10] the directed networks related to applications are considered and efficient algorithms for computing one-dimensional path homology and its persistent version are developed.
In what follows, we provide the category of edge-colored digraphs together with the notion of the homotopy and the homotopy category of edge-colored digraphs. For any edge-colored digraph, we define the collection of edge-colored path homology groups and indicate the possibility of the functorial passage from the category of graphs to the subcategory of symmetrical digraphs. We also prove the colored homotopy invariance of the colored path homology and describe its algebraic properties. More precisely, we discuss the natural filtration of the path homology groups of the edge-colored digraph, construct commutative diagrams and braids of exact sequences for those homology groups, and describe the spectral sequence that is associated with the filtration. This paper contains many examples to illustrate the nontriviality of edge-colored homology groups. We discuss also possible applications of the constructed theory.
A graph = ( ) G V E , is a nonempty set V of objects called vertices together with a set E of non ordered , is a nonempty set V of objects called vertices together with a set E of ordered pairs of distinct vertices of V called directed edges or arrows. A pair ( whereas the vertices v and w are called, respectively, the origin and the end of the given arrow. Accordingly, we write = (or simply a mapping) from a digraph G to a digraph H is a mapping Having in mind all the considerations above, we point out that we are thus provided with the following categories: the category of graphs and graph mappings, the subcategory of with the same objects and with the morphisms given by homomorphisms, the category of digraphs and digraph mappings, and the subcategory of with the same objects and with the morphisms given by homomorphisms. It is easy to check that the passing from a graph G to a symmetric digraph  G naturally defines the mapping of morphisms and gives the functors → : and → : . Let G and H be any graphs. We define their Box product G H □ as a graph with the set of vertices Two digraph homomorphisms are called strongly homotopic if the homotopy between them is a homomorphism. In the case of homotopy F for which = n 1, the map F is called the one-step homotopy of (di) graphs.
Now we give a brief explanation of the notion of homotopy in the case of graphs that is similar to the case of digraph given in [2]. There exists a one-step homotopy F between graph mappings → f G H : if and only if either H for every ∈ x V G . It follows that two graph mappings f and g are homotopic if there is a finite sequence of graph mappings from G to H such that f k and + f k 1 are one-step homotopic (see also Examples 3.6, 3.7, and 3.9). This time, it is easy to check that we are provided with the following categories: the category ′ of graphs and classes of homotopic mappings, the category ′ with the same objects and with the morphisms given by the classes of strongly homotopic homomorphisms, the category ′ of digraphs and classes of homotopic mappings, and the category ′ with the same objects and with the morphisms given by the classes of strongly homotopic homomorphisms.
It follows easily from [2, Proposition 6.5] that the functors and preserve the relation to be homotopic and hence define functors ′ ′→ ′ : and ′ ′→ ′ : . Now we turn our attention to the path homology groups of any (di)graph and provide necessary definitions. Let = ( ) G V E , be a digraph and R be a commutative ring. p pp with the differential that is induced by ∂. The elements of this module are called regular paths and regular elementary paths for basic elements. Now we return to the consideration of the digraph = ( The submodule Ω p consists of all linear combinations v of allowed paths for which ∂v is a linear combination of allowed paths as well. Having all the above in mind, we obtain a chain complex ( ) * G R Ω , . The homologies of this chain complex are called path homologies of the digraph G and denoted by For a graph G we define the path homology ( ) . Now the standard line of arguments provides a morphism of chain complexes ( ) , . Thus, the path homology groups of digraphs and graphs are functorial and these groups are homotopy invariant [2].

Categories of edge-colored digraphs and graphs
In this section, we introduce several categories of edge-colored graphs and digraphs, describe their basic properties, and provide examples. In the next section, we shall use these categories for constructing the collection of edge-colored path homology theories.
An edge coloring of a graph (digraph) = ( ) G V E , G G is given by an assignment of a color to each edge (arrow) ∈ e E G . An edge coloring is called proper if incident edges (arrows) have distinct colors. An edge coloring is called k-improper if for any edge (arrow) ∈ e E G there exist at most k incident edges (arrows) having the same color as e. An edge coloring that uses k colors is called a k-edge coloring.
An edge coloring of a (graph) digraph = ( In what follows, we shall consider proper coloring as the k-improper coloring with = k 0. Since from now on only edge colorings will be considered, the word edge will be accordingly omitted.
Thus, we obtain the following categories: the category of colored graphs and the colored morphisms, the subcategory with the same objects and with the colored morphisms that are homomorphisms, the category of colored digraphs and the colored morphisms, and the subcategory with the same objects and with the colored morphisms given by homomorphisms.
For a colored graph ( Thus, as in Section 2, we obtain the functors → : and → : . , , we can consider this (di)graph G without any coloring. Any morphism of , is, in particular, a (di)graph mapping and we obtain a collection of forgetful functors from the categories of colored (di)graphs to the corresponding categories of (di)graphs.

Example 3.2. Consider the following colored digraph G:
Let the mapping → f G G : be given on the set of vertices by , .
Then f is a morphism of colored digraphs.
Path homology theory of edge-colored graphs  709 For a colored digraph ( , , define a function κ which returns the number of different colors that are being used for the coloring of arrows in a non empty set A of arrows in E G . For every allowed path , be a colored morphism. By (2.2) and Definition 3.1, for a regular path , . Now we introduce the notion of a s-colored homotopy between two colored morphisms of digraphs. Denote by I the segment digraph = ( → ) be colored morphisms of colored digraphs and let and, for every allowed path = … v e i i p . We denote such a homotopy by ( ) The colored morphisms f f , 0 1 are called s-colored one-step homotopic if there exists an s-colored onestep homotopy from f 0 to f 1 or from f 1 to f 0 .
, be colored morphisms of colored digraphs. We say that f is s-colored homotopic to g if there exists a finite sequence of colored morphisms , such that any two consequent morphisms are s-colored one-step homotopic.
Let f g , be s-colored homotopic morphisms as in Definition 3.4 with the sequence . Now, define a segment digraph I p in the following way. For every pair of vertices ( Proposition 3.5. The relation "to be s-colored homotopic" is an equivalence relation for any ≥ s 0 on the set of colored morphisms be a colored morphism. Define a homotopy F φ , 0,1 is s-colored homotopy for any ≥ s 0 and relation "to be s-homotopic" is reflexive. Note that in the place of the color "1" in the definition of the homotopy F s we can take any another color.
Let f be s-colored homotopic to g due to the sequence of colored morphisms = The definition of s-colored homotopy in the category of colored graphs is similar and it is an equivalence relation on the set of colored morphisms of colored graphs. From the considerations above it follows that, for ≥ s 0, we are provided with the collection of s-colored homotopy categories of graphs ′ s in which the objects are colored graphs and morphisms are classes of s-colored homotopic morphisms. Similarly, we also obtain the collection of s-colored homotopy categories of digraphs ′ s and the s-colored homotopy categories ′ s , ′ s . Below, we give an example of a non trivial one-step two-colored homotopy between colored morphisms of three-colored digraphs. We define → f G H : 0 on the appropriate set of vertices in the following way: As for the → f G H : It is easy to see that both f 0 and f 1 are colored morphisms which are in fact colored homomorphisms. Let → F G I H : □ 1 be the digraph homotopy given on the set of vertices in the following way: The image of restriction of the mapping F to the set of arrows Example 3.7. Consider digraphs G and H given in Figure 2.
We define → f G H : on the appropriate set of vertices in the following way: , .
As for the → g G H : , we set , , .
It is easy to see that both f and g are colored homomorphisms. Denote by I 2 the segment digraph → → 0 1 2 and let → F G I G : □ 2 be the digraph mapping given on the set of vertices of the digraph G I □ 2 in the following way: , whereas F is a colored homomorphism and the sequence of colored defines a two-colored homotopy between f and g.  . Denote by I 2 the segment digraph → → 0 1 2 and let → F G I G : □ 2 be the digraph mapping given on the set of vertices as follows:

(3.2)
It is easy to see that F is a digraph mapping as well as a homotopy. The restrictions | { } F G □ 0 and | { } F G □ 2 coincide, respectively, with the morphisms f 0 and f 1 . Nevertheless, the mapping F is not a colored homotopy since the mapping | {}→ given on the set of vertices by the formula in the middle row of (3.2) is not a colored morphism.

Path homology of colored graphs and digraphs
In this section, we construct a collection of path homology theories defined on various categories of colored graphs and digraphs and describe their basic properties. To illustrate the definitions thus introduced, we also provide several examples. Let ( ) G φ , be a colored digraph. Recall that for every nonempty set of arrows ⊂ A E G we have defined the function κ which returns the number of different colors that are being used in the coloring of arrows from the set A. for ≥ k 0. Note that k 0 is the free R-module generated by all the elementary 0-colored paths. Thus, we obtain submodules with the differential that is induced by the differential ∂ of the chain complex ( ) The homology groups of chain complex (4.2) will be referred to as k-colored path homology groups and denoted by , be a morphism of colored digraphs. For ≥ k 1, the morphism * f in (2.2) induces a morphism of chain complexes and, hence, a homomorphism of k-colored path homology groups Proof. It follows from Definition 3.1 and Now we state the k-colored homotopy invariance of k-colored path homology groups of digraphs. Proof. The colored k-homotopy is a special case of a homotopy, and we give only the sketch of proof (see [2, §2.5 and §3.2] for details). It follows from Definitions 3.3 and 3.4 that it is sufficient to consider the case of one-step k-colored homotopy. By Theorem 4.5, the colored morphisms f and g induce morphisms of chain complexes Let , be a colored graph. For ≥ k 1, define the k-colored path homology groups of G as the k-colored path homology groups of the corresponding symmetric digraph , .

Algebraic properties of colored path homology
In this section, we describe the basic algebraic properties of the colored path homology groups. In particular, we introduce a notion of the relative colored path homology and construct various diagrams of exact sequences that give effective methods of computation. Then we construct a spectral sequence of colored homology groups following [15,Chapter 7] and present several examples.
In what follows, we shall denote the functions φ G and φ H simply by φ since this cannot lead to confusion. In this case, we write and call the pair ( ) H G , a colored pair of (di)graphs.  k k and call these groups the relative colored path homology groups. The homology long exact sequence of a pair of colored digraphs ⊂ G H provides algebraic relations between colored path homology groups of digraphs G and H and is an effective computing tool in many cases.  Figure 4. We compute all colored homology groups of this pair of digraphs for = R to illustrate the definition. Once again, we apply direct techniques for homology groups computation only to obtain that in the case of G and H , the colored path homology groups look as follows:  , in Figure 5 in which the vertices that are denoted by equal numbers and the arrows between pairs of such vertices are identified naturally. Note that the underlying non-directed graph is a one-dimensional skeleton of the minimal triangulation of the projective plane. Now we compute all colored homology groups in the braid of exact sequence (5.6) for = R . We denote ⟨ … ⟩ a a , , n 1 the free -module generated by elements … a a , , n 1 . . We can compute directly that the image of the differential ∂ → : Θ Θ n n 1 0 has rank 5. Hence, the rank of the kernel of this differential equals − = 15 5 10 for = n 1, 2, 3.
The module Θ 2 1 is generated by all one-colored paths of length 2, namely = ⟨ ⟩ e e e e Θ , , ,