308203A Introduction to Computing II Lecture 12: Graphs - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

308203A Introduction to Computing II Lecture 12: Graphs

Description:

A way to represent relations between pairs of objects ... Two graphs, G1 and G2, are considered isomorphic ... Isomorphic graphs: Example. Isomorphic graphs: ... – PowerPoint PPT presentation

Number of Views:55
Avg rating:3.0/5.0
Slides: 16
Provided by: alfre6
Category:

less

Transcript and Presenter's Notes

Title: 308203A Introduction to Computing II Lecture 12: Graphs


1
308-203AIntroduction to Computing IILecture
12 Graphs
Fall Session 2000
2
Graphs
A way to represent relations between pairs of
objects
Definition A graph is set of vertices (V)
connected by a set of edges
(E) G (V, E) where every edge in E is a
pair of two vertices, e (v1, v2).
3
Graph (example)
Let G ( a, b, c, d , (a,b) , (b,c), (c,
d), (a,d) )
a
b
c
d
4
Definitions
  • neighbors the nodes which are joined by an
    edge
  • degree of node x the number of neighbors x has

a
b
c
d
5
Definitions
  • neighbors the nodes which are joined by an
    edge
  • degree of node x the number of neighbors x has

degree 3
degree 1
a
b
degree 2
degree 2
c
d
6
Path
A Path is a sequence of vertices (v1, v2, v3,
vi) connected by edges, i.e. For all j, 0 lt j lt
i, (vj, vj1) is in E
7
Path
A Path is a sequence of vertices (v1, v2, v3,
vi) connected by edges, i.e. For all j, 0 lt j lt
i, (vj, vj1) is in E
vi
v1
8
Reachability
If there exists a path from v1 to v2 then v1 is
said to be reachable from v2.
Reachability is a so-called equivalence
relation because it has the following
properties, where (x R y) denotes x reachable
from y
1. Reflexive x R x for any x 2. Symmetric x
R y ? y R x 3. Transitive x R y and y R z
? x R z
9
Connected Components
This means the vertices can be partitioned into
groups of connected vertices, called connected
components
Example a graph with four connected components
10
Cycles
A path which begins and ends at the same
vertex is called a cycle.
If all the vertices in the cycle are distinct,
then we say that the cycle is a simple cycle.
11
Example
A simple cycle (in red)
A higher-order cycle
12
Isomorphism
Equality for graphs
Two graphs, G1 and G2, are considered
isomorphic if there exists a correspondence
between the vertices of G1 and G2 such that there
is an edge between v1 and v2 in G1 if and only if
there is an edge between the corresponding
vertices v1 and v2 in G2.
13
Example
Isomorphic graphs
14
Example
Isomorphic graphs
15
Any questions?
Write a Comment
User Comments (0)
About PowerShow.com