
Step 1įirst, I needed to know the names of the students that will play in the Math Pentathlon. Because I created a website, I used the PHP programming language.
#Round robin schedule creator code#
It required a number of steps to code the round robin algorithm. To create a website that pairs students without repeats, I had to create this round robin process in code. ROUND 1 ROUND 2 ROUND 3 ROUND 4 ROUND 5 Writing Code

ON PAPERīefore I started to code, here’s the round robin algorithm results for five rounds. For example, with 4 students, the pairs are (1, 2) (1, 3) and (1, 4) which is only 3 pairs, whereas 5 pairs for 5 rounds are needed. With 6 students, there are 5 possible different pairs, but with anything less you can not make 5 different pairs. The same pairs will not repeat unless there are less than 6 students. At the end, the schedule would look like this. This continues rotating for a total of 5 different rounds. Then, again, the players are paired across the polygon. So this pairsįor the second round, the players are rotated around the polygon leaving just one student in the center as a constant. Each point of the polygon will have a student number and the center of the polygon will have the first student.įor the first round, students are paired from across the polygon and the center student is paired with the highest point. The number of students must be an even number to ensure pairs with no left over students.įor example, with 10 students there will be 9 sides to the polygon, N-1 or 10-1. The number of sides is N-1, with N equal to the number of students. To pair a round robin tournament, draw a polygon and rotate the polygon. So with this algorithm, we can pair the players up without breaking this rule. In Math Pentathlon, two players can not play against each other more than once. This algorithm is perfect for the scheduler that I have created. The round robin tournament algorithm is an algorithm that pairs students up without repeating the same pair more than once. What HappenedĪt the end of the competition, all the points are added up and medals are awarded, depending on how many points each kid has collected. Kids gain points depending on their wins or losses. They have a monitor who watches the games and clarifies rules. At the tournament, each kid plays each game with different people they have never met. At the end of the Math Pentathlon season, there is a final tournament. The games are practiced as a team or individually. Juggle, Contig 60, Stars & Bars, Fab-A-Diffy, Queens & Guardsįrac Fact, Pent ‘Em In, Fraction Pinball, Prime Gold, Remainder Islands DivisonĬalla, Hex-A-Gon, Kings & Quadraphages, Shape-Up, Star Trackįiar, Kwatro-Sinko, Par 55, Ramrod, Sum Dominoes & Dice Each division has a set of five different games. Students are grouped into divisions based on their grades. Math pentathlon is a group of math and logical thinking related games. I hope this program will help many school Math Pentathlon leads.

One day, I saw him working on this pairing problem and thought, if a human can do this scheduling in 4 hours, can’t a computer do it in less time? So I started programming a website and, two years later, my website can schedule a mock tournament in 5 minutes. My dad worked long hours and stayed up late making schedules for the Math Pentathlon meetings.

After every round, we check that the same students aren’t paired up together again. Two students cannot be paired up more than once during competition. There are some rules to pairing up players. I never realized how much work this involved until my dad was the school lead and had to schedule the mock tournaments. Usually, the person in charge of Math Pentathlon, the school lead, does this work. To run smoothly, someone pairs the students up, assigns games, and assigns monitors. During the meetings, we played games like the final tournament, in a mock/model tournament. My school Math Pentathlon club met on weekends to practice games for the final tournament. How I solved Math Pentathlon scheduling with the round robin algorithm!įrom grades kindergarten through seventh, I played Math Pentathlon, a group of math and critical thinking games that is practiced and later played at a final tournament.
