#OK to post homework #George Spahn, 2-6-2022, Assignment 5 # 5 deriv1 := diff(q[1]*(1-q[1]-q[2])^(d[1]),q[1]): deriv2 := diff(q[2]*(1-q[2]-q[1])^(d[2]),q[2]): solve({deriv1 = 0, deriv2 = 0}, {q[1],q[2]}): # the produced output is # q[1] = d[2]/(d[1]*d[2] + d[1] + d[2]) # q[2] = d[1]/(d[1]*d[2] + d[1] + d[2]) # when d1 and d2 are both equal to 1, # q1 and q2 are both equal to 1/3, as we computed before #6 # Let's define nashut to be the combined utility of both players # in the nash equilibrium described above. ut := q[1]*(1-q[1]-q[2])^(d[1]) + q[2]*(1-q[2]-q[1])^(d[2]): nashut := subs(q[1] = d[2]/(d[1]*d[2] + d[1] + d[2]), q[2] = d[1]/(d[1]*d[2] + d[1] + d[2]), ut): # Let ut1 be the best possible utility of player 1 if q2 = 0. u1 := q[1]*(1-q[1])^(d[1]): s1 := solve(diff(u1,q[1]) = 0, q[1]): ut1 := subs(q[1]=s1,u1): # Similarly let ut2 be the best possible utility of player 2 if q1 = 0. u2 := q[2]*(1-q[2])^(d[2]): s2 := solve(diff(u2,q[2]) = 0, q[2]): ut2 := subs(q[2]=s2,u2): # Let m be the max of ut1 and ut2. m := max(ut1,ut2): # We now claim that m >= nashut, and if d1,d2 > 0, then m > nashut. # The proof will be by picture. plot3d(m-nashut,d[1]=0..1,d[2]=0..1); # The plot shows that m - nashut is nonnegative # and only equal to 0 when d1 = 0 or d2 = 0 # Therefore, the nash equilibrium does not maximize combined utility # unless d1 = 0 or d2 = 0.