+1 vote
85 views

Que. Consider domain is the set of all people in the world.

$F(x,y) =x \text{ is the friend of y}.$

Represent each of the following sentences using first-order logic statements
$1.$ Every person has $at most \ 2$ friends.
$2.$ Every person has $exactly \ 2$ friends.
$3.$ Every person has $at least \ 2$ friends.

My attempt –
$1. \forall x \exists y_1\exists y_2(F(x,y_1) \wedge F(x,y_2) \wedge \forall z(F(x,z) \implies ((z= y_1) \vee (z= y_2))))$
$2. \forall x \exists y_1\exists y_2(F(x,y_1) \wedge F(x,y_2) \wedge (y_1 \neq y_2) \wedge \forall z(F(x,z) \implies ((z= y_1) \vee (z= y_2))))$
$3. \forall x \exists y_1\exists y_2(F(x,y_1) \wedge F(x,y_2) \wedge (y_1 \neq y_2))$

Please verify.

asked | 85 views
+1
0
Every person has $atmost$ 2 friends. - means he can have either 0, 1 or 2 friends. According to me it should be

$\forall x \exists y_1\exists y_2(F(x,y_1) \wedge F(x,y_2) \wedge \forall z(F(x,z) \implies (((z \neq y_1) \wedge (z \neq y_2))\vee (z= y_1) \vee (z= y_2)))))$

Let me know if i am making any mistake in this.
0

@!KARAN, I don't think so it will work. Try when x has 3 friends.
There is a flaw in my formula too. It's not covering "0" case,

+3

@Soumya29

For Statement 1, If you use "for all" symbol then it should work.

$\forall x \forall y_1 \forall y_2(F(x,y_1) \wedge F(x,y_2) \wedge \forall z(F(x,z) \implies ((z= y_1) \vee (z= y_2))))$

or simply write-

$\forall x \forall y_1 \forall y_2 \forall z (F(x,y_1) \wedge F(x,y_2) \wedge F(x,z) \implies ((z= y_1) \vee (z= y_2)))$

+1

Yes, it covers all the cases now. Thank you so much @Sachin   :)

0 votes
1 answer
2
+2 votes
2 answers
6