Convert statements into first order logic

  • Thread starter Marclan
  • Start date
  • #1
19
0
Given are the following predicate symbols:
Member(x) : x is a member of the bicycle club
Chairman(x) : x is the chairman of the bicycle club
Bicycle(x) : x is a bicycle
Brand(x, y) : the brand of x is y
Owns(x, y) : x is the owner of y

a. Statement: every member of the bicycle club has the same brand of bicycle.

Note that this statement is ambiguous, the meaning could be:
i: each member of the Club has bycicles of the same brand (monobrand member),
ii: all the members of the Club have bycicles of the same brand (monobrand Club),
iii: all the members of the Club have at least one bicycle of the same brand, but (s)he may
have other bicycles of other brands.

Express these interpretations of the given statement in first order logic, using the predicate
symbols above.

I'm trying for example the first one but i'm having some problems:
i. ∀x ∀y (member(x) ∧ bicycle(y) ∧ owns(x,y) ∃ z brand(y,z)¬∃ z2 brand(y,z2))
Or maybe it's better this:
i. ∀x ∀y (member(x) ∧ bicycle(y) ∧ owns(x,y) → ¬∃ z,z2 (brand(y,z2) ∧ brand(y,z)))

There is a correct answer or there could be an easier way to do this? I'll keep update this post if i will solve it. Thanks :wink:
 
Last edited:

Answers and Replies

  • #2
stevendaryl
Staff Emeritus
Science Advisor
Insights Author
8,919
2,897
I'm trying for example the first one but i'm having some problems:
i. ∀x ∀y (member(x) ∧ bicycle(y) ∧ owns(x,y) ∃ z brand(y,z)¬∃ z2 brand(y,z2))
Or maybe it's better this:
i. ∀x ∀y (member(x) ∧ bicycle(y) ∧ owns(x,y) → ¬∃ z,z2 (brand(y,z2) ∧ brand(y,z)))

Both of those are sort of close, but not exactly. Look at the first one: (I've rewritten it in LaTex):
[itex]\forall x \forall y (member(x) \wedge bicycle(y) \wedge owns(x,y) \wedge \exists z\ brand(y,z) \rightarrow \neg \exists z_2\ brand(y,z_2))[/itex]

The clause--[itex]\neg \exists z_2\ brand(y,z_2)[/itex]--literally says that "y does not have a brand". What you need to say, instead is that "y does not have a brand that is different from z".
 
  • #3
19
0
Both of those are sort of close, but not exactly. Look at the first one: (I've rewritten it in LaTex):
[itex]\forall x \forall y (member(x) \wedge bicycle(y) \wedge owns(x,y) \wedge \exists z\ brand(y,z) \rightarrow \neg \exists z_2\ brand(y,z_2))[/itex]

The clause--[itex]\neg \exists z_2\ brand(y,z_2)[/itex]--literally says that "y does not have a brand". What you need to say, instead is that "y does not have a brand that is different from z".
Thank you for the answer, i'm trying to translate that "different from z" but i'm not finding the right way to do that in FOL, the following statement is wrong too?
∀x ∀y (member(x) ∧ bicycle(y) ∧ owns(x,y) ∃ z brand(y,z)¬∃ z2 (brand(y,z2) ∧ brand(y,z)))

It's probably wrong because it's saying that for each bicycle not exist more than one brand associated with it...
 
Last edited:
  • #4
35,139
6,892
@Marclan, in future posts, please don't delete the three parts of the homework template -- they are required here.
 
  • #5
19
0
Still trying to understand how to convert the first sentence, can anyone give an advice to help me?
The problem is translating this correct clue "y does not have a brand that is different from z".
 
  • #6
19
0
In this moment i'm thinking that it's not possible to say that in the first order logic. I'm still on my solution of the third post.
 
  • #7
19
0
Can anyone check if this can be a solution for the second statement? Thanks ;)
∀x ∀y ∀z ∀x2 ∀y2 (member(x) ∧ bicycle(y) ∧ owns(x,y) ∧ brand(y,z)member(x2) ∧ bicycle(y2) ∧ owns(x2,y2) ∧ brand(y2,z))

I don't know if it's more correct use ∃z or ∀z.
 
  • #8
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
2020 Award
17,572
9,339
Still trying to understand how to convert the first sentence, can anyone give an advice to help me?
The problem is translating this correct clue "y does not have a brand that is different from z".

This isn't my area, but it terms of normal mathematical logic, for (i) I would start:

For all ##x## there exists ##z## ##\dots##

where ##x## is a member and ##z## (depending on ##x##) is the brand of bicycle that ##x## has exclusively.
 
  • #9
19
0
I wrote the iii) and i think it's correct:
∀x ∀y ∀z (member(x) ∧ bicycle(y) ∧ owns(x,y) ∧ brand(y,z)∀x2 ∃y2 (member(x2) ∧ bicycle(y2) ∧ owns(x2,y2) ∧ brand(y2,z)))

Always here trying to resolve i) and ii) and learn something new. Thanks!
 
  • #10
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
2020 Award
17,572
9,339
I wrote the iii) and i think it's correct:
∀x ∀y ∀z (member(x) ∧ bicycle(y) ∧ owns(x,y) ∧ brand(y,z)∀x2 ∃y2 (member(x2) ∧ bicycle(y2) ∧ owns(x2,y2) ∧ brand(y2,z)))

Always here trying to resolve i) and ii) and learn something new. Thanks!

That doesn't look right at all. (iii) ought to start with: there exists a brand ##z## ...
 
  • #11
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
2020 Award
17,572
9,339
@Marclan have you done any (mathematical) logic before? My approach would be to translate the English into logic, then (what I can't do) translate the logic into the first-order mumbo-jumbo. But, if you can't do "normal" logic, it's going to be hard to go straight to the first-order expressions.

For example the phrase I've underlined here is logically superfluous:

iii: all the members of the Club have at least one bicycle of the same brand, but (s)he may
have other bicycles of other brands.
 
  • #12
19
0
That doesn't look right at all. (iii) ought to start with: there exists a brand ##z## ...

It's not so simple in the first order logic. Can you explain me why my last statement is wrong? Translating that in words sounds like: "For each member who has a bicycle of a brand z, there is for each other member (x2) at least one bicycle Y2 of the same brand z. It's not what iii) means?
 
  • #13
19
0
iii: all the members of the Club have at least one bicycle of the same brand, but (s)he may
have other bicycles of other brands.

Yes i saw that too, i'm just ignoring it.
 
  • #14
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
2020 Award
17,572
9,339
It's not so simple in the first order logic. Can you explain me why my last statement is wrong? Translating that in words sounds like: "For each member who has a bicycle of a brand z, there is for each other member (x2) at least one bicycle Y2 of the same brand z. It's not what iii) means?

That's not what (iii) means. (iii) means there is some brand (call it the club's default brand) and all members have at least one bicycle of that brand.
 
  • #15
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
2020 Award
17,572
9,339
It's not so simple in the first order logic. Can you explain me why my last statement is wrong? Translating that in words sounds like: "For each member who has a bicycle of a brand z, there is for each other member (x2) at least one bicycle Y2 of the same brand z. It's not what iii) means?

It's clearly wrong because (iii) says nothing about "all brands" that are owned by at least one club member, which is the gist of what you have.

I'd start again and try at least to get a clear logical statement of what (i)-(iii) mean. Without that you will just go round in circles.
 
  • #16
19
0
It's clearly wrong because (iii) says nothing about "all brands" that are owned by at least one club member, which is the gist of what you have.

I'd start again and try at least to get a clear logical statement of what (i)-(iii) mean. Without that you will just go round in circles.

I'm sure about a thing, in the text there isn't a specific brand for the Club (instead of how it could be normal in the reality) so i'm thinking that a right way to solve it is using a general brand. And i don't see the problem "all the brands" because in a normal instantiation of the bicycles, each one will have only one brand so i'm just only saying for each member, each bicycle of him/her and for each brand associated (one) etc...
For example, i can change that in the following statement (exist instead of each for z) but i don't see the advantage:

∀x ∀y z (member(x) ∧ bicycle(y) ∧ owns(x,y) ∧ brand(y,z)∀x2 ∃y2 (member(x2) ∧ bicycle(y2) ∧ owns(x2,y2) ∧ brand(y2,z)))

Thank you for the support!
 
  • #17
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
2020 Award
17,572
9,339
I'm sure about a thing, in the text there isn't a specific brand for the Club (instead of how it could be normal in the reality) so i'm thinking that a right way to solve it is using a general brand. And i don't see the problem "all the brands" because in a normal instantiation of the bicycles, each one will have only one brand so i'm just only saying for each member, each bicycle of him/her and for each brand associated (one) etc...
For example, i can change that in the following statement (exist instead of each for z) but i don't see the advantage:

∀x ∀y z (member(x) ∧ bicycle(y) ∧ owns(x,y) ∧ brand(y,z)∀x2 ∃y2 (member(x2) ∧ bicycle(y2) ∧ owns(x2,y2) ∧ brand(y2,z)))

Thank you for the support!

I still think you're going wrong on both the logical interpretation of the statement and then the rendering of that statement into first-order logic.

For example, the ##\exists \ z ## is superfluous and what you have means something like:

If a club member owns a bicycle of brand z, then all members of the club own a bicycle of brand z.
 
  • #18
19
0
For example, the ##\exists \ z ## is superfluous and what you have means something like:

If a club member owns a bicycle of brand z, then all members of the club own a bicycle of brand z.

You are right, it's the correct meaning. My statement doesn't say that "at least one". In this moment i don't really know how to solve all of these. Thanks anyway.
Always opened for new ideas ;)
 
  • #19
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
2020 Award
17,572
9,339
You are right, it's the correct meaning. My statement doesn't say that "at least one". In this moment i don't really know how to solve all of these. Thanks anyway.

I'm going offline now anyway. But, my advice is you have to develop your logical thinking. Here's how I look at statements (i)-(iii). I do three things: try to figure out what it means (obviously!); think of an example of when it is true; figure out what it doesn't mean; think of an example of when it is false.

(i) each member of the Club has bicycles of the same brand (monobrand member)

What does it mean? It means every club member has his/her own preferred brand and all his/her bikes are of that brand.

Example: Three members: A has one bike (brand X); B has 6 bikes (all brand Y); C has two bikes (all brand X)

What does it not mean? It doesn't mean there is any relationship between the brands of bicycles preferred by different members.

What else does it mean? It means no one can have two bikes of different brands.

Example: A has two bikes, one brand X, one brand Y. This is not allowed by statement (i).

That's the way I would analyse this. And, at this point I believe I truly understand statement (i).
 
  • Like
Likes Dale and Marclan
  • #20
19
0
I'm going offline now anyway. But, my advice is you have to develop your logical thinking. Here's how I look at statements (i)-(iii). I do three things: try to figure out what it means (obviously!); think of an example of when it is true; figure out what it doesn't mean; think of an example of when it is false.

(i) each member of the Club has bicycles of the same brand (monobrand member)

What does it mean? It means every club member has his/her own preferred brand and all his/her bikes are of that brand.

Example: Three members: A has one bike (brand X); B has 6 bikes (all brand Y); C has two bikes (all brand X)

What does it not mean? It doesn't mean there is any relationship between the brands of bicycles preferred by different members.

What else does it mean? It means no one can have two bikes of different brands.

Example: A has two bikes, one brand X, one brand Y. This is not allowed by statement (i).

That's the way I would analyse this. And, at this point I believe I truly understand statement (i).

A good help but i'm still on my past solution:

∀x ∀y (member(x) ∧ bicycle(y) ∧ owns(x,y) ∃ z brand(y,z)¬∃ z2 (brand(y,z2) ∧ brand(y,z)))

And i have just wrote that it's probably wrong because it's only saying that for each bicycle not exist more than one brand associated with it. If only i could know how to write this, i will solve all the exercize.
 
  • #21
Stephen Tashi
Science Advisor
7,676
1,503
If only i could know how to write this, i will solve all the exercize.

Are you required to put all the quantifiers on the left side of the statement?

It seems to me the natural way to express things would be to nest them.


##\forall m ( member(m) \rightarrow ( \exists c ( bicycle(c) \land owns(m,c) \land \exists b ( brand(c,b) \land \forall y ( bicycle(y) \land owns(x,y) \rightarrow ....## etc.
 
  • #22
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
2020 Award
17,572
9,339
A good help but i'm still on my past solution:

∀x ∀y (member(x) ∧ bicycle(y) ∧ owns(x,y) ∃ z brand(y,z)¬∃ z2 (brand(y,z2) ∧ brand(y,z)))

And i have just wrote that it's probably wrong because it's only saying that for each bicycle not exist more than one brand associated with it. If only i could know how to write this, i will solve all the exercize.

There are a number of problems. The main problem is that there is nothing logical to say that ##z2 \ne z##. Simply giving a variable a different name doesn't mean it can't have the same value as another. Second, with the last clause, you are actually trying to say that no bike has two brands.

For (i), one of the advantages of my analysis was that I can see an alternative way to write this statement as the contrapositive:

No member has two bikes of different brands.

Logically that becomes:

There does not exist member ##x## who owns bikes ##y_1## and ##y_2## with Brand of ##y_1## not equal to Brand of ##y_2##.

That is an alternative approach you may wish to think about.

The equivalent positive statement for (i) is:

Every member has bikes of only a single brand. (this is the logical structure I'll use)

For all members ##x##, if ##x## owns bikes ##y_1## and ##y_2## then Brand of ##y_1## = Brand of ##y_2##.

You can see how I'm building this up and can check at each stage that my statements agree with the previous step.

One more step for you:

For all members ##x##, if ##x## owns bikes ##y_1## and ##y_2## and Brand(##y_1, z_1)## and Brand(##y_2, z_2##), then ##z_1 = z_2##

The final step is to expand this into the full first-order. But, as I keep saying, your problem is not really with first-order logic, your problem is that you haven't yet learned to think logically. It's a bit like trying to run a hurdles race before you can run. You need to learn to run first (think logically) then run and jump the hurdles (first-order logic).
 
  • #23
19
0
There are a number of problems. The main problem is that there is nothing logical to say that ##z2 \ne z##. Simply giving a variable a different name doesn't mean it can't have the same value as another. Second, with the last clause, you are actually trying to say that no bike has two brands.

For (i), one of the advantages of my analysis was that I can see an alternative way to write this statement as the contrapositive:

No member has two bikes of different brands.

Logically that becomes:

There does not exist member ##x## who owns bikes ##y_1## and ##y_2## with Brand of ##y_1## not equal to Brand of ##y_2##.

That is an alternative approach you may wish to think about.

The equivalent positive statement for (i) is:

Every member has bikes of only a single brand. (this is the logical structure I'll use)

For all members ##x##, if ##x## owns bikes ##y_1## and ##y_2## then Brand of ##y_1## = Brand of ##y_2##.

You can see how I'm building this up and can check at each stage that my statements agree with the previous step.

One more step for you:

For all members ##x##, if ##x## owns bikes ##y_1## and ##y_2## and Brand(##y_1, z_1)## and Brand(##y_2, z_2##), then ##z_1 = z_2##

The final step is to expand this into the full first-order. But, as I keep saying, your problem is not really with first-order logic, your problem is that you haven't yet learned to think logically. It's a bit like trying to run a hurdles race before you can run. You need to learn to run first (think logically) then run and jump the hurdles (first-order logic).

The big problem is that simple z1=z2 is not possible to write in FOL (as far as i'm concerned). Yesterday i thought about a new way to say the i), and this is it:

∀x ∀y ∃z (member(x) ∧ bicycle(y) ∧ owns(x,y) ∧ brand(y,z)∀y2 bicycle(y2) ∧ owns(x,y2) ∧ brand(y2,z))

It's seems correct to me, but i'm waiting your opinion ;)
 
Last edited:
  • #24
19
0
Are you required to put all the quantifiers on the left side of the statement?

It seems to me the natural way to express things would be to nest them.


##\forall m ( member(m) \rightarrow ( \exists c ( bicycle(c) \land owns(m,c) \land \exists b ( brand(c,b) \land \forall y ( bicycle(y) \land owns(x,y) \rightarrow ....## etc.
No but using more quantifiers you can on the left side of the statement helps to reduce the starting set to consider and make more simple the writing of the formula (instead of writing → followed by one other → etc).
 
  • #25
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
2020 Award
17,572
9,339
The big problem is that simple z1=z2 is not possible to write in FOL (as far as i'm concerned). Yesterday i thought about a new way to say the i), and this is it:

∀x ∀y ∃z (member(x) ∧ bicycle(y) ∧ owns(x,y) ∧ brand(y,z)∀y2 bicycle(y2) ∧ owns(x,y2) ∧ brand(y,z))

It's seems correct to me, but i'm waiting your opinion ;)

I think that says something like "if x owns a bicycle of brand z, then all bicycles are owned by x and are of brand z)"

Given the way z1 = z2 translates to FOL, perhaps a better preparatory statement would be:

For all members x, there exists (a brand) z, such that all bikes owned by x are of brand z.
 
Last edited:

Related Threads on Convert statements into first order logic

Replies
10
Views
2K
Replies
3
Views
1K
Replies
3
Views
484
  • Last Post
Replies
0
Views
155
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
15
Views
3K
  • Last Post
Replies
6
Views
2K
  • Last Post
Replies
5
Views
683
Replies
2
Views
2K
Top