graphs lec1
TRANSCRIPT
-
8/13/2019 Graphs Lec1
1/12
GRAPHSLecture 7
-
8/13/2019 Graphs Lec1
2/12
Graph: is a pair of sets (V,E), where
elements ofEconnects elements of V.
Elements of Vare called as vertices/nodes
-the number of vertices is called the order
of G
The elements ofEare the edges, or arcs
-the number of edges is called thesize of
G
The edge e= (v1, v
2) has as endpointsv
1
and v2. eis incidentfromv1and incident
on v2. v1and v2are adjacentor neighbors.
v1is the initialvertex and v2is the
terminalvertex.
-
8/13/2019 Graphs Lec1
3/12
Graph types
Multigraph: Graph with multiple edges
between the same pair of vertices.
Simple graph: No multiple edges and no
loops;Eis a subset of VV.
Directed/ undirectedgraph: Edges go in
a specific direction, or are always
symmetric. Combinations of the above: for example,
directed simple graph
-
8/13/2019 Graphs Lec1
4/12
Degree of vertices
The degreeof a vertex v,deg(v) is the number ofedges with vas an endpoint, except that a loopadds 2 to the degree.
If the graph is directed, thein-degreeof v
deg+
(v) is the number of edges with vasterminal vertex. Similarly, the out-degreeof vdeg-(v) is the number of edges with vas initialvertex.
If the degree of all the vertices of the graph isthe same, k , then the graph is called as k-regular
graph. e.g 3-regular graph is calleda cubicgraph.
-
8/13/2019 Graphs Lec1
5/12
Degree
If di=deg vi; d1,d2,dnis the degree
sequenceof G.
Convention: Label the vertices such that
is monotone increasing sequence
(G) = d1 d2 dn=(G)
-
8/13/2019 Graphs Lec1
6/12
Handshaking Theorem
If V={v1,v2..vn} is a vertex set of a non
directed graph G, then
For directed graph
-
8/13/2019 Graphs Lec1
7/12
Prove that for any non directed graph
there is an even number of vertices with
odd degree using the handshaking
theorem.
-
8/13/2019 Graphs Lec1
8/12
Path Types
In a non directed graph G a sequence of zero or more edgesof the form {vo,v1}{v1,v2}{vn-1,vn} is called asPathfrom voto vn
Vertex vois called as initial vertex.
Vertex vnis called the terminal vertex.
If vo= vnpath is called closed path and if vo vnpath is calledopen path.
A path is said to be trivialif there is no edges at all in thepath, 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 thesame.
Cycle:-No repetition of edges and vertices and whoseendpoints are the same.
-
8/13/2019 Graphs Lec1
9/12
-
8/13/2019 Graphs Lec1
10/12
Show that the sum, over the set of people atthe party, of the number of people a personhas shaken hands with, is even. Assume thatno one shakes his or her own hand.
In a party of four couples, severalhandshakes took place. No one shook handswith himself neither with his own spouse
and no one shook hands with the sameperson more than once .
After all the handshakes have completedhow many hands each person has shaken?
-
8/13/2019 Graphs Lec1
11/12
Does there exist a simple graph withfive 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
-
8/13/2019 Graphs Lec1
12/12
Subgraph
A graph G = (V, E) is a subgraph ofG = (V, E) if V V and E E (V
V)
G is a proper subgraph if G G.