# Thread: express them in predicate logic

1. ## express them in predicate logic

Please I'm still studying the powerpoints
Express these in predicate logic using predicates, quantifiers and logical operators

1. Everybody playsHearthstone.
2. Someone collected all thecards in the game.
4. There is exactly one card that all players have yet to collect.

2. ## Re: express them in predicate logic

Originally Posted by iiicedreaper
Please I'm still studying the powerpoints
Express these in predicate logic using predicates, quantifiers and logical operators
1. Everybody playsHearthstone.
2. Someone collected all thecards in the game.
4. There is exactly one card that all players have yet to collect.
On the universe of all persons & cards in the game, define these predicates:
$P(x)$ is a person & $C(y)$ y is a card in the game Hearthstone.
$H(x)$ x plays Hearthstone.
$WH(x)$ x won a head-to-head matchup.
$CC(x,y)$ x has collected y.

1) $\left( {\forall x} \right)\left[ {P(x) \to H(x)} \right]$
2) $\left( {\exists x} \right)\left( {\forall y} \right)\left[ {P(x) \wedge C(y) \to CC(x,y)} \right]$
3) $(\exists x)\left( {\exists y} \right)\left[ {x \ne y \wedge P(x) \wedge P(y) \wedge WH(x) \wedge WH(y)} \right]$

Now you try #4. Show you work.

3. ## Re: express them in predicate logic

4.
(∀x)(∃y)[P(x)∧C(y)→ ¬CC(x,y)]
I kinda get it from number two since i'm kinda confused why you used implication there, but now that I get it I figured it would be something like it
am I right about number 4

4. ## Re: express them in predicate logic

What you have written says that there is at least one card that no one has collected. You need to change it to say that "there is exactly one card". I am no expert on predicate logic but I have seen "∃!x" used to mean "there exist a unique x such that".

5. ## Re: express them in predicate logic

Originally Posted by iiicedreaper
4.
4. There is exactly one card that all players have yet to collect.
(∀x)(∃y)[P(x)∧C(y)→ ¬CC(x,y)]
You have written a conditional proposition whereas #4 is a existential statement.
There is a real difference in $\left( {\forall x} \right)\left( {\exists y} \right)~\&~\left( {\exists y} \right)\left( {\forall x} \right)$
So #4 is $\left( {\exists! y} \right)\left( {\forall x} \right)\left[ {C(y) \wedge P(x) \wedge \neg CC(x,y)} \right]$ Note that I used the unique symbol, be careful because some texts no not allow that.

Here is a simple example: On the universe of people suppose that $L(x,y)$ reads "x loves y".
1) Everyone loves someone. $(\forall x)(\exists y)[L(x,y)]$
2) Someone loves everyone $(\exists x)(\forall y)[L(x,y)]$

6. ## Re: express them in predicate logic

ok
but what is the difference between (∀x)(∃y) & (∃y)(∀x)
first one means all x ahs at least one y
and the second means at least one y contains all x ?
did i get that right ?

7. ## Re: express them in predicate logic

oh my homework has another question that gave me a name and wanted me to put it into the equation
do i put the name into the equation or put the sign of "at least one" (∃!x) in the equation ?

8. ## Re: express them in predicate logic

I totall forgot that, thanks

9. ## Re: express them in predicate logic

Originally Posted by iiicedreaper
ok
but what is the difference between (∀x)(∃y) & (∃y)(∀x)
first one means all x ahs at least one y and the second means at least one y contains all x ?
Using $\mathcal{L}(x,y)$ on the set of people to mean "x loves y" we get
$(\forall x)(\exists y)[\mathcal{L}(x,y)]$ translates as "Everyone loves someone"

Whereas $(\exists y)(\forall x)[\mathcal{L}(x,y)]$ translates as "Someone is loved by everyone."

Originally Posted by iiicedreaper
oh my homework has another question that gave me a name and wanted me to put it into the equation
do i put the name into the equation or put the sign of "at least one" (∃!x) in the equation ?
I have never seen ($\exists ! x)$ to be used other than as "there exist exactly one (unique) x,"

In predicate logic ($\exists x)$ means "there is a least one x"