Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Ministry of Transport and Communications of Ukr...doc
Скачиваний:
0
Добавлен:
01.07.2025
Размер:
949.25 Кб
Скачать

5.3. Directed Graphs

De/'M'^'oM. A directed graph or a digraph is a graph with directed edges. In this case a set L consists of ordered pairs of vertices. Elements of L are called arcs.

Exaw^/e J.3.7. Let us consider the directed graphs

  1. G1 = (F1,^1) where F1 = {..1,.2}; = {(.2,.1)};

  2. A) Directed graph g1

    G2 =(F2,^ 2 ) where F2 ={.x1, .2, .3, .4, .5 }; ^ = {(.1, .2 ), (.2, .3 ), (.3, ^4 ), (.4, ^5 )}.

b) Directed graph G2

For directed graphs we introduce semidegrees: positive semidegree ) and negative semidegee ).

) is a number of arcs which go into a vertex ) is a number of arcs which go out of a vertex ...

5.4. The Ways of Representation of Graphs

    1. A finite graph can be given by listing its elements. For example,

G = (F ): F = {1,2,3,4,5,6,7,8}, ^ = {(1,2), (2,3), (2,4), (1,4), (3,4), (4,5), (6,6), (6,7)}.

    1. Matrix representation of graph

Let us consider a digraph G = (F ), where F = {.x1, .x2,...,},

, M

w)

^ = {M1, M 2,...,

This finite directed graph can be represented by an adjacency matrix.

By an adjacency matrix of a digraph G we mean a square matrix 4(G) = (a;^.) of order where

A. = ^

1, if (.X;,.... )e ^;

= ^

0, if (..',....

By an incidence matrix of a digraph G we mean a matrix R.G) = ) of dimension " x w, where

1, if a vertex is the end of an arc M.; -1, if a vertex is the begining of an arc M.; 0, if a vertex is not incidental with an arc M..

Exaw^/e J.4.7. Consider the digraph G in F'g. J.4.7.

F'g.J.4.7

x1 x2 x3 0 1 1 0 1 110

The adjacency matrix of this graph has the form

4(G )=

x2

x3

The incidence matrix is of the form

M

1

3

M 2 Ml M

R(G )=

x

x3

-1 0 1 1

1 -1 0 -1 0 1 -1 0

Consider now a finite nondirected graph G = (^ ). ^ = {x1, x2,..., xM },

^ = 1,M2,..., Mw }.

De/''M''Y''oM. By an adjacency matrix of this graph we mean a square matrix 4(G) = (a;^.) of order M, where

1, if (x', x. )E ^;

0, if (x',x...

De/'M'Y'oM. By an incidence matrix of a graph G we mean a matrix R(G) = (-^z^.) of dimension M x w, where

f1, if a vertex x^ is incidental with an edge M.; = 1

a. =

0, if a vertex x^ is not incidental with an edge M..

Exaw^/e J.4.2. Consider the graph G in F'g. J.4.2.

F'^. J.4.2

x1

^2

x3

x1

f 0

1

1)

x 2

1

0

0

x3

.1

0

0.

M1 M 2 i 0

The adjacency matrix of this graph is of the form ^(G) =

The incidence matrix has the form R(G )= 1

x3 ^0 1,

It is possible to extend the definitions of ^(G) and R(G) for multygraphs and pseudographs

Graph

Digraph

Adjacency matrix ^(G) = (a^^.)

a'7 =<

0, if x', x, are not adjacent M, if x', x, are adjacent M times

0, if x'x,

M, if x'x, e L M times

Incedence matrix R(G) = )

  1. if x' is not incedence with M,

  2. if x' is incedence with M, o^f M, is a loop

-1, if x' is initial point of M, 1, if x' is end point of M, 0, if x' is not incedence with M, o,if M, is a loop


Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]