Читайте также:
|
A directed graph, or digraph, consists of a set V of vertices (or nodes) together with a set E of ordered pairs of elements of V called edges (or arcs). The vertex a is called the initial vertex of the edge (a, b), and the vertex b is called the terminal vertex of this edge.
An edge of the form (a, a) is represented using an arc from the vertex a back to itself. Such an edge is called a loop.
Example. The directed graph with vertices a, b, c and d, and edges (a, b), (a, d), (b, b), (b, d), (c, a), (c, b) and (d, b) is displayed in Figure: 
Example. The directed graph of the relation R = {(1, 1),(1, 3), (2, 1),(2, 3),(2, 4), (3, 1), (3, 2),(4, 1)} on the set {1, 2, 3, 4} is shown in Figure: 
Example. What are the ordered pairs in the relation R represented by the directed graph shown in Figure below?

Solution: The ordered pair (x, y) in the relation are R = {(1, 3),(1, 4), (2, 1),(2, 2),(2, 3), (3, 1), (3, 3), (4, 1), (4, 3)}. Each of these pairs corresponds to an edge of the directed graph, with (2, 2) and (3, 3), corresponding to loops.
Дата добавления: 2014-12-23; просмотров: 206 | Поможем написать вашу работу | Нарушение авторских прав |