Enhances Python skills by working with data structures and algorithms and gives examples of complex systems using exercises, case studies, and simple explanations.
Author(s): Allen Downey
Publisher: "O'Reilly Media, Inc."
Year: 2012
Language: English
Pages: 142
Table of Contents
Preface
Why I Wrote This Book
Suggestions for Teachers
Suggestions for Autodidacts
Contributor List
Conventions Used in This Book
Using Code Examples
Safari® Books Online
How to Contact Us
Chapter 1. Complexity Science
What Is This Book About?
A New Kind of Science
Paradigm Shift?
The Axes of Scientific Models
A New Kind of Model
A New Kind of Engineering
A New Kind of Thinking
Chapter 2. Graphs
What’s a Graph?
Representing Graphs
Random Graphs
Connected Graphs
Paul Erdős: Peripatetic Mathematician, Speed Freak
Iterators
Generators
Chapter 3. Analysis of Algorithms
Order of Growth
Analysis of Basic Python Operations
Analysis of Search Algorithms
Hashtables
Summing Lists
pyplot
List Comprehensions
Chapter 4. Small World Graphs
Analysis of Graph Algorithms
FIFO Implementation
Stanley Milgram
Watts and Strogatz
Dijkstra
What Kind of Explanation Is That?
Chapter 5. Scale-Free Networks
Zipf’s Law
Cumulative Distributions
Continuous Distributions
Pareto Distributions
Barabási and Albert
Zipf, Pareto, and Power Laws
Explanatory Models
Chapter 6. Cellular Automata
Stephen Wolfram
Implementing CAs
CADrawer
Classifying CAs
Randomness
Determinism
Structures
Universality
Falsifiability
What Is This a Model Of?
Chapter 7. Game of Life
Implementing Life
Life Patterns
Conway’s Conjecture
Realism
Instrumentalism
Turmites
Chapter 8. Fractals
Fractal CAs
Percolation
Chapter 9. Self-Organized Criticality
Sand Piles
Spectral Density
Fast Fourier Transform
Pink Noise
Reductionism and Holism
SOC, Causation, and Prediction
Chapter 10. Agent-Based Models
Thomas Schelling
Agent-Based Models
Traffic Jams
Boids
Prisoner’s Dilemma
Emergence
Free Will
Chapter 11. Case Study: Sugarscape
The Original Sugarscape
The Occupy Movement
A New Take on Sugarscape
Pygame
Taxation and the Leave Behind
The Gini Coefficient
Results with Taxation
Conclusion
Chapter 12. Case Study: Ant Trails
Introduction
Model Overview
API Design
Sparse Matrices
wx
Applications
Chapter 13. Case Study: Directed Graphs and Knots
Directed Graphs
Implementation
Detecting Knots
Knots in Wikipedia
Chapter 14. Case Study: The Volunteer’s Dilemma
The Prairie Dog’s Dilemma
Analysis
The Norms Game
Results
Improving the Chances
Appendix A. Call for Submissions
Appendix B. Reading List
Index