Basic Notions on Graphs Matrix Representations Operators and Trees

advertisement
Basic Notions
on Graphs
Matrix Representations
Operators and Trees
Presented by
Joe Ryan
School of Electrical Engineering
and Computer Science
University of Newcastle, Australia
Incidence matrices
Let G be a graph without loops, with n vertices labelled
1,2,…,n, and m edges labelled 1,2,3,…,m. The
incidence matrix I(G) of G is the nxm matrix in which
the entry in row i and column j is
1 if the vertex i is incident with the edge j, and
0 otherwise.
2
Incidence matrices
Problem Write down the incidence matrix of each of the
following graphs.
3
Incidence matrices
Problem Draw the graph represented by each of the
following incidence matrices.
4
Incidence matrices
Let D be a digraph without loops, with n vertices labelled
1,2,…,n, and m arcs labelled 1,2,3,…,m. The
incidence matrix I(D) of D is the nxm matrix in which
the entry in row i and column j is
1 if the arc j is incident from vertex i,
-1 if the arc j is incident to vertex i, and
0 otherwise.
5
Incidence matrices
Problem Write down the incidence matrix of each of
the following digraphs.
6
Incidence matrices
Problem Draw the digraph represented by each of
the following incidence matrices.
7
Null graphs
A null graph is a graph with no edges.
The null graph with n vertices is denoted by Nn.
The graph Nn is regular of degree 0.
8
Regular graphs
A 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.
9
Regular graphs
Exercise: Draw an r-regular graph with 8 vertices
when r = 3,4,5.
Theorem: Let G be an r-regular graph with n vertices. Then
G 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.
10
Regular graphs
Exercise: 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.
11
Cycle graphs
A cycle graph is a graph consisting of a single cycle of
vertices and edges.
The cycle graph with n vertices is denoted by Cn.
The graph Cn is regular of degree 2 and has n edges.
Exercise: Draw the graphs K7, N7 and C7.
12
Petersen graph
Petersen 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:
13
Platonic graphs
Platonic solids and the corresponding Platonic graphs:
14
Cubes
Cubes: vertices are all binary words of a given length k,
and two vertices are joined whenever the vertices
differ in exactly one bit.
k-cube or k-dimensional cube is based on words of
length k; it is denoted by Qk.
15
Bipartite graphs
A bipartite graph is a graph whose set of vertices can be
split into 2 subsets A and B in such a way that each
edge 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.
16
Complete bipartite graphs
A complete bipartite graph is a bipartite graph in which
each vertex in A is joined to each vertex in B by
exactly one edge.
Kr,s denotes a complete bipartite graph with r vertices in A
and s vertices in B.
Exercise:
(a) Draw the graphs K2,3, K1,7 and K4,4. How
many vertices and edges does each have?
(b) Under what conditions on r and s is Kr,s
a regular graph?
17
Path graphs
A path graph is a tree consisting of a single path through
all its vertices.
Path graph with n vertices is denoted by Pn.
The graph Pn has n-1 edges and can be obtained from the
cycle graph Cn by removing one edge.
18
Trees
A tree is a connected graph with no cycles.
Note that in a tree there is exactly one path between any
two vertices.
Exercise: There are 8 unlabelled trees with 5 or fewer
vertices. Draw them.
Exercise: Explain why every tree is a bipartite graph.
Explain why a tree with n vertices has n-1 edges.
19
Complete graphs
A 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 Kn.
The graph Kn is regular of degree n-1, and has n(n-1)/2
edges.
20
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 and
radius(G) ≥ 1.
And, of course, |V(G)| = n ⇒ G ⊆ Km, m ≥ n.
21
Complement of a graph
The 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
22
Complement of a graph
If |E(G)| = e, then |E(G)| = n(n-1)/2 - e
+
G
=
G
Kn
23
Self Complementary Graphs
C5
C5
P4
P4
24
Converse of a Digraph
„
For a digraph G, the converse of G is
obtained by simply reversing the direction
of the arrows.
B
B
A
D
C
A
D
C
25
Self Converse Digraphs
K3 is the same as K3.
C6 is isomorphic to C6.
26
Cartesian Products of Graphs
1
The Cartesian Product of
G1 and G2 is the graph
obtained by placing a
copy of G2 at each vertex
of G1 and then joining
corresponding vertices of
G2 for copies that are
placed at adjacent
vertices of G1.
a
b
c
2
G2
3
G1
a1
c1
b1
a2
b2
a3
G1 × G2
c2
b3
c3
27
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 plane
drawing, draw a line joining the vertices of G* in the faces
on either side of e: these are the edges of G*.
28
Duality
Consider the graph of the cube. If we place a new vertex
within each face (incl. the infinite face) and join the pairs
of new vertices in adjacent faces, we obtain the graph of
the octahedron and vice versa.
29
Duality
Problem Draw the dual of each of the following plane
drawings of planar graphs.
Problem The following diagrams show two different plane
drawings of a planar graph. Show that their duals are
not isomorphic.
30
Duality
Different 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 so
is its dual G*, and so we can construct (G*)*, the dual of
G*.
Note that (G*)* is isomorphic to G.
31
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 vertex
but is not as strongly connected as G4.
32
Vertex Connectivity
„
A graph is called k connected if the removal of k
vertices is required to disconnect the graph.
3 connected
2 connected
33
Edge Connectivity
A 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.
34
Clustering
A graph shows high clustering if neighbours of
points are connected.
This graph is locally connected. All neighbours of
each point are connected.
Many social network graphs display high clustering
35
Clustering
Most graphs with high clustering have large
diameter.
Small world networks show high clustering but
have small diameter.
36
6 degrees of separation
Stanley Milgram (1967) sent 160 letters
from Omaha, Nebraska to Boston – not by post!
What is the degree of Facebook?
37
Tree structures
A tree is a connected graph that has no cycles.
Trees are relatively simple structures but very important for
many practical applications.
38
Tree structures
Example of an artificial object that can be modeled as a tree.
39
Tree structures
Example of a conceptual tree: family tree.
40
Tree structures
Another example of a conceptual tree: hierarchical tree
representing the responsibilities in a company.
41
Mathematical properties of trees
A tree is a connected graph that has no cycles.
42
Mathematical properties of trees
Problem 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
43
Mathematical properties of trees
Theorem: Equivalent Definitions of a Tree.
Let T be a graph with n vertices. Then the following
statements 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 edge
disconnects T.
•Any two vertices of T are connected by exactly one
path.
•T contains no cycles, but the addition of any new
edge creates a cycle.
Prove the equivalences.
44
Spanning trees
Let G be a connected graph. Then a spanning tree in G
is a subgraph of G that includes every vertex of G and
is also a tree.
The number of spanning trees in a graph can be very
large. For example, the Petersen graph has 2000
labelled spanning trees.
45
Spanning trees
Two 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; repeat
this procedure until all vertices are included.
Cutting down method: Choose any cycle and remove
any one of its edges; repeat this procedure until no
cycles remain.
46
Spanning trees
Problem Use each method to construct a spanning tree
in the complete graph K5.
47
Rooted trees
A particular type of a tree structure that appears often is
the rooted tree.
48
Rooted trees: Experiments
Possible outcomes of experiments can be represented
by a branching tree.
Example: tossing a coin.
Problem Draw the branching tree representing the
outcomes of 2 throws of a six-sided die.
49
Rooted trees: Games of strategy
Branching 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.
50
Decision Tree
Adequate
Income
Adequate
Assets
Adequate
Income
Steady
Job
Adequate
Income
Adequate
Assets
Adequate
Income
Approve
the Loan
Not Approve
the Loan
Approve
the Loan
Not Approve
the Loan
Approve
the Loan
Not Approve
the Loan
Not Approve
the Loan
Not Approve
the Loan
51
Pruned Decision Tree
Adequate
Income
Approve
the Loan
Not Approve
the Loan
Adequate
Income
Approve
the Loan
Not Approve
the Loan
Steady
Job
Adequate
Assets
Not Approve
the Loan
52
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
53
Download