# prize35-7 Exercise 3: map of outcomes for different competition strengths (K1 = K2 = 1000) def outcome(a12, a21, k1=1000, k2=1000): s1 = k1 > a12 * k2 s2 = k2 > a21 * k1 if s1 and s2: return "coexist" if s1: return "1 wins" if s2: return "2 wins" return "either" values = (0.4, 0.8, 1.2, 1.6) print("a12 / a21 " + " ".join(f"{v:7.1f}" for v in values)) for a12 in values: print(f"{a12:9.1f} " + " ".join(f"{outcome(a12, a21):7s}" for a21 in values)) print("coexistence squares:", sum(outcome(x, y) == "coexist" for x in values for y in values), "of 16") # Output: # a12 / a21 0.4 0.8 1.2 1.6 # 0.4 coexist coexist 1 wins 1 wins # 0.8 coexist coexist 1 wins 1 wins # 1.2 2 wins 2 wins either either # 1.6 2 wins 2 wins either either # coexistence squares: 4 of 16 # Reading it: only 4 of 16 squares allow coexistence, all with BOTH alphas below 1 (each species limits itself more # than it limits the other). If one alpha is above 1 and the other below, the weaker competitor is excluded; if both # are above 1, the winner depends on who starts ahead. Similar species sharing everything rarely coexist for long.