House, design, repair, decor. Yard and garden. Do it yourself

House, design, repair, decor. Yard and garden. Do it yourself

» Orgrafs and binary relationships. The attitude of the attainability of the peaks of the Orgraf

Orgrafs and binary relationships. The attitude of the attainability of the peaks of the Orgraf

1. Reachability and counterfeitness

Tasks in which the concept of achievability is used, quite a lot. Here is one of the nickname. The graph may be a model of some organization in which people are represented by vertices, and the arcs interpret the communication channels. When considering such a model, it is possible to put a question whether information from one person X can be transmitted to another person X 7, i.e. There is a path that comes from the top x, to the top of the X /. If this path exists, they say that the vertex x, - achievable from the top of X ,. It is possible to be interested in the achievability of the vertex x, from the tops x, only on such paths whose lengths do not exceed the predetermined value or the length of which is less than the highest number of vertices in the column.

Reachability in the graph is described by the achievability matrix R \u003d || g, y ||, i, J. =1,2,... p, Where p - the number of vertices of the graph, and each element is defined as follows:

Gu- 1, if the top x, achievable from x,

Gu \u003d. 0 otherwise.

Many vertices R (x,) graph G, achievable from a given vertex X "consists of such elements x; For which (/, /) - th element in the achievability matrix is \u200b\u200b1. Obviously, all the diagonal elements in the matrix R are equal to 1, since each vertex is renewed itself with a length of 0. Since the direct display of the 1st order g +1 (x,) is a multitude of such vertices. Xj which are achievable from x, using paths of length 1, then the set g (g (x,)) \u003d g x,) consists of vertices, achievable, using paths Length 2. Similar to g P (x,) is a multitude of vertices that are achievable from x, using paths r.

Since any vertex of the graph, which is achievable from x "must be achievable using the path (or paths) with a length of 0 or 1, or 2, ..., or r, then a set of vertices, achievable for the top x "can be represented as

As we see, the set of achievable vertices R (x,) is a direct transitive closure of the vertices x "i.e. R (x,) \u003d T (x,). Consequently, to construct the achievability matrix, we find the achievable sets R (x,) for all vertices x, e x. believing g y - 1, if x 7 e R (x,) and gu- 0 otherwise. For graph shown in Fig. 59.4, butThe sets of attainances are as follows:

Fig. 59.4.

The matrix of adjacency (a), achievability (R), counterfeitness (q) have the following form:

Controlness matrix Q \u003d qij, I, J \u003d 1,2,... p, Where p - The number of vertices of the graph is determined as follows:

qij \u003d. 1, if you can reach a vertex x H Qtj \u003d Oh otherwise.

Controlly set Q (x,) There are many such vertices that from any vertex of this set you can get into the top x /. Similar to the construction of the achievable set R (x,) you can record the expression for Q (X,):

Thus, it can be seen that q (x,) is nothing more than the reverse transitive closure of the vertices x, i.e. Q (x () \u003d t "(x,). From the definitions it can be seen that the column X, the matrix Q (in which q t j \u003d 1, if Hu € q (x,), and c / y \u003d 0 Otherwise) coincides with the line X, the matrix R, i.e. Q \u003d R, where R is a matrix, transposed to the achievability matrix R.

Controlness matrix is \u200b\u200bpreviously shown.

It should be noted that since all elements of matrices R and Q are equal to 1 or 0, each string can be stored in binary form, saving the cost of computers. The matrices R and q are convenient for processing on a computer, as in computational terms the main operations are high-speed logical operations.

2. Finding a plurality of vertices included in the way if you need to learn about the vertices of the graph included in these paths, you should recall the definitions of direct and reverse transitive closures. Since t + (x,) is a set of vertices in which there are ways from the top of x "A T" (y) - a plurality of vertices, of which there are ways in x /, then T (x,) n t (XJ) - A variety of vertices, each of which belongs to at least one way, coming from x, to Hu. These vertices are called essential, or integral relative to two terminal vertices. Xand Hu. All other vertices of the graph are called insignificant, or excessive, since their removal does not affect the paths from x / to Hu.

So, for the graph in Fig. 59.5 Finding vertices included in the path, for example, from the vertex x2 to the vertex x4, it comes down to finding T + (xg) \u003d (xg, xs, x4, x5, hb), T "(x4) \u003d (xi, x2, x3 , X4, x5), and their intersection T + (xg) p t (x4) \u003d \u003d (x2, xs, x4, x 5).

Tasks in which the concept of achievability is used, quite a lot. Here is one of them. The graph may be a model of some organization in which people are represented by vertices, and the arcs interpret the communication channels. When considering such a model, it is possible to put a question whether information from one person x i be transmitted to another person X j, i.e. there is a path that comes from the top x i to the top of X j. If such a path exists, they say that the vertex x j is reaches from the top x i. It is possible to be interested in the achievability of the vertex x j from the top X I only on such paths, the lengths of which do not exceed the predetermined value or the length of which is smaller than the greatest number of vertices in the graph, etc. Tasks.

The achievability in the graph is described by the reachability matrix R \u003d, i, j \u003d 1, 2, ... n, where n is the number of vertices of the graph, and each element is defined as follows:

r ij \u003d 1, if the vertex x j is reaches from x i,

r ij \u003d 0, otherwise.

Many verthos R (x i) graph G, achievable from a given vertex X i, consists of such elements x j, for which (i, j) -th item in matrix achievors equal to 1. It is obvious that all diagonal elements in the matrix R are equal to 1, since each vertex is achieved from itself the length of the length 0. Since direct display 1st order g +1 (x i) is a plurality of such vertices x j, which are achievable from X i using the length paths 1, then the set G + (g +1 (x i)) \u003d g +2 (x i) It consists of vertices achievable from X i using the length of length 2. Similarly, r + p (x i) is a plurality of vertices that are achievable from X i using paths p.

Since any vertex of the graph, which is achieved from X i, must be achievable using the path (or paths) of length 0 or 1, or 2, ..., or p, then many verthosachievable for vertex x i can be represented as

As we see, the set of achievable vertices R (x i) is a direct transitive closure The vertices of X i, i.e. r (x i) \u003d t + (x i). Consequently, to construct the achievability matrix, we find the achievable sets R (X i) for all vertices. Believing r ij \u003d 1 if and R ij \u003d 0 otherwise.


Fig. 4.1.

For graph shown in Fig. 4.1, and, many reaches are as follows:

Matrix achievability It seems as shown in Fig. 4.1, c. Matrix achievability It is possible to construct a matrix of adjacency (Fig. 4.1, b), forming the set T + (x i) for each vertex x i.

Matrix of counterfeitness Q \u003d [q ij], i, j \u003d 1, 2, ... nwhere n is the number of vertices of the graph is determined as follows:

q ij \u003d 1, if the top of X j can be achieved by a vertex X i,

q ij \u003d 0, otherwise.

Count achievability

One of the first questions arising from the study of graphs is the question of the existence of paths between the vertices set or all pairs. The answer to this problem is the ratio of attainability at the vertices of the graph G \u003d (V, E): the vertex W is reaches from the vertex V if V \u003d W or in G is the path from V to w. In other words, the attitude ratio is a reflexive and transitive closure of relation E. For undeteriented graphs, this ratio is also symmetrically and, therefore, is the equivalence ratio on the set of vertices V. In an unintected graph of equivalence classes with respect to achievability are called connected components. For oriented graphs, achievability, generally speaking, should not be a symmetric attitude. Symmetric is mutual achievability.

Definition 9.8. The vertices V and W oriented graph g \u003d (V, E) are called mutually achievable if G is the path from V to W and the path from W in V.

It is clear that the ratio of mutual achievability is reflexive, symmetric and transitive and, therefore, equivalence on on the set of vertices of the graph. Equivalence classes with respect to mutual attainability are called strong connected components or double components graph.

Consider at the beginning the question of building the attitude of achievability. We define the graph of achievability (called sometimes as a graph of transitive circuit), the edges of which correspond to the source graph.

Definition 9.9. Let G \u003d (V, E) be an oriented graph. The graph of achievability G * \u003d (V, E *) for G has the same set of vertices V and the following set of edges E * \u003d ((U, V) | In the graph G, the vertex V is achievable from the vertex U).

Example 9.3. Consider the graph G from Example 9.2.

Fig. 9.2. Count G.

Then you can check that the graph of achievability G * for G looks like this (new ribs-loop at each of the vertices 1-5 are not shown):

Fig. 9.3. Count G *

How can I construct a graph g * by g *? One method is that for each vertex of the graph G, to determine the set of tops achievable from it, sequentially adding the vertices to it, achievable from it with paths of length 0, 1, 2, etc.

We will look at another method based on the use of the adjacency matrix A G of graph G and Boolean operations. Let a set of vertices v \u003d (v 1, ..., v n). Then the matrix A G is the Boolean matrix of size n × n.

Below to preserve similarity with ordinary operations over matrices, we will use "arithmetic" designations for boolean operations: through + we denote disjunction, and through · - conjunction.

Denote by e n a single matrix of size n × n. Put . Let our procedure for constructing G * based on the following statement.

Lemma 9.2. Let be . Then

Evidence We carry out induction by k.

Basis.For k \u003d 0 and k \u003d 1, the statement is true by definition and.

Induction step.Let the lemma is valid for k. We show that it remains just for k + 1. By definition, we have:

Suppose that in the graph G from V i in V j, there is a path of length k + 1. Consider the shortest of these paths. If its length k, then by the assumption of induction A_ (ij) ^ ((k)) \u003d 1. In addition, a jj (1) \u003d 1. Therefore, a ij (k) a jj (1) \u003d 1 and a ij (k + 1) \u003d 1. If the length of the shortest path from V i in V j is equal to k + 1, then let V r - its last -ex-current vertex. Then, from V i in V R, there is a path of length k and on the assumption of induction A Ir (k) \u003d 1. Since (v r, v j) e, then A_ (Rj) ^ ((1)) \u003d 1. Therefore, A IR (k) A Rj (1) \u003d 1 and A ij (k + 1) \u003d 1.

Back, if A ij (k + 1) \u003d 1, then at least for one R, the term A Ir (k) A Rj (1) in the amount is equal to 1. If it is R \u003d J, then A ij (k) \u003d 1 and By inductive assumption in G, there is a path from vi in \u200b\u200bVJ length k. If R j, then A Ir (k) \u003d 1 and a Rj (1) \u003d 1. This means that in G there is a way from V i in V R length k and edge (V R, V j) E. Combining them, we obtain the path from V i in V j. K + 1.

From Lemma 9.1 and 9.2 we get directly

Corollary 1. Let G \u003d (V, E) be an oriented graph with N vertices, and G * is its graph of achievability. Then A_ (G *) \u003d. Evidence. From Lemma 5.1, it follows that if G is a path from U in V U, then it also has a simple way from U in V length N-1. And in Lemma 5.2, all such paths are presented in the matrix.

Thus, the procedure for constructing the matrix of the adjacency A G * of the reachability graph for G is reduced to the construction of the matrix into the degree of N-1. We will make some comments to simplify this procedure.

where k is the smallest number such that 2 k n.

this r is detected, that A IR \u003d 1 and A rj \u003d 1, then the entire sum A ij (2) \u003d 1. Therefore, the rest of the components can not be considered.

Example 9.3. Consider as an example calculation of the Count Count Matrix A G * for Count G presented on fig.9.2.. In this case

Since G has 6 vertices, then. Calculate this matrix:

and (the last equality is not difficult to check). In this way,

As you can see, this matrix really sets the graph represented on fig.9.3..

Mutual achievability, components of strong connectivity and the base of the graph

By analogy with the achievability graph, we define the graph of strong attainment.

Definition 9.10. Let G \u003d (V, E) be an oriented graph. The graph of strong achievability G * * \u003d (V, E * *) for G has the same set of vertices V and the following sets of E * * \u003d ((U, V) | In the Graph G of Vertine V and U are mutually achievable).

According to the matrix of the graph of achievability, it is easy to build a crust matrix of strong attaining. Indeed, from definitions of achievability and strong achievability immediately follows, then for all pairs (i, j), 1 i, jn, the value of the element is 1 then and only if both elements Ag * (i, j) and Ag * (j, i) equal to 1, i.e.

In the matrix, the components of the strong connectivity of the graph G can be selected as follows.

    Position in the K 1 component V 1 and all such vertices v j, that A_ (G _ * ^ *) (1, j) \u003d 1.

    Let the components K 1, ..., K I and V K are already constructed - this is a top with a minimum number that has not yet fallen into the components. Then put the vertex V k in the K_ (I + 1) component and all such vertices V j,

    that A_ (G _ * ^ *) (k, j) \u003d 1.

We repeat step (2) until all the vertices are distributed by components.

In our example for Graph G on fig.2 On the matrix we get the following matrix of the graph of severe attainability

Using the procedure described above, we find that the vertices of the graph G are divided into 4 components of a strong connectivity: k 1 \u003d (V 1, V 2, V 3), \\ k 2 \u003d (v 4), \\ k 3 \u003d (v 5), \\ K 4 \u003d (v 6). On the set, the components of strong connectivity also define the attitude of attainability.

Definition 9.11. Let k and k "be the components of a strong connectedness of the graph G. component K achievable from The components K ^ \\ Prime, if k \u003d k "or there are such two vertices U k and V k" that u is achievable from v. K. strictly achievable fromK ^ \\ Prime, if k k "and k is achievable from k". Component K is called minimal If it is not strictly achievable from any component.

Since all the vertices in one component are mutually achievable, it is not difficult to understand that the relationship of achievability and strict achievability on the components does not depend on the selection of the vertices U K and V k.

From the definition, the following characteristic of strict achievability is easily displayed.

Lemma 9.3. The ratio of strict achievability is the ratio of the partial order, i.e. It is antireflexically, antisymmetrically and transitive.

This relationship can be represented as a oriented graph, whose vertices are components, and the edge (k ", k) means that K is strictly achievable from K". On the fig. 9.4. This graph is shown in the component for the graph G.

Fig. 9.4.

In this case, there is one minimum component K 2.

In many applications, the oriented graph is a network of distribution of some resource: product, product, information, etc. In such cases, the task of finding a minimum number of such points (vertices) has occurs, of which this resource can be delivered to any point of the network.

Definition 9.12. Let G \u003d (V, E) be an oriented graph. Subset of vertices w v called givenIf any vertex of the graph can be achieved from the vertices W. The subset of the vertices W v is called the graph of the graph, if it is generating, but no its own subset is not generating.

The following theorem allows you to effectively find all the bases of the graph.

Theorem 9.1. Let G \u003d (V, E) be an oriented graph. The subset of the vertices W v is the base G if and only when it contains on one vertex from each minimum component of a strong connectivity G and does not contain any other vertices.

Evidence Note first that each vertex of the graph is achieved from the vertex belonging to some minimum component. Therefore, a plurality of vertices of W containing one vertex from each minimum component is generating and when removing from it, any vertex ceases to be such, since the vertices from the corresponding minimum component become unattainable. Therefore, W is the base.

Back, if W is the base, it is obliged to include at least one vertex from each minimum component, otherwise the vertices of such a minimum component will be unavailable. There cannot contain any other vertices, since each of them is achievable from the already included vertices.

From this theorem, the following procedure for constructing one or enumeration of all Bases of Count G.

    Find all components of strong connectedness G.

    Determine the order for them and allocate the minimum components with respect to this order.

    To generate one or all of the graph base, choosing on one vertex from each minimum component.

Example 9.5. We define all the bases of the oriented graph G shown in fig.9.5..

Fig. 9.5. Count G.

At the first stage we find the components of a strong connectivity G:

In the second stage, we build a graph of strict achievability on these components.

Fig. 9.6. Count relationship attribution on components G

Determine the minimum components: k 2 \u003d (b), k 4 \u003d (d, e, f, g) and k 7 \u003d (r).

Finally we list all four bases G: B 1 \u003d (b, d, r), b 2 \u003d (b, e, r), b 3 \u003d (b, f, r) and b 1 \u003d (b, g, r) .

Tasks

Task 9.1. Prove that the sum of the degrees of all vertices of an arbitrary oriented count is even.

This task has a popular interpretation: to prove that the total number of handshakes who exchanged people who came to the party are always even.

Task 9.2. List all non-relative ne-oriented graphs that have no more than four vertices.

Task 9.3. Prove that a non-oriented connected graph remains connected after removing some edge ↔ This edge belongs to some cycle.

Task 9.4. Prove that non-oriented connected graph with N vertices

    contains at least N-1 ribs

    if there is more n-1 ribs, it has at least at least one cycle.

Task 9.5. Prove that in any group of 6 people there are three pairs of friends or three pairs of strangers.

Task 9.6. Prove that the non-oriented graph G \u003d (V, E) is connected ↔ for each partition V \u003d V 1 V 2 with non-empty V 1 and V 2, there is an edge connecting V 1 with V 2.

Task 9.7. Prove that if there are exactly two vertices of an odd degree in an un-ore-oriented graph, then they are connected by.

Task 9.8. Let G \u003d (V, E) be ne-oriented graph C | E |< |V|-1. Докажите, что тогда G несвязный граф.

Task 9.9. Prove that in a connected non-oriented column, any two simple maximum length paths have a total vertex.

Task 9.10. Let a non-oriented graph without loops G \u003d (V, E) has a K component of connectivity. Prove that then

Task 9.11. Determine what is an graph of achievability for

    graph with N vertices and an empty set of edges;

    graph with n vertices: v \u003d (v 1, ..., v n), the ribs of which form a cycle:

Task 9.12. Calculate the matrix of the attacurity graph for the graph

and build the corresponding accrehensibility graph corresponding to it. Find all Count G.

Task 9.13. Build for the specified on fig. 9.7 Oriented graph G 1 \u003d (V, E) of its armpit matrix A G1, the incidence matrix B G1 and adjacency lists. Calculate the achievability matrix A G1 * and construct an appropriate graph of achievability G 1 *.

Fig. 9.7.

Un-oriented and oriented trees

Trees are one of the most interesting classes of graphs used to represent a different kind of hierahical structures.

Definition 10.1. A ne-oriented graph is called wood, if he is connected and there are no cycles in it.

Definition 10.2. The oriented graph G \u003d (V, E) is called (oriented) by wood, if

On the fig. 10.1. Examples of non-oriented Tree G 1 and oriented Tree G 2 are shown. Note that the Tree G 2 is obtained from G 1 by selecting the vertex C as the root and orientation of all ribs in the direction "from the root".

Fig. 10.1. Un-Oriented and Cointed Trees

This is not by chance. Prove yourself the following statement about the connection between un-ore-oriented and oriented trees.

Lemma 10.1. If in any non-oriented tree G \u003d (V, E) choose an arbitrary vertex V V as a root and orient all the ribs in the direction "from the root", i.e. To make the V beginning of all the incidents of it, the vertices, adjacent to the V - the beginning of all the incident not yet oriented edges, etc., the resulting as a result of the oriented graph G "will be a oriented tree.

Un-oriented and oriented trees have many equivalent characteristics.

Theorem 10.1.Let G \u003d (V, E) be a non-oriented graph. Then the following conditions are equivalent.

    G is a tree.

    For any two vertices in G, there is a single path connecting them.

    G connected, but when removing from e, any edge ceases to be connected.

    G connected and | E | \u003d | V | -one.

    G acyclic and | E | \u003d | V | -one.

    G acyclic, but adding any edge to E generates a cycle.

Evidence (1) (2): If in G, some two vertices were connected to two ways, it would be obvious that G would have a cycle. But this is contrary to the definition of a tree in (1).

(2) (3): If G is connected, but when removing some edge (U, V) E does not lose connections, then between U and V there is a path that does not contain this edge. But then in G there are at least two paths connecting u and v, which contradicts condition (2).

(3) (4): The reader is provided (see Task 9.4).

(4) (5): If G contains a cycle and is connected, then when removing any edge from the cycle, the connectivity should not be broken, but the ribs will remain | E | \u003d V -2, and according to the task 9.4 (a) in the connected column there must be At least V -1 ribs. The resulting contradiction shows that the cycles in g are not and satisfied (5).

(5) (6): Suppose that adding the edge (U, V) to E did not lead to the appearance of a cycle. Then in G vertices U and V are in different components of connectivity. Since | E | \u003d V -1, then in one of these components, let it (V 1, E 1), the number of ribs and the number of vertices coincide: | E 1 | \u003d | V 1 |. But then there is a cycle in it (see problem 9.4 (b)), which contradicts acyclicity G.

(6) (1): If G was not connected, then there would be two vertices U and V from different connected components. Then addition of the edge (U, V) to E is not the resulting cycle, which contradicts (6). Consequently, G is connected and is a tree.

For oriented trees, it is often convenient to use the following inductive definition.

Definition 10.3. We define the induction class of oriented graphs, called trees. At the same time, for each of them, we define the allocated vertex - the root.

Fig. 10.2 illustrates this definition.

Fig. 10.2. Inductive definition of oriented trees

Theorem 10.2. Definitions of oriented trees 10.2 and 10.3 are equivalent.

EvidenceLet the graph G \u003d (V, E) be satisfied with the conditions of definition 10.2. Let's show induction by the number of vertices | V | what.

If | V | \u003d 1, then the only vertex V v is by the property (1) of the root of the tree, i.e. In this graph, there are no edges: E \u003d. Then.

Suppose that every graph with n vertices satisfying the definition 10.2 enters. Let the graph G \u003d (V, E) C (n + 1) -th vertex satisfy the conditions of definition 10.2. By condition (1) there is a top-root R 0. Let from R 0 comes out k ribs and they lead to the vertices R 1, ..., R k (k 1). Denote by g i, (i \u003d 1, ..., k), the graph, including the vertices V i \u003d (V V | V \\ Textit (achievable from) Ri) and connecting their edges E i E. It is easy to understand that G I satisfies the conditions Definition conditions 10.2. Indeed, in R i do not enter the ribs, i.e. This vertex is the root G i. In each of the other vertices from V I enters one edge as in g. If V V i, then it is achieved from the root R i to determine the graph G i. As | V i | n, then by inductive assumption. Then graph G was obtained by inductive rule (2) of determination 10.3 of the trees G 1, ..., G k and therefore belongs to the class.

⇐ If some graph G \u003d (V, E) enters the class, then the implementation of conditions (1) - (3) of definitions 10.2 is easy to establish induction by definition 10.2. We provide this to the reader as an exercise.

With oriented trees, rich terminology has been connected, which came from two sources: botany and family relations.

The root is the only vertex in which the ribs do not include, the leaves are vertices from which the ribs do not come out. The path from the root in the sheet is called a tree branch. The height of the tree is the maximum of its branches. The depth of the vertex is the length of the path from the root into this vertex. For the vertex V V, the subgraph of the tree T \u003d (V, E), which includes all the tops that are achievable from V and connect their ribs from E, forms supported T V tree T with the root V (see Task 10.3). The height of the vertex V is the height of the T V tree. Count, which is a union of several non-cycle trees, is called forest.

If from the vertex V leads the edge to the vertex W, then the V is called father w, and w - son.v (Recently, a assexual pair of terms is used in the Angoy-speaking literature: the parent is a child). From the definition of the tree it immediately follows that each vertex except the root has a single father. If the path is carried out from the vertex V, then v is called the ancestor w, and W is a descendant V. Vertices who have a common father called brothers or sisters.

We highlight another class of graphs, generalizing oriented trees - oriented acyclic. Two species of such marked graphs will be used to further for the representation of boolean functions. These graphs may have several roots - vertices that do not include ribs, and several ribs can enter each vertex, and not one, like trees.


Computer technologies, in particular program ... 2009 of the year Primary school is an experimental platform by The introduction of the federal state ...
  • M Onering the media Modernization of vocational education March - August 2011

    Summary

    Uniform state Exams " by Selection ": Information computertechnologies, biology and literature. By the way, in this year Ege ... question "On the results of implementation program development of national research universities in 2009 -2010 years ". ...

  • Strategic Development Program Tver 2011

    Program

    IN 2009 year. Structural shifts observed in 2010 yearby relation to K. 2009 , ... Professionallyorienteed Foreign language "," Modern educational technologies". In each program Raising qualifications are implemented by the module " State ...

  • By analogy with the achievability graph, we define the graph of strong attainment.

    Definition: Let-oriented graph. Graph of strong attainability
    for has a lot of vertices and the next lot of Ryube
    in graf vershins and mutually achievable.

    According to the matrix of the graph of attainability
    easy to build a matrix
    count strong attainability. Indeed, from definitions of achievability and severe attainment, it immediately follows, then for all steam
    ,
    , Element value
    equal 1 then and only if both elements
    and
    equal to 1, i.e.

    In the matrix
    You can highlight the components of a strong connectivity of the graph in the following way:

    We repeat the second step until all the vertices are distributed by components.

    In our example for the graph example 14.1. in the matrix
    we get the next matrix of the graph of strong attainability

    Using the procedure described above, we find that the vertices of the graph smashed at 4 components of strong connectivity:
    ,
    ,
    ,
    . On the set, the components of strong connectivity also define the attitude of attainability.

    Definition: Let be
    and
    - components of strong connectivity of the graph . Component
    achievablefrom components
    , if a
    or exist such two vertices
    and
    , what achievable from .
    strictly achievable from
    , if a
    and
    achievable from
    . Component
    it is called minimal if it is not strictly achievable from any component.

    Since all vertices in one component are mutually achievable, it is not difficult to understand that the relationship of achievability and strict achievability on the components does not depend on the selection of vertices
    and
    .

    From the definition, the following characteristic of strict achievability is easily displayed.

    Lemma: The ratio of strict achievability is the ratio of the partial order, i.e. It is antireflexically, antisymmetrically and transitive.

    This relationship can be represented as a oriented graph, whose vertices are components, and the edge
    means that
    strictly achievable from
    . The graph of the component for the graph of Example 14.1 is shown below.

    In this case, there is one minimum component.
    .

    In many applications, the oriented graph is a network of distribution of some resource: product, product, information, etc. In such cases, the task of finding a minimum number of such points (vertices) has occurs, of which this resource can be delivered to any point of the network.

    Definition: Let be
    - Oriented graph. Subset of Verkhin
    called givenif from the vertices
    you can reach any vertex of the graph. Subset of Verkhin
    the base of the graph is called if it is generating, but no one generates its own subset.

    The following theorem allows you to effectively find all the bases of the graph.

    Theorem: Let be
    - Oriented graph. Subset of Verkhin
    is a base Then and only when it contains one vertex from each minimum component of strong connectedness And does not contain any other vertices.

    Evidence: note first that each vertex of the graph is achieved from the vertex belonging to some minimum component. Therefore, many verthos
    containing one vertex from each minimum component is generating, and when removing from it, any vertex ceases to be such, since the vertices from the corresponding minimum component become unattainable. therefore
    is the base.

    Back, if
    it is a base, it is obliged to include at least one vertex from each minimum component, otherwise the vertices of such a minimum component will be unavailable. No other vertices
    contain can not, since each of them is achievable from already included vertices.

    This theorem follows the following procedure for building one or enumeration of all bases of the graph. :

    Example 14.3: We define all the bases of the oriented graph .

    At the first stage we find the components of strong connectivity :

    In the second stage, we build a graph of strict achievability on these components.

    Determine the minimum components:
    ,
    and
    .

    Finally, list all four databases :
    ,
    ,
    and
    .

    Considered issues of achievability for the orgraves and ways to find matrices of achievability and counterfeitness. A matrix method of finding the number of paths between any vertices of the graph is considered, as well as finding a plurality of vertices included in the path between the peaks pair. The purpose of the lecture: give an idea of \u200b\u200bachievability and counterfeitness and ways to find them

    Reachability and counterfeitness

    The tasks in which the concept is used achievement, quite a bit of.

    Here is one of them. Graphthere may be a model of some organization in which people are represented by vertices, and the arcs interpret communication channels. When considering such a model, it is possible to put a question whether information from one persons I be transmitted to other litsuch j, that is, there is a path that comes from the vertex I to the tops j. If this path exists, they say that the vertices j achievablefrom the vertex I. It is possible to be interested in the achievability of the vertex J from the vertex I only on such paths, the lengths of which do not exceed the predetermined value or the length of which is less than the highest number of vertices in the column, etc. Tasks.

    The achievement in the graph is described by the achievability matrix R \u003d, i, j \u003d 1, 2, ... n, wheren the number of vertices of the graph, and each element is defined as follows:

    r ij \u003d 1, if the vertices j are achievable from I,

    r ij \u003d 0, otherwise.

    The set of R (xi) vertices R (Xi) of the graph, achievable from a given vertex I, consists of such elements I, for which (i, j) -th element in the achievability matrix is \u200b\u200b1. Obviously, all diagonal elements in matrixing 1, since each vertex is achievable From itself, the length of the length is 0. Since the direct mapping of 1st order +1 (xi) is a plurality of such vertices j, which are achievable from × i using the paths of length 1, then the set + (g +1 (xi)) \u003d r +2 (xi) consists of vertices, achievable from СX I using lengths of length 2. Similar to + P (xi) is a plurality of vertices that are achievable from XI using length paths.

    Since any vertex of the graph, which is achieved from X i, should be achieved using the path (or paths) of length 0 or 1, or 2, ..., orp, then a plurality of vertices achievable for the vertex I can be represented as

    R (x i) \u003d (x i) g +1 (x i) g +2 (x i) ... g + p (x i).

    As we can see, the set of achievable vertices R (X i) is a direct transitive closure of the vertices IX i, so e.r (x i) \u003d t + (x i). Consequently, to construct the achievability matrix, we find the achievable sets (x i) for all vertices I x. Presenting, R ij \u003d 1, if x R (x i), И ij \u003d 0v, otherwise.

    Fig. 4.1. Reachability in the column: a -graph; B - matrix of adjacency; in - the achievability matrix; G-matrix of counterfeitness.

    For graph shown in Fig. 4.1, a, set of achievorsare as follows:

    R (x 1) \u003d (x 1) (x 2, x 5) (x 2, x 4, x 5) (x 2, x 4, x 5) \u003d (x 1, x 2, x 4, x 5 ),

    R (x 2) \u003d (x 2) (x 2, x 4) (x 2, x 4, x 5) (x 2, x 4, x 5) \u003d (x 2, x 4, x 5),

    R (x 3) \u003d (x 3) (x 4) (x 5) (x 5) \u003d (x 3, x 4, x 5),

    R (x 4) \u003d (x 4) (x 5) (x 5) \u003d (x 4, x 5),

    R (x 5) \u003d (x 5) (x 5) \u003d (x 5),

    R (x 6) \u003d (x 6) (x 3, x 7) (x 4, x 6) (x 3, x 5, x 7) (x 4, x 5, x 6) \u003d (x 3, x 4, x 5, x 6, x 7),

    R (x 7) \u003d (x 7) (x 4, x 6) (x 3, x 5, x 7) (x 4, x 5, x 6) \u003d (x 3, x 4, x 5, x 6 , x 7).

    Matrix achievability it seems as shown in Fig. 4.1, in. Matrix achievabilitycan be built by sailing matrix(Fig. 4.1, b), forming a set + (x i) for each vertex i.

    Matrix of counterfeitness Q \u003d [q ij], i, j \u003d 1, 2, ... n, wheren the number of vertices of the graph, is defined as follows:

    q ij \u003d 1, if the vertex j can reach the vertex i,

    q ij \u003d 0, otherwise.

    Control-freethe setq (x i) is a set of such vertices, which from any vertex of this set can be achieved by the vertex i. Similar to the construction of the achievable setR (X i), you can record the expression forQ (X i):

    Q (x i) \u003d (x i) M -1 (x i) g - 2 (x i) ... Mr (x i).

    Thus, it can be seen that q (x i) is nothing more than the reverse transitive closure of the vertices I, so e.q (x i) \u003d T - (x i). It is obvious from the definitions that the column x i of the matrixq (in which q ij \u003d 1, if x q (x i), andQ ij \u003d 0) either) coincides with the string of i matrix, so e.q \u003d r t, wherer T - matrix, transposed to matrix achievabilityR.

    Matrix of counterfeitnessshown in Fig. 4.1, g.

    It should be noted that since all the elements of the matrices are 1 or 0, then each string can be stored in binary form, saving the memory costs of the computer. MatricesQuests for processing on a computer, since from a computational point of view, the main operations are high-speed logic operations.

    Finding a plurality of vertices included

    If you need to learn about the vertices of the graph included in these paths, you should recall the definitions of direct and inverse transitive closures. Since T + (XI) is a plurality of vertices in which there are ways from the vertex I, AT - (X J) - a plurality of vertices, of which there are ways of CX J, TT + (XI) T - (XJ) - a variety of vertices , Each of which belongs at least one way, going fromX i kx j. These vertices are called essential or integral relative to two terminal vertices Ix J. All other vertices of the graph are called non-essential or redundant, since their removal does not affect the paths of the OTX I KX J.

    Fig. 4.2. Orgraf

    So for the graph in fig. 4.2 Finding the vertices included in the path, for example, from the vertex x 2 in the vertex 4, reduces to find + (x 2) \u003d (x 2, x 3, x 4, x 5, x 6),

    T - (x 4) \u003d (x 1, x 2, x 3, x 4, x 5), and their intersectionsT + (x 2) T - (x 4) \u003d (x 2, x 3, x 4, x five ).

    Matrix method of finding ways in graphs

    The adjacency matrix fully determines the structure of the graph. Erected the matrix of adjacency in the square according to the rules of mathematics. Each element of the matrix A 2 is determined by the formula

    a (2) ik \u003d n j \u003d 1 a ij a jk

    The term in the formula is equal to 1 and only if both numbers A ij i jk are equal to 1, otherwise it is equal to 0. Since the existence of a length of length 2 from the vertex I is existed from the equality Ij \u003d A jk \u003d 1 suits j, then (i -i, k-th) The element of the matrix 2 is equal to the number of paths of length 2, reaching from the I V.

    Table 4.1A shows the semiance matrix of the graph shown in Fig. 4.2. The result of the construction of the adjacency matrix into the square A 2 is shown in Table 4.1b.

    So "1", standing at the intersection of the second line and the fourth column, speaks of the existence of one path of 2 length from the vertex x 2 to the vertices 4. Indeed, as we see in graftin fig. 4.2, there is such a way: A 6, A 5. "2" in Matrixa 2 speaks of the existence of two paths 2 from the vertex 3 to the vertices 6: a 8, a 4 i 10, a 3.

    Similarly, for the matrix of the adjacency, erected into the third degree A 3 (Table 4.1B), A (3) IK is equal to the number of paths of length 3, reaching fromX I kh k. From the fourth line of the matrix 3, it can be seen that the paths of 3 exist: one of the 4 Vx 4 (A 9, A 8, A 5), one of 4 in

    x 5 (A 9, A 10, A 6) and two paths of 4 Vx 6 (A 9, A 10, A 3 and A 9, A 8, A 4). The matrix 4 shows the existence of paths 4 (Table 4.1g).

    Thus, if A p ik is an element of the matrix P, TOA P IK is equal to the number of paths (not necessarily orcertes or simple orrachesis) of the length, which goes fromX I kh k.