
Computers play an increasingly important role in mathematics and the converse is also true, old and new branches of mathematics are increasingly important in computer science. Traditionally, languages, science, and mathematics were the corner stones and the main tools in education to develop skills needed to understand the world. Obviously those shape our scientific thinking in a broad sense. The authors believe that more and more also a way of computational thinking is another pillar that should support our educational system. It relies on logic and mathematics and results in an algorithmic approach to problem solving. That involves not only a sequential description of successive steps, but it also includes abstraction and generalization (not solving a particular problem, but solve a whole class of similar problems), it requires checking all the details (no loose ends, and including also all the most unlikely situations), and it needs analysis, and it forces to look for optimal (shortest, fastest, ...) algorithms. Note that all these properties also apply to solving a mathematical problem. And yet there is a difference the authors claim. And I tend to agree, since indeed, I also have known students who were good in mathematics, and yet had difficulties to understand or assimilate an algorithm and others were marvelous computer programmers, but were very reluctant when mathematical theorems and proofs were involved.
The two authors of this book are mostly involved in education and with this book they want to illustrate what this computational thinking means outside the context of a lesson or a school environment. So they chose the subtitle ``Games, magic and puzzles to help become a computational thinker''. They obviously love magic and tricks and much of what they illustrate relies on these. Part of the text is based on their contributions to the online magazine Computer Science for Fun located at www.cs4fn.org.
They start with Jean-Dominique Bauby, editor in chief of the magazine Elle who, after a stroke, was completely paralyzed and could only blink with an eye. Solve the problem `What is the most efficient way for him to communicate?'. This leads to a binary search algorithm and efficient encoding of an alphabet based on a frequency analysis. Similar cutting of the problem in half at each step is illustrated with a card trick to predict the value of a card from a stack. It turns out that this also applies to mechanically selecting punched cards earmarked with a binary system of slits and holes.
Cut hive puzzles consist of a hexagonal grid partitioned in subsets each containing a number of neighboring cells. If such a subset had n cells, then the numbers 1,2,...,nneed to be placed in these cells, but no cells with the same number can touch each other. This involves not only designing the successive logical steps and rules of the type if... then... for a solution method but it also introduces another important element: patterns. Pattern matching and recognition is important for computational thinking.
Other puzzles are more like traveling salesman problems: visit a number of squares of a grid with knight moves, or visit a number of interesting tourist attractions in a city, or the classical Königsberg bridge problem. These require a clear representation of the data. In this case clarifying the problem structure via graphs.
Then a big leap is taken to artificial intelligence. How can a robot learn? Although they don't name it, they touch upon the basics of genetic algorithms, and discuss one of the earliest chatbot ELIZA, and the Turing test. A logical next step is to illustrate the idea of a simple neural network. Since it is a binary example, it also connects with logic binary circuits and simple Boole algebra. Again it is a big leap to then discuss the question if ever artificial intelligent robots or computers can take over our world. The authors reassure their readers that this will certainly never happen because the internet of things consists of things that are too different and moreover they do not have a reason to dominate the human race. So it would only be possible if we let them do it.
Here we are halfway through the book and here the authors take a step back and discuss some grid games. There is not only the grid of pixels on a screen, but more important is Conway's game of life, or the spit-not-so game. The latter is a game in which two players have to select words from a list until they have 3 words with the same letter in them.
The remaining chapters involve more tricks and magic using some simple mathematics and most of all pattern matching. For example patterns implied by prime numbers or detecting patterns in an image using simple digital filters, etc. But also the basic principles of CAT scans and MRI are explained. Psychological misleading or make-belief can help in tricks (a variant of the goat-rabbit-cabbage that have to cross the river, or visual illusions, or Weber's law). This is fun, but it seems not to be related to computational thinking, unless one tries to model the human brain and how it experiences its environment.
The authors conclude by summarizing what they find to be important for computational thinking. It is not only the algorithmic idea, but also modeling the problem and the situation based on scientific arguments, sometimes it requires heuristics, but logic and pattern matching are always important. The representation of the problem can be important to make abstractions and generalizations and it can help to decompose the problem into smaller subproblems. Of course computational problems arise by certain needs people have, so this interaction is also important, understanding what they want and evaluation of the resulting algorithmic product by collecting feedback from users are definitely of practical importance.
So, I believe it is clear what the authors want to convey to the reader: what is computational thinking and what is covered by that concept. It is certainly not thinking the way a computer thinks but it is linked with how humans function in everyday life, and how this can be transferred to a computational machine. It is however not so clear to me who they want to convey the message to. Are this the children who have to learn these skills? Are it the policy makers who have to define the education programs? Are it the generally interested readers? I believe they address all of them but do not really bring the message to any of them. There is too much magic, tricks, and puzzles to really bring the concepts to children, and they try to cover a really broad spectrum and they touch only superfluously on some topics. There are key words that keep appearing repeatedly typeset in bold in the text like: logic thinking, decomposition, algorithmic thinking, pattern matching, etc. but there is no systematic treatment. After reading the book it gives the impression that magicians must be the best computational thinkers, and you better start practicing card tricks before engaging in programming a computer. But I believe this is not what they had in mind.