Download Graphs

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Lecture 10: Graphs
Graph Terminology
Special Types of Graphs
Representing Graphs
Graph Isomorphism
Basic Terminology
An edge connects two vertices
Two vertices are adjacent if they are connected
An edge is incident with the two vertices it connects
Vertices are the endpoints of the edge connecting them
The degree of a vertex is the number of incident edges
An isolated vertex has degree zero (0)
A pendant vertex has degree one (1)
The Handshaking "Theorem"
2e 
 deg( v)
vV
2
4
3
3
4
7
1
5
4
3
5
5
6
0
4
2e  56
e  28
The "First Theorem" of Graph Theory
Every undirected graph has an even number of vertices of odd degree.
E
E
O
O
E
O
O
O
E
O
O
O
E
E
E
A Theorem for Directed Graphs
In a graph with directed edges the in-degree of a vertex v, denoted by deg-(v), is the
number of edges with v as their terminal vertex.
The out-degree of v, denoted by deg+(v), is the number of edges with v as their initial
vertex.
Let G=(V,E) be a graph with directed edges. Then
 deg  (v)   deg  (v) 
vV
vV
E
Complete Graphs Kn
A complete graph is a simple graph with one edge between every pair of vertices.
K1
K2
K3
K4
K5
How many edges are there in a complete graph of n vertices?
First we note that each vertex of Kn has degree n-1.
Using the Handshaking Theorem, we have
2e = S deg(v) = n*(n-1),
therefore
e = n*(n-1)/2.
K6
Cycles
C3
C4
C5
C6
Wheels
W3
W4
W5
W6
The n-Cube Qn
Q1
Q2
Q3
Q4 - The 4D Hypercube
Connection Machine
The Connection Machine was a series of supercomputers that grew out of Danny Hillis's
research in the early 1980s at MIT on alternatives to the traditional von Neumann
architecture of computation. The Connection Machine was originally intended for
applications in artificial intelligence and symbolic processing, but later versions found
greater success in the field of computational science.
CM-2
CM-5
http://en.wikipedia.org/wiki/Connection_Machine
Some Complete Bipartite Graphs
K2,3
K3,3
K3,5
K2,6
The "first theorem" of planar graph theory - K3,3 is not planar.
The Arc Reversal Algorithm
The arc-reversal algorithm has applications in computer communications, parallel
processing, flow analysis, scheduling and Bayesian Networks.
The Assignment Problem
Maximal Matching Problem
Subgraph of a Graph
Union of Graphs
Graph Isomorphisms
Adjacency Matrix Graph Representation
For an n-node graph we build an nxn array with 1's indicating edges and 0's no edge the main
diagonal of the matrix is unused unless a node has an edge connected to itself. If graph is
weighted, 1's are replaced with edge weight values
A
D
F
C
B
H
E
G
A
B
C
D
E
F
G
H
adjacency matrix
A B C D E F G
- 1 1 1 1 1 0
1 - 1 0 1 0 0
1 1 - 1 1 0 0
1 0 1 - 0 1 1
1 1 1 0 - 1 1
1 0 0 1 1 - 1
0 0 0 1 1 1 0 1 1 1 0 1 1
H
0
1
1
1
0
1
1
-
Summary
Basic Terminology
Some Classic Theorems
Types of Graphs
K, C, W, Q
Bipartite and Complete Bipartite Graphs
Graph Problems and Algorithms
Arc Reversal Algorithm
Assignment Problem
Maximal Matching
Graphs and Subgraphs
Graph Isomorphisms
Adjacency Matrix
Related documents