Sort & Search Algorithms in Kumamoto

Introduction

SIJP has been teaching computer science in Seattle as well as livesteaming to Kumamoto and Fukuoka, Japan using Youtube. This summer, the leading teacher, Kenji Imasaki visited Kumamoto to hold a special class for the native students.

On July 21st, Kenji with the help of many volunteers, hosted SIJP’s Computer Science class in English at Kumamoto National Institute of Technology. The theme was “Sort and Search Algorithms.

Assignments

They prepared two assignments ahead of class as practice for the students.

“This is me” video

To practice recording timestamps of video, they prepared the following Seesaw activity for the video.

 

“This is me” Activity” (you can click the image to use this activity in your Seesaw class)

 

Using the following Youtube video

(Kenji included this video to show his love for this song and the movie, “The Greatest Showman”. He wants students to know that they should not be afraid to show who they are)

This activity is for students to practice recording timestamps. Every time they hear “This is me” in the video, the students will record the displayed timestamp in seek bar. This will be a necessary skill for the Binary Search activity “Who stole my KitKat” later on in class. In that activity, the students will perform the similar action of recording the timestamp to find who/when stole the KitKat using the binary search algorithm.

Bubble sort

We prepared optional assignments relating to bubble sort.

Record bubble sort with your friends 

Bubble Sort Activity (you can click the image to use this activity in your Seesaw class)

We received two submissions, one of them creatively used stuffed animals to represent the sorting algorithm.

Bubble sort using playing cards

We also asked students to use playing cards

Bubble Sort Activity (you can click the image to use this activity in your Seesaw class)

Here is one of students submission:

quick sort with playing cards

As another option, we asked students to work on quick sort as homework. One of students submission was:

We were pleasantly surprised by the students’ engagements BEFORE the class.


Ice-breakers

The class started off with an icebreaker, where kids were asked  to create a self-introduction video and upload it to Seesaw. Here is what we did:

  1. Form a group of four
  2. Assign numbers 1,2,3,4 to each student in the group
  3. Student 1 becomes presenter
  4. Student 2 becomes cameraman
  5. upload the video to Seesaw
  6. repeat step 3 and step 4, but Student 2 becomes presenter and Student 3 becomes cameraman

Self Introduction Activity (you can click the image to use this activity in your Seesaw class)

Sorting Algorithms

After Kenji introduced himself, he explained what sorting is, its significance, and when and how it is used. The purpose of the sorting is to make it easy to find the item that you are looking for.


When we need sorting : The game of sequence

 

Then, we moved onto to the Kahoot sorting game.

https://play.kahoot.it/#/k/6ca44c30-661a-46aa-bf85-fe5f549269cf

Students came to front and formed a line to play Kahoot.

 

Afterwards, the students worked on bubble sort. They formed two teams and raced each other to see which group was able to bubble sort by height in a shorter amount of time.

 

Then, Kenji called for volunteers to do bubble sort on 100 cards. If anyone was able to sort the cards in under a minute, Kenji offered to give a free plane ticket to the United States.

Students are trying to bubble sort 100 cards in 1 minute

Before the beginning of class, our staff created special cards using the following labels and playing cards.

Special playing cards that are made for sorting

 

It turned out that none of the brave challengers were able to do it. They were sad that they couldn’t accomplish it. Kenji, then, explained why it is impossible.

The number of comparison needed to execute bubble sort with n cards is: n*(n-1)/2

So, if you have 100 cards, you would have to do 100*99/2=4950 comparison. To finish it in 1 minute (60 seconds), you have to do 4950/60 = 82.5 comparison per second! It is humanly impossible to do so.

They needed a new algorithm! This is when Kenji tried to introduce quicksort. However, before he could, the students needed to understand recursion and divide and conquer algorithm. Kenji used three examples to show the what recursion is. For the first example, he used Russian dolls (or Matryoshka doll)

An example of recursion: Russian dolls

For the second example, he used the Droste effect (Pinterest), which can be generated when you place two mirrors facing each other.

 

The last one was broccoli which is also known as a fractal vegetable. When you tear them apart, you’ll find that the smaller parts look identical to the big whole you once had, just smaller.

An example of recursion: broccoli

Kenj also talked about divide-and-conquer by breaking down the idea of “How to become a Youtuber”. At first glance, becoming a Youtuber looks really hard. However, if you can break down that big goal into smaller tasks(divide) and accomplish each of these smaller tasks(conquer), the whole process becomes easier.

  1. Record an interesting video
  2. Edit the video
  3. Upload it to youtube
  4. Set up Channel
  5. Ask people to subscribe the channel
  6. Create more videos

Then, we showed the steps of quick sort algorithm, which uses recursion (or divide and conquer).

  1. Take the first item.
  2. Move everything less than that first item to the left of it, everything greater to the right (assuming ascending order).
  3. Recurse on each side. (Recursion)

The following video shows the recursive quicksort algorithm step by step. (Note: Video is in Japanese).

Using the video as a guide, Kenji asked kids and parents do the same and here are the results.

Kids and parents sorted by ascending height after quicksort.

They then, tried quicksort using playing cards.

First, Kenji demonstrated how sorting 9 cards would occur. Then, the whole class worked on sorting 100 cards using quicksort.

By working together, they quickly learned that quicksort could be done in parallel.

Quick sort 100 cards by parallel

During the break, the kids enjoyed experiencing Oculus Go that Kenji brought.

Search Algorithms

Kenji explained search algorithms as:

Search is used in websites like, Google as well as tools like, Google Photo, which is backed up by AI. We use searches all the time. For example, Kenji was looking for Ayu fish pictures just the other day. He found tons of pictures right away, thanks to search algorithms.

Search key can be :

  • Number (Phone number, Social security number ….)
  • String (Name, keyword, object names recognized by AI)
  • Address (Google Map)

Then, to learn binary search algorithm, we used the following Security video

Then, we try to find who stole Kitkat from my video using binary search.

The seesaw activity is:

 

Binary search Activity “Who stole my Kitkat?” (you can click the image to use this activity in your Seesaw class)

After that, we used 100 sorted playing cards from previous section. We did the following:

  1. Take out 10 random cards from the cards cards
  2. Kenji asked to find a number that are still on the table
  3. Count the number of tries
  4. Kenji asked to find a number that are not on the table (the card that are taken out in step 1)
  5. Count the number of tries and compare it when the cards are not sorted

Feedback

Kids

Evaluation

Kid’s Evaluation (5 being best)

 

Comments

Good
  • Kenji’s talk is very interesting. Staff is very kind
  • Very easy to understand
  • Enjoyed Kahoot quiz show
  • Fun
  • Enjoyed learning bubble sort and other algorithms together

 

Improvements
  • Separate elementary kids and junior high
  • Increase the number of quiz

Parents

Evaluation

Parent’s Evaluation (5 being best)

Comments

 

Good
  • Enjoyed ice-breaking activities
  • Algorithms are easy to understand
  • Kids are influenced by Kenji’s passion
  • Staff’s support

 

Improvements
  • Net environment
  • Too long (need two breaks)
  • Could not experienced VR
  • Preparation was not enough

 

We are planning to hold class in October, November, December. Stay tuned!