# Thread: Universal Quantifier in Predicate Logic

1. ## Universal Quantifier in Predicate Logic

Hi,

I have the following:
B(x) stands for "x is a baker",
F(x) stands for "x is a farmer",
K(x,y) stands for "x knows y".

Ax: for all x
Ex: there exists an x

(a) Express "Everybody knows a farmer" in terms of predicate logic.

For this I have:

Ax(Ey (F(y) -> K(x,y))

Which I believe translates to "For all X, there exists a farmer Y, such that X knows a Y". Which in turn implies that everybody knows a farmer.

Now, the second question is:

(b) "Everybody knows someone who knows a farmer"

This one confuses me, as the same relation is involved twice.

So far, I have:

Ax(Ey K(x,y) -> (K(y,z) && Ez(F(z))

But this does not seem right. How do I approach this question?

2. ## Re: Universal Quantifier in Predicate Logic

Originally Posted by aprilrocks92
I have the following:
B(x) stands for "x is a baker",
F(x) stands for "x is a farmer",
K(x,y) stands for "x knows y".

(a) Express "Everybody knows a farmer" in terms of predicate logic.
Here is that one: $\displaystyle \left( {\forall x} \right)\left( {\exists y} \right)\left[ {F(y) \wedge K(x,y)} \right]$

Now you post your effort on the other parts.

3. ## Re: Universal Quantifier in Predicate Logic

For all x, there exists a y,z such that if z is a farmer, and y knows z, then x knows y.

(Ax)(Ey,z) [F(z) & K(z, y)]->K(x,y).

As stated above, I'm rather confused as to how this is put.

4. ## Re: Universal Quantifier in Predicate Logic

Originally Posted by aprilrocks92
For all x, there exists a y,z such that if z is a farmer, and y knows z, then x knows y.
(Ax)(Ey,z) [F(z) & K(z, y)]->K(x,y).
What the devil are you on about?

Look at the statement ""Everybody knows someone who knows a farmer""
Where do you see an implication (an if...then) there?

$\displaystyle \left( {\forall x} \right)\left( {\exists y} \right)\left( {\exists z} \right)\left[ {K(x,y) \wedge F(z) \wedge K(y,z)} \right]$