I have to teach algorithms? What the heck are algorithms?

Karen Cornelius
5 min readFeb 20, 2016

--

We are living in a world progressively more and more managed and organised by algorithms, and many of us are not even aware of it!

Have you used a phone book or dictionary?

Do you use an ATM?

Do you book holidays online?

Do you invest in stocks?

Do you search the internet with Google or another search engine?

Do you teach genre structures?

Guess what — there are algorithms involved in all of these and MANY more functions in our lives.

A friend was trying, unsuccessfully, to use the University website to enrol in subjects for his final year of study, a more complicated process than usual because he had credit to be applied from 2 other Universities. He was a little frustrated and said, ‘The darned algorithm can’t accommodate my credit’.

That had me thinking. We are absolutely surrounded by algorithms, yet most of us are not even sure what one is, let alone how ‘all pervasive’ they are.

So what is an algorithm?

In the broadest sense, an algorithm is a way to organise information for a purpose and/or analysis.

Algorithms give structure and repeatable form to events, actions and decisions.

Schooling systems across the globe now include algorithms, along with the new focus on coding and computational thinking, in curricula.

The Australian Curriculum defines an algorithm as: ‘Step-by-step procedures required to solve a problem’.

Wikipedia says that in mathematics and computer science, an algorithm is a self-contained step-by-step set of operations to be performed. Algorithms exist that perform calculation, data processing, and automated reasoning.

As an aside: the word algorithm comes from the name of the mathematician, Mohammed ibn-Musa al-Khwarizmi, who was part of the royal court in Baghdad around 800+AD.

Back to my ah ha moment listening to my friend. I realised that they were algorithms everywhere — in simple to incredibly complex forms.

Using a phone book, dictionary, library cataloguing system or calendar, following a recipe, filing, researching stock prices, and driving, are all examples of activities that use algorithms. There are logical steps to each of these processes. We don’t randomly start paging through a dictionary, we start at a place in the book that is as close as possible to the target word’s first letter, and we move backwards and forwards, systematically narrowing down the number of words to manually search for the target word. This is algorithmic thinking.

We not only use algorithms, we create them. Giving someone directions to find your house, developing a roster, drawing plans, scheduling, organising an event, and prioritising our workload are all examples of creating algorithms.

With the dramatic increase in ability to crunch data, we are seeing incredible escalations in the sophistication of the algorithms around us. Some examples:

  • Google pulls relevant responses to our search terms from billions of website possibilities — thanks to algorithms. How often do you go beyond the first page of search results these days? I remember trawling through 10–15 pages to find what I needed in early internet days, not any more.
  • Holiday bookings though Expedia, booking.com or other services coordinate flights, recommend accommodation and car hire and suggest tours, based on just one search request. Your follow-up emails (until you unsubscribe if you’re like me!) will continue to be shaped by your requests.
  • Police departments employ predictive policing or ‘Crush’, which stands for ‘Criminal Reduction Utilising Statistical History’ — algorithms again! Major campaigns such as the 4 August 2005 arrest of 1,200 criminals in 3 hours by the police department of Memphis, Tennessee have become very popular internationally.
  • Marketing has latched onto algorithms as a way to personalise and tailor the advertising we see in our browsing and social media use. Getting the right products close to the right people is efficient and profitable.
  • I’ve written in another blog post about my experience with Facebook. As I prepared to leave for Thailand to teach 3 years ago, my Facebook feed shifted to offer increasing numbers of travel and Thai posts. It wasn’t subtle, it happened in a flash. On deciding that I would return to Australia to set up Teacher Solutions, and searching for information about what was happening in education systems across the world, again my Facebook feed dramatically changed in focus.
  • Netflix offers up movie recommendations based on your viewing habits. Amazon offers products for sale based on your browsing and purchasing history. The ability to manage massive amounts of data, and to tailor responses with algorithms, has enabled these services to become much ‘smarter’ and more targeted.
  • Billions of shares move around the internet constantly, at incredible speed, driven by algorithms.
  • Cleaning robots, like ‘Roomba’, driven by algorithms, efficiently vacuum our floors. Soon our fridges will order replacement products from the supermarket for us! Slowly but surely our lives will be managed by more algorithms.

There are scientists and mathematicians who are concerned about how unaware we are of the sea of algorithms surrounding us. Kevin Slavin’s 2011 TED talk is worth hearing if you’d like to know more about this.

Our young people must understand algorithms and be practised in the thinking that creates them.

The Australian Curriculum calls for us to teach algorithms from the first years of school.

F-2 examples:

•experimenting with very simple, step-by-step procedures to explore programmable devices, for example providing instructions to physical or virtual objects or robotic devices to move in an intended manner, such as following a path around the classroom

•recognising sequences of instructions or events that are commonly experienced such as the sequence of traffic lights or instructions for recording a TV show or how their lunch order is taken and delivered

Year 3–4 examples:

•describing, using drawings, pictures and text, the sequence of steps and decisions in a solution, for example to show the order of events in a game and the decisions that a player must make

•defining and describing the sequence of steps needed to incorporate multiple types of data in a solution, for example sequencing the steps in selecting and downloading images and audio to create a book trailer

Year 5–6 examples:

•following, modifying and describing the design of a game involving simple algorithms represented diagrammatically or in English, for example creating a flowchart with software that uses symbols to show decisions, processes and inputs and outputs

•experimenting with different ways of representing an instruction to make a choice, for example branches in a tree diagram or using an ‘IF’ statement (a common statement used to branch) to indicate making a choice between two different circumstances using a spreadsheet or a visual program

Year 7–8 examples:

•investigating and designing some common algorithms, such as to search, sequence, sort, merge, control data structures

•checking the accuracy of an algorithm before it is implemented, for example desk checking it with test data to see if the instructions produce the expected results

In a world awash with algorithms, learning where they are, how they are used, and how to create them are critical future skills for our young people. We need to empower young people to be agile computational thinkers, and using and creating algorithms is a key part of this process. Good luck!

--

--

Karen Cornelius

I'm a passionate educator. You’ll learn more about me and my doctoral study on student voice at studentvoice.space — my research website.