Theoretical and Experimental DNA Computation (Natural ...
Theoretical and Experimental DNA Computation (Natural ...
Theoretical and Experimental DNA Computation (Natural ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Fig. 2.7. Fragment of county map<br />
2.5 Data Structures 35<br />
The graph representing this map is depicted in Fig. 2.8, with vertices representing<br />
counties <strong>and</strong> edges representing borders.<br />
Cornwall<br />
Devon<br />
Somerset Wiltshire<br />
Dorset<br />
Berkshire<br />
Hampshire<br />
Fig. 2.8. Graph representing county map<br />
Isle of Wight<br />
Vertices <strong>and</strong> edges may have labels attached to them (for example, a vertex<br />
may be labelled with the name of a county, <strong>and</strong> an edge may be labelled with<br />
the length of the border.) Vertices may be isolated (i.e., be unconnected to<br />
any other vertex). For example, in Fig. 2.7, the Isle of Wight is an isl<strong>and</strong>, so<br />
the vertex representing it is isolated. In addition, edges may be directed or<br />
undirected. As their name suggests, the former have an implied direction (if,<br />
for example, they represent one-way streets or flights between two airports),<br />
while the latter have no particular direction attached to them.<br />
Another graph is is presented in Fig. 2.9. As we denote a graph by<br />
G =(V,E), where V is the vertex set <strong>and</strong> E theedgeset,Fig.2.9represents<br />
the graph G =({v0,v1,v2,v3,v4}, {e0,e1,e2,...,e7}). We denote the<br />
number of vertices in a graph by n =|V | <strong>and</strong> the number of edges by |E|.<br />
We can specify an edge in terms of the two edges it connects (these are<br />
called its end-points. If the end-points of some edge e are vi <strong>and</strong> vj, then<br />
we can write e = (vi,vj) (as well as e = (vj,vi) if e is undirected). So,<br />
we can define the graph in Fig. 2.9 as G =(V,E),V =({v0,v1,v2,v3,v4}),<br />
E =({(v0,v0), (v0,v1), (v1,v4), (v4,v1), (v1,v3), (v1,v2), (v2,v3), (v3,v4)}).