Sei sulla pagina 1di 12

GRAPHS

Lecture 7

Graph: is a pair of sets (V,E), where elements of E connects elements of V. Elements of V are called as vertices/nodes -the number of vertices is called the order of G The elements of E are the edges, or arcs -the number of edges is called the size of G The edge e = (v1, v2) has as endpoints v1 and v2. e is incident from v1 and incident on v2. v1 and v2 are adjacent or neighbors. v1 is the initial vertex and v2 is the terminal vertex.

Graph types
Multigraph: Graph with multiple edges between the same pair of vertices. Simple graph: No multiple edges and no loops; E is a subset of V V. Directed / undirected graph: Edges go in a specific direction, or are always symmetric. Combinations of the above: for example, directed simple graph

Degree of vertices
The degree of a vertex v, deg(v) is the number of edges with v as an endpoint, except that a loop adds 2 to the degree. If the graph is directed, the in-degree of v deg+(v) is the number of edges with v as terminal vertex. Similarly, the out-degree of v deg-(v) is the number of edges with v as initial vertex. If the degree of all the vertices of the graph is the same, k , then the graph is called as k-regular graph. e.g 3-regular graph is called a cubic

graph.

Degree
If di=deg vi; d1,d2,dn is the degree sequence of G. Convention: Label the vertices such that <di> is monotone increasing sequence (G) = d1 d2 dn =(G)

Handshaking Theorem

If V={v1,v2..vn} is a vertex set of a non directed graph G, then

For directed graph

Prove that for any non directed graph there is an even number of vertices with odd degree using the handshaking theorem.

Path Types

In a non directed graph G a sequence of zero or more edges of the form {vo,v1}{v1,v2}{vn-1,vn} is called as Path from vo to vn Vertex vo is called as initial vertex. Vertex vn is called the terminal vertex. If vo= vn path is called closed path and if vo vn path is called open path. A path is said to be trivial if there is no edges at all in the path, such a path is consisting of a singleton set {vo} Simple path:-No repetition of edges and vertices. Circuit:- No repetition of edges and whose endpoints are the same. Cycle:-No repetition of edges and vertices and whose endpoints are the same.

Show that the sum, over the set of people at the party, of the number of people a person has shaken hands with, is even. Assume that no one shakes his or her own hand. In a party of four couples, several handshakes took place. No one shook hands with himself neither with his own spouse and no one shook hands with the same person more than once . After all the handshakes have completed how many hands each person has shaken?

Does there exist a simple graph with five vertices of these degrees? If so, draw such a graph.
3,3,3,3,2 1,2,3,4,5 1,2,3,4,4 3,4,3,4,3 0,1,2,2,3 1,1,1,1,1

Subgraph

A graph G = (V, E) is a subgraph of G = (V, E) if V V and E E (V V) G is a proper subgraph if G G.

Potrebbero piacerti anche