Midterm Examination Review Solutions MATH 210G Fall 2017 Instructions: The midterm will be given in class on Thursday, March 16. You will be given the full class period. You will be expected to SHOW WORK to justify your solutions. NOTE: on the actual exam, there will be one true-false problem worth 5 points. There will be 6 additional problems each worth 20 points. You are to work five of them. So the total will be out of 105 points. You will be allowed a non-cellular calculator and an 8.5 11 sheet with formulas on one side, which is to be turned in with the exam. 1. The first problem will be FIVE true/false items taken directly from quizzes or from quiz readings. The problem will be worth 5 points total. 2. Using the symbols K: I were the King of the world; C: I d throw away the cars in the world; B: I d throw away the bars in the world, transform each of the statements into logical symbols and use truth tables to determine which pairs of statements are logically equivalent. A) If I were the King of the world then I d throw way the cars and the bars in the world : K (C B) B) Either I were the King of the world or I d throw away the cars and the bars of the world: K (C B) C) Either I were not the King of the world or I d throw way the cars and the bars of the world K (C B) K C B C B K (C B) K (C B) K (C B) T T T T F T F T T F F T T T F T F F F T F F F F Looking at the fourth and fifth rows of the truth table we see that (A) and (C) are logically equivalent but (B) is not equivalent to (A) or (C).
K C B C B K (C B) K (C B) K (C B) T T T T T T T T F T F F T F F T T T T T T F F T F T F T T T F F F T F T F F F F T F F T F F T F T F F F F T F T 3. Translate each sentence into an implication of the form A B or B A, then determine the intended implication. Everyone who has bags of money also has thick biceps None but masons drink protein shakes No one with thick biceps can recite ancient poems People who like to go to the opera have bags of money All the masons can recite ancient poems Let s assign symbols: B: people with bags of money; T people who have thick biceps; M :masons; P: people who drink protein shakes; R: people who can recite ancient poems; O: people who like to go to the opera. These sentences translate into symbols as follows: B T P M R T B O M R. The implication chain is P M R T B 0, or P O. People who drink protein shakes don t like to go to the opera. 4. Translate each sentence into an implication of the form A B or B A, then determine the intended implication. Cowboys fans like to say I m fixin to leave People named Digby do not like to say I m fixin to leave People not named Digby are always named Bubba. People who like to use technology to their advantage are not named Bubba.
Fans of Super bowl Champs like to use technology to their advantage. Let s assign symbols as follows C: Cowboys fan; F : people who say I m fixin to leave; D: People names Digby; B: People named Bubba; I: People who like to use technology to their advantage; S: Fans of SuperBowl champs The sentences translate to: C F D F D B I B S I Then S I B D F C. Fans of Superbowl Champs are not Cowboys fans. 5. Suppose you run a medical clinic. Suppose that 10% of the patients who enter your clinic have a runny nose and suppose that 5% of the clinic s patients have a fever. Suppose it is known that 7% of person s with a runny nose are also have a fever. Use Bayes formula to compute the probability that a patient who enters your clinic and is running a fever also has a runny nose. Let A be the event that a patient has a runny nose and B be the event that a patient has a fever. Then p(a) = 0.1, p(b) = 0.05 and p(b A) = 0.07. Bayes formula implies that p(a B) = p(b A)p(A)/p(B) = 0.07 0.1/0.05 = 0.14 or 14% probability that a patient who is a has a fever also has runny nose. 6. Using the identity p(x) = p(x A)p(A) + p(x A)p( A) one obtains from Bayes theorem that p(b A)p(A) p(a B) = p(b A)p(A) + p(b A)p( A) Note that p( A) = 1 p(a). Suppose that 1% of the population has a certain genetic defect D. A certain test detects the defect 90% of the time when the defect is present, but 9.6% of the tests are false positives. If a person tested for the defect has a positive test result, what is the probability that the person actually has the defect? Let D denote the event that a person has the genetic defect and let T denote the event that the test for the defect gives a positive result. We are given that p(t D) = 0.9 and that p(t D) = 0.096. We also know that p(d) = 0.01 so p( D) = 0.99. Applying the form of Bayes formula abive gives that p(d T ) = p(t D)p(D) p(t D)p(D) + p(t D)p( D) = 0.9 0.01 0.9 0.01 + 0.096 0.99 = 0.009 0.009 + 0.0954 = 0.009 0.10404 or about 8.65% of those who get a positive test result actually have the defect. 7. In a multiple choice exam, 60% of students know the correct method to solve a certain problem. However, there is a 5% chance that a student will choose the wrong answer on the test, even if he/she knows the correct method to solve the problem, and there
is also a 25% chance that a student who does not know the correct method guesses the answer correctly. If a student did get the problem right, what is the probability that the student actually knew the correct answer? Let A be the event that a student knows the method to get the correct answer and let B be the event that the student actually gets the correct answer. Then p(a) = 0.6 and p(b A) = 0.95 since p( B A) = 0.05 and p(b A) = 0.25 while p( A) = 0.4. Note that p(b) = p(b A)p(A) + p(b A)p( A) = 0.95.6 + 0.25 0.4 = 0.67 so Bayes rule gives p(a B) = p(b A)p(A) p(b) = 0.95 0.6 0.67 0.85 Slightly over 85% of students who get the right answer know the method to get the right answer 8. Donald Trump and Vladimir Putin play a tournament as follows. They each wager 32 rubles. In each round they flip a fair coin. If it comes up heads Trump wins, tails Putin wins. The first player to win ten times gets the full 64 rubles. After fifteen rounds Melania Trump calls and tells Donald he has to come home for dinner. At this point Putin has won 9 times and Trump has won 6 times. What is the fairest way to divide the 64 rubles? The probability that Trump will win if play continues is one in sixteen, since Trump would need to get heads four consecutive times. So Trump should get 64/16 = 4 rubles and Putin should get 64 15/16 = 60 rubles. 9. Batman and Superman each wager $ 8 in a tournament of Rock, Paper, Scissors. The first to win 10 times takes all. After fifteen rounds not counting ties Batman has eight wins and Superman has seven. At this point, Batman has to retire to the batcave and get some sleep. What is the fairest way to divide the $16 that has been wagered? What is the minimum additional number of rounds (not counting ties) that guarantees a winner? There has to be a winner in at most four more games since either Batman will win at least two of them or Superman will win at least three of them. To determine the probabilities of each winning, make a table of all possible outcomes of the four games and count how many cases each wins, then divide by all possible outcomes. The sixteen possible outcomes are ( B means Batman wins and S means Superman wins): S BBBB BBBS BBSB BBSS BSBB BSBS BSSB BSSS SBBB SBBS SBSB SBSS SSBB SSBS SSSB SSSS Batman wins 11 of the 16 possible cases so Batman should get $ 11 and Superman should get $ 5.
10. (a) A ladder is 10 feet long. When the top of the ladder just touches the top a wall, the bottom of the ladder is 6 feet from the wall. How high is the wall? (b) TV screen size is measured diagonally across the screen. A widescreen TV has an aspect ratio of 16:9, meaning the ratio of its width to its height is 16/9. Suppose that a TV has a one inch boundary on each side of the screen. If Joe has a cabinet that is 34 inches wide, what is the largest screen size TV that he can fit in the cabinet? Problem cancelled 11. An octahedral die has eight sides, each with probability 1/8 of coming out on top. There are 64 possible outcomes of rolling a pair of octahedral dice, listed as follows. (1, 1) (1, 2) (1, 3) (1, 4) (1, 5) (1, 6) (1, 7) (1, 8) (2, 1) (2, 2) (2, 3) (2, 4) (2, 5) (2, 6) (2, 7) (2, 8) (3, 1) (3, 2) (3, 3) (3, 4) (3, 5) (3, 6) (3, 7) (3, 8) (4, 1) (4, 2) (4, 3) (4, 4) (4, 5) (4, 6) (4, 7) (4, 8) (5, 1) (5, 2) (5, 3) (5, 4) (5, 5) (5, 6) (5, 7) (5, 8) (6, 1) (6, 2) (6, 3) (6, 4) (6, 5) (6, 6) (6, 7) (6, 8) (7, 1) (7, 2) (7, 3) (7, 4) (7, 5) (7, 6) (7, 7) (7, 8) (8, 1) (8, 2) (8, 3) (8, 4) (8, 5) (8, 6) (8, 7) (8, 8) Compute the probability that the sum of the dice is 7 or 11. Compute the probability that the sum is 3, or 15. Compute the probability that both die show an odd number. Compute the probability that the sum of the dice is an even number. (a) There are six ways to get a sum of 7 ((1, 6), (2, 5),..., (6, 1)) and six ways to get a 11 ((3, 8),..., (8, 3)) so 12 ways to get a 7 or 11 so the probability is 12/64 = 3/16. (b) There are two ways to get a three ((1, 2), (2, 1)), and two to get a 15 ((7, 8), (8, 7), so the probability is 4/64 = 1/16. (c) There are 16 ways in which both die show an odd number so the probability is 16/64 = 1/4. (d) The sum of the dice is even if both dice are even or both dice are odd. There are 16 ways for even and 16 for odd, so the probability is 32/64 = 1/2. 12. a) In four-card guts, a hand consists of four cards dealt from a deck of 52 cards. Straights and flushes are not counted. How many possible four card guts hands are there? b) How many four card guts hands contain exactly two pairs? c) How many four card guts hands contain three of a kind but not four of a kind? d) How many four card guts hands do not contain a pair? (a) There are ( ) 52 52 51 50 49 48! = 4 4! 48! = 52 51 50 49 4 3 2 1 = 13 17 25 49 = 270,725
To ( get two pairs you need two different ranks. The number of choices of two ranks is 13 ) 2 = 78. Since there are four suits and you are choosing two suits for each pair, there are ( ( 4 2) = 6 choices for the pair at the higher rank and 4 2) choices for the pair at the lower rank. The total number of distinct pairs then is 78 6 6 = 2808. To get three of a kind note that there are thirteen ranks and four choices (one of the four suits cannot be represented). Then you have 48 choices for the remaining card at a different rank. So the total number of possible four card hands containing three of a kind is 13 4 48 = 2496. To get the number of hands that have a pair but no better, first note that there three different ranks represented in the hand (the rank with the pair and the two other ranks). There are ( ) 13 3 ways to choose three different ranks. There are three possible choices for which rank has the pair (the upper rank, the middle rank, or the lower rank). There are ( 4 2) = 6 ways to get a pair in a given rank, and there are four different ) choices for each rank that does not have the pair. Altogether this gives us 3 6 4 4 = 82,368 possible ways to get a pair but no better. ( 13 3 Note that to determine the number of hands that have no pairs, there are four different ranks, and four different choices for the card at each rank so ( ) 13 4 4 4 4 4 = 183040 possible four card hands without a pair. Note that there are 13 ways to get four of a kind, 1 at each rank. These are all the possiblities. Adding up the number of ways to get all possibilities we get # 4 of a kind + # 3 of a kind + # two pairs + # one pair +# no pair = 13 + 2496 + 2808 + 82368 + 183040 = 270, 725. 13. a) In five card poker, a hand consists of five cards dealt from a deck of 52 cards. How many possible five card poker hands are there? b) How many five card poker hands do not contain any pairs? c) How many five card poker hands do not contain any card higher than a ten (ie, A,K,Q,J)? (Hint: This is the same as counting the number of five card hands from a deck that only contains ranks 2 10.) d) How many five card poker hands contain exactly one card of each suit? (a) The number of five card poker hands is ( ) 52 = 52! 52 51 50 49 48 = 5 5! 47! 120 = 2,598,960 (b) If a poker hand does not contain any pairs then it has five ranks and four ways to get the card in each rank. Multiplying these ways gives ( ) 13 # = 4 4 4 4 4 = 1287 2 10 = 1287 1024 = 1,317,888 5 (c) This is the same as the number of ways of choosing five cards from a deck with the ) A-J s removed, which has 36 cards, that is, = 376, 992 ( 36 5
(d) Zero 14. a) Starting with the first 4 rows of Pascal s triangle, compute the next five rows. The next rows are as follows: 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 1 7 21 35 35 21 7 1 1 8 28 56 70 56 28 8 1 b) How many distinct subsets are there of a set having eight elements? In general, how many distinct subsets are there of a set having N elements? Hint: consider the cases N = 0, 1, 2, 3 and look for a pattern. The set containing no elements is called the empty set. The empty set is a subset of every set. In particular, the empty set has one subset and a set with one element has two distinct subsets: the empty set and the element itself. There are 2 8 = 256 different subsets. In general, a set with N elements has 2 N distinct subsets, including the empty set. This number is obtained by adding up all the numbers in the Nth row of Pascal s triangle since the numbers ( n k) give the number of k-element subsets of a set of n elements. c) Eight kids want to play a game of four on four basketball. How many distinct ways are there to divide the kids into two teams, each with four players? There are 35 ways: ( 8 4) = 70 but each time the group is split into two teams of four, the splitting counts two of the 70 ways of choosing four elements from a set of eight elements. 15. Let L stand for the statement: Rex Tillerson is Large and let C stand for the statement Rex Tillerson is in charge. Use truth tables to verify whether the following two statements are logically equivalent: (i) Rex Tillerson is neither Large nor in Charge : L C. (ii) Rex Tillerson is not Large or in Charge: (L C). (iii) Rex Tillerson is not Large and in Charge: (L C). Thus statements (i) and (ii) are logically equivalent but (iii) is not equivalent to (i) or (ii). 16. Fill in the values T or F for each of the rows and columns of the following truth table.
L C L C (L C) (L C) T T T F F T F F L C L C (L C) (L C) T T F F F T F F F T F T F F T F F T T T Table 1: Truth table for # 15 P Q P Q (P Q) P ((P Q) P ) Q T T T F F T F F Table 2: Filled in truth values P Q P Q (P Q) P ((P Q) P ) Q T T T T T T F F F T F T T F T F F T F T
Recall that this is the truth table for modus ponens, the way that affirms by affirming.