CS计算机代考程序代写 0 There are four cards on a table showing symbols D, E, 2, and 3 (one per card). Each card has a letter on one side and a digit on the other. Which card(s) do you need to turn over to determine whether every card with a D on one side has a 3 on the other? Why?

0 There are four cards on a table showing symbols D, E, 2, and 3 (one per card). Each card has a letter on one side and a digit on the other. Which card(s) do you need to turn over to determine whether every card with a D on one side has a 3 on the other? Why?
§ You may have to turn over both D and 2, or you may have your answer after turning over justoneofthem. IftheDhasa3ontheotherside,andthe2doesn’thaveaDonthe other side, then you answer yes. If the D has anything other than 3 on the other side, you answer no. If the 2 has a D on the other side, you answer no. It doesn’t matter what the E has on the other side. As for the 3, if it has a D and you already answered yes, this won’t change your answer. If it has a D and you already answered no because you previously saw a D without a 3, again this won’t change your answer. And if the 3 has anything other than a D on the other side, then again it doesn’t change your answer about what Ds have on their other sides.
Although the question does not ask for it, we can formalize the problem as follows. Let’s refer to the top (visible) sides of the cards as t0 , t1 , t2 , and t3 , and the bottom (invisible) sides of the same cards as b0 , b1 , b2 , and b3 respectively. Part of the given information is
t0=“D” ∧ t1=“E” ∧ t2=“2” ∧ t3=“3” Another part of the given information is
¬(b0=“D”) ∧ ¬(b1=“D”) ∧ ¬(b2=“3”) ∧ ¬(b3=“3”)
because cards don’t have letters on both sides, and they don’t have digits on both sides. The question we are asked is
=
(t0=“D” ⇒ b0=“3”) ∧ (b0=“D” ⇒ t0=“3”)
∧ (t1=“D” ⇒ b1=“3”) ∧ (b1=“D” ⇒ t1=“3”)
∧ (t2=“D” ⇒ b2=“3”) ∧ (b2=“D” ⇒ t2=“3”)
∧ (t3=“D” ⇒ b3=“3”) ∧ (b3=“D” ⇒ t3=“3”)
(⊤⇒b0=“3”)∧(⊥⇒⊥)
∧ (⊥⇒b1=“3”)∧(⊥⇒⊥)
∧ (⊥⇒⊥)∧(b2=“D”⇒⊥)
∧ (⊥⇒⊥)∧(b3=“D”⇒⊤)
Now use the given information
Now simplify using the laws (⊤⇒a) = a and (a⇒⊥) = ¬a and (⊥⇒a)=⊤
= b0=“3” ∧ ⊤ ∧ ⊤ ∧ ⊤ ∧ ⊤ ∧ ¬(b2=“D”) ∧ ⊤ ∧ ⊤
Now simplify further using the laws (⊤∧a) = a and (a∧⊤) = a
= b0=“3” ∧ ¬(b2=“D”)
To answer the question with “yes”, we need to know that the bottom of card 0 is “3” and that the bottom of card 2 is not “D”. To answer the question with “no” we need to know either that the bottom of card 0 is not “3” or that the bottom of card 2 is “D”.
Here is a logically equivalent puzzle. Four people are in a bar. The first is drinking beer; the next one is drinking Coke; the next one is 16 years old; the last one is 25 years old. The law says that no-one under 21 years old is allowed to drink beer. To check whether the law is being followed, who do we need to investigate further?