Adaptive immunity shapes communities of organisms at all scales of life, from the smallest bacteria fending off phages to humans battling the latest pandemic. Organisms use adaptive immunity to learn from past exposure to pathogens by storing and updating many highly specific immune memories that match particular pathogens. Despite being single-celled organisms vastly different from humans, many bacteria and archaea also employ adaptive immunity through the CRISPR-Cas system.
In all types of adaptive immunity, many complicated biological processes interact to produce observed phenomena. By simplifying these complicated systems, phenomenological models have the power to reveal intuitive patterns and rules that can lead to observed phenomena, some of which are quite general. This thesis is about using simple phenomenological models to understand adaptive immunity in bacteria. Starting with simple interactions, I find remarkable emergent complexity and intuitive ways of looking at experimental data. This work is a step forward in the theoretical understanding of both bacterial communities and adaptive immunity and illustrates the power of simple models to build intuition about complex phenomena.