Graphs and Networking - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

Graphs and Networking

Description:

A graph consists of vertices (points) and ... the adjacency matrix of a graph G are: ... Note that the same graph can have several adjacency matrices. How to ... – PowerPoint PPT presentation

Number of Views:36
Avg rating:3.0/5.0
Slides: 13
Provided by: none2
Category:

less

Transcript and Presenter's Notes

Title: Graphs and Networking


1
Graphs and Networking
  • Tom Roby
  • Cal State Hayward

2
Review
  • A graph consists of vertices (points) and edges
    (connections)
  • The degree of a vertex is the number of edges
    incident to the vertex
  • Two vertices are adjacent if there is an edge
    connecting them

3
Adjacency Matrix
  • The entries in the adjacency matrix of a graph G
    are
  • aij 1 if there is an edge between
    vertices i and j
  • 0 otherwise

4
Example
  • Find the adjacency matrix for the graph

5
Going backwards
  • Find the graph corresponding to the adjacency
    matrix

C4
6
Try it yourself
C4
Note that the same graph can have several
adjacency matrices
7
How to multiply matrices

8
Powers of A
  • If A is the adjacency matrix of a graph G, then
    An describes how many ways there are to get from
    vertex i to vertex j in n steps.

A2
A
9
Number of paths of length 2
A2
There are 3 paths of length 2 from node 1 to
node 1
There are 2 paths of length 2 from node 3 to node
3
There is 1 path of length 2 from node 2 to node 3
10
The shortest path problem
  • You want to send some information in a network
    from point A to point B
  • The cost of sending information depends on the
    length of the path from A to B
  • You want to minimize the cost, i.e. find the
    shortest path from A to B

11
Examples of Networks
  • Scanned picture Rosen p.491

12
Weighted graphs
  • Definition
  • A weighted graph is a graph that has a number
    (weight, length, cost, etc.) assigned to each
    edge.
  • //pic of a weighted graph
Write a Comment
User Comments (0)
About PowerShow.com