# prize35-8 Exercise 2: how the strength of the mutual benefit changes the outcome r, K = 0.5, 100.0 def run(boost, years=200): n1, n2 = 10.0, 10.0 for t in range(years): k1 = K + boost * n2 k2 = K + boost * n1 n1 += r * n1 * (1 - n1 / k1) n2 += r * n2 * (1 - n2 / k2) return n1, n2 for boost in [0.0, 0.2, 0.6, 0.9]: n1, n2 = run(boost) print(f"boost {boost:.1f}: {n1:6.1f} and {n2:6.1f} formula K/(1-boost) = {K / (1 - boost):6.1f}") # Output: # boost 0.0: 100.0 and 100.0 formula K/(1-boost) = 100.0 # boost 0.2: 125.0 and 125.0 formula K/(1-boost) = 125.0 # boost 0.6: 250.0 and 250.0 formula K/(1-boost) = 250.0 # boost 0.9: 999.9 and 999.9 formula K/(1-boost) = 1000.0 # Reading it: with a mutual boost b, each species settles at K / (1 - b), which matches the formula. Weak help (0.2) gives a modest gain, 0.6 more than doubles # the numbers, and at 0.9 the loop of help is so strong the populations reach about ten times K (the 999.9 is the formula's 1,000 not quite reached yet). If b were 1 or more, # this simple model would grow without limit, a sign that real mutualisms must be held in check by other costs.