Take two objects, show them to the class and ask comparison questions. Which one is taller, which one is heavier, etc. For example, a pencil, eraser, ruler, etc.
| Creator | Mikko Muilu |
| Subject | Math, ICT, physical education |
| Length | 45 minutes |
| Pedagogical Approach | Phenomenon-based learning |
| Competences | Students learn to compare objects and numbers |
| Grades | Students aged 9-12. |
| Technologies | Pen and paper |
Exercise 1:
Have the students draw a long and a short picture on paper. Have students compare the height and width of objects drawn by other students. Listen carefully and ask leading questions
Discussion:
After this first experiment, have students explain how they decided. He or she makes a decision based on observation or measuring heights, for example. Does he compare all the pictures at once or does he first compare two pictures in pairs and then decide.
After introducing the warm-up experiments, the next step is to let your student know that comparing and applying the bubble-sorting algorithm to other students.
Task 2:
Choose a volunteer to do the task. Ask your student to compare the heights of other students. You can use tape or post-it notes to write other students’ heights and stick them on the students’ chests. Ask other pupils to form a line. They do not have to be in any order. Watch to see if you change other students if they are in the wrong order.
Pay attention to how the volunteer solves the order problem. For example, if two students are in the wrong order, does the volunteer change them or keep them in their current position?
Discussion:
Explain the Bubble Sort algorithm.
Bubble Sort is the simplest sorting algorithm that works by repeatedly swapping adjacent elements if they are in the wrong order. This requires several passes through the row. This is not the most efficient sorting algorithm, but it is one of the easiest.
Based on this algorithm, the volunteer’s goal is to keep switching people and changing locations based on the bubble sort algorithm. In other words, the bubble sort algorithm works by having the learner start at the beginning and compare over and over again until people are in the correct order based on heights.
TODO: image
Example with numbers
First pass:
( 5 1 4 2 8 ) -> ( 1 5 4 2 8 ), Here the algorithm compares the first two elements and switches because 5 > 1.
( 1 5 4 2 8 ) -> ( 1 4 5 2 8 ), switching because 5 > 4.
( 1 4 5 2 8 ) -> ( 1 4 2 5 8 ), Switching because 5 > 2.
( 1 4 2 5 8 ) -> ( 1 4 2 5 8 ), Since these elements are already in order (8 > 5), the algorithm does not swap them.
Second pass:
( 1 4 2 5 8 ) -> ( 1 4 2 5 8 )
( 1 4 2 5 8 ) -> ( 1 2 4 5 8 ), Switching because 4 > 2.
( 1 2 4 5 8 ) -> ( 1 2 4 5 8 )
( 1 2 4 5 8 ) -> ( 1 2 4 5 8 )
Now the set is already sorted, but our algorithm doesn’t know if it is complete. The algorithm needs one complete pass without any switching to know that it is sorted.
Third pass:
( 1 2 4 5 8 ) -> ( 1 2 4 5 8 )
( 1 2 4 5 8 ) -> ( 1 2 4 5 8 )
( 1 2 4 5 8 ) -> ( 1 2 4 5 8 )
( 1 2 4 5 8 ) -> ( 1 2 4 5 8 )
Exercise 3: Sort the students’ heights/age/other characteristics using bubble sorting.
Discussion: are there easier ways to do this? How could students improve it?

