开发者

HElp with converting to first order logic

Using only these predicates.....

child(X)            X is a child
unwell(X,Y) X is unwell on day Y
location(X,Y,Z)     Location of X on day Y is Z (school, park, home)
sunny(X)            X is a sunny day

Generally, children do not go to school whenever they are unwell
∄x [Child(x) ∧ location(X,y,home) → Child(x)开发者_StackOverflow ∧ unwell(X,y)]

Not sure if what i've written is right or wrong

Also not sure, how to convert this line...

On sunny days Julie goes to the park, otherwise she stays at home.

Would appreciate the help... Thanks...


Maybe something like this:

 ((child(Julie) ^ location(Julie,Y,park)) -> sunny(Y)) ^ ((child(Julie) ^ location(Julie,Y,home)) -> ~sunny(Y))

I will edit this further if I can think of something. Been a while since I touched first-order logic :)


your first answer isn't correct, but it isn't really translatable to FOL because it describes doesn't describe a strict rule, but only something that is generally the case. To describe that kind of things you would need some kind of non monotonic logic.

But even if we leave that out, and just asume it is a strict rule and ignore all exceptional behaviour you here say that there isn't an entity x which if it is a child and at home is sick and a child. i think you meant to be the second precedent of the implication to be $location(X,Y,school)$

the rendering of the second sentence by Sagar V looks nice but perhaps you want to reverse the implication (depends on what causal relation you want to have) and his sentence forces Julie to be a child which isn't in your problem statement

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜