Activity 3: Different Ways a Computer Sorts
Teaching students about sorting algorithms through hands-on activities.
Grade: 1
Grade: 2
Grade: 3
Grade: 4
Grade: 5
Grade: 6
Time: 30 Minutes
Description
Kids will learn about sorting by arranging numbered paper strips in order and using different sorting approaches that a computer can take.
Materials Required
- Paper pieces labelled 1-10
- Notebook & pen
Steps to Conduct the Activity
Step 1: Introduction
- Using paper pieces, label them from 1 to 10.
- Interact with students and ask why they think having things sorted and arranged can be useful.
- Explain the three different sorting methods we will be using: Bubble Sort, Selection Sort, and Insertion Sort.
Step 2: How Each Sorting Method Works
Bubble Sort
- Bubble Sort: Takes two adjacent pieces and compares them together, arranging them by swapping if they are in the wrong order.
- Lay out the numbered paper strips in a random order.
- Compare each pair of adjacent strips and swap them if they are in the wrong order.
- Repeat this process until the strips are sorted.
Reference video to be played before activity: Bubble Sort Algorithm
Selection Sort
- Selection Sort: Repeatedly finds the smallest item in the unsorted part and moves it to the end of the sorted part.
- Lay out the numbered paper strips in a random order.
- Find the smallest number among all the strips and move it to the first position.
- Find the next smallest number from the remaining strips and place it next to the first.
- Repeat until all strips are sorted.
Reference video to be played before activity: Selection Sort Algorithm
Insertion Sort
- Insertion Sort: Involves sorting one item at a time by comparing each new item with the items already sorted and inserting it in the correct position.
- Lay out the numbered paper strips in a random order.
- Start with the second strip and compare it to the first. Insert it in the correct position (before or after the first strip).
- Take the third strip and compare it to the already sorted strips, inserting it in the correct position.
- Repeat the process until all strips are sorted.
Reference video to be played before activity: Insertion Sort Algorithm
Reflection
- Gather back as a class and ask students which method took them the least amount of time to complete.
- If the answers vary, ask them why they felt that way.
Answers on Which Algorithm is Usually Faster
- Bubble Sort: Slow because it has to compare and swap a lot.
- Selection Sort: A little better than bubble sort but still has to make many comparisons.
- Insertion Sort: Often the fastest of the three for small lists because it finds the right spot for each item without many unnecessary moves.
Learning Outcomes
By the end of this activity, students should:
- Understand the basic concepts of sorting and why it is useful.
- Learn how to perform Bubble Sort, Selection Sort, and Insertion Sort.
- Recognize the differences in efficiency between the three sorting methods.