Jump to content

Help with first oder logic...

- - - - -

  • Please log in to reply
1 reply to this topic

#1
thedevil

thedevil

    Newbie

  • Members
  • Pip
  • 4 posts
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...

#2
Momerath

Momerath

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 243 posts
What you've written says that if X is a child and is at home then X is a child and is unwell. That is not what they said.
Not sure how you made the extra marks, so I'll just write it out :)

There exists X where Child(X) ^ unwell(X,y) -> not location(X,y,school).

If your instructor says that the 'there exists' should be 'for all' you can tell them that 'Generally' doesn't mean 'always' :)

As for the second one, it's been a long time since I've had to do stuff like this and I'd need to review it before I'd be confident on how to represent a conditional.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users