In Rosen's Discrete Mathematics book(7e) this is the problem no. 12(m) of 1.5th chapter
There are at least two students in your class who have not chatted with the same person in your class
where
$C(x,y)$ = $x$ and $y$ have chatted over the internet.
I tried to solve this problem and thought this problem is in the form like "if x has chatted with someone z , then y hasn't chatted with z and if y has chatted with z , then x hasn't chatted with z" and finally came to a solution like this
$\exists x \exists y[(x \ne y ) \land \forall z (( C(x,z) \rightarrow \lnot C(y,z)) \land ((C(y,z) \rightarrow \lnot C(x,z))]$
Is this answer right? If not then what should be the answer.Please explain.
Note that by Contraposition, $C(x,z) \to \neg C(y,z)$ is equivalent to $C(y,z) \to \neg C(x,z)$. So, you are saying the same thing twice there, and it suffices to just use one of them:
$$\exists x \ \exists y [x \neq y \land \forall z (C(x,z) \to C(y,z))]$$
Note that by Implication, this is equivalent to the answer suggested in the Comments:
$$\exists x \ \exists y [x \neq y \land \forall z (\neg C(x,z) \lor C(y,z))]$$
Moreover, if we do a DeMorgan on this, we get another intutive answer, namely that for any person, it is not true that both $x$ and $y$ chatted with that person:
$$\exists x \ \exists y [x \neq y \land \forall z \neg (C(x,z) \land C(y,z))]$$
Finally, using Quantifier Negation, we can pull out the negation, and obtain yet another very reasonable translation: that there isn't anyone that both $x$ and $y$ chatted with:
$$\exists x \ \exists y [x \neq y \land \neg \exists z (C(x,z) \land C(y,z))]$$