Question

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

Was it helpful?

Solution

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

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top