# Think Complexity

*Think Complexity* is an introduction to complexity science
using Python.  Complexity Science is an interdisciplinary
field — at the intersection of mathematics, computer science, and natural science — that focuses on discrete models of physical and
social systems.

Topics in this book include networks and graphs, cellular automatons, agent-based models and swarms, fractals, evolution, and self-organizing systems.

[Here is the landing page for the second edition at Green Tea Press](https://greenteapress.com/wp/think-complexity-2e/).

You can buy paper and electronic versions from [Bookshop.org](https://bookshop.org/a/98697/9781492040200) or [Amazon](https://amzn.to/3wPN0SJ).

This book is available under a Creative Commons license, which means that you are free to copy, distribute, and modify it, as long as you attribute the source and don't use it for commercial purposes.


**Notebooks**

For each chapter, there is a Jupyter notebook in this repository that contains the code from the chapter, exercises, and (optionally) exercise solutions.

You can [download the notebooks](https://github.com/AllenDowney/ThinkComplexity/raw/refs/heads/v3/ThinkComplexity.zip) and run them in your own Python environment. In that case, you'll need to install the libraries the code depends on.

Or you can use the links below to run the notebooks on Colab.

* Chapter 2: [Run the notebook with no solutions](https://colab.research.google.com/github/AllenDowney/ThinkComplexity/blob/v3/nb/chap02.ipynb) or  
[Run the notebook with solutions](https://colab.research.google.com/github/AllenDowney/ThinkComplexity/blob/v3/soln/chap02.ipynb)

* Chapter 3: [Run the notebook with no solutions](https://colab.research.google.com/github/AllenDowney/ThinkComplexity/blob/v3/nb/chap03.ipynb) or  
[Run the notebook with solutions](https://colab.research.google.com/github/AllenDowney/ThinkComplexity/blob/v3/soln/chap03.ipynb)

* Chapter 4: [Run the notebook with no solutions](https://colab.research.google.com/github/AllenDowney/ThinkComplexity/blob/v3/nb/chap04.ipynb) or  
[Run the notebook with solutions](https://colab.research.google.com/github/AllenDowney/ThinkComplexity/blob/v3/soln/chap04.ipynb)

* Chapter 5: [Run the notebook with no solutions](https://colab.research.google.com/github/AllenDowney/ThinkComplexity/blob/v3/nb/chap05.ipynb) or  
[Run the notebook with solutions](https://colab.research.google.com/github/AllenDowney/ThinkComplexity/blob/v3/soln/chap05.ipynb)

* Chapter 6: [Run the notebook with no solutions](https://colab.research.google.com/github/AllenDowney/ThinkComplexity/blob/v3/nb/chap06.ipynb) or  
[Run the notebook with solutions](https://colab.research.google.com/github/AllenDowney/ThinkComplexity/blob/v3/soln/chap06.ipynb)

* Chapter 7: [Run the notebook with no solutions](https://colab.research.google.com/github/AllenDowney/ThinkComplexity/blob/v3/nb/chap07.ipynb) or  
[Run the notebook with solutions](https://colab.research.google.com/github/AllenDowney/ThinkComplexity/blob/v3/soln/chap07.ipynb)

* Chapter 8: [Run the notebook with no solutions](https://colab.research.google.com/github/AllenDowney/ThinkComplexity/blob/v3/nb/chap08.ipynb) or  
[Run the notebook with solutions](https://colab.research.google.com/github/AllenDowney/ThinkComplexity/blob/v3/soln/chap08.ipynb)

* Chapter 9: [Run the notebook with no solutions](https://colab.research.google.com/github/AllenDowney/ThinkComplexity/blob/v3/nb/chap09.ipynb) or  
[Run the notebook with solutions](https://colab.research.google.com/github/AllenDowney/ThinkComplexity/blob/v3/soln/chap09.ipynb)

* Chapter 10: [Run the notebook with no solutions](https://colab.research.google.com/github/AllenDowney/ThinkComplexity/blob/v3/nb/chap10.ipynb) or  
[Run the notebook with solutions](https://colab.research.google.com/github/AllenDowney/ThinkComplexity/blob/v3/soln/chap10.ipynb)

* Chapter 11: [Run the notebook with no solutions](https://colab.research.google.com/github/AllenDowney/ThinkComplexity/blob/v3/nb/chap11.ipynb) or  
[Run the notebook with solutions](https://colab.research.google.com/github/AllenDowney/ThinkComplexity/blob/v3/soln/chap11.ipynb)

* Chapter 12: [Run the notebook with no solutions](https://colab.research.google.com/github/AllenDowney/ThinkComplexity/blob/v3/nb/chap12.ipynb) or  
[Run the notebook with solutions](https://colab.research.google.com/github/AllenDowney/ThinkComplexity/blob/v3/soln/chap12.ipynb)


**Tutorial**

I offer a half-day tutorial based on material from _Think Complexity_.
[Information about the tutorial is here](https://allendowney.github.io/ComplexityScience/).
