0

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) ∧ 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...

skaffman
  • 398,947
  • 96
  • 818
  • 769
John
  • 4,413
  • 6
  • 25
  • 28

2 Answers2

0

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 :)

Sagar V
  • 1,916
  • 15
  • 23
  • this would not work as far as i know cause.... this would imply she can be home on a sunny day....!!! – John Sep 30 '10 at 07:44
  • what if i write something like [sunny(Y) -> location(Julie,Y,park)] V location(Julie,Y,home) – John Sep 30 '10 at 08:02
  • @John: I'm not totally sure of that primarily because that translates into [location(Julie,Y,park) ^ ~sunny(Y)] V location(Julie,Y,home). I am not totally sure that is correct. – Sagar V Sep 30 '10 at 08:11
0

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

Robokop
  • 906
  • 1
  • 5
  • 12