translate sentences using predicate logic and universal quantifiers

762 Views Asked by At

ok so I think I understand of them, but correct my answers if I am wrong..

  1. Any pet either loves itself(a) or some person(b).

my answer: ∀ x Pet(x) --> (Love(x,a) V Love(x, b))

  1. Dogs will eat anything

my answer: ∀ x (Dog(x) --> EatAnything(x))

  1. Some sleepy student didn't answer any questions.

my answer: ∃ x (SleepyStudent(x) ---> ¬ AnswerQuestion(x))

  1. No dog except Fido barked

not sure about this one: ∃ x dogFido(x) ---> Barked(x) ???

  1. Every student who takes CSCI loves it

not sure about this one: ∀ x Student(x) ---> takesCSCI(x, a) ???

I did my best with those questions and I'm hoping I got most of them right, but if I made any errors it would be much appreciated if they were pointed out.

1

There are 1 best solutions below

2
On

Your answers aren't bad, but I think they could be better. I'll rewrite a few of them to give you an idea of what should be changed:

  1. $\forall x \exists b: Pet(x) \land Person(b) \to Loves(x, x) \vee Loves(x,b)$

In your example, you don't bind either $a$ or $b$ with quantifiers, so how do we know that $a$ is "itself" and that $b$ is a person? So I have simply replaced $a$ with $x$, so $Loves(x,x)$ says the pet loves itself, and properly bound $b$ with a quantifier and included a predicate to say it's a person.

  1. $ \forall x \forall y : Dog(x) \to Eat(x,y)$

While $EatAnything$ is probably acceptable, I think it's generally more correct that binary predicates should act as a verb, so we can say $x$ eats $y$ and then say this is true for all dogs $x$ and all $y$.

  1. $ \forall x : Dog(x) \land Barked(x) \to Fido(x)$

Since Fido is the only dog who barked, that is the same as saying given any dog, if the dog barked then we know the dog is Fido. Notice that even if we know Fido is a dog, we still need to verify $x$ is a dog before implying it's fido, since maybe there's something else that's not a dog that barked.

Try and see if you can modify 3 and 5 with these suggestions in mind.