GraphDraft - CMPS 101 Algorithms and Abstract Data Types...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
1 CMPS 101 Algorithms and Abstract Data Types Graph Theory Graphs A graph G consists of an ordered pair of sets ) , ( E V G = where V , and } of subsets - 2 { ) 2 ( V V E = , i.e. E consists of unordered pairs of elements of V . We call ) ( G V V = the vertex set, and ) ( G E E = the edge set of G . In this handout we consider only graphs in which both the vertex set and edge set are finite. An edge { x , y }, denoted xy or yx , is said to join its two end vertices x and y , and these ends are said to be incident with the edge xy . Two vertices are called adjacent if they are joined by an edge, and two edges are said to be adjacent if they have a common end vertex. A graph will usually be depicted as a collection of points in the plane (vertices), together with line segments (edges) joining the points. Example 1 } 6 , 5 , 4 , 3 , 2 , 1 { ) ( = G V , } 56 , 45 , 36 , 35 , 26 , 25 , 24 , 23 , 14 , 12 { ) ( = G E 1 2 3 4 5 6 Two graphs 1 G and 2 G are said to me isomorphic if there exists a bijection ) ( ) ( : 2 1 G V G V φ such that for any ) ( , 1 G V y x , the pair xy is an edge of 1 G if and only if the pair ) ( ) ( y x is an edge of 2 G . In other words, must preserve all incidence relations amongst the vertices and edges in 1 G . We write 2 1 G G to mean that 1 G and 2 G are isomorphic. Example 2 Let 1 G be the graph from the previous example, and define 2 G by } , , , , , { ) ( 2 f e d c b a G V = , } , , , , , , , , , { ) ( 2 ef de cf ce bf be bd bc ad ab G E = . Define a map ) ( ) ( : 2 1 G V G V by , 3 , 2 , 1 c b a f e d 6 , 5 , 4 . Clearly is an isomorphism. 2 G can be drawn as a d c f b e Isomorphic graphs are indistinguishable as far as graph theory is concerned. In fact, graph theory can be defined to be the study of those properties of graphs that are preserved by isomorphism. Thus a graph is not a picture, in spite of the way we visualize it. A graph is a combinatorial object consisting of two abstract sets, together with some incidence data relating those sets.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 If ) ( G V x the degree of x , denoted ) deg( x , is the number of edges incident with vertex x , or equivalently, the number of vertices adjacent to x . Referring to Example 1 above we see that 2 ) 1 deg( = , 5 ) 2 deg( = , and 3 ) 6 deg( = . The degree sequence of a graph consists of it’s vertex degrees arranged in increasing order. The graph in Example 1 has degree sequence (2, 3, 3, 3, 4, 5). Observe that the graph in Example 2 has the same degree sequence. Clearly if ) ( ) ( : 2 1 G V G V φ is an isomorphism, then ) deg( )) ( deg( x x = for any ) ( 1 G V x , and hence isomorphic graphs have the same degree sequence. Observe that
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/03/2009 for the course CS CS101 taught by Professor Agoreback during the Spring '09 term at American College of Gastroenterology.

Page1 / 6

GraphDraft - CMPS 101 Algorithms and Abstract Data Types...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online