views:

19

answers:

1

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

A: 

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
this would not work as far as i know cause.... this would imply she can be home on a sunny day....!!!
John
oh yes! Sorry I read it wrong. I will change my answer.
Sagar V
what if i write something like[sunny(Y) -> location(Julie,Y,park)] V location(Julie,Y,home)
John
@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