A Game for Learning How to Model in Graph Theory
Abstract
:1. Introduction
- Understanding of the problem.
- Simplification and structuring of the problem.
- Mathematization of the real problem.
- Math work using the right tools and skills.
- Analysis of the results.
- Validation of the results in the environment.
- Exposure of the found total or partial solution.
2. Preliminaries
3. A Teaching Proposal for Shortest Path Algorithms
- (i)
- Velatina travels at 6 km/h, and cannot travel more than 15 km without stopping at one of the inns along the route.
- (ii)
- Along certain trails there are lakes where Velatina stops for 10 min to drink, then jogs at 8 km/h up to the next crossroad.
- (iii)
- Elner loses as many points as the number of minutes he takes to travel each route on the map. However, he has the possibility of gaining points by transporting a package on certain routes, as shown in the Table 1:
- (iv)
- The inns are located on the boundaries of the feudal lords’ lands, and each time they pass through them Elner must pay the tax indicated in Table 2:
- (v)
- Each time Elner passes through an inn, Velatina can travel up to 15 km again.
- (vi)
- The routes , and are dangerous, and Elner will only risk going through them if he transports a package.
- (a)
- Help Elner determine the best possible route.
- (b)
- If Elner decided to avoid stopping at lakes in order to not lose points, what route would he would follow in this case? Is this route more advantageous than the one obtained in (a) above?
- (c)
- Elner manages to overcome the challenge with the maximum number of points possible, and in a later screen, he finds himself with the possibility of using the same map with the added restrictions that the routes and have become inaccessible. Is Elner able to make it from Rojcatar to Casue in these new circumstances? If yes, indicate the best possible route. Otherwise, another challenge must to be considered in order to move forward.
- (a)
- In this first section, the weighting is obtained by taking into account kilometers, taxes when leaving inns, stops at the lakes, and transporting of packages. More specifically, the weight of each arc is calculated as the sum of the following values:
- ⁃
- Considering that the average speed at which Velatina travels is 6 km/h, it takes 10 min to travel 1 km, which results in a weight of 10 points for each kilometer traveled.
- ⁃
- If, at vertex i, there is an inn that charges a tax of c points, (as shown in Table 2), then c points must be added to the weight of each arc .
- ⁃
- If there is a lake in the arc , the mare stops for 10 min, which is equivalent to a cost of 10 points. The average speed during the first half of the journey is then 6 km/h, that is, a consumption of 10 points per kilometer. During the second half of the route, following the indications of the problem, the average speed of Velatina is now 8 km/h, which is 7.5 points per kilometer traveled.
- ⁃
- The transport of packages involves a benefit and not consumption. In order to reflect the fact that this is a gain, we associate the b points obtained by transporting a package from i to j with a negative weight, , which is added to the weight of the arc .
We ask the students to observe that the final weight associated with each arc of the graph can be either positive or negative. From the above considerations, the students must construct the matrix of weights (points) C associated with the graph G (see Figure 3) shown below.We tell the students to approach the problem following an iterative process, taking into account that Velatina cannot travel more than 15 km without stopping at an inn.We must determine whether or not Casue is reachable from Rojcatar by a route of fewer than 15 km, which we call admissible. As our goal is to find the path from Rojcatar to Casue that consumes the least points, we must analyze the admissible paths from Rojcatar to the different inns. The process continues by obtaining the admissible routes from the inns reached in the previous iteration to Casue and the unreached inns. The iterative process ends when the only admissible paths from the reached inns are those leading to Casue. The path that consumes the least number of points can be obtained by comparing all of the routes obtained by the previous procedure.We point out to the students that in order to take into account the restriction on the maximum 15 km to be traveled without resting, a matrix of weights K must be constructed where the position corresponds to the number of kilometers between i and j.Next, we develop the solution to the problem, paying special attention to those details that should be emphasized to help students solve it.First stageFirst, we ask the students which problem in the context of graph theory corresponds to the question posed about determining the best possible path. Bearing in mind that this path is the one that minimizes the number of points consumed, the students should identify that the objective is to find the path of minimum cost (usually called the shortest path) while taking into account the given constraints.The first of these states that Velatina cannot travel more than 15 km without stopping at an inn; thus, we have to start by determining whether Casue and any of the inns are accessible from Rojcatar by an admisssible path. In order to do this while taking into account that all of the weights (kilometers) are positive, we apply Dijkstra’s algorithm to vertex 0 with the matrix of weights K. After applying this algorithm, we can observe that the shortest path from the origin vertex to our destination (vertex 13) has a weight of 25 km, and cannot be reached without stopping at inns. On the other hand, we can reach the inns located at vertices 6, 9, and 16 in 9, 13, and 4.4 km, respectively. We discard inns 10 and 15 because the distance from Rojcatar to them is 16 and 15.5 km, respectively.We ask the students whether the shortest paths provided by Dijkstra’s algorithm necessarily correspond to those that minimize the number of points consumed. They should realize that the answer is negative because the latter path has to be calculated by considering the weights of the matrix of points C.Before calculating these paths, we emphasize that matrix C has negative values, and therefore Dijkstra’s algorithm is not applicable. It is therefore necessary to make use of the Bellman–Ford or Floyd–Warshall algorithm. Applying one of these algorithms to vertex 0, we can find that the shortest paths to the inns located at vertices 6, 9, and 16 are:- ⁃
- To the one located in vertex 16: 0-1-16 with a weight of 49 points and 4.4 km.
- ⁃
- To the one located in vertex 9: 0-2-6-8-9 with a weight of 75 points and 14.5 km.
- ⁃
- To the one located in vertex 6: 0-2-6 with a weight of 18 points and 9 km.
We note that certain paths provided by the Bellman–Ford algorithm may not be admissible because they are longer than 15 km; therefore, these are not considered in the present analysis. In that case, a combinatorial study comparing all of the possibilities should be made.Second stageAs in the previous stage, when looking for the shortest paths in kilometers we apply Dijkstra’s algorithm, considering matrix K, to each of vertices 6, 9, and 16 to reach Casue (vertex 13) directly or any of the inns not reached in the previous stage. In this way, we obtain the following paths:- ⁃
- From the inn located in vertex 6:
- *
- To the inn located in vertex 10: 6-8-10 (7 km)
- *
- To the inn located in vertex 15: 6-3-15 (19.5 Km)
- *
- To Casue: 6-8-9-12-13 (22.5 km)
- ⁃
- From the inn located in vertex 9:
- *
- To the inn located in vertex 10: 9-8-10 (8.5 km)
- *
- To the inn located in vertex 15: 9-3-15 (20.5 Km)
- *
- To Casue: 9-12-13 (17 km)
- ⁃
- From the inn located in vertex 16:
- *
- To the inn located in vertex 10: 16-4-10 (14.5 km)
- *
- To the inn located in vertex 15: 16-1-0-14-15 (19.9 Km)
- *
- To Casue: 16-4-10-13 (26.5 km)
We have highlighted in bold all admissible paths with weightings of fewer than 15 km. We point out to the students that it is not necessary to perform the above study between the already-reached inns i and j; the shortest path from the origin vertex 0 to an inn i concatenated with the shortest path from inn i to j cannot be shorter than the one provided by Dijkstra’s algorithm from 0 to j, as the weights are positive.Following the same reasoning as in the previous stage, we can apply the Bellman–Ford algorithm using the matrix C to obtain the shortest paths in points from vertices 6, 9, and 16 to 10, which weigh less than 15 km, obtaining:- ⁃
- From the inn located in 6 up to the one in vertex 10: 6-8-10 with a weight of 75 points and 7 km.
- ⁃
- From the inn located in 9 up to the one in vertex 10: 9-8-10 with a weight of 65 points and 8.5 km.
- ⁃
- From the inn located in 16 up to the one in vertex 10: 16-4-10 with a weight of 36 points and 14.5 km.
We note now that there are no inns left to reach, and the only viable option is to find a route less than 15 km to Casue from inn 10.We now ask the students whether searching for the best path in points is sufficient to consider the shortest of those routes obtained in the first stage concatenated with the shortest path from the second one. We ask them to think of the fact that the answer is negative. For instance, the shortest path in points obtained in the first stage is the one from 0 to 6 with 18 points, which, concatenated with path 6-10, weighs 93 points. However, if the paths 0-16 and 16-10 are concatenated the total weight is 85 points.Third stageAt this point, students should be able to continue solving the problem by reasoning as before. Specifically, they must apply Dijkstra’s algorithm to obtain the shortest path (in km) from vertex 10 to Casue (vertex 13). The result is path 10-13 of 12 km. Observing that this path is admissible, they should apply the Bellman–Ford algorithm again to obtain the shortest path from 10 to 13 by considering matrix C. This algorithm again provides the admissible path 10-13 with a weight of 118 points.We ask the students which are the possible routes from Rojcatar to Casue. The answer should be:- ⁃
- The path 0-2-6-8-10-13, as a result of the concatenation of the paths 0-2-6, 6-8-10, and 10-13, with a cost of 211 (18 + 75 + 118) points.
- ⁃
- The path 0-2-6-8-9-8-10-13, as a result of the concatenation of the paths 0-2-6-8-9, 9-8-10, and 10-13, with a cost of 258 (75 + 65 + 118) points.
- ⁃
- The path 0-1-16-4-10-13, as a result of the concatenation of the paths 0-1-16, 16-4-10, and 10-13, with a cost of 203 (49 + 36 + 118) points.
Therefore, the best possible route is the path 0-1-16-4-10-13, with a cost of 203 points; when taking this route, upon arriving in Casue the player has 297 points to buy supplies at the village store. - (b)
- The students should be able to solve this section after the study carried out in section (a). The new cost matrix includes only the package constraints, not the lake ones. Because Elner does not stop at lakes, the weights of the edges containing a lake should be obtained only by considering their distance in kilometers and whether a package is transported from one end to the other. The new cost matrix matches C from the previous section, except for the and entries, which change from being 27.5 to 20, the entry, which changes from 118 to 123, and the entry, which changes from 115 to 120. The and edges keep the same weight, 80.The procedure from section is repeated, obtaining the same paths again except with different weights. In this case, the admissible paths from Rojcatar to Casue without stopping at lakes are:
- ⁃
- The path 0-2-6-8-10-13, as a result of the concatenation of the paths 0-2-6, 6-8-10, and 10-13, with a cost of 213 (18 + 75 + 120) points.
- ⁃
- The path 0-2-6-8-9-8-10-13, as a result of the concatenation of the paths 0-2-6-8-9, 9-8-10, and 10-13, with a cost of 260 (75 + 65 + 120) points.
- ⁃
- The path 0-1-16-4-10-13, as a result of the concatenation of the paths 0-1-16, 16-4-10, and 10-13, with a cost of 205 (49 + 36 + 120) points.
Therefore, the path Elner should take is 0-1-16-4-10-13, arriving at Casue with 295 points. Although intuitively one might think that not letting Velatina rest at the lakes would decrease the number of points spent, this is not true. - (c)
- This section aims to check whether the students have assimilated the techniques, algorithms, and reasoning used in the previous sections. In this case, the matrices to be used to find the costs in points and kilometers coincide with the matrices C and K from section (a), except for the entries , and , which are weighted with ∞.On this occasion, we now include a new question related to reachability in graph theory: whether vertex 13 (Casue) can be reached from vertex 0 (Rojcatar). Although this question is solvable using Dijkstra’s algorithm, as the weights are all positive, it is convenient to remind the students that using one of the BFS or DFS search algorithms is more appropriate as their complexity is and that of Dijkstra’s algorithm is . The application, for example, of the BFS algorithm provides the path 0-3-9-12-13.After following the same reasoning as in section (a), the following results are obtained:In the first stage, the inns accessible from the origin vertex are:
- ⁃
- The inn located at vertex 9: 0-2-6-8-9, with a weight of 75 points and 14.5 km.
- ⁃
- The inn located at vertex 6: 0-2-6, with a weight of 18 points and 9 km.
In the second stage, we conclude that the only inn accessible from 6 and 9 is the one located in vertex 10, reached via the following paths:- ⁃
- From the inn located in 6 up to the one in vertex 10: 6-8-10, with a weight of 75 points and 7 km.
- ⁃
- From the inn located in 9 up to the one in vertex 10: 9-8-10, with a weight of 65 points and 8.5 km.
We note that there are no inns left to reach; thus, the only viable option is to find the shortest path of less than 15 km from the inn located in vertex 10 to Casue.Applying Dijkstra’s algorithm to obtain this path using matrix K, we obtain 10-8-9-12-13, with a weight of 25.5 km. The students must conclude that Elner cannot reach Casue with his mare Velatina from Rojcatar due to the constraints of the game. Therefore, Elner must perform an alternative challenge to continue his adventure.
4. Students’ Feedback about Modeling with Graphs
- I found the modeling interesting, and it has helped me to understand graph theory better.
- The methodology applied in the course was adequate.
- The proposed exercises and tasks have helped improve my learning.
- The realization of graph modeling problems has seemed to be a very interesting aspect because they help understand concepts and put into practice the knowledge acquired.
- I have found graphs very interesting. I think I have assimilated and understood all the concepts that have been taught in the course.
- The learning methodology used is useful since I consider that I know how to pose, identify and solve graph problems.
- I liked the graph theory quite a lot, both for the enjoyable aspect of some problems and for the real applications.
- I think that problem modeling methodology helps students a lot and is a great tool to assimilate theoretical concepts through practice.
- I found the graph exercises very interesting and important to know the real application of the algorithms, etc.
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Conflicts of Interest
References
- Jordán, C.; Murillo-Arcila, M.; Torregrosa, J.R. The STEM Methodology and Graph Theory: Some Practical Examples. Mathematics 2021, 9, 3110. [Google Scholar] [CrossRef]
- 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.; López-Martínez, 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]
- Braicovich, T.; Cognigni, R.M. Coloreando la geografía del plano al toroide. Números 2011, 76, 135–148. [Google Scholar]
- Freudenthal, H. Why to teach mathematics so as to be useful. Educ. Stud. Math. 1968, 1, 3–8. [Google Scholar] [CrossRef]
- Blum, W.; Leiss, D. How do Students and Teachers Deal with Modelling Problems? In Mathematical Modelling: Education, Engineering and Economics; Haines, E.C., Galbraith, P., Blum, W., Khan, S., Eds.; Horwood: Chichester, UK, 2007; pp. 222–231. [Google Scholar]
- Ärlebäck, J.B. Exploring the Solving Process of Group Solving Realistic Fermi Problems from the Perspective of the Anthropological Theory of Didactics. In Proceedings of the Seventh Conference of European Research in Mathematics Education (CERME 7); Pytlak, M., Rowland, T., Swoboda, W., Eds.; CERME: Rzeszów, Poland, 2009; pp. 1010–1020. [Google Scholar]
- Blum, W.; Borromeo-Ferri, R. Mathematical Modelling: Can It Be Taught And Learnt? J. Math. Model. Appl. 2009, 1, 45–58. [Google Scholar]
- Gallart, C.; Ferrando, I.; García-Raffi, L.M. Implementación de Tareas de ModelizacióN Abiertas en el aula de Secundaria, AnáLisis Previo; González, E., Teresa, M., Myriam, C., David, A., Tomás, O., Eds.; Investigación en Educación Matemática; SEIEM: Salamanca, Spain, 2014; pp. 327–336. [Google Scholar]
- Jordán, C.; Murillo-Arcila, M.; Seoane-Sepúlveda, J.B. Teoría de Grafos y Modelización. Problemas Resueltos; Paraninfo: Madrid, Spain, 2022; ISBN 9788413679280. [Google Scholar]
- Barbosa, J. Modelagem e Modelos Matemáticos na Educação Científica. Alexandria Revista de Educação em Ciência e Tecnologia 2009, 2, 69–85. [Google Scholar]
- Lenz, L.; Stehling, V.; Richert, A.; Isenhardt, I.; Jeschke, S. Of Abstraction and Imagination: An Inventory-Taking on Gamification in Higher Education. In Proceedings of the 11th European Conference on Game-Based Learning (ECGBL), Graz, Austria, 5–6 October 2017. [Google Scholar]
- Cook-Chennault, K.; Villanueva Alarcón, I.; Jacob, G. Usefulness of Digital Serious Games in Engineering for Diverse Undergraduate Students. Educ. Sci. 2022, 12, 27. [Google Scholar] [CrossRef]
- Lameras, P.; Moumoutzis, N. Towards the gamification of inquiry-based flipped teaching of mathematics a conceptual analysis and framework. In Proceedings of the 2015 International Conference on Interactive Mobile Communication Technologies and Learning (IMCL), Thessaloniki, Greece, 19–20 November 2015; pp. 343–347. [Google Scholar]
- Kalogiannakis, M.; Papadakis, S.; Zourmpakis, A.-I. Gamification in Science Education. A Systematic Review of the Literature. Educ. Sci. 2021, 11, 22. [Google Scholar] [CrossRef]
- Sailer, M.; Homner, L. The Gamification of Learning: A Meta-analysis. Educ. Psychol. Rev. 2020, 32, 77–112. [Google Scholar] [CrossRef] [Green Version]
- Shurui, B.; Hew, K.F.; Huang, B. Does gamification improve student learning outcome? Evidence from a meta-analysis and synthesis of qualitative data in educational contexts. Educ. Res. Rev. 2020, 30, 100322. [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]
- Jordán, C.; Torregrosa, J.R. Introducción a la Teoría de Grafos y sus Algoritmos; Reverte-UPV: Valencia, Spain, 1996. [Google Scholar]
- Christofides, N. Graph Theory. Al Algorithmic Approach; Academic Press Inc.: Cambridge, MA, USA, 1986. [Google Scholar]
- Jordán, C.; Burriel, J.; Herráiz, R. Un problema a resolver con los algoritmos de caminos más cortos. Model. Sci. Educ. Learn. 2011, 4, 263–273. [Google Scholar] [CrossRef]
- Jordán, C.; Sanabria-Codesal, E. Aprendiendo a modelizar con grafos. Pensam. Mat. 2021, 11, 55–66. [Google Scholar]
- Chamorro Molina, J. Solving With Graphs 2.0. 2014. Available online: http://hdl.handle.net/10251/36155 (accessed on 1 June 2022).
Route | 2-6 | 3-15 | 5-6 | 9-8 | 12-11 | 16-4 |
Benefit | 72 | 90 | 107 | 25 | 48 | 117 |
Inn | 6 | 9 | 10 | 15 | 16 |
Tax | 2 | 5 | 3 | 10 | 5 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 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
Cordero, A.; Jordan, C.; Murillo-Arcila, M.; Sanabria-Codesal, E. A Game for Learning How to Model in Graph Theory. Mathematics 2022, 10, 1969. https://doi.org/10.3390/math10121969
Cordero A, Jordan C, Murillo-Arcila M, Sanabria-Codesal E. A Game for Learning How to Model in Graph Theory. Mathematics. 2022; 10(12):1969. https://doi.org/10.3390/math10121969
Chicago/Turabian StyleCordero, Alicia, Cristina Jordan, Marina Murillo-Arcila, and Esther Sanabria-Codesal. 2022. "A Game for Learning How to Model in Graph Theory" Mathematics 10, no. 12: 1969. https://doi.org/10.3390/math10121969
APA StyleCordero, A., Jordan, C., Murillo-Arcila, M., & Sanabria-Codesal, E. (2022). A Game for Learning How to Model in Graph Theory. Mathematics, 10(12), 1969. https://doi.org/10.3390/math10121969