AT2: Graphing The Hospital Floor Problem: Two Floor Plans of A Hospital Floor Are Shown. Draw A Graph That Represents The Floor Plan

You might also like

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

IGBALIC, KIMBERLY E.

BSPH 1D

AT2: Graphing the hospital floor

Problem: Two floor plans of a hospital floor are shown. Draw a graph that represents the floor plan,
where each vertex represents a room and an edge connects two vertices if there is a doorway between
the two rooms. Is it possible to walk through the hospital and pass through each doorway without going
through any doorway twice? Does it depend on whether you return to the room you started at? Justify
your conclusion.

o It is necessary to find an Euler path in the graph in order to find a travel route that walks
through the hospital and passes through each doorway without passing through any doorway
twice. The Eulerian Graph Theorem states that the graph is Eulerian because the vertices are of
degree 2 or 4, which is supported by the data. As a result, an Euler circuit can be found. That is,
if a person begins and ends in the same room, and if there is a path that allows the person to
visit each passage only once, the person is considered to be in the same room.
IGBALIC, KIMBERLY E.
BSPH 1D

o In this diagram, four vertices are odd degrees and three even degrees. Therefore, it is not the
Eulerian circuit nor Eulerian path. More so, it means that it is impossible to walk through the
hospital without going through any doorway twice. As such, it is also impossible to return to the
room you started since this is not an Eulerian circuit nor an Eulerian path.

AT 2: PH Travel Plan

Problem scenario: Juan wants to tour Philippine Islands. She will start and end his journey in Davao and
visit Cebu, Manila, Siargao, and Iloilo. The promo airfares available to him between places are given in
the table. Draw a weighted graph that represents the travel costs between places and use the greedy
algorithm and edge-picking algorithm to find a low-cost route.

Destinations Davao Cebu Manila Siargao Iloilo


Davao - Php 845 Php 1275 Php 470 Php 880
Cebu Php 845 - Php 320 Php 515 Php 340
Manila Php 1275 Php 320 - Php 520 Php 365
Siargao Php 470 Php 515 Php 520 - Php 225
IGBALIC, KIMBERLY E.
BSPH 1D

Iloilo → Siargao – 225 Siargao → Manila – 520

Manila → Cebu – 320 Cebu → Siargao - 515

Cebu → Iloilo – 340 Davao → Iloilo – 880

Manila → Iloilo – 365 Cebu → Davao - 845

Davao → Siargao - 470 Manila → Davao - 275

Route 1: Davao – Cebu – Manila – Iloilo – Sairgao

Davao → Cebu – 845

Cebu → Manila – 320

Manila → Iloilo – 365

Iloilo → Siargao – 225

Siargao → Davao – 470

= 2,225 Low travel cost value


IGBALIC, KIMBERLY E.
BSPH 1D

Route 2: Davao – Manila – Siargao – Cebu – Iloilo

Davao → Manila – 1275

Manila → Siargao – 520

Siargao → Cebu – 515

Cebu → Iloilo – 340

Iloilo → Davao – 880

= 3,530

Route 3: Davao – Iloilo – Cebu – Manila – Siargao

Davao → Iloilo – 880

Iloilo → Cebu – 340

Cebu → Manila – 320

Manila → Siargao – 520

Siargao → Davao – 470

= 2,530

Refers to the weighted graph above:

GREEDY ALGORITHM:

Davao – Sairgao – Iloilo – Cebu – Manila – Davao

EDGE-PICKING ALGORITHM

Sairgao – Iloilo – Cebu – Manila – Davao - Siargao

You might also like