The ubiquity of cross-feeding (a nutrient-exchange mutualism) raises two related questions: Why is cross-feeding favored over self-sufficiency, and how are cross-feeders protected from non-producing cheaters? The Black Queen hypothesis suggests that if leaky resources are costly, then there should be selection for gene loss, and selection for self-sufficiency, but likely selection against mutualistic inter-dependency. However, space has been shown to promote mutualisms, so we examined how it alters the predictions of the Black Queen hypothesis. We developed a stochastic spatial model in which species compete for sites in a two-dimensional grid. Microbe needed two essential resources to reproduce. Some microbes produce the resources themselves, but this came at a cost of reduced birth rates, and some resources leaked to nearby sites. Non-producing microbes could take up leaked resources, if available. We examined when cross-feeders (inter-dependent single-producers) could outcompete double-producers (self-sufficient microbes) or non-producers (cheaters). Spatial effects depended on how far resources diffused and how microbes clustered. We could remove the effect of clustering, while leaving the effect of short-ranged resource diffusion, by randomly rearranging the microbes regularly.
If compounds diffuse long distances, then cross-feeding is never adaptive. Cross-feeders sometimes displace double-producers, but are always displaced by non-producers. If resources diffuse over short distances, then cross-feeders can dominate, even if spatial structure is disrupted so often that microbes interact randomly. In this case, non-producers are harmed because they can only reproduce if they are randomly near both cross-feeders, whereas each cross-feeder only needs to be near its one partner. Double-producers gain an advantage because they do not rely on any partner, but their benefit can be offset by their low birth rates. Interestingly, non-producers benefit when double-producers are abundant, because the resources occur together. This leads to bistability: the double-producer and non-producer can exclude the cross-feeders, but the cross-feeders can sometimes exclude the others. When spatial structure is not disrupted, the benefits of spatial uncertainly remain mostly unchanged, and cross-feeders gain an additional advantage because they separate themselves from cheaters. Our model suggests that spatial uncertainty and spatial structure both reduce selection for gene loss.