TITLE: Does the placement of the quantifier make any difference in the following examples.
QUESTION [5 upvotes]: I have trouble understanding if the placement quantifier matter in these following problems.
Problem One: Nobody in calculus class is smarter than everybody in the discrete math class.
Let S(x,y) stand for "x is smarter than y", D(x) stand for "x is in discrete math class," and C(x) stand for "x is in calculus class."
My analysis of the English statement in logical form was this:
$\neg \exists_x \forall_y [(C(x) \land D(y)) \to S(x,y)]$
However ,the books answer was the following:
$\neg \exists_x [(C(x) \land \forall_y (D(y) \to S(x,y))]$
Here's another example:
Problem Two: Anyone who has a friend who has the measles will be quarantined
Let F(x,y) stand for "x and y are friends", M(x) stand for "x has the Measles," and Q(x) stand for "x will be quarantined."
This was my answer:
$\forall_x \exists_y [(F(x,y) \land M(y)) \to Q(x)]$
This was the books answer:
$\forall_x [\exists_y(F(x,y) \land M(y)) \to Q(x)]$
Does my logical analysis of the English statement change the meaning of the English statement? In other words, is my logical translation an incorrect representation of the English statement? Is my answers and the author's answers acceptable to the representation of the English statements?

REPLY [2 votes]: The book answer to (1) is correct. Now, 
$$\neg \exists x [(C(x) \land \forall y (D(y) \to S(x,y))]$$
is equivalent to 
$$\neg \exists x\forall y [(C(x) \land (D(y) \to S(x,y))]$$
[The relevant principle is that $(C \land \forall y\varphi(y)) \equiv \forall y(C \land \varphi(y))$, when $C$ doesn't contain the bound variable.] But note the bracketing here! $A \land (B \to C)$ is not the same as $(A \land B) \to C$. You have misplaced the brackets in the prenex form.
The book answer to (2)
$$\forall  x[\exists y(F(x,y) \land M(y)) \to Q(x)]$$
is also correct. It is clearly equivalent to, in turn, 
$$\forall  x[\neg\exists y(F(x,y) \land M(y)) \lor Q(x)]$$
$$\forall  x[\forall y\neg (F(x,y) \land M(y)) \lor Q(x)]$$
$$\forall  x\forall y[\neg(F(x,y) \land M(y)) \lor Q(x)]$$
$$\forall  x\forall y[(F(x,y) \land M(y)) \to Q(x)]$$
And evidently that last, in particular, is also a correct translation.  "Anyone who has a friend who has the measles will be quarantined" says that take any two people $x$, $y$, if  $x$ has $y$ as a friend who has measles, then $x$ will be quarantined. You have the wrong pair of quantifiers in the prenex form.
[The general background principle that needs to be kept in mind is $(\exists x\varphi x \to C) \equiv \forall x(\varphi x \to C)$. In effect, one side of this equivalence gets substituted for the other after the initial quantifier in the wff here. More carefully, we can get from the first to the last wff formally by instantiating the quantifier, using the equivalence, and then generalizing.]