0% found this document useful (2 votes)
1K views46 pages

6 - Mathematics - of - Graphs - PPTX Filename - UTF-8''6 Mathematics of Graphs

The document discusses several topics related to graphs and their mathematical properties: 1. It defines what a graph is and provides examples of graphs representing relationships between people. 2. It introduces concepts like vertices, edges, degree of a vertex, and complete, simple, equivalent, connected, and planar graphs. 3. It describes Euler circuits and paths, and theorems related to determining when a graph contains an Euler circuit or path. 4. It discusses Hamiltonian circuits and Dirac's theorem for determining when a graph is Hamiltonian. 5. It introduces the concept of weighted graphs and applications like the traveling salesman problem. 6. It presents greedy algorithms and the edge-picking algorithm to find Hamiltonian circuits in weighted

Uploaded by

Lia Alegre
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (2 votes)
1K views46 pages

6 - Mathematics - of - Graphs - PPTX Filename - UTF-8''6 Mathematics of Graphs

The document discusses several topics related to graphs and their mathematical properties: 1. It defines what a graph is and provides examples of graphs representing relationships between people. 2. It introduces concepts like vertices, edges, degree of a vertex, and complete, simple, equivalent, connected, and planar graphs. 3. It describes Euler circuits and paths, and theorems related to determining when a graph contains an Euler circuit or path. 4. It discusses Hamiltonian circuits and Dirac's theorem for determining when a graph is Hamiltonian. 5. It introduces the concept of weighted graphs and applications like the traveling salesman problem. 6. It presents greedy algorithms and the edge-picking algorithm to find Hamiltonian circuits in weighted

Uploaded by

Lia Alegre
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 46

The Mathematics of

Graphs
Outline

1. Graphs and Euler Circuits


2. Weighted Graphs
3. Planarity and Euler’s Formula
4. Graph Coloring
Graphs and Euler Circuits
Graph

A graph is a set of points called vertices and line


segments or curves called edges that connects
vertices.
Example: Graph

• Each dot represents a person, and a line segment


connecting two dots.
• It means that those two people are friends on
Facebook.
Constructing a Graph
The following table lists five students at a college.
An “X” indicates that the two students participate in the same
study group this semester.

Rene Madz Allan Norma Kiko


Rene --- X X X
Madz X --- X X
Allan X X --- X
Norma X ---
Kiko X X ---

Draw a graph that represents this information where each vertex


represents a student and an edge connects two vertices if the
corresponding students study together.
Terminologies

• In general, graphs can contain vertices that are not


connected to any edges.
• If two or more edges connect the same vertices, they
are called multiple edges.
• If an edge begins and ends at the same vertex, it is
called a loop.
• A graph is connected if any vertex can be reached from
any other vertex by tracing along edges.
• A connected graph in which every possible edges is
drawn between vertices is called complete graph.
Complete Graph
Terminologies

• A graph is simple if it has no loops and there is at most


one edge between any two vertices in the graph.
Equivalent Graphs

Two or more are called equivalent graphs if the edges


form the same connections of vertices in each graphs.
Equivalent Graphs

Determine whether the two graphs are equivalent.


1.

2.
Euler Circuits
•A path in a graph can be thought of as a movement from
one vertex to another by traversing edges.
•If a path ends at the same vertex at which it started, it is
considered a closed path, or circuit.
•A circuit that uses every edge, but never uses the same
edge twice, is called an Euler circuit.
•The number of edges that meet at a vertex is called the
degree of a vertex.
Eulerian Graph Theorem

A connected graph is Eulerian


if and only if
each vertex of the graph is of even degree.
Euler Path

• An Euler path is a path that uses every edge of a graph


exactly once.
• An Euler circuit is a circuit that uses every edge of a
graph exactly once.
• An Euler path starts and ends at different vertices.
• An Euler circuit starts and ends at the same vertex.
Euler Path Theorem

A connected graph contains an Euler path if and only if the


graph has two vertices of odd degree with all other
vertices of even degree.
Furthermore, every Euler path must start at one of the
vertices of odd degree and end at the other.
Example: Euler Path

The floor plan of an art gallery is pictured below. Draw a


graph that represents the floor plan, where vertices
correspond to rooms and edges correspond to doorways.
a) Is it possible to take a stroll that passes through every
doorway without going through the same doorway twice?
b) If so, does it matter whether we return to the starting
point?
Weighted Graphs
Hamiltonian Circuits

• A Hamiltonian Circuit is a path that uses each vertex of


a graph exactly once.

• A graph that contains a Hamiltonian circuit is called


Hamiltonian.
Example: Hamiltonian Circuit

Find a Hamiltonian circuit from this graph.


Dirac’s Theorem

Consider a connected graph with at least three vertices and


no multiple edges. Let 𝑛 be the number of vertices in the
𝑛
graph. If every vertex has a degree of at least , then the
2
graph must be Hamiltonian.
Dirac’s Theorem

Note:
If the graph does not meet the requirements of the
Dirac’s Theorem, it still might be Hamitonian.
Weighted Graph

A weighted graph is a graph in which each edge


is associated with a value, called a weight.
Traveling Salesman Problem

The travelling salesman problem (TSP) asks the following


question: "Given a list of cities and the distances between
each pair of cities, what is the shortest possible route that
visits each city exactly once and returns to the origin city?“

The traveling salesman problem consists of a salesman and a


set of cities. The salesman has to visit each one of the cities
starting from a certain one (e.g. the hometown) and returning
to the same city. The challenge of the problem is that the
traveling salesman wants to minimize the total length of the
trip.
Example: Traveling Salesman Problem
(Aufmann) The table below lists the distances in miles between six
popular cities that a particular airlines flies to. Suppose a traveller
would like to start in Chicago, visit the other five cities this airlines flies
to, and return to Chicago. Find three different routes that the traveller
could follow, and find the total distance flown from each route.
Chicago New York Washington Philadelphia Atlanta Dallas
Chicago - 713 597 665 585 803
New York 713 - No flights No flights 748 1374
Washington 597 No flights - No flights 544 1185
Philadelphia 665 No flights No flights - 670 1299
Atlanta 585 748 544 670 - No flights
Dallas 803 1374 1185 1299 No flights -
The Greedy Algorithm

A method of finding the a Hamiltonian circuit in a


complete weighted graph is given by the following
greedy algorithm.
1. Choose a vertex to start at, then travel along the
connected edge that has the smallest weight.
2. After arriving at the next vertex, travel along
the edge of smallest weight that connects to a
vertex not yet visited. Continue this process
until you have visited all vertices.
3. Return to the starting vertex.
The Greedy Algorithm

Note:
The greedy algorithm attempts to give a
circuit of minimal total weight, although it
does not always succeed.
Example: Greedy Algorithm
Use the greedy algorithm to find a Hamiltonian circuit
starting at vertex A in the given weighted graph.
The Edge-Picking Algorithm

Another method of finding a Hamiltonian circuit in a


complete weighted graph is given by the following
edge-picking algorithm.
1. Mark the edge of smallest weight in the graph.
2. Mark the edge of the next smallest weight in the
graph, as long as it does not complete a circuit
and does not add a third marked edge to a single
vertex.
3. Continue the process until you can no longer mark
any edges. Then mark the final edge that
completes the Hamiltonian circuit.
The Edge-Picking Algorithm

Note:
The edge-picking algorithm attempts to give
a circuit of minimal total weight, although it
does not always succeed.
Example: Edge Picking Algorithm
Use the edge-picky algorithm to find a Hamiltonian circuit
in the given weighted graph.
Example: Edge Picking Algorithm
The table shows the lengths of cables needed to connect
computers to create a network. Find the minimum length
of cable using the edge-picking algorithm.

A B C D E F
A -- 10 22 9 15 8
B 10 -- 12 14 16 5
C 22 12 -- 14 9 16
D 9 14 14 -- 7 15
E 15 16 9 7 -- 13
F 8 5 16 15 13 --
Example: Hamiltonian Circuit
Use (a.) the greedy algorithm starting at vertex A and (b.)
edge-picky algorithm to find a Hamiltonian circuit in the
given weighted graph.
Applications of Weighted Graphs
(Aufmann) Route Planning: Brian needs to visit the pet store, the
shopping mall, the local farmers market and the pharmacy. His
estimated driving times (in minutes) between the locations are given
the table below. Use the greedy algorithm and the edge-picking
algorithm to find two possible routes, starting and ending at home, that
will help Brian minimize his total travel time.
Home Pet store Shopping Farmers Pharmacy
mall market
Home - 18 27 15 8
Pet store 18 - 24 22 10
Shopping 27 24 - 20 32
mall
Farmers 15 22 20 - 22
market
Pharmacy 8 10 32 22 -
Planarity and Euler’s Formula
Planar Graphs

A planar graph is a graph that can be drawn so that no


edges intersect each other (except at vertices).
Platonic Solids
Subgraphs

A part of a graph G is called a subgraph of G.

Subgraph Theorem
“If a graph G has a subgraph that is not planar, the G is
also not planar. In particular, if contains the Utilities
Graph or K5 as a subgraph, G is not planar.”

Nonplanar Graph Theorem


A graph is nonplanar if and only if it has the Utilities Graph
or K5 as a subgraph, or it has a subgraph that can be
contracted to the Utilities Graph or K5.
Euler’s Formula

In a connected planar graph drawn with no


intersecting edges, let v be the number of vertices, e
the number of edges, and f the number of faces.
Then v + f = e + 2.
Graph Colorings
Coloring Map

If the map is divided into regions in some manner, what is the


minimum number of colors required if the neighboring regions are
to be colored differently?
There is a connection between map coloring and graph theory.
Maps can be modeled by graphs using the countries as the vertices
and two vertices (countries) are adjacent if they share a common
boundary.
In graph coloring, each vertex of a graph will be assigned one color
in such away that no two adjacent vertices have the same color.
The interesting idea here is to determine the minimum number of
(distinct) colors to be used so that we can color each vertex of a
graph with no two adjacent vertices have the same color.
Four-Color Theorem

Every planar graph is 4-colourable.


The Chromatic Number of a Graph

The minimum number of colors needed to color a graph so


that no edge connects vertices of the same color is called
the chromatic number.

2-Colorable Graph Theorem


A graph is 2-colourable if and only if it has no circuits that
consist of an odd number of vertices.
Example:

Look at the map. Assume that no


country is split into more than one
piece and countries that touch each
other at just a corner point will not be
considered neighbors.
How many colors are needed?
Determine whether the graph is 2-
colorable.
Scheduling Problem
Six student clubs need to hold meetings on the same day, but some students
belong to more than one club. In order to avoid members missing meetings,
the meetings need to be scheduled during different time slots. An “X” in the
table. below indicates that the two corresponding clubs share at least one
member. Use graph coloring to determine the minimum number of time slots
necessary to ensure that all club members can attend all meetings.
Student Honor society Biology Gaming club Debate team Engineering club
newspaper association
Student
newspaper - X X
Honor Society
- X X X
Biology
association X X - X
Gaming club
X - X X
Debate team
X X X -
Engineering club
X X -
References:

• Auffmann et al, Mathematical Excursions (2018)


• https://www.youtube.com/watch?v=nZwSo4vfw6c

• Mame, Neil (Batangas State University), Manalang, Rodman (UE Manila),


Maquiling Rene (Xavier University), Mocorro, Ronald (Leyte Normal University) –
Powerpoint Presentation (2017)

You might also like