Graphical image of dots combined.

Why mathematics? Basic education, ChatGPT, and computer science for all

Photo of Peter Larsson.
Peter Larsson

Computers have become ubiquitous: we use them at home, school, work, and many of us carry one (smartphone) all the time. They consist of the visible hardware and the hidden software (programs) that governs them. ChatGPT [1] is a recent software innovation which promises to bring the benefits of Artificial Intelligence (AI) [2] to the masses. To understand these innovations requires knowledge of Computer Science (CS). CS for All [3] in USA or Informatics for All [4] in Europe is the idea that everybody needs to learn the basics of computing [5]. Countries are using two approaches: a separate school subject or integrating computing with existing subjects. In Finland computing is part of mathematics and crafts in basic education. This text tries to answer the question how mathematics can contribute to understanding computing.

CS was born from the need to calculate faster at the beginning of World War II and the solution was found in using electronics. These origins are still prominent, mathematics provides the principles for processing information and electronics have evolved to computing technology. The theoretical model of a computer predates the birth of the discipline, as early as 1936, a graduate student in mathematics Alan Turing created the first model of a general computing machine [6]. Turing modelled how a human calculates on paper. The human writing and reading symbols were replaced by the operation of a machine and thinking was simulated by explicit rules governing its operations. The rules could be used to define an algorithm for the machine in any area of mathematics. A layperson could perform the algorithm without any mathematical knowledge, it was enough that he knew how to operate the imaginary machine.

Finnish primary school pupils learn to follow and plan step-by-step instructions in mathematics. Later they use this analogy of an algorithm to write computer programs. In lower secondary school, the curriculum mentions algorithmic thinking in combination with programming. When pupils program more complex calculations, they need to think explicitly about the algorithms they implement. A human can use existing mathematical knowledge when learning to calculate in a new topic, but for a computer every step must be defined. An algorithm implemented as a program is controlling the features of the computer to change inputs to outputs. That this change has a meaning, that it provides information, is up to the programmer. Sometimes the focus of programming is more on the operation of the computer itself e.g., to display, store or transfer information.

Some problems are so complex that a human cannot design an algorithm to solve them. Machine learning is an AI technique where computers (their programs) learn the solutions themselves from enormous amounts of data (inputs). In one approach, the computer discovers data patterns independently. In another, humans curate the data to exemplify correct patterns. ChatGPT is a chatbot that uses AI to answer questions and maintaining a dialogue [7]. It combines the two previous models: it learns language patterns from texts and from humans it gets models for answering questions. This way of learning does not rely on absolute answers but probabilities [8]. Therefore, the program can generalize a set of question-and-answer pairs to similar type of questions. ChatGPT uses this model for choosing suitable text patterns to provide the answer even though the question might be one that it has not encountered before.

There is still a need for programmers to design algorithms. Any computer activity is based on algorithms and programs that implement them. Machine learning is also based on human ingenuity. During basic education it is important to not just write programs, but also to understand the nature of algorithms. Mathematics is the key to this understanding.

[Disclaimer: this text is 100% of human origin]

Peter Larsson
The writer is a doctoral researcher at the University of Turku in Doctoral Programme of Technology (Computing). His goal is to combine results from computing and mathematics education research to design a framework to support the teaching of programming in lower secondary school mathematics. The day job is at the University’s Digital Services.

REFERENCES

  1. OpenAI Inc. is the company that develops ChatGPT (https://openai.com)
  2. Artificial Intelligence entry in The Internet Encyclopedia of Philosophy (https://iep.utm.edu/artificial-intelligence/)
  3. USA: Computer Science for All (https://www.csforall.org)
  4. Europe: Informatics for All (https://informaticsforall.org)
  5. Definition of Computing in Wikipedia (https://en.wikipedia.org/wiki/Computing)
  6. An article in Quanta magazine about Alan Turing the inventor of the first mathematical model of a computer (https://www.quantamagazine.org/alan-turings-most-important-machine-was-never-built-20230503)
  7. What Is ChatGPT Doing … and Why Does It Work? (https://writings.stephenwolfram.com/2023/02/what-is-chatgpt-doing-and-why-does-it-work/)
  8. What can Large Language Models offer to linguists? (https://blog.oup.com/2023/06/what-can-large-language-models-offer-to-linguists/)