Think Complexity: Exploring Complexity Science with Python
Allen B. Downey, Franklin W. Olin College of Engineering
Copyright Year: 2012
ISBN 13: 9781449314637
Publisher: Green Tea Press
Conditions of Use
It's difficult to be truly "comprehensive" in the field of Complexity, since it is so broad and so (relatively) new. An introductory text would do best to give the flavor of the field and enough interesting applications to pique the reader's... read more
It's difficult to be truly "comprehensive" in the field of Complexity, since it is so broad and so (relatively) new. An introductory text would do best to give the flavor of the field and enough interesting applications to pique the reader's interest, which this book does. This text's references to approachable works in related fields will be of great value to some readers; there aren't too many of them, and those I recognized are indeed accessible to the audiences who would read this book.
The content is accurate, error-free, and unbiased.
Coverage of the main topic itself ("Complexity") is general enough to stand the (immediate) test of time. The example code is unfortunately in Python 2, which is not forwards-compatible with Python 3 and which is (slowly) becoming obsolete. The book would benefit from upgrading to Python 3.
Overall, the presentation is exceptionally clear and accessible to an introductory audience. The author does a terrific job in making a potentially esoteric subject approachable and interesting. The text does assume a good deal of background knowledge, in a broad variety of subjects. To cite just one example, chapter 5 makes statements about "long tailed" and "short tailed" distributions without defining those terms. It seems unlikely to this reviewer that most computer science students would have previously encountered those terms, and remember them so well that not even a refresher is necessary. As another example, it is doubtful that many computer science students without a signal processing background could follow the arguments in chapter 9 (self-organized criticality) with just the information presented. In a few places, the text is a bit too terse. Having taught Dijkstra's shortest-path algorithm in a Discrete Math course, I doubt that the brief description of it in section 4.5 would be enough for most students to successfully implement it as the exercises call for. Similarly, few readers, no matter their background, could actually implement Schelling's segregation model (called for in exercise 10.1) with only the information given on p.91. Thus instructors should expect to provide their classes with significant additional explanation in resources in many cases. Chapter 5, which presents the concept of statistical distributions, is lacking figures that, in my mind, are crucial for understanding the difference between Gaussian, exponential, Pareto, etc. families. The exercises call for the reader to implement these from scratch and plot them, but even if most readers would actually follow-through on this, the text itself would be enormously enhanced by simply depicting a probability density function for each of the major distributions discussed. One might argue that casting Conway's Game of Life in terms of "convolution functions" obscures what is otherwise a natural and easy concept.
The text is internally consistent in terms of terminology and framework.
The chapters are very well-designed and modular. Instructors will have a good deal of flexibility in which chapters they choose to cover and in what order. All of the case studies at the end of the book could be adapted to make promising self-contained projects for students. For most of them, this will require some investment on the part of the instructor, as these appendices do a better job describing existing studies than they do giving guided instructions for writing one's own simulation. They are all quite well-written, however, and present intriguing problem areas.
Overall, the organization is quite strong. The text does occasionally wander into programming concepts that, while they would be interesting in a book about programming languages or Python idiosyncrasies, are a bit of a distraction from this book's stated context and purpose. The foray into iterators and generators in chapter 2 is an example, as are hashtables and list comprehensions from chapter 3. In places, the author calls for the reader to read something external (often a Wikipedia article; sometimes a seminal research paper) and then answer questions about it. In some cases, future sections of the text depend on the knowledge gained from this process. This makes the book somewhat less self-contained and perhaps less lucid. (If instructors actually assign these readings for credit, however, this could be considered a strength of the text rather than a weakness.)
The text is well-formatted, indexed, and easy to navigate. The only weakness here is the aforementioned lack of figures in certain areas.
I found no grammatical errors in the text.
The author has a fascinating way of putting complex systems into the overall context of the history of science. The various sidebars about contributors to the field (Erdős, Dijkstra, etc.) are amusing and well-situated. They give additional flavor to an already readable text, and help connect very technical concepts to human concerns.
This is a very well-written and entertaining book on a somewhat unusual combination of topics. It does a great job making the theory of complexity "relatable" to a college audience by posing intriguing, yet approachable, questions raised by the computational models. Chapters 6 and 7 in particular are outstanding in this regard. Especially well-done are the philosophical questions the book raises about what kinds of models do in fact lead to reliable knowledge about the systems they represent, and which do not. Far too few texts in this and other fields even mention this issue, let alone demonstrate its importance and point the reader to how it might be answered. The discussion of holism vs. reductionism in chapter 9 is one of several sections that stand out in this way. Although the subject it describes is multi-disciplinary, this book is probably best-suited to a computer science audience. At times it divagates into somewhat off-topic concerns that would nevertheless be of interest to computer science students (examples: how iterators and generators work in Python; how to use the pyplot package; a summary of algorithmic complexity; object-oriented API design). Excellent comparison of "classical models" (based on physical laws and equations) with complex system models.
Table of Contents
- 1 Complexity Science
- 2 Graphs
- 3 Analysis of algorithms
- 4 Small world graphs
- 5 Scale-free networks
- 6 Cellular Automata
- 7 Game of Life
- 8 Fractals
- 9 Self-organized criticality
- 10 Agent-based models
- 11 Case study: Sugarscape
- 12 Case study: Ant trails
- 13 Case study: Directed graphs and knots
- 14 Case study: The Volunteer's Dilemma
About the Book
This book is about complexity science, data structures and algorithms, intermediate programming in Python, and the philosophy of science:
- Data structures and algorithms: A data structure is a collection that contains data elements organized in a way that supports particular operations. For example, a dictionary organizes key-value pairs in a way that provides fast mapping from keys to values, but mapping from values to keys is generally slower.
- An algorithm is a mechanical process for performing a computation. Designing efficient programs often involves the co-evolution of data structures and the algorithms that use them. For example, the first few chapters are about graphs, a data structure that is a good implementation of a graph---nested dictionaries---and several graph algorithms that use this data structure.
- Python programming: This book picks up where Think Python leaves off. I assume that you have read that book or have equivalent knowledge of Python. As always, I will try to emphasize fundmental ideas that apply to programming in many languages, but along the way you will learn some useful features that are specific to Python.
- Computational modeling: A model is a simplified description of a system that is useful for simulation or analysis. Computational models are designed to take advantage of cheap, fast computation.
- Philosophy of science: The models and results in this book raise a number of questions relevant to the philosophy of science, including the nature of scientific laws, theory choice, realism and instrumentalism, holism and reductionism, and Bayesian epistemology.
This book focuses on discrete models, which include graphs, cellular automata, and agent-based models. They are often characterized by structure, rules and transitions rather than by equations. They tend to be more abstract than continuous models; in some cases there is no direct correspondence between the model and a physical system.
Complexity science is an interdisciplinary field---at the intersection of mathematics, computer science and physics---that focuses on these kinds of models. That's what this book is about.
About the Contributors
Allen B. Downey is an American computer scientist, Professor of Computer Science at the Franklin W. Olin College of Engineering and writer of free textbooks.
Downey received in 1989 his BS and in 1990 his MA, both in Civil Engineering from the Massachusetts Institute of Technology, and his PhD in Computer Science from the University of California at Berkeley in 1997.
He started his career as Research Fellow in the San Diego Supercomputer Center in 1995. In 1997 he became Assistant Professor of Computer Science at Colby College, and in 2000 at Wellesley College. He was Research Fellow at Boston University in 2002 and Professor of Computer Science at the Franklin W. Olin College of Engineering since 2003. In 2009-2010 he was also Visiting Scientist at Google Inc.