# Welcome Hello! This book is designed to take you on a journey, from counting on your fingers to orchestrating swarms of digital creatures like the fireflies below. We'll start simple and develop each idea organically. The computer program above simulates the coordinated behavior exhibited by some species of fireflies. We can describe this behavior, known as **_synchronization_**, to a computer using the following mathematical model: $$\dot{\theta_{i}} = \omega_{i} + \frac{K}{N} \displaystyle\sum_{j=1}^N \sin(\theta_{j} - \theta_{i})$$ This **_ordinary differential equation_** conveys the following idea: "The way in which I change my direction $\dot{\theta_{i}}$ is based upon my natural preference $\omega_{i}$, my current direction $\theta_{i}$, and the directions of my neighbors $\theta_{j}$." Don't worry if this collection of symbols seems inscrutable to you at the moment; you will learn to "talk mathematics" over the course of the book. ## Team

Author – Nick McIntyre

Editor – Isabella Tang

Illustrator – Catherine Stroud

## Dedication For my students, who teach me how to teach this stuff. ## Preface Here's the plan: I will show you how to model systems using one formal language (mathematics) so that you can explore them using another formal language (computer code). My hope for you, dear reader, is that you walk away from each exercise a little more confident that you can understand anything you see and construct anything you can imagine. It's not overselling it to say that modern life is entirely dependent upon math and code. More to the point, working at the intersection of these entwined fields can be a whole lot of fun. ## A Little Background The Wikipedia entry on [mathematics](https://en.wikipedia.org/wiki/Mathematics) begins by highlighting core topics like quantity, structure, space, and change. Whether you're into creating things or exploring the limits of knowledge, mathematics is a useful lens through which to view the world. In 1936, two mathematicians named Alonzo Church and Alan Turing wanted to determine what functions could be computed; they ended up laying the foundation of [computer science](https://en.wikipedia.org/wiki/Computer_science). It's fitting that **_computational thinking_**–thinking about problems in terms of systems, models, data, and algorithms–is a powerful approach to learning and applying mathematics. The International Society for Technology in Education (ISTE) outlines the following core components in their [computational thinking competencies](https://www.iste.org/standards/computational-thinking). {panels} :column: col-12 :card: border-2 ****   **Systems** that enable decomposition.  {panels} :column: col-12 :card: border-2 **$\mapsto$**   **Models** that distill essential features.  {panels} :column: col-12 :card: border-2 ****   **Data** that computers can understand.  {panels} :column: col-12 :card: border-2 ****   **Algorithms** that computers can execute.  This book emphasizes these components as part of a structured problem-solving process.