1 Dot 1
1 Dot 1
Discrete Mathematics I
7. Let p and q be the propositions p : It is below freezing. q : It is snowing. Write these propositions using p and q and logical connectives. a) It is below freezing and snowing. b) It is below freezing but not snowing. c) It is not below freezing and it is not snowing. d) It is either snowing or below freezing (or both). e) If it is below freezing, it is also snowing. f) It is either below freezing or it is snowing, but it is not snowing if it is below freezing. g) That it is below freezing is necessary and sufcient for it to be snowing. Give yourself 1 point for each part (a-g) you got exactly correct, for a total possible of 7 points. 10. Let p, q, and r be the propositions p : You get an A on the nal exam. q : You do every exercise in this book. r : You get an A in this class. Write these propositions using p, q, and r and logical connectives. a) You get an A in this class, but you do not do every exercise in this book. b) You get an A on the nal, you do every exercise in this book, and you get an A in this class. c) To get an A in this class, it is necessary for you to get an A on the nal. d) You get an A on the nal, but you dont do every exercise in this book; nevertheless, you get an A in this class. e) Getting an A on the nal and doing every exercise in this book is sufcient for getting an A in this class. f) You will get an A in this class if and only if you either do every exercise in this book or you get an A on the nal. Give yourself 1 point for each part (a-f) you got exactly correct, for a total possible of 6 points.
1
16. For each of these sentences, determine whether an inclusive or an exclusive or is intended. Explain your answer. a) Experience with C++ or Java is required. b) Lunch includes soup or salad. c) To enter the country you need a passport or a voter registration card. d) Publish or perish. Give yourself 1 point for each part (a-d) you got exactly correct, for a total possible of 4 points. 18. Write each of these statements in the form if p, then q in English. [Hint: Refer to the list of common ways to express conditional statements provided in this section.] a) It is necessary to wash the bosss car to get promoted. b) Winds from the south imply a spring thaw. c) A sufcient condition for the warranty to be good is that you bought the computer less than a year ago. d) Willy gets caught whenever he cheats. e) You can access the website only if you pay a subscription fee. f) Getting elected follows from knowing the right people. g) Carol gets seasick whenever she is on a boat. Give yourself 1 point for each part (a-g) you got exactly correct, for a total possible of 7 points. 19. Write each of these statements in the form if p, then q in English. [Hint: Refer to the list of common ways to express conditional statements provided in this section.] a) It snows whenever the wind blow from the northeast. b) The apple trees will bloom if it stays warm for a week. c) That the Pistons win the championship implies that they beat the Lakers. d) It is necessary to walk 8 miles to get to the top of Longs Peak. e) To get tenure as a professor, it is sufcient to be world-famous. f) If you drive more than 400 miles, you will need to buy gasoline. g) You guarantee is good only if you bought your CD player less than 90 days ago. h) Jan will go swimming unless the water is too cold. Give yourself 1 point for each part (a-h) you got exactly correct, for a total possible of 8 points. 23. State the converse, contrapositive, and inverse of each of these conditional statements.
2
a) If it snows today, I will ski tomorrow. b) I come to class whenever there is going to be a quiz. c) A positive integer is a prime only if it has no divisors other than 1 and itself. Give yourself 3 points for each of the 3 parts that is correct for converse, inverse and contrapositive (a point for each), for a total possible of 9 points. 34. Construct a truth table for ((p q) r) s. Give yourself up to 17 total pointsone point for each correct row, including the heading. 35. Construct a truth table for (p q) (r s). Give yourself up to 17 total pointsone point for each correct row, including the heading. 46. An explorer is captured by a group of cannibals. There are two types of cannibals those who always tell the truth and those who always lie. The cannibals will barbecue the explorer unless he can determine whether a particular cannibal always lies or always tells the truth. He is allowed to ask the cannibal exactly one question. a) Explain why the question Are you a liar? does not work. b) Find a question that the explorer can use to determine whether the cannibal always lies or always tells the truth. Give yourself 2 points for a correct explanation for part a, and 2 points for a correct question (one of several possible) for part b, for a total possible of 4 points. 47. Express these system specications using the propositions p The message is scanned for viruses and q The message was sent from an unknown system together with logical connectives. a) The message is scanned for viruses whenever the message was sent from an unknown system. b) The message was sent from an unknown system but it was not scanned for viruses. c) It is necessary to scan the message for viruses whenever it was sent from an unknown system. d) When a message is not sent from an unknown system it is not scanned for viruses. Give yourself 1 point for each part (a-d) you got exactly correct, for a total possible of 4 points. 48. Express these system specications using the propositions p The user enters a password, q Access is granted, and r The user has paid the subscription fee and logical connectives.
3
a) The user has paid the subscription fee, but does not enter a valid password. b) Access is granted whenever the user has paid the subscription fee and enters a valid password. c) Access is denied if the user has not paid the subscription fee. d) If the user has not entered a valid password but has paid the subscription fee, then access is granted. Give yourself 1 point for each part (a-d) you got exactly correct, for a total possible of 4 points. 51. Are these system specications consistent? The router can send packets to the edge system only if it supports the new address space. For the router to support the new address space it is necessary that the latest software release be installed. The router can send packets to the edge system if the latest software release is installed. The router does not support the new address space. Give yourself 1 point for the correct answer, and up to 3 points for a good explanation of why, for a total possible of 4 points. 66. In the below example of multiplication most of the digits have been suppressed and replaced by dots. (Those that remain are not necessarily all of the 4s, 5s, and 6s in the example.) Restore the suppressed digits by using logical reasoning and/or trial and error to nd them. (Hint: The form of the multiplication tells you that there are some numbers that have only a few possible values. For example, because the rst partial product only has 3 digits, you can deduce that the rightmost (ones) digit of the second number must be a 1.) 6 . . . . . 5 . 5 . 5 . . . . . . . . 4 .
. .
Give yourself 1 point for each correct digit you restore, for a total possible of 18 points.