Graphs

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 36

L

P Graphs
U

Graph Terminology
L
P
Special Types of Graphs
U Representing Graphs
Graph Isomorphism
L
P
Connectivity
U Euler and Hamilton Paths
Shortest-Path Problems
L
P
U

L
P
U

L
P
U

L
P Is it possible to find your soul-mate through a mathematical
U
process? Maybe! Let's explore!

L Suppose that two groups of people sign up for a dating service.


P After they've signed up, they are shown images of and given
U
descriptions of the people in the other group.

New Section 1 Page 1


They're asked to select people that they would be happy to be
matched with.

All of the information is entered into a computer, and the


computer organizes it in the form of a graph.
The graph's vertices are the people, and there is an edge between
them if they both said they would be happy to be matched with the
other person.

A graph G = (V, E) consists of V, a nonempty set of vertices


(or nodes) and E, a set of edges.
Each edge has either one or two vertices associated with it,
called its endpoints.
An edge is said to connect its endpoints.

New Section 1 Page 2


L
P
U

L
P
U
The set of vertices V of a graph G may be infinite.
A graph with an infinite vertex set or an infinite number of edges is
L
called an infinite graph.
P A graph with a finite vertex set and a finite edge set is called a finite
U graph.

L
P
U

L
P
U

L
P
U

L
P
U

L
P
U

L
P
U

L
P A computer network may contain multiple links between data centers.
U

New Section 1 Page 3


L
P A computer network may contain multiple links between data centers.
U
To model such networks we need graphs that have more than one edge
connecting the same pair of vertices.
Graphs that may have multiple edges connecting the same vertices are
called multigraphs.

L
P
U

L
P
U
A graph in which each edge connects two different vertices and where
no two edges connect the same pair of vertices is called a simple graph.

L
P
U

we may even have more than one loop at a vertex.


Graphs that may include loops, and possibly multiple edges connecting
the same pair of vertices or a vertex to itself, are sometimes called
pseudographs.
L
P
U

L
P
U

L
P
U

New Section 1 Page 4


A directed graph (or digraph) (V, E) consists of a nonempty set of vertices
V and a set of directed edges (or arcs) E.
Each directed edge is associated with an ordered pair of vertices.
The directed edge associated with the ordered pair (u, v) is said to start at
u and end at v.

L
P
U

L A graph with both directed and undirected edges is called a mixed


P graph
U

L
P
U

L
P
U

L
P
U

L
P
U

L
P
U

L
P
U
New Section 1 Page 5
L
P
U

L
P
U

L
P
U

L
P
U

L
P
U

L
P
U

L
P
U

L
P
U

L
P
U

L
P
U

L
P
U

New Section 1 Page 6


L
P
U

L
P
U

L
P
U

L
P
U

L
P
U

L
P
U

L
P
U

L
P
U

L
P
U

L
P
U

L
P
U

New Section 1 Page 7


L
P
U

L
P
U

L
P
U

L
P
U

L
P
U

L
P
U

L
P
U

New Section 1 Page 8


New Section 1 Page 9
New Section 1 Page 10
New Section 1 Page 11
New Section 1 Page 12
New Section 1 Page 13
New Section 1 Page 14
New Section 1 Page 15
New Section 1 Page 16
New Section 1 Page 17
New Section 1 Page 18
New Section 1 Page 19
New Section 1 Page 20
New Section 1 Page 21
New Section 1 Page 22
New Section 1 Page 23
New Section 1 Page 24
New Section 1 Page 25
New Section 1 Page 26
New Section 1 Page 27
New Section 1 Page 28
New Section 1 Page 29
New Section 1 Page 30
New Section 1 Page 31
New Section 1 Page 32
New Section 1 Page 33
New Section 1 Page 34
New Section 1 Page 35
New Section 1 Page 36

You might also like