Convert sentences into First Order Logic

In summary: If someone is not in the class then that person is either ill or lazy.2) Ill people do not go for shopping.3) The class teacher noticed that James is not in the class but she has seen James come out of the Candy Shop.
  • #1
Cruger
7
0
Hello there, I have 3 sentences.

They are:
1) If someone is not in the class then that person is either ill or lazy.
2) Ill people do not go for shopping.
3) The class teacher noticed that James is not in the class but she has seen James come out of the Candy Shop.
I want to convert above sentences to first order logic.
I have tried like this

1) [itex]\exists[/itex]x person(x) [itex]\wedge[/itex] [itex]\neg[/itex]inClass(x) [itex]\rightarrow[/itex] ill(x) [itex]\vee[/itex] lazy(x)

2) [itex]\forall[/itex]x person(x) [itex]\wedge[/itex] ill(x) [itex]\wedge[/itex] [itex]\neg[/itex]goShopping(x)

3) [itex]\exists[/itex]x teacher(x) [itex]\wedge[/itex] hasNoticed(x) [itex]\rightarrow[/itex] [itex]\neg[/itex]inClass(James) [itex]\wedge[/itex] goShopping(James)Please somebody tell me whether these are right or wrong?
If they are wrong can you correct them?
Thank you...
 
Last edited:
Physics news on Phys.org
  • #2
1 doesn't look quite right. What if everyone is in class?

2 says that everyone is ill and nobody is shopping.

3 is also definitely wrong. Suppose Mr. X, a teacher, asks his class if anyone knows the answer to some question. He notices Jane raising her hand. This does not imply one thing about James. Mr. X might not even have James as a student.
 
  • #3
Can you please write it in correct way?
I need to have a clear idea...
 
  • #4
Is this right?

1) [itex]\exists[/itex]x person(x) [itex]\wedge[/itex] [itex]\neg[/itex]inClass(x) [itex]\rightarrow[/itex] ill(x) [itex]\vee[/itex] lazy(x)

2) [itex]\forall[/itex]x person(x) [itex]\wedge[/itex] ill(x) [itex]\rightarrow[/itex] [itex]\neg[/itex]goShopping(x)

3) [itex]\exists[/itex]x teacher(x) [itex]\wedge[/itex] (hasNoticed(x, James) [itex]\wedge[/itex] [itex]\neg[/itex]inClass(James) [itex]\wedge[/itex] goShopping(James))
 
  • #5
A problem common to your answers 1 and 2: No parentheses. What you wrote is not a WFF because implication is the last to be evaluated without parentheses. The x's on the right hand side of the implication in your expressions are free variables. I'm assuming you meant ∃x (person(x) ∧ ¬inClass(x) → ill(x) ∨ lazy(x)), or with even more parentheses, ∃x ((person(x) ∧ ¬inClass(x)) → (ill(x) ∨ lazy(x))) (but neither of these is correct).

For (1), you shouldn't be using ∃. What happens if x is a rock (i.e., not a person)?

(3) also has problems. Try translating what you wrote back to English. Hint: To be correct, the teacher has to have noticed that James is not in class and has to have noticed that James left the Candy Store.
 
  • Like
Likes 1 person
  • #6
how about this?

1) [itex]\forall[/itex]x [[itex]\exists[/itex]y [itex]\neg[/itex]inClass(y) [itex]\rightarrow[/itex] ill(y) [itex]\vee[/itex] lazy(y)]

2) [itex]\neg[/itex] [itex]\exists[/itex]x (go(ill_people, x) [itex]\wedge[/itex] shopping(x))

3) [itex]\exists[/itex]x teacher(x) [itex]\wedge[/itex] (hasNoticed(x, James) [itex]\wedge[/itex] [itex]\neg[/itex] inClass(Suresh)) [itex]\wedge[/itex] goes(James, shopping))
 
Last edited:
  • #7
please reply......
 
  • #8
No. What's x doing in your new version of 1? In 2, what's this go(ill_people,x)? In 3, who's Suresh? Where's the Candy Store?

It looks like you are just grasping for answers.
 
  • #9
I'm so confused. please do this for me...
 
  • #10
We do not do your homework for you at this site.

It appears you are getting confused by "someone" in the phrase "if someone is not in the class then that person is either ill or lazy.". English is a bit sloppy. Sometimes "some" means "there exists", but not here. Consider the phrase "someone who is over 18 is eligible to vote". This does not mean that there exists some person who is over 18 and who is eligible to vote. It means that every person who is over 18 is eligible to vote. Try translating "Anyone who is not in class is either ill or lazy".

With regard to "ill people do not go for shopping," you were almost there once. You have to be careful of operator precedence. When in doubt, use parentheses. You can address this particular problem using either a universal or negated existential qualifier.

With regard to "the class teacher noticed that James is not in the class but she has seen James come out of the Candy Shop," there's no mention of shopping. One thing you have to be careful of here is the temptation to use second order logic. Don't make a predicate that takes a predicate as an argument.
 
  • Like
Likes 1 person
  • #11
Cruger said:
Hello there, I have 3 sentences.

They are:
1) If someone is not in the class then that person is either ill or lazy.
2) Ill people do not go for shopping.
3) The class teacher noticed that James is not in the class but she has seen James come out of the Candy Shop.
I want to convert above sentences to first order logic.

You've got to take these step by step. Looking at number 1, what is the shape of the sentence? It is an if-then sentence. So your answer will be something like "(quantifiers) if (predicate) then (predicate)". This is the first step.

Next, let's look at the first predicate, it says someone is not in the class. So let's have C(x) mean, x is in the class. So our sentence now looks like "(quantifiers) if ~C(x) then (predicate)".

The second predicate is similar, I'll leave you to handle that. Now to decide what the quantifiers should be. The question must apply to all students, because it means that ANYONE who isn't in the class is ill or lazy. So it must be "all students x". So finally, "For all students x, if ~C(x) then (predicate)."

This is almost ready to translate. If ##\in## is available to you, you can translate this as-is. Otherwise, you need to modify it so that x includes only students. I can think of 3 ways to do that, see if you can find a way to do that.
 

FAQ: Convert sentences into First Order Logic

1. How do I convert a sentence into First Order Logic?

First Order Logic is a formal language used to represent knowledge and statements in a logical and precise manner. To convert a sentence into First Order Logic, you need to identify the key elements of the sentence, such as the subject, predicate, and logical connectives. Then, you can use quantifiers, variables, and logical symbols to represent the sentence in First Order Logic.

2. What are the benefits of converting sentences into First Order Logic?

Converting sentences into First Order Logic allows for a clear and unambiguous representation of knowledge and statements. It also enables logical reasoning and deduction to be applied, making it a valuable tool in fields such as artificial intelligence and computer science.

3. Can all sentences be converted into First Order Logic?

No, not all sentences can be converted into First Order Logic. Some sentences may be too complex or contain ambiguous language that cannot be represented using the rules and symbols of First Order Logic. Additionally, First Order Logic is limited to representing knowledge and statements about the world, and cannot capture emotions, beliefs, or opinions.

4. Are there any limitations to using First Order Logic?

First Order Logic has some limitations, such as its inability to represent uncertainty or probabilities. It also assumes a closed world, meaning that anything that is not explicitly stated to be true is considered false. This can lead to incomplete or incorrect representations if there is missing information.

5. How can I check if my conversion into First Order Logic is correct?

To check if your conversion into First Order Logic is correct, you can use logical reasoning and deduction to test the validity of the statements. You can also use automated tools and software designed for First Order Logic to validate your conversion. Additionally, seeking feedback from others or consulting resources and experts can help identify any errors in your conversion.

Similar threads

Back
Top