3

I am not asking for a specific answer, as I assume this would be against the rules of this group, just instructions to the correct approach for the following question:

In CS50AI 2020 - Quiz 1, we have the following question:

The following question will ask you about the following logical sentences.

  1. If Hermione is in the library, then Harry is in the library.

  2. Hermione is in the library.

  3. Ron is in the library and Ron is not in the library.

  4. Harry is in the library.

  5. Harry is not in the library or Hermione is in the library.

  6. Ron is in the library or Hermione is in the library.

Which of the following logical entailments is true? *

  • Sentence 6 entails Sentence 3

  • Sentence 1 entails Sentence 4

  • Sentence 2 entails Sentence 5

  • Sentence 1 entails Sentence 2

  • Sentence 6 entails Sentence 2

  • Sentence 5 entails Sentence 6

As far as I can see, none of these statements (by themselves) entail any of the other statements.

E.g., the first option is: Sentence 6 entails Sentence 3

That is impossible, because Statement 3 is False, so cannot be entailed.

The second option is: Sentence 1 entails Sentence 4, this also appears to be non-proven (i.e. not entailed), because we do not know if Hermione is in the library (i.e if we did know that Hermione was in the library then we could say, we know Harry is in the library, because Hermione is there, but we do not know Hermione is there in the first place).

And so on.

Any pointers in the right direction would be appreciated.

Thanks.

2

So if it is written A entails B, it means that for all possible worlds, is there any world where A is true and B is true.

So firstly, sentence 3 is never gonna be true.

let's see Sentence 1 entails Sentence 2 option, let's see it through truth table: p: Hermione is in the library q: Harry is in the library

p   q   sent1   sent2
T   T     T       T
T   F     F       T
F   T     T       F
F   F     T       F

So, when p and q is true, sentence 1 entails sentence 2.

1
  • I'm pretty sure this logic is wrong, because if so then Sentence 1 entails Sentence 4 as well, and there should only be one answer May 9 at 9:37
-1

Let's take a look to the truth table and conclude why S2 ⊨ S5:

  • Let p := Hermione is in library
  • Let q := Harry is in library
  • Let t := Ron is in library
  • Let 0 := False
  • Let 1 := True
  • And let S1, S2, ..., S6 the sentences proposed
p q t S1 S2 S3 S4 S5 S6
0 0 0 1 0 0 0 1 0
0 0 1 1 0 0 0 1 1
0 1 0 1 0 0 1 0 0
0 1 1 1 0 0 1 0 1
1 0 0 0 1 0 0 1 1
1 0 1 0 1 0 0 1 1
1 1 0 1 1 0 1 1 1
1 1 1 1 1 0 1 1 1

In every world where S2 is True, S5 must be True as well. And as you can see in the table it actually happens. When Hermione is in the library sentence 5 is always correct. And in terms of logic statement:

S5 = (¬S4 ∨ S2)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .