Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
574 views
in Technique[技术] by (71.8m points)

logic - Converting Complex Sentences into FOL

I have been practicing converting sentences into FOL. There're two sentences that I want to confirm about if I'm making correct sense or not.

1. No one is sharing a seat.

On the internet, this sentence is converted like this:

A x1,x2,y Person(x1) ^ Person(x2) ^ Seat(y) ^ InSeat(x1,y)^InSeat(x2,y)==> (x1=x2)

But I converted this sentence like this:

Ax Person(x) ^ AySeat(y)==> ~Sharing(x,y)

By this, I mean, Everyone is not sharing any seat.

2.No class has both fresh students and seniors taking it.

This problem is not available over the internet but, I tried to extract the sense like:

Either fresh student or senior (but not both) taking any class.

and then converted this sentence into this FOL:

 Ayclass(z):((fresh_students(x)==>take(x,z))==>~(seniors(y)==>take(y,z)))  

I'm not sure but is it correct? Am I extracting sense and converting it into FOL correctly?

By the way, I have learned to use either or but not both in FOL from here:

https://math.stackexchange.com/questions/658511/propositional-logic-p-or-q-but-not-both

They showed different ways to do that so I picked one of them.

question from:https://stackoverflow.com/questions/65950779/converting-complex-sentences-into-fol

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...