Upload
rajat-sharma
View
221
Download
0
Embed Size (px)
Citation preview
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 1/53
Basic Notions
on Graphs
Presented by
Joe RyanSchool of Electrical Engineering
and Computer Science
University of Newcastle, Australia
Matrix Representations
Operators and Trees
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 2/53
2
Incidence matricesLet G be a graph without loops, with n vertices labelled
1,2,…,n , and m edges labelled 1,2,3,…,m . Theincidence matrix I (G ) of G is the n xm matrix in whichthe entry in row i and column j is
1 if the vertex i is incident with the edge j , and0 otherwise.
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 3/53
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 4/53
4
Incidence matrices
Problem Draw the graph represented by each of thefollowing incidence matrices.
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 5/53
5
Incidence matricesLet D be a digraph without loops, with n vertices labelled
1,2,…,n , and m arcs labelled 1,2,3,…,m . Theincidence matrix I (D ) of D is the n xm matrix in which
the entry in row i and column j is1 if the arc j is incident from vertex i ,
-1 if the arc j is incident to vertex i , and
0 otherwise.
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 6/53
6
Incidence matrices
Problem Write down the incidence matrix of each ofthe following digraphs.
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 7/53
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 8/53
8
Null graphsA null graph is a graph with no edges.
The null graph with n vertices is denoted by N n .The graph N n is regular of degree 0.
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 9/53
9
Regular graphsA graph is regular if its vertices all have the same degree.A regular graph is r-regular , or regular of degree r , if the
degree of each vertex is r.
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 10/53
10
Regular graphsExercise: Draw an r -regular graph with 8 vertices
when r = 3,4,5.
Theorem: Let G be an r -regular graph with n vertices. ThenG has nr /2 edges.
Proof. Let G be a graph with n vertices, each of degree r .Then the sum of the degrees is nr . By the Handshaking
Lemma, the number of edges is half of this sum.
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 11/53
11
Regular graphsExercise: Verify that the Theorem holds for each of the
following regular graphs:
Exercise: (a) Prove that there are no 3-regular graphs
with 7 vertices;(b) Prove that, if n and r are both odd, then
there are no r -regular graphs with n
vertices.
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 12/53
12
Cycle graphsA cycle graph is a graph consisting of a single cycle of
vertices and edges.
The cycle graph with n vertices is denoted by C n .The graph C n is regular of degree 2 and has n edges.
Exercise: Draw the graphs K 7, N 7 and C 7.
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 13/53
13
Petersen graphPetersen graph was discovered by Julius Petersen in 1898.
Petersen graph is a 3-regular graph with 10 vertices and
15 edges. It may be drawn in many ways, for example:
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 14/53
14
Platonic graphsPlatonic solids and the corresponding Platonic graphs :
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 15/53
15
CubesCubes : vertices are all binary words of a given length k ,
and two vertices are joined whenever the verticesdiffer in exactly one bit.
k-cube or k-dimensional cube is based on words oflength k ; it is denoted by Q k .
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 16/53
16
Bipartite graphsA bipartite graph is a graph whose set of vertices can be
split into 2 subsets A and B in such a way that eachedge of the graph joins a vertex in A and a vertex in B .
Exercise: Prove that in a bipartite graph every cycle has
an even number of edges.
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 17/53
17
Complete bipartite graphsA complete bipartite graph is a bipartite graph in which
each vertex in A is joined to each vertex in B byexactly one edge.
K r,s denotes a complete bipartite graph with r vertices in Aand s vertices in B.
Exercise: (a) Draw the graphs K 2,3, K 1,7 and K 4,4. Howmany vertices and edges does each have?
(b) Under what conditions on r and s is K r,s
a regular graph?
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 18/53
18
Path graphsA path graph is a tree consisting of a single path through
all its vertices.
Path graph with n vertices is denoted by P n .
The graph P n has n -1 edges and can be obtained from the
cycle graph C n by removing one edge.
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 19/53
19
TreesA tree is a connected graph with no cycles.
Note that in a tree there is exactly one path between anytwo vertices.
Exercise: There are 8 unlabelled trees with 5 or fewervertices. Draw them.
Exercise: Explain why every tree is a bipartite graph.
Explain why a tree with n vertices has n -1 edges.
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 20/53
20
Complete graphsA complete graph is a graph in which each vertex is joined
to each of the others by exactly one edge.
The complete graph with n vertices is denoted by K n .The graph K n is regular of degree n -1, and has n (n -1)/2
edges.
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 21/53
21
Complete graphs
Every graph on n vertices is a subgraph of Kn.
|V(G)| = n ⇒ G ⊆ Kn
So we also know that Δ(G) ≤ n-1,|E(G)| ≤ n (n -1)/2 andradius(G) ≥ 1.
And, of course, |V(G)| = n ⇒ G ⊆ Km, m ≥ n.
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 22/53
22
Complement of a graphThe complement of a graph G (written G) is a graph on the
same vertex set as G containing all edges not in G.
G G
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 23/53
23
Complement of a graphIf |E(G)| = e, then |E(G)| = n(n-1)/2 - e
G G Kn
+ =
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 24/53
24
Self Complementary Graphs
C5 C5 P4 P4
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 25/53
25
Converse of a Digraph For a digraph G, the converse of G is
obtained by simply reversing the directionof the arrows.
A
B
C
DA
B
C
D
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 26/53
26
Self Converse Digraphs
K3 is the same as K3.
C6 is isomorphic to C6.
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 27/53
27
Cartesian Products of Graphs1
3
b
2
b3
b2
b1
a c
a3
a2
a1
c3
c2
c1
G1
G2
G1× G
2
The Cartesian Product ofG1 and G2 is the graphobtained by placing acopy of G2 at each vertexof G1 and then joiningcorresponding vertices ofG2 for copies that are
placed at adjacentvertices of G1.
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 28/53
28
Duality
Let G be a connected planar graph. Then a dual graph G *is constructed from a plane drawing of G as follows.
Draw one new vertex in each face of the plane drawing:these are the vertices of G *. For each edge e of the planedrawing, draw a line joining the vertices of G * in the faces
on either side of e : these are the edges of G *.
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 29/53
29
Duality
Consider the graph of the cube. If we place a new vertexwithin each face (incl. the infinite face) and join the pairsof new vertices in adjacent faces, we obtain the graph ofthe octahedron and vice versa .
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 30/53
30
DualityProblem Draw the dual of each of the following plane
drawings of planar graphs.
Problem The following diagrams show two different planedrawings of a planar graph. Show that their duals are
not isomorphic.
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 31/53
31
DualityDifferent plane drawings of a planar graph G may give rise
to non-isomorphic dual graphs G *.
If G is a plane drawing of a planar connected graph then sois its dual G *, and so we can construct (G *)*, the dual ofG *.
Note that (G *)* is isomorphic to G .
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 32/53
32
Connectivity
G1 is a tree – removal of any edge disconnects it (all edges are
cut-edges or bridges).G2 cannot be disconnected by removing an edge.but it can be disconnected by removing a vertex (the cut-vertex).
G3 cannot be disconnected by removing an edge or a vertexbut is not as strongly connected as G4.
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 33/53
33
Vertex Connectivity A graph is called k connected if the removal of k
vertices is required to disconnect the graph.
3 connected 2 connected
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 34/53
34
Edge ConnectivityA graph is called k edge connected if the removal of k
edges is required to disconnect the graph.
The above graph is 3-edge connected
Problem: Identify the cut set.
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 35/53
35
ClusteringA graph shows high clustering if neighbours of
points are connected.
This graph is locally connected. All neighbours ofeach point are connected.
Many social network graphs display high clustering
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 36/53
36
ClusteringMost graphs with high clustering have large
diameter.
Small world networks show high clustering buthave small diameter.
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 37/53
37
What is the degree of Facebook?
Stanley Milgram (1967) sent 160 letters
from Omaha, Nebraska to Boston – not by post!
6 degrees of separation
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 38/53
38
Tree structuresA tree is a connected graph that has no cycles.Trees are relatively simple structures but very important formany practical applications.
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 39/53
39
Tree structuresExample of an artificial object that can be modeled as a tree.
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 40/53
40
Tree structuresExample of a conceptual tree: family tree.
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 41/53
41
Tree structuresAnother example of a conceptual tree: hierarchical treerepresenting the responsibilities in a company.
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 42/53
42
Mathematical properties of treesA tree is a connected graph that has no cycles.
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 43/53
43
Mathematical properties of treesProblem Draw the 6 unlabelled trees with 6 vertices.
Each unlabelled tree with n vertices can be obtained from an unlabelled tree with n-1 vertices by adding an edge
joining a new vertex to an existing one.
For example, from
we can obtain
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 44/53
44
Mathematical properties of treesTheorem: Equivalent Definitions of a Tree.Let T be a graph with n vertices. Then the followingstatements are all equivalent.
•T is connected and has no cycles.•T has n -1 edges and has no cycles.•T is connected and has n -1 edges.
•T is connected and the removal of any edgedisconnects T .
•Any two vertices of T are connected by exactly one
path.•T contains no cycles, but the addition of any newedge creates a cycle.
Prove the equivalences.
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 45/53
45
Spanning treesLet G be a connected graph. Then a spanning tree in G
is a subgraph of G that includes every vertex of G andis also a tree.
The number of spanning trees in a graph can be verylarge. For example, the Petersen graph has 2000labelled spanning trees.
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 46/53
46
Spanning treesTwo methods for constructing a spanning tree in a
connected graph:Building-up method : Select edges of the graph one at a
time in such a way that no cycles are created; repeatthis procedure until all vertices are included.
Cutting down method : Choose any cycle and removeany one of its edges; repeat this procedure until nocycles remain.
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 47/53
47
Spanning trees
Problem Use each method to construct a spanning treein the complete graph K 5.
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 48/53
48
Rooted trees
A particular type of a tree structure that appears often isthe rooted tree .
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 49/53
49
Rooted trees: Experiments
Problem Draw the branching tree representing the
outcomes of 2 throws of a six-sided die.
Possible outcomes of experiments can be representedby a branching tree.
Example: tossing a coin.
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 50/53
50
Rooted trees: Games of strategyBranching trees can be used in the analysis of games ,
esp. games of strategy such as chess or tic-tac-toe,and for strategic manoeuvres such as those arising in
military situations.
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 51/53
51
Adequate
Income
Adequate
Income
Approve
the Loan
Not Approvethe Loan
Not Approve
the Loan
Not Approvethe Loan
Approve
the Loan
Not Approve
the Loan
Approve
the Loan
Not Approve
the Loan
Adequate
Income
Adequate
Income
AdequateAssets
Adequate
Assets
Steady
Job
Decision Tree
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 52/53
52
Adequate
Income
Approve
the Loan
Not Approve
the Loan
Not Approvethe Loan
Approve
the Loan
Not Approve
the Loan
Adequate
Income
Adequate
Assets
SteadyJob
Pruned Decision Tree
8/4/2019 Ban Dung Ryan 3
http://slidepdf.com/reader/full/ban-dung-ryan-3 53/53
Revision (and terms to know) Incidence matrices
Types of graphs – null, regular, cycles, Platonic,Petersen, bipartite, path graphs, trees
Complement of a graph Converse of a digraph
Cartesian product (of two graphs) Dual of a graph
Connectivity