You are on page 1of 54

Requirements

Prelim
Objectives
Overview,
Midterm:
Intro to Graph
Week Week 8

Theory
Prelim Exam, Grades, and Other Requirements
Overview of Midterm Topics
Lesson: Mathematics of Graph (Part I)

and Circuits
Euler Paths
Course GE MAT 101 – Mathematics in the Modern World
Program/Year/Section BSN 2-2

Hamiltonian
Paths and
Lectured by Rafael Antonio U. Esquillo

Cycles
Date October 5, 2022
Time 8:00 am – 11:00 am

Recall
Name Format: P/Y/S – LN, FN, MI
Ex.: BSE 4-3 - Esquillo, Rafael Antonio U.
Requirements
Prelim
Objectives
Overview,
Midterm:
Intro to Graph
Week Week 8

Theory
Prelim Exam, Grades, and Other Requirements
Overview of Midterm Topics
Lesson: Mathematics of Graph (Part I)

and Circuits
Euler Paths
Course GE MAT 101 – Mathematics in the Modern World
Program/Year/Section BSN 2-2

Hamiltonian
Paths and
Lectured by Rafael Antonio U. Esquillo

Cycles
Date October 5, 2022
Time 8:00 am – 11:00 am

Recall
Name Format: P/Y/S – LN, FN, MI
Ex.: BSE 4-3 - Esquillo, Rafael Antonio U.
Prelim Exam and Grade Components

Requirement
Prelim
s
Prelim Exam

Objectives
Overview,
Midterm:
• Prelim exam scores will be posted online on iLS showing student nos.
without names.

Intro to Graph
• Video of explanation to the correct answers will be posted online as well,

Theory
but after all students have taken the test.
Prelim Grades

and Circuits
Euler Paths
• Components
• Online Activity and Oral Participation: 20%

Hamiltonian
Paths and
• Online Activity: Reading Assignment and Video Reaction

Cycles
• Oral Participation
• Quizzes: 40%

Recall
• Prelim Quiz 1
• Prelim Quiz 2 – posted on Oct 3 (Mon)
• Prelim Exam: 40%
• Grades will be posted online showing student numbers without names.
Overview of Midterm Topics and Today’s Objectives

Requirement
Prelim
s
Midterm Topics

Objectives
Overview,
Midterm:
Mathematics of

Intro to Graph
Theory
Mathematics of Apportionment and Patterns and
Graphs Voting Symmetries

and Circuits
Euler Paths
Hamiltonian
Paths and
Cycles
Recall
Overview of Midterm Topics and Today’s Objectives

Requirement
Prelim
s
Mathematics of Graphs – Outline

Objectives
Overview,
Midterm:
4.1. Introduction to Graph Theory
4.2. Euler Paths and Circuits

Intro to Graph
Theory
4.3. Hamiltonian Paths and Cycles
4.4. Weighted Graphs

and Circuits
Euler Paths
4.5. Graph Coloring
4.6. Trees

Hamiltonian
Paths and
Cycles
Recall
Introduction to Graph Theory

Requirement
Prelim
s
Graph theory

Objectives
Overview,
Midterm:
• Graph theory is a branch of mathematics that was developed after
Leonhard Euler (1707-1783), a Swiss mathematician, solved an eighteenth-

Graph Theory
century problem involving the seven bridges of Königsberg in Old Prussia.

Intro to
Königsberg Bridge Problem

and Circuits
Euler Paths
• The city of Königsberg (now Kaliningrad,
Russia) has four districts divided by the B

Hamiltonian
Pregel River. Seven bridges connected

Paths and
Cycles
these districts as shown in the figure on A
the right. D

Recall
• Can you take a walk through the town,
visiting each part of the town and
C
crossing each bridge only once?
Introduction to Graph Theory

Requirement
Prelim
s
Graph

Objectives
Overview,
Midterm:
• A graph is a collection of points called vertices or nodes
and line segments or curves called edges

Graph Theory
that connect the vertices.

Intro to
• The position of the vertices, the lengths of the edges, and the shape of
the edges do not matter in a graph.

and Circuits
Euler Paths
Hamiltonian
Paths and
Cycles
• Sometimes, the edges are represented by arrows (directed) or are given
values (weighted).

Recall
Prelim Midterm: Hamiltonian
Intro to Euler Paths
Requirement Overview, Paths and Recall
Graph Theory and Circuits
s Objectives Cycles
• Construct a graph illustrating the Königsberg’s bridge problem.
Introduction to Graph Theory

D
A
Constructing a Graph

C
B
Introduction to Graph Theory

Requirement
Prelim
s
Some Definitions

Objectives
Overview,
Midterm:
• A loop is an edge connecting a vertex to itself.
• Two or more edges connecting the same vertices are called multiple

Graph Theory
edges.

Intro to
and Circuits
Euler Paths
Hamiltonian
Paths and
• A simple graph is a graph with no loops and no multiple edges.

Cycles
Recall
Introduction to Graph Theory

Requirement
Prelim
s
Some Definitions

Objectives
Overview,
Midterm:
• A path is an alternating sequence of
vertices and edges. It can be seen as a trip

Graph Theory
from one vertex to another using the

Intro to
edges of the graph.
• A circuit is a path that begins and ends

and Circuits
Euler Paths
with the same vertex, i.e. a closed path.
• A cycle is a circuit that doesn’t repeat

Hamiltonian
Paths and
vertices.

Cycles
Recall
Introduction to Graph Theory

Requirement
Prelim
s
Some Definitions

Objectives
Overview,
Midterm:
• Two vertices are adjacent if there is an edge connecting them.

Graph Theory
Intro to
• Adjacent edges are edges that share a common vertex.

and Circuits
Euler Paths
• The degree of a vertex is the number of edges connected to that vertex.

Hamiltonian
Paths and
Cycles
Recall
• The number of edges of a complete
Introduction to Graph Theory

Requirement
graph given its number of vertices is

Prelim
s
given by the formula:
Some Types of Graph

Objectives
Overview,
Midterm:
for .
• The degree of each vertex of a
• Disconnected graph complete graph is .

Graph Theory
- a graph in which a path cannot be

Intro to
made from one vertex to another. Number Degree Number
of of each of

and Circuits
Euler Paths
vertices vertex edges,

• Complete graph – a graph in which every

Hamiltonian
Paths and
possible edge is drawn between vertices. It

Cycles
should not contain multiple edges.

Recall
Euler Paths and Circuits

Requirement
Prelim
s
Euler Circuit

Objectives
Overview,
Midterm:
• An Euler circuit is a closed path that uses
every edge, but never uses the same edge

Graph Theory
twice. The path may cross through vertices

Intro to
more than once.
• Euler proved that the graph formed by the

and Circuits
Euler Paths
Konigsberg bridges does not have an Euler
circuit. For an Euler circuit to exist, the

Hamiltonian
Paths and
degree of each vertex must be even.

Cycles
Recall
Eulerian Graph Theorem
A connected graph is Eulerian if and only if
every vertex of the graph is of even degree.
Euler Paths and Circuits

Requirement
Prelim
s
Euler Circuit

Objectives
Overview,
Midterm:
Determine whether each graph is Eulerian. If it is, find an Euler circuit. If it is
not, explain why.

Graph Theory
Intro to
and Circuits
Euler Paths
Hamiltonian
Paths and
Cycles
Recall
Euler Paths and Circuits

Requirement
Prelim
s
Euler Path

Objectives
Overview,
Midterm:
An Euler path is a path that uses every edge in the graph exactly once, but it

Graph Theory
does not start and end at the same vertex.

Intro to
Eulerian Path Theorem

and Circuits
Euler Paths
A connected graph contains an Euler path if
and only if the graph has two vertices of odd

Hamiltonian
Paths and
Cycles
degrees with all other vertices of even
degrees.
Furthermore, every Euler path must start at

Recall
one of the vertices of odd degrees and end at
the other.
Euler Paths and Circuits

Requirement
Prelim
s
Euler Path

Objectives
Overview,
Midterm:
Determine whether the following graph is Eulerian. If it is, find an Eulerian

Graph Theory
circuit. If it is not, can you find an Euler path?

Intro to
and Circuits
Euler Paths
Hamiltonian
Paths and
Cycles
Recall
Euler Paths and Circuits

Requirement
Prelim
s
Application of Euler Paths and Circuits

Objectives
Overview,
Midterm:
The floor plan of a museum is shown below. Draw a graph showing the plan,

Graph Theory
with each room represented by a vertex and each edge representing a door

Intro to
between adjoining rooms. Is it possible to walk in the museum passing
through each door exactly once?

and Circuits
Euler Paths
Hamiltonian
Paths and
Cycles
Recall
Euler Paths and Circuits

Requirement
Prelim
s
Application of Euler Paths and Circuits

Objectives
Overview,
Midterm:
A mail carrier has the neighborhood pictured below on his route. He wants to

Graph Theory
cover each street exactly once without retracing any street. Find a way to

Intro to
accomplish this.

and Circuits
Euler Paths
Hamiltonian
Paths and
Cycles
Recall
Hamiltonian Paths and Cycles

Requirement
Prelim
s
Hamiltonian Graph

Objectives
Overview,
Midterm:
• A Hamiltonian path is a path that visits each vertex of the graph exactly
once.

Graph Theory
Intro to
• A Hamiltonian circuit or cycle is a path that uses each vertex of a graph
exactly once and returns to the starting vertex.

and Circuits
Euler Paths
• A graph that contains a Hamiltonian circuit is called Hamiltonian graph.

Hamiltonian
Paths and
Cycles
Recall
Hamiltonian Paths and Cycles

Requirement
Prelim
s
Hamiltonian Graph

Objectives
Overview,
Midterm:
• Hamiltonian vs Eulerian
Euler: does not repeat an edge

Graph Theory
Hamiltonian: does not repeat a vertex

Intro to
• Unlike Euler circuit, where Eulerian Graph Theorem is used to check if a

and Circuits
Euler Paths
graph contains an Euler circuit, there is no straightforward criterion to
check whether a Hamiltonian cycle exists. But there is Dirac’s Theorem

Hamiltonian
Paths and
that can help.

Cycles
Dirac’s Theorem
Consider a connected graph with at least three

Recall
vertices and no multiple edges. Let be the number of
vertices in the graph. If every vertex has degree of at
least , then the graph must be Hamiltonian.
Hamiltonian Paths and Cycles

Requirement
Prelim
s
Hamiltonian

Objectives
Overview,
Midterm:
Determine whether each graph is Hamiltonian or not. If it is, find a

Graph Theory
Hamiltonian Cycle. If not, explain why.

Intro to
and Circuits
Euler Paths
Hamiltonian
Paths and
Cycles
Recall
Prelim Midterm: Hamiltonian
Intro to Euler Paths
Requirement Overview, Paths and Recall
Graph Theory and Circuits
s Objectives Cycles
Hamiltonian Paths and Cycles

Application of Hamiltonian Cycles


Hamiltonian Paths and Cycles

Requirement
Prelim
s
Application of Hamiltonian Cycles

Objectives
Overview,
Midterm:
Graph Theory
Intro to
and Circuits
Euler Paths
Hamiltonian
Paths and
Cycles
A Hamiltonian circuit represents a

Recall
sequence of flights that travels all cities
and returns to the starting city without
each city being visited twice.
Prelim Midterm: Hamiltonian
Intro to Euler Paths
Requirement Overview, Paths and Recall
Graph Theory and Circuits
s Objectives Cycles
Hamiltonian Paths and Cycles

Application of Hamiltonian Cycles


Hamiltonian Paths and Cycles

Requirement
Prelim
s
Application of Hamiltonian Cycles

Objectives
Overview,
Midterm:
Even though
there are degrees less

Graph Theory
Intro to
than n/2=7/2=3.5, there
is still a Hamiltonian
circuit in the graph

and Circuits
Euler Paths
(Dallas-Atlanta-Boston-
New York-Los Angeles-
San Francisco-Phoenix).

Hamiltonian
Paths and
Cycles
By Dirac’s Theorem, it is
possible to route a
document to all offices

Recall
and return it to the
originating office without
sending it throught the
same office twice.
Recall

Requirement
Prelim
s
• A collection of points called __________ and line segments or curves called

Objectives
Overview,
Midterm:
__________ that connect the vertices is called __________.

Graph Theory
• An edge that connects a vertex to itself is __________.

Intro to
• Two or more edges that connect two vertices are called __________.

and Circuits
Euler Paths
• A graph that has neither loops nor multiple edges is called a/an__________.

Hamiltonian
Paths and
Cycles
• Are the two graphs the same/equivalent?

Recall
Recall

Requirement
Prelim
s
• A graph in which every possible edge is drawn between vertices and

Objectives
Overview,
Midterm:
should not contain multiple edges is called __________.

Graph Theory
• For the complete graph , what is the degree of each vertex? How many

Intro to
edges does the graph have? []
Degree : __________

and Circuits
Euler Paths
Number of edges: : __________

Hamiltonian
Paths and
Cycles
Recall
Recall

Requirement
Prelim
s
Eulerian Graph Theorem

Objectives
Overview,
Midterm:
A connected graph is Eulerian if and only if every vertex of the graph is of
__________degree.

Graph Theory
Intro to
Eulerian Path Theorem
A connected graph contains an Euler path if and only if the graph has

and Circuits
Euler Paths
__________ vertices of odd degrees with all other vertices of __________
degrees. Furthermore, every Euler path must start at one of the vertices of

Hamiltonian
Paths and
__________degrees and end at the other.

Cycles
Dirac’s Theorem

Recall
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 degree
of at least __________, then the graph must be Hamiltonian.
Prelim Midterm: Hamiltonian
Intro to Euler Paths
Requirement Overview, Paths and Recall
Graph Theory and Circuits
s Objectives Cycles
C
Is each graph Eulerian? If not, is there an Euler path?

B
A
Recall
Prelim Midterm: Hamiltonian
Intro to Euler Paths
Requirement Overview, Paths and Recall
Graph Theory and Circuits
s Objectives Cycles
Is the graph Hamiltonian? If not, is there a Hamiltonian path?
Recall
Weighted
Graphs
Coloring
Graph
Week Week 8

Trees
Mathematics of Graphs (Part II)
Course GE MAT 101 – Mathematics in the Modern World

Recall
Program/Year/Section BSN 2-2
Lectured by Rafael Antonio U. Esquillo
Date October 8, 2022
Time 8:00 am – 11:00 am

Name Format: P/Y/S – LN, FN, MI


Ex.: BSE 4-3 - Esquillo, Rafael Antonio U.
Weighted Graphs

Weighted
Graphs
A weighted graph is a graph in which each edge is associated

Coloring
Graph
with a value called weight.

Trees
Recall
Weighted Graphs

Weighted
Graphs
The table below lists down the distances (miles) between the cities having direct routes as well

Coloring
Graph
as the corresponding distances between them.
a) Draw a graph that represents this information where each vertex represents a city and an
edge connects two vertices if the two cities have a direct flight with their corresponding

Trees
weights.
b) Find two different routes that visit each of the places and return to its starting point
without visiting any city twice. Compare the total number of miles travelled by each of

Recall
these routes.
Manila Cebu CDO Davao Palawa Ozamis
n
Manila - 355 485 589 358 477
Cebu 355 - 137 240 354 148
CDO 485 137 - 118 414 64
Davao 589 240 118 - 495 133
Palawa 358 354 414 495 - 363
n
Osamis 477 148 64 133 363 -
Graph Coloring

Weighted
Graphs
• Graph coloring started in the mid-1800’s when Francis Guthrie tried to

Coloring
Graph
color the map of England so that it would be easy to distinguish the
countries sharing a common border. After many attempts, he found out
that a maximum of four colors were required to color the map.

Trees
• Planar Graph – a graph that can be drawn so that no edges intersect each

Recall
other (except at vertices).
Graph Coloring

Weighted
Graphs
• In a planar graph drawn with no crossing edges, if the number of vertices

Coloring
Graph
is v, the number of edges is e, and the number of faces is f, then

(Euler’s Formula)

Trees
Recall
Graph Coloring

Weighted
Graphs
Chromatic Number of a Graph

Coloring
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.

Trees
Consider the complete graphs and . Determine their chromatic number.

Recall
Graph Coloring

Weighted
Graphs
2-Colorable Graph Theorem

Coloring
Graph
A graph is 2-colorable if and only if it has no circuits that consist of an odd
number of vertices.

Trees
Recall
Graph Coloring

Weighted
Graphs
NOTE:
This graph is planar as
Four-Color Theorem discussed in slide 35.

Coloring
Graph
The chromatic number of a planar graph is at most 4.

Trees
Recall
Graph Coloring

Weighted
Graphs
Map Coloring

Coloring
Graph
A map can be represented by a graph with the different regions as vertices.
Two regions are adjacent if they share part of their boundaries.

Trees
The graph representing a map is planar. Hence, it needs only 4 colors.

Recall
Ex.: Draw the corresponding graph and color
Graph Coloring

Weighted
Graphs
Map Coloring

Coloring
Graph
A map can be represented by a graph with the different regions as vertices.
Two regions are adjacent if they share part of their boundaries.

Trees
The graph representing a map is planar. Hence, it needs only 4 colors.

Recall
Ex.: Draw the corresponding graph and color
Week Week 10
Graph Theory (Scheduling, Trees)
Introduction to Apportionment and Voting
Course GE MAT 101 – Mathematics in the Modern World
Program/Year/Section BSN 2-2
Lectured by Rafael Antonio U. Esquillo
Date October 22, 2022
Time 8:00 am – 11:00 am

Name Format: P/Y/S – LN, FN, MI


Ex.: BSE 4-3 - Esquillo, Rafael Antonio U.
Checklist
[ ] Recording
[ ] Audio
[ ] Camera and Screen
[ ] Break Timer
https://www.imagebible.org/topic/leadership
Some Postings on iLS
• Answers and Solutions to Prelim Exam
• Prelim Grades
• Signatory of class representative for CAS Form 171
• Midterm Problem Set 1
• File Name: [PYS]-Midterm Problem Set 1 – [LN, FN, MI]
• You can draw on paper or draw digitally
• Due: Oct 24 (Mon) 10 pm
• Midterm Quizzes 1 and 2
• Expect it to be posted on Oct 24 (Mon)
• Due: Oct 28 (Fri) 10 pm
Graph Coloring

Weighted
Graphs
Scheduling

Coloring
Graph
Six college accreditation committees need to hold meetings on the same day, but
some teachers belong to more than one committee. In order to avoid members
missing meetings, the meetings need to be scheduled at different time slots. Use

Trees
graph coloring to determine the minimum number of time slots necessary to
ensure that all faculty members can attend all meetings.

Recall
Faculty Faculty Outreach Physical Library Student
Instruction Development Program Facility Facility Welfare
Faculty - X X X
Instruction
Faculty X - X X X
Development
Outreach X X - X X X
Program
Physical Facility X X - X
Library Facility X X X - X
Student Welfare X X X X -
Graph Coloring

Weighted
Graphs
Scheduling

Coloring
Graph
Faculty Faculty Outreach Physical Library Student
Instruction Development Program Facility Facility Welfare
Faculty - X X X
Instruction
Faculty X - X X X

Trees
Development
Outreach X X - X X X
Program
Physical X X - X

Recall
Facility
Library X X X - X
Facility
Student X X X X -
Welfare

1st time slot Faculty Instruction and


Physical Facility
2nd time slot Faculty Development
3rd time slot Outreach Program
4th time slot Library Facility
5th time slot Student Welfare
Trees

Weighted
Graphs
Tree

Coloring
Graph
A tree is a graph in which any two vertices are connected by exactly one
path.

Trees
Recall
Properties of Trees:
1. A tree has no circuits.
2. Trees are connected graphs.
3. Every edge in a tree is a bridge.
bridge – an edge that makes the graph disconnected
4. A tree with vertices has exactly edges.
Trees

Weighted
Graphs
Spanning Tree

Coloring
Graph
A spanning tree for a graph is a tree that results from the removal of as
many edges as possible from the original graph without making it
disconnected.

Trees
Ex.: Find a spanning tree

Recall
Trees

Weighted
Graphs
Spanning Tree

Coloring
Graph
A spanning tree for a graph is a tree that results from the removal of as
many edges as possible from the original graph without making it
disconnected.

Trees
Ex.: Find a spanning tree

Recall
One possible answer:
Trees

Weighted
Graphs
Minimum Spanning Trees

Coloring
Graph
A minimum spanning tree for a weighted graph is the spanning tree for

Trees
the graph that has the smallest possible sum of the weights.

A minimum spanning tree must have one fewer edge than the number of

Recall
vertices.
Trees

Weighted
Graphs
Kruskal’s Algorithm

Coloring
Graph
To construct a minimum spanning tree for a weighted graph:
1. Choose the edge with the lowest weight and highlight it in color.
2. Choose the unmarked edge with the next lowest weight that does not

Trees
form a circuit with the edges already highlighted and highlight it.
3. Repeat until all vertices have been connected.

Recall
Give the minimum spanning tree of the graph.
Trees

Weighted
Graphs
Kruskal’s Algorithm

Coloring
Graph
To construct a minimum spanning tree for a weighted graph:
1. Choose the edge with the lowest weight and highlight it in color.
2. Choose the unmarked edge with the next lowest weight that does not

Trees
form a circuit with the edges already highlighted and highlight it.
3. Repeat until all vertices have been connected.

Recall
Give the minimum spanning tree of the graph.
Photo credits
• https://mathinsight.org/network_introduction
• https://www.youtube.com/watch?v=YWfEqWLz9pc
• https://en.wikipedia.org/wiki/Fractal
• https://www.istockphoto.com/vector/seamless-filipino-ethnic-pattern-yakan-1-gm1304069424
-395341175
• https://www.mathsisfun.com/activity/seven-bridges-konigsberg.html
• https://mathinsight.org/definition/directed_graph
• https://study.com/academy/lesson/weighted-graphs-implementation-dijkstra-algorithm.html
• https://www.javatpoint.com/graph-theory-types-of-graphs
• https://www.javatpoint.com/walks-trails-path-circuit-and-cycle-in-discrete-mathematics
• https://www.wikidata.org/wiki/Q45715
• Cambridge General Mathematics, AC/VCE Units 1 and 2
• Mathematical Excursions, Aufmann et. al.

You might also like