{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

Info icon This 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.
Image of page 1

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

View Full Document Right 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 | ) ( | 2 ) deg( ) ( G E x G V x = since each edge, having two distinct ends, contributes 2 to the sum on the left. This is sometimes known as the Handshake Lemma for it says that the number of hands shaken at a party is exactly twice the number of handshakes. It follows from this formula that the number vertices of odd degree must be even.
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern