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

MATHEMATICS IN THE

MODERN WORLD

Instructor: Joris N. Buloron, MS


Topic Outline
I. Nature of Mathematics
II. Speaking Mathematically
III. Problem-Solving
IV. Statistics
V. Logic
VI. Graphs
VII. Mathematical Systems

Textbook: Aufmann, R., Lockwood, J., Nation, R., Clegg, D., Epp, S., Abad, E. Jr. Mathematics
in the Modern World. (Rex Book Store, Inc., Manila, Philippines). 2018.
VI. Graph Theory
Seven Bridges of Kӧnigsberg, Euler and Graph Theory

(Courtesy of google.com)
The problem was to devise a walk through
the city that would cross each of those
bridges once and only once.

Moreover, what if we want to start and end


with the same vertex?
(Courtesy of google.com)
Introduction to Graphs
• A graph is a pair (V,E) where V is a set of elements called vertices and E
is a set of edges {v,w}.
• Example: Consider the graph G=(V,E) where V={1,2,3,4,5} and
E={{1,2},{1,3},{3,4},{2,4},{4,5}}.
Draw a diagram representing the graph G.
• Example: Consider the graph G=(V,E) where V={a,b,c,d} and E={{a,b},{b,c},{b,d}}.
Draw a diagram representing the graph G.
• Example: The table below lists five mobile phone companies and indicates whether they have
agreements to roam onto each other's networks. Draw a graph that represents this information, where
each vertex represents a phone company and an edge connects two vertices if the corresponding
companies have a roaming agreement. Then use the graph to answer the questions: Which phone
company has roaming agreements with the most carriers? Which company can roam with only one
other network? MobilePlus TalkMore SuperCell Airwave Lightning
MobilePlus - No Yes No Yes
TalkMore No - Yes No No
SuperCell Yes Yes - Yes No
Airwave No No Yes - Yes
Lightning Yes No No Yes -
• Example: An “X” in the table below indicates a direct Bus Rapid Transport (BRT) route
between the corresponding cities/municipalities. Draw a graph that represents this
information, in which each vertex represents a city/municipality and an edge connects two
vertices if there is a BRT route between the corresponding cities/municipalities. Give a
minimal set of routes so that a commuter can travel from Minglanilla to Lapu-lapu City.
Cebu City Minglanilla Mandaue City Consolacion Talisay City Lapu-Lapu City Cordova

Cebu City - X X X

Minglanilla - X

Mandaue City X - X X

Consolacion X - X

Talisay City X X -

Lapu-Lapu City X X X

Cordova X X -
• In general, a graph can include vertices that are not joined to any edges,
but all edges must begin and end at vertices.
• 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 called connected if any vertex can be reached from any other
vertex by tracing along edges.
• A connected graph in which every possible edge is drawn between
vertices and without any multiple edges is called a complete graph.
• Two graphs G=(V,E) and G'=(V',E') are isomorphic if there exists a one-to-
one and onto function β:V→V' such that for any x,y ϵ V:
{x,y} ϵ E if and only if {β(x), β(y)} ϵ E'.
• Example: Determine whether the following graphs are isomorphic.
B C

A B C D
A D

• Example: Determine whether the following graphs are isomorphic.


A D

B B A

C E
C D E
Euler Circuits
• A path is a graph G=(V,E) such that V={x1, x2, x3, ... , xn-2, xn-1, xn} and
E={{x1,x2}, {x2,x3}, ... , {xn-2,xn-1}, {xn-1,xn}}.
• If a path ends at the same vertex at which it started, it is called a closed
path or a circuit.
• Note: a path or a circuit is sometimes useful when considered as a part of
a “bigger” graph (this is the concept of a “subgraph”).
• In a graph, a circuit that uses every edge but never uses the same edge
twice is called an Euler circuit.
• Example: Find an Euler circuit in the following graph.
A B C D

E F G H
• Example: Find an Euler circuit in the following graph.
A B

C D

• The number of edges that meet at a vertex is called the degree of a


vertex. If v is a vertex of a graph G, we write deg(v) the degree of vertex v.
• Example: Determine the degree of each vertex in the following graph.
A B
C

D E
• A graph with an Euler circuit s called an Eulerian graph.
• Eulerian Graph Theorem:
A connected graph is Eulerian if and only if every vertex of the graph
is of even degree.
• Example: Use the Eulerian Graph Theorem to verify our two examples above on the
existence of Eulerian circuits.
• Example: Recalling the problem of 7 bridges of Kӧnigsberg, was it possible for the people to
take a stroll that would lead them across each bridge and return them to the starting point
without traversing the same bridge twice?
• In a graph, a path that uses every edge once and only once is called an
Euler path.
• Example: Determine if there exists an Euler path of the following graph.
A B

C D
• A Version of Euler Path Theorem:
Let G be a connected graph with two distinct vertices x and y of odd
degrees. G has an Euler path from vertex x to vertex y if and only
if x and y are the only vertices of odd degrees.

• Example: Verify our last example on the existence of an Euler path using this theorem.
• Example: Recalling the problem of 7 bridges of Kӧnigsberg, was it possible for the people to
take a stroll such that they start in one of the points and end up with a different point with the
condition that they cross each bridge without traversing the same bridge twice?
• Example: A bicyclist wants to mountain
bike through all the trails of a national park.
A map of the park is shown on the right.
Because the bicyclist will be dropped off in
the morning by friends and picked up in
the evening, she does not have a
preference for where she begins and ends
her ride. Is it possible for the cyclist to
traverse all of the trails without repeating
any portions of her trip?
• Example: The floor plan of a warehouse is
illustrated on the right. Use a graph to
represent the floor plan, and answer the
following questions: Is it possible to walk
through the warehouse so that you pass
through every doorway once but not twice?
Does it matter whether you return to the
starting point?
Hamiltonian Circuits
• A Hamiltonian circuit ina a given graph is a path that begins and ends at
the same vertex and passes through each vertex of a graph exactly once.
A graph that contains a Hamiltonian circuit is called a Hamiltonian graph.
• Example: Which of the following graphs is a Hamiltonian graph?
A B E F J K
I

C D G H L M N

• Dirac's Theorem: Consider a connected graph with at least three vertices


and no multiple edges. Let n be the number of vertices in the graph. If
every vertex has degree of at least n/2 then the graph is Hamiltonian.
• Example: The following table shows the available flights of an airline. An “X” means that
the airline has direct flights between the two corresponding cities/municipalities. Draw a
corresponding graph for the table. Is there a sequence of flights that visits each locality and
returns to the starting locality without visiting any locality twice?

Lapu-Lapu City Santa Fe Panglao Pasay City Bacolod City Angeles City (Clark)
(Bantayan)
Lapu-Lapu City - X X X

Santa Fe (Bantayan) X - X X X

Panglao X - X X

Pasay City X - X X

Bacolod City X X X X - X

Angeles City (Clark) X X X X -


• Example: A large law firm has offices in seven major cities. The firm has overnight
document deliviries scheduled every day between certain offices. In the table below, the
“X” indicates that there is delivery service between the corresponding offices. Using the law
firm's existing delivery service, is it possible to route a document to all the offices and
return the document to its originating office without sending it through the same office
twice?

Cebu City Carcar City Mandaue City Talisay Lapu- Danao City Bogo City
City Lapu City
Cebu City - X X X X

Carcar City - X X X

Mandaue City X X - X

Talisay City X - X X

Lapu-Lapu City X X - X

Danao City X X X -

Bogo City X X X -
Weighted Graphs
• A weighted graph is a graph in which each edge is associated with a
value called weight.
• Example:
1

2
6 3

Is it possible to find a Hamiltonian circuit with the least sum of weights?


• Example: The table below lists the distances in miles between six popular cities that a
particluar airline flies to. Suppose a traveler would like to start in Chicago, visit the other five
cities this airline flies to, and return to Chicago. Find routes that the traveler could follow,
and find the total distance flown for each route.

Chicago New York Washington, D.C. Philadelpia Atlanta Dallas

Chicago - 713 597 665 585 803


New York 713 - No flights No flights 748 1374
Washington, D.C. 597 No flights - No flights 544 1185
Philadelpia 665 No flights No flights - 670 1299
Atlanta 585 748 544 670 - No flights
Dallas 803 1374 1185 1299 No flights -
• Example: A tourist visiting San Francisco is staying at a hotel near the Moscone Center. The
tourist would like to visit five locations by bus tomorrow and then return to the hotel. The
number of minutes spent traveling by bus between locations is given below. (N/A in the table
indicates that no convenient bus route is avalable.) Find routes for the tourist to follow and
compare the total travel times.

Moscone Civic Union Embarcadero Fisherman's Coit


Center Center Square Plaza Wharf Tower
Moscone Center - 18 6 22 N/A N/A
Civic Center 18 - 14 N/A 33 N/A
Union Square 6 14 - 24 28 36
Embarcadero Plaza 22 N/A 24 - N/A 18
Fisherman's Wharf N/A 33 28 N/A - 14
Coit Tower N/A N/A 36 18 14 -
Algorithms in Complete graphs
• From the previous examples, is there a way of finding the best route?
• There is no known shortcut for finding the optimal Hamiltonian circuit in
weighted graph. But there are algorithms in finding a pretty good solution
in a comlete graph.
• The Greedy Algorithm
i.) Choose a vertex to start at, then travel along the connected edge
that has the smallest weight. (If two or more edges have the same
weight, pick any one).
ii.) After arriving at the next vertex, travel along the edge of the
smallest weight that connects to a vertex not yet visited. Continue
this process until you have visited all vertices.
iii.) Return to the starting vertex.
• Example: Find good routes from the previous examples using the greedy algorithm.

• The Edge-Picking Algorithm


i.) Mark the edge of smallest weight in the graph. (If two or more
edges have the same weight, pick any one.)
ii.) 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.
iii.) Continue this process until you can no longer mark any edges.
Then mark the final edge that completes the Hamiltonian circuit.

• Example: Find good routes from the previous examples using the edge-picking algorithm.
• Example: 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 in the following table. Use the greedy algorithm and 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 Mall 27 24 - 20 32
Farmers Market 15 22 20 - 22
Pharmacy 8 10 32 22 -
Planarity of Graphs
• Problem: Three utility companies each need to run pipes to three houses. Can they do so
without crossing over each other's pipes at any point?

This is a question of planarity!


• A planar graph is a graph that can be drawn so that no edges intersect
each other (except at vertices).
• Example: Which of the following are planar graphs?
• Does the utility problem above has a positive solution?
• Subgraph Theorem:
If a graph G has a subgraph which is not planar, then G is also not
planar.
• Example: Is the following graph planar?
Euler's Formula
• In a planar drawing of a graph, the edges divide the graph into different
regions called faces. The region surrounding the graph, or the exterior, is
considered the infinite face.

• Example: How many faces are there in each of the following graph?
• 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.

• Example: Verify the graphs from the previous example using the Euler's formula.

• Example: Determine the number of faces of the following graph and verify using the Euler's
formula.
Graph Coloring
• Francis Guthrie, a South African mathematician and botanist, tried to color
a map of the countries of England. He wanted that countries sharing a
common border to have different colors. He then noticed that four colors
are needed to color the map and so he postulated that four colors are
sufficient to color any map. This is now known as the four-color problem.
• Example: 4-Coloring of the US map.
• Example: Suppose the following is a map of a province with different cities. Color the map
such that two cities sharing a common boundary have different colors.

• We can draw a corresponding graph for a map by representing a


country/province by a vertex in a graph and connect two vertices if the
corresponding countries/provinces share the same boundary.
• The coloring of map as above corresponds to coloring of vertices such
that two vertices which are neighbors have different colors.
• Example: Draw the corresponding graph of the map from the previous example and color
the graph such that no two neighbor vertices have the same color.

• If n colors are enough to color the vertices of a graph such that no two adjacent vertices
have the same color, we say that the graph is n-colorable.

• Four-Color Theorem
Every planar graph is 4-colorable.

• Example: Consider the map of Central Cebu Protected Landscape (CCPL) on the
following page. Construct a graph such that each city/municipality included in CCPL is
represented by a vertex and two vertices are connected if the corresponding
cities/municipalities share the same boundary. Color the graph and decide whether it is 2-
colorable, 3-colorable or 4-colorable.
• 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 of
the graph.
• 2-Colorable Graph Theorem
A graph is 2-colorable if and only if it has no circuits that consist of
an odd number of vertices.
• Example: Determine if each of the following graphs is 2-colorable or not.
Applications of Graph Coloring
• Example: Eight different school clubs want to schedule meetings on the last day of the
semester. Some club members, however, belong to more than one of these clubs, so clubs
that share the same members cannot meet at the same time. How many different time slots
are required so that all members can attend all meetings? Clubs that have a member in
common are indicated with an “X” in the table below.
Kahugpungan sa Student Debate Honor Student Mathematics Campus Campus
Pinulungang Government Club Society Newspaper Circle Democrats Republicans
Binisaya
Kahugpungan sa - X X X X
Pinulungang Binisaya
Student Government X - X X X

Debate Club X - X X X

Honor Society X X X - X X

Student Newspaper X X - X X

Mathematics Circle X X X - X X

Campus Democrats X X X -

Campus Republicans X X X -
• Example: Six film students have collaborated on the creation of five films.
Film A was produced by Brian, Chris, and Damon.
Film B was produced by Allison and Fernando.
Film C was produced by Damon, Erin, and Fernando.
Film D was produced by Brian and Erin.
Film E was produced by Brian, Chris,and Erin.
The college is scheduling a one-day film festival where each film will be shown once and the
producers of each film will attend and participate in a discussion afterward. The college has
several screening rooms available and two hours will be allotted for each film. If the showings
begin at noon, create a screening schedule that allows the festival to end as early as possible
while assuming that all the producers of each film can attend that film's screening.
• Example: Five classes at an elementary school have arranged a tour at a zoo where the
students get to feed the animals.
Class 1 wants to feed the elephants, giraffes, and hippos.
Class 2 wants to feed the monkeys, rhinos, and elephants.
Class 3 wants to feed the monkeys, deer, and sea lions.
Class 4 wants to feed the parrots, giraffes, and polar bears.
Class 5 wants to feed the sea lions, hippos, and polar bears.
If the zoo allows animals to be fed only once a day by one class of students, can the tour
be accomplished in two days? If not, how many days will be required? (Assume that each
class will visit the zoo only on one day).

You might also like