Topoligical classification of $\Omega$-stable flows on surfaces by means of effectively distinguishable multigraphs

Structurally stable (rough) flows on surfaces have only finitely many singularities and finitely many closed orbits, all of which are hyperbolic, and they have no trajectories joining saddle points. The violation of the last property leads to $\Omega$-stable flows on surfaces, which are not structurally stable. However, in the present paper we prove that a topological classification of such flows is also reduced to a combinatorial problem. Our complete topological invariant is a multigraph, and we present a polynomial-time algorithm for the distinction of such graphs up to an isomorphism. We also present a graph criterion for orientability of the ambient manifold and a graph-associated formula for its Euler characteristic. Additionally, we give polynomial-time algorithms for checking the orientability and calculating the characteristic.


Introduction
A traditional method of qualitative studying of a flows dynamics with a finite number of special trajectories on surfaces consists of a splitting the ambient manifold by regions with a predictable trajectories behavior known as cells. Such a view on continuous dynamical systems rises to the classical work by A. Andronov and L. Pontryagin [2] published in 1937. In that paper, they considered a system of differential equationṡ where v(x) is a C 1 -vector field given on a disc bounded by a curve without a contact in the plane and found a roughness criterion for the system (1). A more general class of flows on the 2-sphere was considered in works by E. Leontovich-Andronova and A. Mayer [13,14], where a topological classification of such flows was also based on splitting by cells, whose types and relative positions (the Leontovich-Mayer scheme) completely define a qualitative decomposition of the phase space of the dynamical system into trajectories. The main difficulty in generalisations of this result to flows on arbitrary orientable surfaces is the possibility of new types of trajectories, namely unclosed recurrent trajectories. The absence of non-trivial recurrent trajectories for rough flows on the plane and on the sphere is an immediate corollary from the Poincaré-Bendixson theory for these surfaces, but this is not so trivial for orientable surfaces of genus g > 0. At first, it was proved by A. Mayer [15] in 1939 for rough flows with no singularities on the 2-torus 5 and later by M. Peixoto [20,21] for structurally stable 6 flows on surfaces of any genus (see also [19]).
In 1971, M. Peixoto obtained a topological classification of structurally stable flows on arbitrary surfaces [22]. As before, he did it by studying all admissible cells and he introduced a combinatorial invariant called a directed graph generalizing the Leontovich-Mayer scheme. In 1976, D. Neumann and T. O'Brien [17] considered the so-called regular flows on arbitrary surfaces, such flows have no non-trivial periodic trajectories (i.e. periodic trajectories other than limit cycles) and include the flows above as a particular case. They introduced a complete topological invariant for the regular flows named an orbit complex, which is a space of flow orbits equipped with some additional information.
In 1998, A. Oshemkov and V. Sharko [18] introduced a new invariant for Morse-Smale flows on surfaces, namely a three-colour graph, and described an algorithm to distinct such graphs, which was not, however, polynomial, i.e. its working time is not limited by some polynomial on the length of input information. In the same work they obtained a complete topological classification of Morse-Smale flows on surfaces in terms of atoms and molecules introduced in the work of A. Fomenko [3].
Structurally stable (rough) flows on surfaces have only finitely many singularities and finitely many closed orbits, all of which are hyperbolic, they also have no trajectories joining saddle points. The violation of the last property leads to Ω-stable flows on surfaces, which are not structural stable. However, in the present paper we prove that a topological classification of such flows is also reduced to a combinatorial problem. The complete topological invariant is an equipped graph and we give a polynomial-time algorithm for the distinction of such graphs up to isomorphism. We also present a graph criterion for orientability of the ambient manifold and a graph-associated formula for its Euler characteristic. Additionally, we give polynomial-time algorithms for checking the orientability and calculating the characteristic.

The dynamics of an Ω-stable flow
Let φ t be some Ω-stable flow on a closed surface S. The non-wandering set Ω φ t of the flow φ t consists of a finite number of hyperbolic fixed points and hyperbolic closed trajectories (limit cycles), which are called basic sets.
Denote by G a class of Ω-stable flows φ t with at least one fixed saddle point or at least one limit cycle 7 on a surface S. That is the flow class we consider in our work.

Fixed points
Let φ t ∈ G. The hyperbolicity of the fixed points is expressed by the following fact.
Proposition 2.1 ( [19], Theorem 5.1 from Chapter 2 and [24], Theorem 7.1 from Chapter 4). The flow φ t in some neighbourhood of a fixed point q ∈ Ω φ t is topologically equivalent to one of the following linear flows a t (x, y) = 2 −t x, 2 −t y , b t (x, y) = 2 −t x, 2 t y , c t (x, y) = 2 t x, 2 t y .
In the cases a t , b t , c t the fixed point q is called sink, saddle, source and has the dimension of the unstable manifold W u q equal to 0, 1, 2 accordingly. We will denote by Ω 0 φ t , Ω 1 φ t , Ω 2 φ t the set of all sinks, saddles, sources of φ t accordingly. It follows from the criterion of the Ω-stability in [23] that the saddle points do not organize cycles, i.e. collections of points q 1 , . . . , q k , q k+1 = q 1 with a property W s q i ∩ W u q i+1 = ∅, i = 1, . . . , k.

Closed trajectories
Let c be a closed trajectory of φ t and p ∈ c. Let Σ p be a smooth cross-section passing through the point p transversal to trajectories of φ t near p. Let V p ⊂ Σ p be a neighbourhood of p such that for every point x ∈ V p the value τ x ∈ R + with properties φ τx (x) ∈ V p and φ t (x) / ∈ V p for any 0 < t < τ x is well-defined. Then Σ p is called a Poincaré's cross-section and a map F p : V p → Σ p given by the formula F p (x) = φ τx (x), x ∈ V p is called Poincaré's map.
The hyperbolicity of the closed trajectory c is expressed by the following fact. Poincaré's map F p : V p → F p (V p ) is a diffeomorphism with a fixed point p in a neighbourhood of which F p is topologically conjugate to one of the following linear diffeomorphisms In the cases a ± , c ± the closed trajectory c is called attractive, repelling limit cycle accordingly. Denote by Ω 3 φ t the set of all limit cycles of φ t . In any case the limit cycle c has a neighbourhood U c , avoiding other limit cycles and fixed points of φ t and with the transversal to the trajectories of φ t boundary R c . The neighbourhood U c is homeomorphic to the annulus or the Möbius band (see Fig. 1) in the cases a + , c + or a − , c − accordingly and can be constructed the following way. For every points a, b ∈ V p let us denote by m a,b the segment of V p bounded by the points a, b and by µ a,b the length of this segment. In the cases a + , c + let us choose points .
In the cases a − , c − let us choose a point x * ∈ (V p \ {p}). Then A moving of Σ p along the trajectories in the positive time gives a consistent with c orientation on R c . Thus, in further we will assume that R c is oriented consistently with c.
3 The directed graph for a flow φ t ∈ G Recall that a graph Γ is an ordered pair (B, E) such that B is a finite non-empty set of vertices, E is a set of pairs of the vertices called edges. Besides, if E is a multiset then Γ is called multigraph. Recall that a multiset is a set with the opportunity of multiple inclusion of its elements. Everywhere below we will call a multigraph simply as a graph. If a graph includes an edge e = (a, b), then both vertices a and b are called incident to the edge e. The vertices a and b are connected by e. A graph is called directed if every its edge is an ordered pair of vertices. A finite sequence of vertices and edges of a graph is called a path, the number k is called the length of the path and it is equal to the number of edges of the path. The path τ is called simple if it contains only pairwise disjoint edges. The simple path τ is called a cycle if b 0 = b k . A graph is called connected if every two its vertices can be connected by a path.
We call R a cutting set and the connected components of R cutting circles. LetŜ = S\R. We call an elementary region a connected component of the set S. The elementary regions, obviously, can be of the following pairwise disjoint types with respect to information about basic sets of φ t in the regions: 1) a region of the type L contains exactly one limit cycle; 2) a region of the type A contains exactly one source or exactly one sink; 3) a region of the type M contains at least one saddle point; 4) a region of the type E does not contain elements of basic sets. Definition 1. A directed graph Υ φ t is said to be a graph of the flow φ t ∈ G (see Fig. 2) if (1) the vertices of Υ φ t bijectively correspond to the elementary regions of φ t ; (2) every directed edge of Υ φ t , which joins a vertex a with a vertex b, corresponds to the cutting circle R, which is a common boundary of the regions A and B corresponding to a and b, such that any trajectory of φ t passing R goes from A to B by increasing the time.
We will call a L-, A-, E-or M-vertex a vertex of Υ φ t , which corresponds to a L-, A-, E-or M-region accordingly.
The following proposition immediately follows from the dynamics of the flow φ t and a structure of cutting set. Proposition 3.1. Let Υ φ t be the directed graph of a flow φ t ∈ G, then: 1) every M-vertex can be connected only with L-vertices, furthermore, with every vertex by a single edge; 2) every E-vertex can be incident only to two edges that connect this vertex with two different L-vertices, and one of these edges enters to the E-vertex, another one exits; 3) every A-vertex can be connected only with a L-vertex, furthermore, by a single edge; 4) every L-vertex has degree (the number of incident edges) 1 or 2, and if its degree is 2, then both edges either enter the vertex or exit.
The existence of an isomorphism of the directed graphs for topologically equivalent Ω-stable flows from G is a necessary condition. To make the directed graph a complete topological invariant for the class G, below we equip the graph Υ φ t by additional information.

A-vertex
The flows in A-regions can belong to only the two equivalence classes: a source pool and a sink pool, which we can distinguish by directions of edges incident to A-vertices.

L-vertex
The flows in L-regions can belong to only the four equivalence classes: an annulus with a stable limit cycle, an annulus with an unstable one, the Möbius band with a stable one, the Möbius band with an unstable one, which we can distinguish by directions of edges and by quantities of edges incident to L-vertices.

E-vertex
The flows in E-regions can belong to only the two equivalence classes corresponding to the consistent and the inconsistent orientation of connecting components of E's boundary. However, a structure of an E-region cannot be determined by the directed graph, therefore, we will attribute the weight to the vertex corresponding to an E-region. The weight is "+" in the consistent case and "−" in the inconsistent one.

M-vertex
The flows in M-regions cannot be determined by the directed graph. Then we will equip vertices corresponding to them by four-colour graphs for a description of the dynamics of the flow in the regions. In more details.
All results about flows from G without periodic trajectories are given and proved in our paper [11] but we give it here for completness.
Let us consider some M-region that is either a 2-manifold with a boundary or a closed surface. In the first case let us attach the union D of disjoint 2-disks to the boundary to 8 get a closed surface M , in the second case we also denote the closed surface by M and will suppose that D = ∅. Let us extend φ t | M up to an Ω-stable flow f t : M → M assuming that f t coincides with φ t out of D and Ω f t has exactly one fixed point (a sink or a source) in each connected component of D.
Let Ω 0 f t , Ω 1 f t , Ω 2 f t be the sets of all sources, saddle points and sinks of f t accordingly. By the definition of the region M the flow f t has at least one saddle point. Let A connected component ofM is called a cell.  Let us call a c-curve a separatrix connecting saddle points (from the word "connection"), a u-curve an unstable saddle separatrix with a sink in its closure, a s-curve a stable saddle separatrix with a source in its closure. We will call a polygonal region ∆ the connecting component ofM . consists of an unique t-curve, an unique u-curve, an unique s-curve, and a finite (may be empty) set of c-curves (see Fig. 4).
Denote by ∆ f t the set of all polygonal regions of f t (see Fig. 5, where a flow f t and all its polygonal regions are presented).

Definition 2.
A multigraph is called n-colour graph if the set of its edges is the disjoint union of n subsets, each of which consists of edges of the same colour. We say that a four-colour graph Γ M with edges of colours u, s, u, t bijectively corresponds to f t if: 1) the vertices of Γ M bijectively correspond to the polygonal regions of ∆ f t ; 2) two vertices of Γ M are incident to an edge of colour s, t, u or c if the polygonal regions corresponding to these vertices has a common s-, t-, u-or c-curve; that establishes an one-to-one correspondence between the edges of Γ M and the colour curves; 3) if some vertex b of Γ M is incident to more than one c-edge (the number n b of c-edges is more than 1), then c-edges are ordered by a moving (according to the direction from the source to the sink on t-curve) along the boundary of the corresponding polygonal region (see, for example, Figure 6).   Let us denote by π f t the one-to-one correspondence described above between polygonal regions and vertices, also between colour curves of f t and colour edges of Γ M respectively.
Let us call a st-cycle (tu-cycle) a cycle of Γ M consisting only of s-and t-edges (t-and u-edges). Let us call u-and s-edges exiting out a vertex b as nominal c-edges and assign the numbers 0 and n b + 1 to them respectively. Let us call a c * -cycle a simple cycle Proposition 4.1.
The projection π f t gives an one-to-one correspondence between the sets Ω 0 f t , Ω 1 f t , Ω 2 f t and the sets of tu-, c * -, and st-cycles respectively.
By our construction M = M ∪ D, where D is either empty or each its connected component contains exactly one sink ω (source α) of the flow f t , uniquely corresponding to a cutting circle R c for a limit cycle c of the flow φ t , which uniquely corresponds to a (M, L)-edge ((L, M)-edge) of the graph Υ φ t . Due to Proposition 4.1 the node ω (α) uniquely corresponds to a tu-cycle (a st-cycle), denote it by τ M,L (τ L,M ). Moreover, due to Proposition 4.1, we can embed the graph Γ M such that the cycle τ M,L (τ L,M ) coincides with R c . Thus we induce an orientation from R c to the cycle and call the cycle τ M,L (τ L,M ) oriented one. 11 5 The formulation of the results Definition 5. Let Υ φ t be the directed graph of a flow φ t ∈ G. We will say that Υ φ t is the equipped graph of φ t and denote it by Υ * φ t if: (1) every E-vertex is equipped with the weight "+" or "−" in consistent and inconsistent case respectively; (2) every M-vertex is equipped with a four-colour graph Γ M corresponding to the flow f t constructed in Subsection 4.4; (3) every edge (M, L) ((L, M)) is equipped with an oriented tu-cycle (st-cycle) τ M,L (τ L,M ) of Γ M corresponding to the limit cycle c of L and oriented consistently with R c (see Fig. 7). Let us denote by π * φ t the one-to-one correspondence described above between the elementary regions and the vertices, the cutting circles and the edges, the directions of the trajectories and the directions of the edges, the consistencies of the orientations of the boundary's connecting components of E-regions and the weights of the E-vertices, the Mregions and the four-colour graphs, the stable limit cycles and the tu-cycles, the unstable limit cycles and the st-cycles, the orientations of the stable limit cycles and the orientations

The classification result
Definition 6. Equipped graphs Υ * φ t and Υ * φ t are said to be isomorphic if there is an one-to one correspondence ξ between all edges and vertices of Υ * φ t and all edges and vertices of Υ * φ t preserving their equipments in the following way: (1) the weights of vertices E and ξ(E) are equal; (2) for vertices M and ξ(M), there is an isomorphism ψ M of the four-colour graphs

The realisation results
To solve the realization problem, we introduce the notion of an admissible four-colour graph and an equipped graph.
Let Γ be a four-colour graph with the properties: (1) every edge of the four-colour graph is coloured in one of the four colors: s, u, t, c; 13 where ν 0 , ν 1 , ν 2 are the numbers of all tu-, c * -and st-cycles of Γ respectively; (2) M is non-orientable if and only if Γ has at least one cycle with an odd length. -every E-vertex is assigned with a weight "+" or "−".
For every M-vertex of an admissible equipped graph Υ * , let us denote by X M the result of applying the formula (2) to the corresponding admissible four-colour graph Γ M . Denote by Y M the quantity of edges, which are incident to M and denote by N A the quantity of Theorem 2. Every admissible equipped graph Υ * corresponds to an Ω-stable flow φ t : S → S from G on a closed surface S, besides: (1) The Euler characteristic of S can be calculated by the formula (2) S is orientable if and only if every four-colour graph equipping Υ * has not cycles of an odd length and every L-vertex is incident to exactly two edges.

The algorithmic results
An algorithm for solving the isomorphism problem is considered to be efficient if its working time is bounded by a polynomial on the length of the input data. Algorithms of such kind are also called polynomial-time or simply polynomial. This commonly recognized definition of efficient solvability rises to A. Cobham [5]. A common standard of intractability is NP-completeness [6]. The complexity status of the isomorphism problem is still unknown, i.e., for the class of all graphs, neither its polynomial-time solvability nor its NP-completeness is proved at the moment. Fortunately, four-colour graphs and directed graphs of flows are not graphs of the general type, as they can be embedded into a fixed surface on which flows are defined, i.e. the ambient surface. That allows to prove the following theorems. 6 The dynamics of a flow f t ∈ G without limit cycles on a surface M In this section everywhere below f t ∈ G is a flow without limit cycles on a closed surface M . We give proofs for the results from Subsection 4.4 and other results about flows without limit cycles. A part of them was proved in [12], [11] and [7] but we repeat them for a completeness.

General properties
Firstly let us give a necessary proposition, which we will use for the proof of the classification theorem.
Proof. Supposing the contrary for some sink ω, we get by the item 1) of Proposition 6.1 . Let us assume the contrary. Then, by the item 1) of Proposition 6.1, there is a point p ∈ Ω f t such that p = ω and W s p ∩W u α i = ∅. Let x ω and x p be points such that x ω ∈ W u α i ∩W s ω and x p ∈ W u α i ∩ W s p . As the manifold W u α i \{α i } is homeomorphic to R 2 \{O} by the item 2) of Proposition 6.1, then there is a simple path c : . . , k} and, consequently, α i 0 ∈ W u α i that is the contradiction with the definition of the unstable manifold of a fixed point. We Then Ω f t does not contain saddle points, that contradicts with conditions of the lemma.
The affirmation for sources can be proved by conversion from f t to f −t .
Lemma 6.2. Let p be a fixed point of f t . Then where Ω p is a non-empty subset of Proof. Consider the case (i), where p is a saddle point. Let x ∈ cl(l u p ). Any point of l u p is a point of W s r for some fixed point r by the item 1) of Proposition 6.1. The point r can be: a) a sink; b) a saddle point; c) a source. a) Let us consider a sink r = ω such that x ∈ W s ω . As ω is the source and l u As W s α = α, then α ∈ l u p , which is impossible because l u p consists of wandering points. Consequently, the case c) is impossible.
Consider the case (ii): p = α is a source. The item 1) of Proposition 6.1 says that the set Then O xn ⊂ l u α and, due to the known behaviour of our flow near σ (see, Proposition 2.1), the set n∈N O xn contains in its closure the separatrix l u σ . b) Let ω ∈ A. According to Lemma 6.1 there is a finite set of saddle points σ 1 , . . . , σ k ∈ consists of a finite number of connected components, at least one of them belongs to l u α , denote it by Q. Thus there is at least one saddle point σ i 0 , i 0 ∈ {1, . . . , k} whose separatrices l u σ i 0 belongs to cl(Q).
The statement similar to Lemma 6.2 may be proved for the stable separatrices of the flow f t .

The proof for Lemma 4.1
We remind that a cell J is a connected component of the setM Then every connected component J ofM is a subset of l u α for a source α. Similarlỹ Then every connected component J ofM is a subset of l s ω for a sink ω. Thus and, consequently, the cell J is a union of trajectories going from α to ω.

The proof for Lemma 4.2
We remind that we choose a one trajectory θ J in the cell J and called it by a t-curve. Also we defined T = J⊂M θ J ,M =M \T . Besides, we called by a c-curve a separatrix connecting saddle points ("connection"), by a u-curve an unstable saddle separatrix with a sink in its closure, by a s-curve a stable saddle separatrix with a source in its closure. A polygonal region ∆ is the closure of a connecting component ofM .
Due to Lemma 4.1 every cell J belongs to the basin of the source α and, due to Lemma 6.2, J is situated in W u α between too (may be coincident) s-curves. A polygonal region ∆ can be created by removal a t-curve from J. As W u α is homeomorphic to R 2 , due to Proposiition 6.1, then ∆ is homeomorphic to a sector in R 2 , i.e. ∆ is homeomorphic to an open disk. By construction, the boundary of ∆ contains unique s-curve and unique t-curve. As ∆ belongs to the basin of the sink ω in the same time, then it is restricted by unique u-curve. By (ii) of Lemma 6.2 the region ∆ is restricted by a finite number of c-curves. We have got that the only possible structure of the boundary of a polygonal region ∆ is the structure depicted on Figure 4 up to a number of the c-curves.

The proof of Lemma 5.1
We remind that π f t is the one-to-one correspondence between polygonal regions and vertices, also between colour curves of f t and colour edges of Γ M respectively.
As f t given on the surface M and every vertex of Γ M corresponds to some its polygonal region, then, we can create a graph isomorphic to Γ M with each vertex in its own polygonal region and with edges that are curves embedded in M , joining the vertices and crossing each its side at the unique point. Such graph is obviously isomorphic to Γ M . Therefore, without loss of generality, let's mean that Γ M is embedded in M . As every polygonal region side adjoins to exactly two different polygonal regions, then Γ M has not cycles of length 2, i.e. Γ M is simple one.
As to each point p ∈ Ω f t a finite number of polygonal regions divided by colour curves adjoins, then the point p by means π f t one-to-one corresponds to a cycle of the vertices corresponding to the regions adjoining to p and of the colour edges crossing colour curves exiting out of p. So exactly 4 polygonal regions divided by u-, s-or c-curves adjoin to a saddle point. If to mean u-and s-edges as nominal c-edges, we get that every saddle point corresponds to the c * -cycle of Γ M . Conversely also is correct, because every c * -cycle can be placed in a neighbourhood of the single saddle point so that such neighbourhoods of different c * -cycles doesn't cross one another. In this way Γ M contains c * -cycles and each such cycle has length 4. Consequently Γ M is admissible.

The proof of Proposition 4.1
The correspondence between Ω 1 f t and the set of c * -cycles follows from the proof of Lemma 5.1. The basin of every sink ω is divided by u-and t-curves alternately lying in W s ω . Consequently ω corresponds to unique tu-cycle of Γ M by means π f t . Conversely it is also corrected because as basins of different sinks are divided by s and c-curves then each tu-cycle can be situated in the basin of the unique sink. In this way π f t creates one-to-one corresponding between the set Ω 0 f t and the set of tu-cycles. The correspondence between Ω 2 f t and the set of st-cycles can be proved similarly.
7 The proof for the classification Theorem 1 In this section we consider Ω-stable flow φ t ∈ G on closed surface S and prove that the isomorphic class of its equipped graph Υ * φ t is a complete topological invariant.

The necessary condition of Theorem 1
Let two Ω-stable flows φ t , φ t ∈ G given on a closed surface S be topological equivalent, i.e. there is a homeomorphism h : S → S mapping trajectories of φ t to trajectories of φ t . Let us think without loss of generality that the cutting set R of φ t is created so that R = h(R), where R is the cutting set of φ t . Also we can think that the restriction Recall that π * φ t is the one-to-one correspondence between the elementary regions and the vertices, the cutting circles and the edges, the directions of the trajectories and the directions of the edges, the consistencies of the orientations of the limit circles for the Eregions and the weights of the E-vertices, the M-regions and the four-colour graphs, the stable limit cycles and the tu-cycles, the unstable limit cycles and the st-cycles respectively. Let us define the isomorphism ξ : As h carries out the topological equivalence of φ t and φ t then it preserves the types of elementary regions and, hence, ξ preserves the types of the vertices. As h preserves the orientation on the trajectories then the weights of vertices E and ξ(E) are equal. Let Γ M is the four-colour graph for some vertex M, Γ ξ(M) is the four-colour graph π f t is the one-to-one correspondence between the polygonal regions and the vertices, also between the colour curves of f t , f t and the colour edges of the four-colour graph Γ M , Γ M respectively.
As Γ M is the four-colour graph of the region M, then As h maps the polygonal regions of f t to the polygonal regions of f t , then there exists the isomorphism ψ : Γ M → Γ M defined by the formula

The sufficient condition of Theorem 1
Let graphs Υ * φ t and Υ * φ t be isomorphic by means of ξ. To prove the topological equivalence of the flows we need to create homeomorphisms between elementary regions mapping the trajectories of φ t to the trajectories of φ t so that for two elementary regions the homeomorphisms on their common boundaries coincide.
I. M-region. Let us consider some M-region of the flow φ t . Consider the region of the flow φ t . Their four-colour graphs Γ M and Γ M are isomorphic by means of ψ. Let Consider a polygonal region ∆ ∈ ∆ f t . The ∆'s boundary contains an unique source α, an unique sink ω and n saddle points σ 1 , σ 2 , . . . , σ n , n ∈ N, and the saddle points are ordered so that their labels increase while moving along the ∆'s boundary according to the direction from the source to the sink on the t-curve. Consider the polygonal region The isomorphism ψ provides an equal number of the same-colour edges exiting out of graph vertices corresponding to ∆ and ∆ . It implies that ∆ 's boundary contains exactly an unique source α , an unique sink ω and n saddle points σ 1 , σ 2 , . . . σ n ordered so that their labels increase while moving along the ∆ 's boundary according to the direction from the source to the sink on the t-curve. for any polygonal regions ∆,∆ of f t .
Step 1. Let us construct h ∆ in neighbourhoods of the node points. Let and recall that a t : R 2 → R 2 , c t : R 2 → R 2 are the flows given by the formulas a t (x, y) = (2 −t x, 2 −t y), c t (x, y) = (2 t x, 2 t y) with the origin O as a sink and a source point accordingly. By Proposition 2.1 there exist the neighbourhoods u ω , u α (u ω , u α ) of ω, α (ω , α ) accordingly such that f t | uω , f t | uα (f t | uω , f t | uα ) are topologically conjugate to a t (x, y)| u , c t (x, y)| u by means of some homeomorphisms h ω : u ω → u, h α : u α → u (h ω : u ω → u, h α : u α → u) accordingly. Without loss of generality let us think that these neighbourhoods do not cross each other for all polygonal regions. For r ∈ (0, 1] let S r = {(x, y) ∈ R 2 : x 2 + y 2 = r} and S ω Everywhere below we will denote by m a,b the closure of a segment of a cross-section to the trajectories of f t (f t ) bounded by points a (a ) and b (b ). In particular denote by m A,A 0 (m A ,A 0 ) the segment which is the intersection S ω 1 ∩ ∆ (S ω 1 ∩ ∆ ) (see Figure  10) , then x ω = S ω r ∩ O x for some r ∈ (0, 1] and x ∈ m A,A 0 . Let us define the homeomorphism h uω : cl(u ω ) ∩ ∆ → cl(u ω ) ∩ ∆ so that h uω (ω) = ω and h uω ( . Similarly for points x α ∈ (cl(u α ) ∩ ∆ \ {α}) being the intersection point x α = S α r ∩ O x for some r ∈ (0, 1] and x ∈ m A,A 0 , define the homeomorphism h uα : cl(u α ) ∩ ∆ → cl(u α ) ∩ ∆ so that h uα (α) = α and h uα (x α ) = x α , where Step 2. Let us construct h ∆ on the boundary of ∆.
Everywhere below we will denote by l a,b the closure of a segment of a trajectory or an separatrix of a saddle point bounded by points a and b, and by λ a,b we will denote its length. Notice that l a,b = l b,a and λ a,b = λ b,a . For smooth segments l a,b , l a ,b of trajectories of f t , f t we will call a homeomorphism by the length of arc a homeomorphism h l a,b : l a,b → l a ,b defined by the following rule for a point x ∈ l a,b : Thus, we construct the following homeomorphisms: h l A,C : l A,C → l A ,C , h l A 0 ,σ 1 : l A 0 ,σ 1 → l A 0 ,σ 1 , h l C 0 ,σn : l C 0 ,σn → l C 0 ,σ n and h lσ i ,σ i+1 : A similar construction on the boundaries of all polygonal regions will provided h ∆ | cl(∆)∩cl(∆) = h∆| cl(∆)∩cl(∆) for any polygonal regions ∆,∆ of f t .
Step 3. Let us construct cross-sections connecting the saddle points with some point inside l A,C (l A ,C ).
Recall that for i = 1, n there exists a neighbourhood u σ The set Z consists of the two intervals crossing in the origin and transversal to the trajecto- Figure 11).
Let Figure 11). Step 4. Let us continue h ∆ inside ∆. Figure 12). II. E-region. Let us consider some E-region of the flow φ t . Consider the E -region of the flow φ t such that These two regions are of the same type because of the weight of the vertices corresponding to them. Let E 1 and E 2 be the connected components of ∂E. Then they are cutting circles and, hence, are cutting circles which are the connected components of ∂E .
Let h E 1 : E 1 → E 1 be an arbitrary homeomorphism preserving orientations of E 1 and Thus we have the homeomorphism for every E-region of the flow φ t .

III.
A-region. Let us consider some A-region of the flow φ t with a source α (for definiteness) inside. Consider the region of the flow φ t . We perfectly know that it is the A -region with a source inside because of directions of edges.
A (A ) is surely surrounded by some L, Due to Proposition 2.1 the source α (α ) has a neighbourhood u α (u α ) and the homeomor- So we define the homeomorphism h A : cl(A) → cl(A ) by the formula The homeomorphism for A-region with a sink can be constructed similarly. Thus we have a homeomorphism for every A-region of the flow φ t .
IV. L-region. Here we will follow to alike construction in [8]. Let us consider some L-region of the flow φ t with an unstable (for definiteness) limit cycle c inside. Consider a region of the flow φ t . We perfectly know that it is an L -region of the flow φ t with an unstable limit cycle c inside of the same type as L because of directions of edges and their number.
We also know that as limit cycles as cutting circles of L and L are oriented consistently because of equal orientation of ψ(τ L,M ) and τ ξ(L),ξ(M) .

Consider the case of the annulus.
Step 1. Let L * and L * * be the two connecting components of ∂L and let L * = (π * φ t ) −1 ξπ * φ t (L * ), L * * = (π * φ t ) −1 ξπ * φ t (L * * ). Let h * : L * → L * and h * * : L * * → L * * be the contractions of the homeomorphisms constructed before on the closures of the elementary regions adjoined to L (L ) with L * and L * * as their common boundary accordingly.
Step 2. Recall that Σ p (Σ p ) is the Poincaré's cross-section of c (c ), Let m a,b , a, b ∈ Σ p (m a ,b , a , b ∈ Σ p ) be the Σ p 's segment restricted by the points a and b (Σ p 's segment restricted by the points a and b ) and µ a,b (µ a ,b ) be its length.
2. Consider the case of the Möbius band. In general the construction is similar to the case of the annulus but it has the few important differences.
Step 1. The boundary ∂L has only one connected component, and Σ p crosses it in two points x * and x * * . Denote h * : ∂L → ∂L the homeomorphism constructed before on ∂L. Let x * be one of the two points in which Σ p crosses ∂L . Let x * = h * (x * ). Let t * ≥ 0 be the least non negative number such that x * = φ t * (x * ). Let Denote by x * * the second point in which Σ p * crosses ∂L (i.e. x * * = x * ).
Step 2. Let us construct a homeomorphism by the next way: For Step 3. Let us define the homeomorphism h L : cl(L) → cl(L ) by the next formulas .
The homeomorphism for L-region with a stable limit cycle can be constructed similarly.
Thus we have a homeomorphism for every L-region of the flow φ t .
The final homeomorphism. We have created the homeomorphism for each elementary region. Thus, the final homeomorphism h : S → S we define by the formula So, Theorem 1 is proved.
8 Realisation of an admissible equipped graph Υ * by the Ω-stable flow φ t on a surface S Firstly we give the proof of the Lemma 5.2 about realisation of an admissible four-colour graph by the Ω-stable flow f t without limit cycles.

The proof of the Lemma 5.2
This proof is equal to the one in our paper [11] but still we give it there for completness. Let Γ be some admissible four-colour graph.
I. Let us construct an Ω-stable flow f t without limit cycles corresponding to Γ's isomorphic class step by step.
Step 1. Consider some vertex b of Γ. The vertex b is incident to n edges, first of which is a t-edge, second one is an u-edge, third one is a s-edge and rest ones are c b j -edges, j = 1, (n − 3). We construct on R 2 a regular 2(n − 1)-gon A 1 A 2 . . . A 2(n−1) with the centre in the origin O(0, 0) and the vertices A 1 (1, 0) and A n (−1, 0) (see Fig. 13). Denote by ϕ the central angle and by a the length of a side of A 1 A 2 . . . A 2(n−1) . Then ϕ = π n − 1 , a = 1 sin ϕ .
Hence, A k = (cos(k − 1)ϕ, sin(k − 1)ϕ) for k = 1, 2(n − 1). Let us denote M b ≡ cl(A 1 A 2 . . . A 2(n−1) ∩ {(x, y) ∈ R 2 | y > 0}). By construction M b is the n-gon with the vertices A 1 , A 2 , . . . , A n , i.e. the number of M b 's vertices is equal to the 28 Figure 13: Designing of the vector field v b number of the edges incident to b. We will call A 1 A n as the t-side, A n−1 , A n as the u-side or the c 0 -side, A 1 , A 2 as the s-side or the c n−2 -side and A k A k+1 as the c n−k−1 -side, where k = 2, (n − 2).
Step 2. Let us design the vector field v b on M b the following way. Firstly we define the vector field v A 1 ,An on the side A 1 A n by the differential equations system   ẏ = 0, By construction A 1 and A n are fixed points, and the flow given by v A 1 ,An moves from A 1 to A n . Let us define the vector field on the other sides of M b . Consider the side A k A k+1 , k = 1, (n − 1). The straight line passing through the points A k , A k+1 is defined by the equation it gives us its slope β k : Now we reduce the considered case to the case of A 1 A n . To do this let us make the one-toone correspondence t k between points of [cos kϕ, cos(k − 1)ϕ] and [−1, 1] by the formula Let γ k = sin 1 2 π(t k − 1), then we define the vector field v A k A k+1 by the following system of equations  Step 3. Now we define the vector field v int inside M b . Let us take an arbitrary point B(x, y) ∈ intM b . Then B ∈ B k H, where B k ∈ A k A k+1 for some k = 1, (k − 1) and H is the B k 's projection to A 1 A n (see Fig. 13). Define v int as an average between the vectors v A 1 ,An (H) and v A k A k+1 (B k ) by the following system of equations Step 4. We denote by B the set of vertices, by N -the number of vertices, by E -the set of edges of Γ. Let η b is the correspondence between t-, u-, s-or c i -edge incident to the vertex b and t-, u-, s-or c i -side of M b accordingly. Denote by M the disjunctive union of M b , b ∈ B. Introduce on M the minimal equivalence relation satisfying to the following rule: if b 1 , b 2 ∈ B are incident to e ∈ E, then the segments P 1 Q 1 = η b 1 (e) and P 2 Q 2 = η b 2 (e) are identified so that a point (x 1 , y 1 ) ∈ P 1 Q 1 = [(x P 1 , y P 1 ), (x Q 1 , y Q 1 )] is equivalent to the point Properties of an admissible graph entail that the quotient space M = M/ ∼ is an closed topological 2-manifold. Denote by q : M → S its natural projection. Notice that the vector field in the points equivalent by ∼ has equal length, hence, q induces the continuous vector field, we denote it by V M .
Step 5. Let us define a smooth structure on M such that V M is smooth on it. Let us cover M by a finite number of maps (U z , ψ z ), z ∈ M , where U z ⊂ M is the open neighbourhood of z and ψ z : U z → R 2 is the homeomorphism to the image of the following type.  Fig. 14). We will denote the length of A k i A k i+1 , the central angle of and µ i (x, y) = µ i (r cos θ, r sin θ) = (r cos θ 1,i , r sin θ 1,i ), where (r, θ) are polar coordinates and the function θ 1,i (θ) is given by the formula Here the function p 1,i (x, y) produces parallel transfer of M b i so that the vertex A k i hits in the origin, and increases the lengths of A k i A k i +1 and A k i −1 A k i up to unit. The function µ i (x, y) identifies the angle of the vertex A k i with i-th coordinate angle.
2. Consider on Γ a st-cycle Recall that the length of A 1 A 2 of M b i is equal to a i and the length of A 1 A n i is equal to 2. Denote the angle between the vector − −− → A 1 A 2 and Ox + by β + 1,i . Let where and ν i (x, y) = ν i (rcosθ, rsinθ) = (r 2,i (r, θ) · cos(θ 2,i (θ)), r 2,i (r, θ) · sin(θ 2,i (θ))) are given by the formulas Here the function p 2,i (x, y) produces parallel transfer of M b i so that the vertex A 1 hits in 32 the origin. The function ν i (x, y), i ∈ {1, . . . , 2m} changes the lengths of A 1 A 2 and A 1 A n i to unit, changes the quantity of the angle of the vertex A 1 to π m and distributes the polygons M b i with their A 1 to the origin so that the angles of A 1 adjoin each other and fill the full angle distributing each on i-th place while by-passing around the origin from Ox + counter clockwise on some circle with a radius less than 1. Also they provide a coincidence of the same-colour sides of adjoining polygons.
3. Consider on Γ a ut-cycle Recall that the length of A n i −1 A n i of M b i is equal to a i , the length of A 1 A n i is equal to 2, the angle between the vector where p 3,i (x, y) = (x + 1, y) and κ i (x, y) = κ i (rcosθ, rsinθ) = (r 3,i (r, θ) · cos(θ 3,i (θ)), r 3,i (r, θ) · sin(θ 3,i (θ))) are given by the formulas Here the function p 3,i (x, y) produces parallel transfer of M b i so that the vertex A n i hits in the origin. The function κ i (x, y), i ∈ {1, . . . , 2m} changes the lengths of A n i −1 A n i and A 1 A n i to unit preserving continuity of the field, changes the quantity of the angle of the vertex A n i to π m and distributes the polygons M b i with their A n i to the origin so that the angles of A n i adjoin each other and fill the full angle distributing each on i-th place while by-passing around the origin from Ox + counter clockwise on some circle with a radius less than 1. Also they provide coincidence of same-colour sides of adjoining polygons.
The conversion functions for introduced maps are the compositions of smooth maps constructed in 1-3 and the inverse ones for them, hence, these maps design a smooth structure on the surface M .

II.
Here we prove i) and ii) of Theorem 5.2. i) Let us prove that the Euler characteristic of M may be found by the formula (2) χ(S) = ν 0 − ν 1 + ν 2 , where ν 0 , ν 1 , and ν 2 is the numbers of all tu-, c * -and st-cycles of Γ accordingly. The fact that the numbers of all the sinks, the saddle points and the sources are equal to ν 0 , ν 1 and ν 2 accordingly follows from Proposition 4.1. That entails the affirmation i), because the given formula is the formula for the index sum of the singular points of f t .
III. Let us prove that the surface M is non-orientable if and only if Γ contains at least one cycle of odd length.
The surface M with the flow f t is orientable if and only if all polygonal regions of f t can be oriented consistently. We can define an orientation for each polygonal region by selection of one of two possible cyclic order of its fixed points: α-σ n -. . . -σ 1 -ω and ω-σ 1 -. . .σ n -α, where α is a source, σ j is a saddle point (j = 1, n), ω is a sink. Let the sign "+" is appropriated to a polygonal region in the first case, "−" -in the second one. It is clear that orientations of two such regions can are consistent if and only if the regions are equipped by different signs. As there is one-to-one correspondence π f t between the polygonal regions of f t and the vertices of the graph Γ, then the condition of orientability of M may be stated the following way: the surface M can be oriented if and only if the vertices of Γ are equipped by the signs "+" and "−" so that each two its vertices connected by an edge has different signs. We call such arrangement of signs of the Γ's vertices the right one.
So all we need is to prove that Γ doesn't have odd length cycles if and only if the right sign arrangement for the vertices of Γ exists.
Truth of that affirmation from the left to the right is obvious, because the right sign arrangement in an odd length cycle is impossible. Let us prove from the right to the left: let Γ doesn't have odd length cycles. Then the right sign arrangement might be made this way: let us take some vertex b 0 of Γ and appropriate to it "+"; for each other vertex b i let us consider a path connecting b i with b 0 and appropriate to it "+" if the path has even length and "−" in the other case. As we suppose Γ doesn't have odd length cycles, then such arrangement doesn't depend on the selection of a path and, hence, is defined correctly.

The proof of the realisation Theorem 2
Let Υ * be some admissible equipped graph.
I. Let us construct an Ω-stable flow φ t corresponding to Υ * 's isomorphic class by creation the surface S and the continuous vector field.
Step 1. Let B be the set of Υ * 's vertices and E be the set of its edges. Let us construct for every b ∈ B a surface S b with a boundary and a vector field − → V b on it, transversal to the boundary. The required Ω-stable flow on S will be glued from these pieces of dynamics by means annuli which correspond to the edges from E according to incidence.
A-vertex. Let b be an A-vertex. Then S b = {(x, y) ∈ R 2 | x 2 + y 2 < 1} and the vector field on the disk S b we define by the vector-function S b be the natural projection. Define on the annulus S b the vector field by the formula , if the weight of E is "+" ("−").
Then W is a curvilinear trapezium with the vertices A(−1; 0), B(−2; 1), C(2; 1), D(1; 0). Define on W the minimal equivalence relation ∼ L such that (x, 0) ∼ L (2x, 1) ((x, 0) ∼ L (−2x, 1)) for x ∈ AD, if the vertex b is incident to two edges (one edge). Let S b = W/ ∼ L and let q b : W → S b be its natural projection. Then S b is the annulus (the Möbius band). Define on S b the vector field by the formula 1})) and orient the boundary of S b in the direction of motion along the coordinate y from 0 to where π V M is the one-to-one correspondence between the elements of the field − → V M and the elements of the four colour graph Γ M . Let u ω (u α ) is some neighbourhood of ω (of α) without other elements of the basic set inside and with the boundary transversal to the trajectories of − → V M . Let us orient ∂u ω (∂u α ) consistently with the orientation of the cycle τ b,L (τ L,b ). Then We will suppose that each connected component of ∂S b has an orientation due to the oriented cycle the orientation.
Step 2. Let A = S 1 × [−1, 1] and we have two vector fields , accordingly, such that they are transversal to ∂A, − → V − has a direction to A, − → V + has a direction out of A. Let We will called the vector field − → V A by an average of the boundaries. For every edge e ∈ E denote by A e a copy of the annulus A. Let us notice that the sets such that x ∼ Υ * h Υ * (x). Then S/ ∼ Υ * is a closed surface, denote it by S and by q S : S → S the natural projection. Then the required vector field − → V S on S coincides with q S ( − → V S b ) for every b ∈ B and is the average of the boundaries on q S (A e ) for every e ∈ E.
II. Let us prove that the Euler characteristic of S can be calculated by the formula It is well-known (see, for example, [4]) that χ(Π p ) = χ(Π) − p, where Π p is the surface Π with p holes and if Π is a result of an identifying of the boundaries of Π 1 p and Π 2 p then χ(Π) = χ(Π 1 p ) + χ(Π 2 p ). As S is a result of the identifying of the boundaries of III. Let us prove that S is orientable if and only if every four-colour graph equipping Υ * has not odd length cycles and each L-vertex is incident to exactly two edges.
Notice that S is orientable if and only if all its parts are orientable, i.e. all its elementary regions are orientable, that equivalently the condition that all L-regions are the annuli and all four colour graphs equipping Υ * do not have odd length cycles (see item (2) of Lemma 5.2).
9 Efficient algorithms to solve the isomorphism problem in the classes of four-colour and equipped graphs, to calculate the Euler characteristic and to determine orientability of the ambient surface In this section, we consider the distinction (isomorphism) problem for four-colour and equipped graphs and the problems of calculation of the Euler characteristic of the ambient surface and determining its orientability. We present polynomial-time algorithms for their solution. 36 Definition 12. A simple graph is called bipartite if the set of its vertices can be partitioned into two parts such that there is no an edge incident to two vertices in the same part.
By König theorem, a simple graph is bipartite if and only if it does not contain odd cycles [9]. For any simple graph with n vertices and m edges, its bipartiteness can be recognized in O(n + m) time by breath-first search [1]. Hence, by the second part of Theorem 2, to check orientability of the ambient surface, we forget about colours of edges of four-colour graphs and apply 2-subdivision to each their edge, to make them simple. Clearly, all of the new graphs are bipartite if and only if the ambient surface is orientable. Thus, orientability of the ambient surface can be tested in linear time on the length of a description of equipped graphs.
By Lemma 5.2, the Euler characteristic of a surface M is equal to ν 0 − ν 1 + ν 2 , where of Γ M belongs to some its c * -cycle C, then the vertex a has an odd or even number in C.
Hence, assuming that this number of a is odd (or even) in C, by the number of e in the set of edges incident to b, one can determine an edge in C following the edge e. Hence, each edge of Γ M is contained in at most two c * -cycles and they can be found in time proportional to the number of edges of Γ M . Found all these cycles, one can remove e from Γ M and similarly proceed our search of c * -cycles in the resultant graph. Clearly, the found cycles will not be met one more time in the future searches of c * -cycles. Therefore, ν 1 can be computed in time proportional to the square of the number of edges of Γ M . Thus, by the first part of Theorem 2, the statement of Theorem 4 holds.