3
$\begingroup$

I'm trying to find a range for {q1,q2} with the conditions listed such that U1R >= U1S

U1R[q1_,q2_] = 2q1 + q2 + 3(1-q1-q2)
U1S[q1_,q2_] = q1 + 3q2 + 2(1-q1-q2)

Reduce[ForAll[{a,b}, 0 <= a <= 1 && 0 <= b <= 1 && a + b <= 1, 
  Exists[{x,y}, 0 <= x <= 1 && 0 <= y <= 1 && x + y <= 1, U1R[x, y] >= U1S[a, b]]], 
 {x,y}, Reals]

However, I'm only getting True for my output. I am expecting something like

.5 < x < .6 && .3 < y < .7 

as my output. Why am I only getting true and not what makes that true? Thanks.

$\endgroup$
  • 4
    $\begingroup$ Your expression states that for any choice of a and b given constraints one can find an x and y with certain constraints. Mathematica certifies that this statement is indeed true. There's not more to this. If you want to have the right answer you have to ask the right question. The question in this case would be something like Reduce[0 <= a <= 1 && 0 <= b <= 1 && a + b <= 1 && 0 <= x <= 1 && 0 <= y <= 1 && x + y <= 1 && U1R[x, y] >= U1S[a, b], {x, y}, Reals] $\endgroup$ – Sjoerd C. de Vries Mar 7 '16 at 22:37
  • $\begingroup$ @SjoerdC.deVries That's a good answer, I think $\endgroup$ – Dr. belisarius Mar 7 '16 at 22:52
  • $\begingroup$ @SjoerdC.deVries Thank you! Could you explain why this gives the desired result: Reduce[ForAll[y, y >= 0, Exists[z, z >= 0, U1R[w, y] < U1R[z, y]]], {z}, Reals] as this gives values for which it's true, but follows the same logic. Thank you again $\endgroup$ – Andrew Castro Mar 7 '16 at 23:01
  • $\begingroup$ @belisarius OK, moved it to an answer and elaborated a bit. $\endgroup$ – Sjoerd C. de Vries Mar 9 '16 at 21:18
2
$\begingroup$

Your expression states that for any choice of a and b given constraints one can find an x and y with certain constraints. Mathematica certifies that this statement is indeed true. There's not more to this. If you want to have the right answer you have to ask the right question. The question in this case would be something like:

Reduce[0 <= a <= 1 && 0 <= b <= 1 && a + b <= 1 && 
       0 <= x <= 1 && 0 <= y <= 1 && x + y <= 1 && 
       U1R[x, y] >= U1S[a, b], {x, y}, Reals
]

You also asked why then

Reduce[ForAll[y, y >= 0, Exists[z, z >= 0, U1R[w, y] < U1R[z, y]]], {z}, Reals]
(* w > 0 *)

gives a definite result, although it is also using ForAll and Exists.

This is because you introduce a variable/parameter w here, which is not bound to an Exists (or ForAll) and hence the truth of this statement depends on its value. When Mathematica checks this, it finds that a solution exists only for w > 0. Had you put w in the Exists as well, Mathematica would have determined the existence of solutions, and would therefore have responded with True, because that's all what Exists is about. It's not about specifications of solutions, but of their existence.

You may want to study the difference between

Reduce@Exists[w, w > 1] 
(* True *)

and

Reduce@Exists[x, w > 1]
(* w > 1 *)

In the former case, we ask Mathematica whether solutions exist for w making the second argument True. It is easy to see that is the case, so the answer must indeed be True. In the latter case the answer depends on the unbound w, so we cannot know whether there is an x for which the second argument is True unless we assume that, indeed, w > 0.

Other cases that may be helpful:

Reduce@Exists[x, w x > 1]
(* w < 0 || w > 0 *)

Reduce@Exists[{x, w}, w > 1]
(* True *)

Reduce@Exists[x, w + x > 1]
(* w ∈ Reals *)

Reduce@Exists[{x, w}, w + x > 1]
(* True *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.