The Science of Computation
A journey through the field of Computer Science
Preface
What is an algorithm? How does a computer work? Can computers do anything, or do they have inherent limitations? What is the Internet, and how can you stream videos from one side of the world to the other in almost real time? How is software made? What is artificial intelligence, and will it ever surpass us?
This book tries to answer these and many other, related questions. In the next few hundred pages, I’ll take you through a journey across the most important topics and themes in Computer Science. We will meet many of its most significant figures –from Alan Turing, Edger Djikstra, and Donald Knuth, to Geoffrey Hinton and Yann LeCunn– and see how they came up with some of the most brilliant ideas in the science of computation.
We will dive into some of the most fascinating discoveries in Computer Science, from the neural networks that power large language models, to the packet switching protocols that make the Internet possible. We will learn how computers work, in and out, why are they so powerful, but also what are their intrinsic limitations. In the end, you will gain a big-picture understanding of the whole field of Computer Science.
This book contains no complicated math or code. There are absolutely no prerequisites to read it, although it is perhaps better suited for high school-level students or older, because some concepts in Computer Science are somewhat sophisticated and rely on intuitions that students form around that age. It is also a perfect companion for a Computer Science major, as it complements the more theoretically- or technically-oriented bibliography you will encounter in college textbooks.
What you’ll find in this book
Computer Science is a relatively new field that emerged in the early 20th century from a massive effort to formalize Mathematics. However, it wasn’t until the mid-60s and early 70s that it gained recognition as a distinct and unique scientific field. This was achieved by establishing the theoretical grounds of computability and complexity theory, which proved there were many interesting, novel, and challenging scientific questions involving computation.
Despite its short time, Computer Science is an extensive field that encompasses a wide range of knowledge and skills. It goes from the most abstract concepts related to the nature of computable problems to the most practical considerations for developing useful software. To solve problems in this field, one must navigate through various levels of abstraction, making it challenging to provide a concise summary that the average reader can easily understand.
The fundamental concepts in Computer Science spread over a vast range of subjects, incorporating multiple areas of math and engineering. Thus it is impossible to divide this field objectively into subfields or separate areas with precise borders. In this book, I will attempt to categorize it into somewhat cohesive disciplines, but keep in mind there is considerable interconnectedness between them.
This book is divided into four parts, each subsequently divided into several chapters, encompassing all of Computer Science. The following sections will give you a taste of what you can find in each section and chapter. While the book is best read top-to-bottom—as some of the later ideas rely on earlier content—if you want to learn about a particular subject, feel free to hop and shop around. Whenever some earlier idea is important to understand what your reading, you will find useful links.
Foundations of Computation
We’ll start our journey by looking at the foundations of Computer Science. The fundamental question of Computer Science is something akin to “What kinds of problems can be solved with algorithms.” To understand this question, we will look at fundamental concepts that underpin the whole field of Computer Science. Moreover, solving a concrete Computer Science problem will often require using one or more algorithms. Hence, studying which specific algorithm can solve which concrete problem is a big part of Computer Science. While a comprehensive study of the most important algorithms in Computer Science is out of the scope of this book, in the final chapter of this first part, we will look at the basic ideas for designing and evaluating common algorithms.
Computational Systems
Mastering the foundations is not enough, though. Ultimately, we need a physical device that can run those algorithms and give us a result at a reasonable cost. Real computers are the physical embodiment of Turing machines, but the devil is in the details. Building a real computer is far more involved than just wiring some cables. Even assuming, as we do in CS, that electronic components always work as expected, the design of resilient computational systems is a whole discipline.
Software Engineering
Building software that works is extremely hard. It’s not enough to master all the algorithms, data structures, theorems, and protocols. Software products have unique qualities among all other engineering products, especially regarding flexibility and adaptability requirements. Any software that lives long enough will have to be changed in ways that weren’t predictable when the software was first conceived. This poses unique challenges to the engineering process of making software, the domain of Software Engineering. In the fourth part of the book, we will look at all the intricate components that participate in the process of getting an app ready for you to use.
Artificial Intelligence
Our final stop in this broad exploration of Computer Science, we will look at the amazing field of Artificial Intelligence. AI is a broad and loosely defined umbrella term encompassing different disciplines and approaches to designing and building computational systems that exhibit some form of intelligence. Examples of machines exhibiting intelligent behavior range from automatically proving new theorems to playing expert-level chess to self-driving cars to modern chatbots. We can cluster the different approaches in AI into three broad areas: knowledge, search, and learning.
What’s next?
Computer science is a vast field encompassing both theoretical and practical aspects. It goes from the most abstract computational concepts grounded in logic and mathematics to the most pragmatic applications based on solid engineering principles to frontier research like building intelligent systems. Working in CS also involves navigating complex social interactions between developers, users, and society and requires awareness of the many ethical issues that automation and computation pose.
Mastering computer science is a significant challenge, making it one of the most demanding academic pursuits. However, this discipline offers immense fulfillment since computation lies at the heart of our modern world. Software pervades all sectors and industries. Those proficient in computer science can find work across various disciplines and not only by creating commercial software. Across all scientific disciplines, from understanding the frontiers of space to solving climate change, designing new materials, and extending human life, every challenging problem in every scientific field has computational aspects that require collaboration between computer scientists and experts from that domain.
This book will not make you a computer scientist overnight. No book can. That requires years of learning and training. My purpose is much more humble. All I want is to light up your curiosity about these topics, and perhaps, motivate you to, one day, become a computer scientist yourself. At the very least, I hope that this book serves you to understand the where fundamental ideas in Computer Science come from, and how they permeate the technology you use every day, and shape the world you live in.
Once you finish this book, you will have an intuitive but solidly grounded understanding of the most important ideas in the vast field of Computer Science. But before we finish, we’ll have one final meetup. In the Epilogue, we will talk about what the near and not-so-near future holds for Computer Science, how we expect technology to change our society, and what can be your role in this future.
If any of that sounds intriguing, then read on!