Graphs

To formalize the notion of a graph briefly sketched in the introduction, on a purely mathematical level, a graph G = (V, E) can be described as a pair of vertices V and edges E, as follows:

V = {v1, ..., vn}

E = {e1, ..., em}

We call the element vi in V vertex and ei in an edge, where each edge connecting two vertices v1 and v2 is, in fact, just a pair of vertices, that is, ei = (v1, v2). Let's construct a simple graph consisting of five vertices and six edges, as specified by the following graph data:

V ={v1, v2, v3, v4, v5}

E = {e1 = (v1, v2), e2 = (v1, v3), e3 = (v2, v3),

       e4 = (v3, v4), e5 = (v4, v1), e6 = (v4, v5)}

This is what the graph will look like:

Figure 1: A simple undirected graph with five vertices and six edges

Note that in the realization of the graph in Figure 1, the relative position of nodes to each other, the length of the edges, and other visual properties are inessential to the graph. In fact, we could have displayed the graph in any other way by means of deforming it. The graph definition entirely determines its topology.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset