Zhi Wei Gan '19

Why Algorithmic Thinking is Important in Computer Science Education

Image credit: University of Edinburgh

Python is used as an introductory language for computer science classes in many schools. With its easily understandable syntax and compatibility with almost any computing environment, Python is the perfect language for new programmers.

Other languages like C or C++ are not suitable for introductory courses as they vary across platforms, which makes it hard for instructors to teach a large class without hiccups. Even Donald Knuth, a renowned computer scientist, remarked, “C++ is too complicated. At the moment, it’s impossible for me to write portable code that I believe would work on lots of different systems, unless I avoid all exotic features.” He further commented that “to think of programming in C++” “would make him physically ill.”

However, for those who decide that an introductory computer science course is sufficient for what they plan to do in life, learning how to use Python through project-based work should not be the focus of their education. There’s a simple reason for this: programming languages change over time, so there is a high chance that code written 10 years ago would no longer run on a new version of the same programming language. Because of this, using class time to teach the syntax or advanced features of any language is not a productive use of time in an introductory course.

Instead, the reason for using Python as a primary language should be that it’s the optimal language for algorithmic thinking. Teaching algorithmic thinking allows students to practice logical thinking. To understand what algorithmic thinking is, one must first define what an algorithm is. According to the Oxford Dictionary, an algorithm is “a process or set of rules to be followed in calculations or other problem-solving operations.” Learning why those sets of rules are in place is the core of algorithmic thinking, for students would be able to create and apply their own algorithms without having to rely on code they found online. As a result, students would be less reliant on other sources of help, such as the Internet.

Outside of programming, algorithmic thinking has many applications. Divide and conquer, an algorithmic technique with applications ranging from sorting to proving mathematical claims, can be used to accomplish tasks in an organized and methodical manner. Using the task of “getting into your dream college” as an example, one could divide it up into smaller subproblems, like “getting better grades” and “starting a club.” Each one of these subproblems could then further be divided into more specific goals. These “mini-goals,” which are achievable within an immediate frame of time, include “doing homework during study hours” or “hanging out with Bob after the test, not before.”

Another algorithmic technique, dynamic programming also has real-life applications outside computer science and mathematics. A well-known dynamic programming problem is: If there are P items in a bucket and each of them has a price Q and size R, which items should one take to fit in a bag of size S such that they maximize the value of items in the bag? Contrary to intuition, progressively taking the items with the highest value would not yield maximum profits. This is because taking several smaller items with a smaller value can lead to a higher net value than taking one very large but costly item. The same concept can be applied to real life. The ‘greediest’ option might not be the best option. For example, continuously taking the shortest paths to get from point A to point B would clearly not yield the shortest path.

With a focus on algorithmic thinking, students would not only be more autonomous within the realm of computer science but also use this acquired skill set outside of class even for ideas that are simply intuitive. In this way, algorithms improve not only computers but hopefully also our daily lives.

comments powered by Disqus