0.1 Why I wrote this book
This book is inspired by boredom and fascination: boredom with the
usual presentation of data structures and algorithms, and
fascination with complex systems. The problem with data structures
is that they are often taught without a motivating context; the
problem with complexity science is that it is usually not taught at
In 2005 I developed a new class at Olin College where students read
about topics in complexity, implement experiments in Python, and learn
about algorithms and data structures. I wrote the first draft of this
book when I taught the class again in 2008.
For the third offering, in 2011, I prepared the book for publication
and invited the students to submit their work, in the form of case
studies, for inclusion in the book. I recruited 9 professors at Olin
to serve as a program committee and choose the reports that were ready
for publication. The case studies that met the standard are included
in this book. For the next edition, we invite additional submissions
from readers (see Appendix A).
0.2 Suggestions for teachers
This book is intended as a scaffold for an intermediate-level college
class in Python programming and algorithms. My class uses the following
- Complexity science is a collection of diverse topics.
There are many interconnections, but it takes time to see them. To
help students see the big picture, I give them readings from
popular presentations of work in the field. My reading
list, and suggestions on how to use it, are in
- This book presents a series of exercises; many of
them ask students to reimplement seminal experiments and extend
them. One of the attractions of complexity is that the
research frontier is accessible with moderate programming skills and
- The topics in this book raise questions in the
philosophy of science; these topics lend themselves to further
reading and classroom discussion.
- Case studies
- In my class, we spend almost half the semester on
case studies. Students participate in an idea generation process,
form teams, and work for 6-7 weeks on a series of experiments, then
present them in the form of a publishable 4-6 page report.
An outline of the course and my notes are available at
0.3 Suggestions for autodidacts
In 2009-10 I was a Visiting Scientist at Google, working in their
Cambridge office. One of the things that impressed me about the
software engineers I worked with was their broad intellectual
curiosity and drive to expand their knowledge and skills.
I hope this book helps people like them explore a set of topics
and ideas they might not encounter otherwise, practice programming
skills in Python, and learn more about data structures and
algorithms (or review material that might have been less engaging
the first time around).
Some features of this book intended for autodidacts are:
- Technical depth
- There are many books about complex systems,
but most are written for a popular audience. They usually skip the
technical details, which is frustrating for people who can handle
it. This book presents the mathematics and other technical content
you need to really understand this work.
- Further reading
- Throughout the book, I include pointers to
further reading, including original papers (most of which are
available electronically) and related articles from
Wikipedia1 and other sources.
- Exercises and (some) solutions
- For many of the exercises, I
provide code to get you started, and solutions if you get stuck or
want to compare your code to mine.
- Opportunity to contribute
- If you explore a topic not covered in
this book, reimplement an interesting experiment, or perform one of
your own, I invite you to submit a case study for possible inclusion
in the next edition of the book. See Appendix A for
This book will continue to be a work in progress. You can read
about ongoing developments at http://www.facebook.com/thinkcomplexity.
Allen B. Downey
Professor of Computer Science
Olin College of Engineering
If you have a suggestion or correction, please send email to
firstname.lastname@example.org. If I make a change based on your
feedback, I will add you to the contributor list
(unless you ask to be omitted).
If you include at least part of the sentence the
error appears in, that makes it easy for me to search. Page and
section numbers are fine, too, but not quite as easy to work with.
- Richard Hollands pointed out several typos.
- John Harley, Jeff Stanton, Colden Rouleau and
Keerthik Omanakuttan are Computational Modeling students who
pointed out typos.
- Muhammad Najmi bin Ahmad Zabidi caught some typos.
- Phillip Loh, Corey Dolphin, Noam Rubin and Julian Ceipek
found typos and made helpful suggestions.
- Jose Oscar Mur-Miranda found several typos.
- I am grateful to the program committee that read and selected
the case studies included in this book:
Sarah Spence Adams,
José Oscar Mur-Miranda,
Mark Somerville, and
- Sebastian Schöner sent two pages of typos!
- Jonathan Harford found a code error.
- Philipp Marek sent a number of corrections.
- Alex Hantman found a missing word.
Like this book?
Are you using one of our books in a class? We'd like to know
about it. Please consider filling out this short survey.