The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
33 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 ago in Mathematical Logic by Boss (14.1k points) | 33 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, 

Please log in or register to answer this question.

Related questions



Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

43,964 questions
49,519 answers
162,503 comments
65,759 users