The STEM Methodology and Graph Theory: Some Practical Examples
Abstract
:1. Introduction
2. Preliminaries
3. Real-World Problems via Shortest Path Algorithms
- (a)
- Can you find a route from A to S with the lowest gasoil consumption?
- (b)
- Is there a route that allows the photographer to go from A to S without having to carry a gasoil can? If there is more than one, which route uses the least amount of fuel?
- (a)
- The problem consists of finding the path from A to S for which we need the least gasoil consumption. Since the weights are all positive, this example serve to introduce Dijkstra’s algorithm for obtaining the path of minimum weight from A to S, which corresponds to route with a gasoil consumption of 29 L. Since the capacity of the jeep is 40 L, the photographer will arrive at city S without any problem;
- (b)
- In this new situation, we consider again the weighted graph from Figure 2. From the results obtained in Section (a), there is no possibility to travel from A to S directly without refueling due to the new car’s capacity since the shortest route from A to S needs 29 L of gasoil.The problem can be analyzed as follows. We must first look for the shortest paths to all gas stations from A and analyze which of these paths are feasible. Then, in the second stage, we consider whether it is possible to reach the gas stations not reached in the previous stage by considering another path different from the shortest one. Finally, in the third stage, we look for the shortest paths from the reachable gas stations to S. Below, we explain in detail the development of these steps, pointing out the hints, clues, or observations that we use to guide the students, helping them to solve the problem.First stage:We first apply Dijkstra’s algorithm to graph G to determine the path with the lowest weight from A to the towns with a gas station, that is , and M. The result of applying it is:
- –
- with weight ;
- –
- with weight ;
- –
- with weight ;
- –
- with weight ;
- –
- with weight .
Observe that the photographer can go to E without any problem since the gasoil consumption for the route is 16 L. At this moment, we ask the students if it is sufficient to check if the gasoil consumption of the obtained paths is greater than 20 to discard them. We have to try to make them realize they have to analyze among all the routes those that contain an intermediate gas station.Indeed, the routes and contain intermediate gas stations. Therefore, we must study the two paths in which each gas station divides the route. In the case of , the path has a weight of 16 L and has a weight of 18 L. Consequently, that route will be possible since the photographer can refuel in city E despite . Conversely, the route will not be possible since , butTo sum up, we can reach E and F considering the paths and with weights and .Second stage:Before further solving the problem, we point out to the students that the shortest path from A to S does not need to be the concatenation of the shortest one from A to a gas station together with the shortest path from it to S.The shortest paths from A to I and K provided by Dijkstra’s algorithm do not contain any intermediate gas station, and they have a weight whose value is greater than 20. Consequently, I and K should be analyzed separately together with M since it could happen that by means of a longer route that included one of the gas stations E or F, it could be possible to reach them from A. We analyze them:- –
- Gas station I: Since the graph is nondirected, we encourage the students, instead of applying Dijkstra’s algorithm to the different gas stations from which I can be reached, to apply it to I to obtain the paths:
- *
- with weight ;
- *
- with weight .
We note that the paths we have to analyze are and . In the last one, to get to I, we pass through the intermediate gas station E. Therefore, to determine whether it is valid or not, we must analyze if the corresponding subroutes have a weight smaller than 20. Indeed, since and both paths and weigh less than 20, routes and will be possible. Since is shorter than , the shortest path that allows us to reach I from a gas station is with .Then, the shortest route from A to I will be with a consumption of 26 L; - –
- Gas station M: Following the same analysis as before, we look for the shortest paths from M to E and F. Applying Dijkstra’s algorithm, we obtain the following routes:
- *
- with weight ;
- *
- with weight .
Since the gasoil consumption along is greater than 20 L, this route will not be valid. On the other hand, , and then, cannot be considered. Consequently, the photographer will not be able to get from E or F to M; - –
- Gas station K: We observe that all the routes from E and F to K pass through A or S, so it will not be possible to move from them to K.
At this point, following the same reasoning stated at the beginning of Stage 2, we ask the students if there are alternative routes to reach M or K from I.The shortest route from I to M that does not pass through A or S is given by with . On the other hand, all routes from I to K pass through A or S, so we discard all of them.Combining all the previous results, the possible routes from A to a gas station are , , and with weights , and , respectively.Third stage:Finally, once we know the reachable gas stations, we ask the students how to obtain the solution of the problem.We must therefore find the shortest routes from the towns , and F to S. Therefore, since graph G is nondirected we can simply apply Dijkstra’s algorithm to S and obtain the shortest path to them:- –
- with weight ;
- –
- with weight ;
- –
- with weight .
Thus, all possible routes from A to S without the need to carry a gasoil can are , , and with weights , , andWe will clearly recommend the photographer take route because it is the least costly or, in other words, the one for which he will have to travel the least kilometers without having to carry the gasoil can.
- , and are replaced by a unique edge weighted with ;
- and are replaced by a unique edge weighted with 22.
4. Conclusions
Author Contributions
Funding
Acknowledgments
Conflicts of Interest
References
- Blinov, M.L.; Yang, J.; Faeder, J.R.; Hlavacek, W.S. Graph Theory for Rule-Based Modeling of Biochemical Networks. In Transactions on Computational Systems Biology VII; Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2006; Volume 4230. [Google Scholar]
- Huber, W.; Carey, V.J.; Long, L.; Falcon, S.; Gentleman, R. Graphs in molecular biology. BMC Bioinform. 2007, 8, S8. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Chen, W.-K. Graph Theory and Engineering Applications; World Scientific Publishing: Singapore, 1997. [Google Scholar]
- Conejero, J.A.; Jordán, C.; Sanabria-Codesal, E. A tree-based model for setting optimal train fare zones. Math. Probl. Eng. 2014, 214, 384321. [Google Scholar] [CrossRef]
- Costa, P.C.S.; Evangelista, J.S.; Leal, I.; Miranda, P.C.M.L. Chemical Graph Theory for Property Modeling in QSAR and QSPR—Charming QSAR & QSPR. Mathematics 2021, 9, 60. [Google Scholar]
- Machado, J.A.T.; Mata, M.E. A fractional perspective to the bond graph modeling of world economies. Nonlinear Dyn. 2015, 80, 1839–1852. [Google Scholar] [CrossRef] [Green Version]
- Pedroche, F. A model to classify users of social networks based on pagerank. Int. J. Bifurc. Chaos 2012, 22, 1250162. [Google Scholar] [CrossRef]
- Pérez-Benito, C.; Morillas, S.; Jordán, C.; Conejero, J.A. A model based on local graphs for colour images and its application for Gaussian noise smoothing. J. Comput. Appl. Math. 2018, 330, 955–964. [Google Scholar] [CrossRef]
- Chai, A.; Le, J.P.; Lee, A.S.; Lo, S.M. Applying Graph Theory to Examine the Dynamics of Student Discussions in Small-Group Learning. CBE-Life Sci. Educ. 2019, 18, ar29. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Ramle, R.; Rosli, D.I.; Nathan, S.S.; Berahim, M. Question-led approach in designing Dijkstra algorithm game-based learning: A pilot study. Int. J. Eval. Res. Educ. 2020, 9, 926–933. [Google Scholar] [CrossRef]
- Sánchez-Torrubia, M.G.; Torres-Blanc, C.; Lopez-Martinez, M.A. PathFinder: A Visualization eMathTeacher for Actively Learning Dijkstra’s Algorithm. Electron. Notes Theor. Comput. Sci. 2009, 224, 151–158. [Google Scholar] [CrossRef] [Green Version]
- Chen, P.; Chiou, P.; Young, G. A Study of Learning Effectiveness on the Dijkstra’s Algorithm Modeled in an Interactive KLA Approach. In Proceedings of the 13th International Conference on Frontiers in Education: Computer Science and Computer Engineering (FECS’17), Las Vegas, NV, USA, 17–20 July 2017; pp. 234–238. [Google Scholar]
- Bang-Jensen, J.; Gutin, G. Digraphs-Theory, Algorithms and Applications; Springer: Berlin/Heidelberg, Germany, 2002. [Google Scholar]
- Chartrand, G.; Oellerman, O.R. Applied and Algorithmic Graph Theory; McGraw Hill: New York, NY, USA, 1993. [Google Scholar]
- Gross, J.L.; Yellen, J. Graph Theory and Its Applications; CRC Press: Boca Raton, FL, USA, 2006. [Google Scholar]
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Jordán, C.; Murillo-Arcila, M.; Torregrosa, J.R. The STEM Methodology and Graph Theory: Some Practical Examples. Mathematics 2021, 9, 3110. https://doi.org/10.3390/math9233110
Jordán C, Murillo-Arcila M, Torregrosa JR. The STEM Methodology and Graph Theory: Some Practical Examples. Mathematics. 2021; 9(23):3110. https://doi.org/10.3390/math9233110
Chicago/Turabian StyleJordán, Cristina, Marina Murillo-Arcila, and Juan R. Torregrosa. 2021. "The STEM Methodology and Graph Theory: Some Practical Examples" Mathematics 9, no. 23: 3110. https://doi.org/10.3390/math9233110
APA StyleJordán, C., Murillo-Arcila, M., & Torregrosa, J. R. (2021). The STEM Methodology and Graph Theory: Some Practical Examples. Mathematics, 9(23), 3110. https://doi.org/10.3390/math9233110