What will Carlos order?

67 Views Asked by At

You are trying to predict what drink Carlos will order at a coffee shop. You know the following:

  1. If Ana orders a mocha, Ben does not order hot chocolate.
  2. Carlos will order the same thing as Ana, unless Ana gets a mocha.
  3. Ana will order either a latte, an espresso, or a mocha.
  4. Ana does not order a latte.
  5. Ben orders hot chocolate.

What will Carlos order?


Let

  • $O(x,y)$ denote $x$ orders $y$.

  • $A$ denote Ana.

  • $B$ denote Ben.

  • $C$ denote Carlos.

  • $C$ denote hot chocolate.

  • $L$ denote latte.

  • $M$ denote mocha.

  • $E$ denote expresso.

So I have this. O(B,C) ¬O(A,L) From 1. We have O(A,M) => ¬O(B,C) which is equivalent to O(B,C) => ¬O(A,M). Is this correct?

Through inference and O(B,C) we know ¬O(A,M) is true. So Ana does not drink a Mocha. So we know ¬O(A,L) ¬O(A,M).

Based of 3. We know O(A,M) ∨ O(A,E) ∨ O(A,L) and ¬O(A,L) ¬O(A,M) so the only option left is O(A,E).

From 2 we know unless it is a Mocha, carlos will order the same thing as Ana, which is an Expresso.

Is this correct? is this also syntactically correct?

1

There are 1 best solutions below

1
On

Yes, you are correct. Carlos orders Expresso. While you solved this using math, it can also be solved using logical reasoning. Ben orders hot chocolate, so Ana must not have ordered Mocha. Ana does not order a latte, so the only option left for Ana is Expresso. Carlos will order the same thing as Ana, unless Ana gets a mocha. And since Ana did not get a Mocha, Carlos gets the same thing as her, an Expresso.