Assignment 3 Logic and Reasoning KEY Print this sheet and fill in your answers. Please staple the sheets together. Turn in at the beginning of class on Friday, September 8. Recall this about logic: Suppose there is no life on Mars. Then the statement: All Martians are green is a true statement. Any statement in logic is true if no counterexample can exist. If there is no example of it either, it is what is called vacuously true. Hint: Several of these questions relate to the logic truth table for implication. When you work them, be sure to identify the propositions in the implication statements. Then you can reason about the entire statement based on what you know about the propositions. 1. Suppose you know that A B is true and that A is true. What do these facts tell you about the value of B, if anything? B is true 2. Suppose you know that A B is true and that A is false. What do these facts tell you about the value of B, if anything? nothing 3. Suppose you know that A B is true and B is false. What do these facts tell you about the value of A, if anything? A is false 4. Tell whether the following implication statement is true under each of the following scenarios, or state that it can t be determined: (All politicians are dishonest) (The country is in trouble) a. All politicians are dishonest is a true statement. A is true, so implication can be either true or false, depending on whether B is true or false b. There exists an honest politician is a true statement A is false, so implication is true c. The country is in trouble is a true statement. B is true, so implication is true 5. Suppose: (All politicians are dishonest) (The country is in trouble) is a true statement, but the country is in trouble is a false statement. Precisely what do these facts imply about politicians? Implication is true and B is false, so A has to be false 6. For which integer values of n is the following statement true? (n = 6) (n + 1 = 7)
A is (n=6) and B is (n + 1 = 7). The implication is true except for when A is true and B is false. But B can never be false if A is true, because n is 6 in that case and 6 + 1 is 7. 7. Use a truth table to solve for the values of A, B, given the following statements are true:! A B,! B! C, C If C is true and!b=>!c, this means that we re looking for values of B where the implication is true and C is true. C is true so!c is false and for this implication to be true it means that!b has to be false. This means B is true. If B is true and!a=>b, then A could be either 0 or 1 8. Here is a proof that 1 for all 1. For 1, let If is false, the implication is automatically true. If is true, then: 1, and 1 11 1 1 1 1 means is true. is true in this case, as well. For each of the following statements, tell whether we have proved the statement true: a. Yes b. Yes c. is true No d. is false No
9. Joe Bloggs wants to show that is true for arbitrary 1. He gives a correct proof that for all 1, but he forgot the base case. Another student gives a correct proof that is false. For each of the following tell whether we can conclude that it is true or false, or else indicate that there is not enough information. a. True b. True c. A 8 is false since we know that A 9 is false and the implication A k =>A k+1 is true an additional correct interpretation is that we can t tell because if the implication is true, we don t know about A and B. They could be either T or F. d. A 1 is false from the same reasoning; the falseness propagates backwards true an additional correct interpretation is that we can t tell because if the implication is true, we don t know about A and B. They could be either T or F. e. Unknown because the A proposition is false, and the implication is true so the B proposition could be either true or false f. is false for an infinite set of values k Same argument as e 10. Here is a proof by induction that all babies have the same eye color. The babies in the world are a set of babies, so it suffices to show that every set of babies has a uniform eye color. Let is true for all 1, then this will prove that is true, where is the number of babies in the world. That will mean that all babies have the same eye color. Base Case: is true because in every set of babies that has just one baby, there are no two babies in the set that have different eye colors. Induction step: Let 1. If is false, then is true. So suppose is true. Let,,...,, be an arbitrary set of k+1 babies. Then,,..., and,,..., are two sets of k babies. Since is true all babies in each of these sets have the same eye color. Therefore, and have the same eye color as the babies in,,...,, so they have the same eye color as each other, and all babies in have the same eye color. Since is an arbitrary set of 1 babies. the same argument applies to every set of 1 babies, and is true: is true in this case also. We conclude that whether or not is true, is true. Which of the following have been successfully proved to be true by the arguments? Problem with proof is going from 1 to 2. From sets of 2 on, there is overlap across the sets, but when looking at sets of size 1 there isn t any overlap, so going from sets of size 1 to size 2 isn t proven. a. True b. Yes
c. No 11. Suppose that in every set of two babies, both babies have the same eye color. What would this imply about the eye colors of all babies? All the same. Here k starts strictly greater than 1 12. Here are some statements related to the book s proof of correctness of Gale Shapley. A: The set returned by every execuon G S is a stable matching. B: The set returned by an execuon of G S is never a stable matching. C: A set S returned by some execuon of G S is not a stable matching. D: In S, there exist pairs (m,w) and (m,w ) such that m prefers w to w and w prefers m to m. E: In S, there exist pairs (m,w) and (m, w ) such that m prefers w to w and w prefers m to m. F: w rejects m, and traded up to higher and higher men in her list, culminang in m. A is the end point where we want to be. We prove by contradiction, so we need to choose C as this statement. B is not the contradiction because we just need to show that there is some execution that doesn t return a stable matching. For the contraction, there has to be a pair that would rather be with each other than their current partners, and this is what D states. So now we re looking for starting with C, including D, and getting to A. Could be either a or c. However, c includes E but E is incorrect. F tells what must have happened to get to D, so we think it must be a. So we check the implication logic and it works out. Which of the following best reflects the logical structure of the proof? (Circle one choice.) a. Using logic, it shows that, and! are true statements, without yet resolving the values of,,.!! is true. Therefore is true. Since,!, so! is true.!, is true. b. Using logic, it shows that, and! are true statements, without yet resolving the values of,, and.!! is true.!, so is true. c. Using logic, it shows that,, and!are true statements, without yet resolving the values of,, and.!! is true. Therefore! is true. Since,!!, so! is true.!, so is true.
13. In the stable matching problem, let two lovebirds be a man and a woman who each first on the other s list. Let a last resort denote a man and a woman that are each last on the other s list. For each of the following, either prove that the statement is true or prove that it is false. To prove a statement is false, come up with a counterexample. (For such a proof, it is desirable to find the smallest counterexample you can think of.) IF you want to prove the statement true, use proof by contradiction: assume that it is false and derive a contradiction. a. Claim: No stable matching contains a last resort. By counter example: Last resort: m 1 : w 1, w 2 w 1 : m 1, m 2 m 2 : w 1, w 2 w 2 : m 1, m 2 matching: {(m 1, w 1 ), (m 2, w 2 )} stable, with a last resort b. Claim: Every stable matching contains a pair of lovebirds. A pair of lovebirds is two people, not two couples. By counter example m 1 : w 1, w 2 w 1 : m 2, m 1 m 2 : w 2, w 1 w 2 : m 1, m 2 matching: {(m 1, w 1 ), (m 2, w 2 )} stable, with no lovebirds c. Claim: Whenever there is a pair of lovebirds. They are married in every stable matching. By contradiction: assume m 1, w 1 are lovebirds. This means: m 1 : w 1,.. w 1 : m 1,. m n : w n : There is a stable matching where they are not paired: { (m 1, w n ) (m n, w 1 ) }. For this to occur, w 1 must have never been asked by m 1, or rejected m 1 in favor of m n. But she would have been asked by m 1 since she s first on his preference list and if she wasn t free at that point she would have traded up to m 1 since he s first on her preference list. 14. We have shown that the number of proposals until the algorithm halts is at most, since none of the n men can make more than n proposals. We haven t proved that this many proposals could ever happen. Show that it can be the case that there are at least proposals before it halts. m 1 w 1 m n w n
Assume that all the men have the same preferences, and all the women do to, each group starting with 1 and going to n. So m 1 will make 1 proposal to get a match, and m 2 will make 2 and so on. So the total number of proposals is = = n 2 /2 + n/2, which is a little more than n 2 /2 and so we get Θ(n 2 ) 15. Prove or disprove: 17 is prime for all 0. Try 17: 17 2 + 17 + 17 = 17 * (17 + 1 + 1) = 17 * 19, but this is divisible by 17 as well as 1, so it isn t prime.