Students are shown the idea of binary search. The idea is based on human robots -exercise.
| Creator | Mikko Muilu |
| Subject | Math, ICT |
| Length | 45 minutes |
| Pedagogical Approach | Problem based learning |
| Competences | Students learn to: understand what a binary search algorithm is and when it should be used |
| Grades | Students aged 9-12. |
| Technologies | A stack of numbered cards has to be preprinted and put in order in a string. String holds cards in order and helps with reuse. (PDF) This requires some time and should be done in advance. Once done, it can be reused. |
Introduction: Teacher presents the stack to the students and tells students to write instructions to the human robot to find a specific number from the 512 numbers in the stack. The instructions have to work every time. Every time the robot looks at a number in the stack, they add one to the count.
Αctivity 1: Students create their own tactics for the human robot and give orders to their friends to use. The robot picks up a random number and tries to find it. Every time they look at a number, counter goes up. (30 minutes)
Discussion: When all students have tried out finding their number at least once, they can be asked if they came up with a tactic that is working better. Teacher introduces the idea of binary search. (video)
(15 minutes)
Αctivity 2: Students try out binary search and write down the counts. What is the largest number the counter goes up to? (As much time as wanted. few minutes / search)
Discussion: How high does the counter go? Can anyone think of a number that takes more than 9 card lookups? Why? (10 minutes)

