




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
During the study of discrete mathematics, I found this course very informative and applicable.The main points in these lecture slides are:Compound Propositions, Logical Connectives, One Interpretation, Truth Table, Simple Equivalent Expressions, Tautology, Pair of Expressions, Demorgan Law, Distributive Law, Domain of Discourse, Empty Set
Typology: Exams
1 / 8
This page cannot be seen from the preview
Don't miss anything!
Name: Net ID: Univ. ID #
Read the following instructions b efore you start to work.
This is a closed-b o ok, closed-notes exam! No calculators, pap er, noteb o oks, or anything else. If you brought anything with you other than p encils, erasers, or p ens, please leave them at the front of the ro om with the pro ctor.
Print your name, Net-ID, and University ID in the slots ab ove, and print your name at the top of every page.
Write your answers in the spaces provided. You can use the backs of sheets for scratch. See the pro ctor if you need more scratch pap er.
Read each question carefully and make sure you understand exactly what it is asking. If you give a b eautiful answer to the wrong question, you'll get no credit. Simplify your answers as much as p ossible. Correct but unnecessarily complicated answers might not receive full credit.
For reasons of consistency, the pro ctors will only answer syntactic questions ab out the exam (e.g. is that an \a" or an \e"). If you think the question is ambiguous, make and state your reasonable assumptions and answer the question.
Don't sp end to o much time on any single problem. You have 105 minutes, and there are 110 p oints on the exam, so if a problem lo oks like it will take you much longer in minutes than its p oint value, you might leave it for later. Rememb er, this exam is curved.
Ambiguously marked answers will receive no credit.
Points for each problem are indicated.
For True/False questions, your score is the numb er correctly marked minus the numb er in- correctly marked. For all other problem typ es there is no p enalty for incorrect answers.
Make sure you have all 8 pages.
(a) x is even only if y is o dd. Solution: If x is even then y is o dd.
(b) It is hot whenever it is sunny. Solution: If it is sunny then it is hot.
(c) Studying is suÆcient for passing. Solution: If you study then you pass
(d) Studying is necessary for passing. Solution: If you pass then you studied
(a) It is neither cold nor dry. Solution: :c ^ :d. (Or: :(c _ d).)
(b) it is rainy if it is not dry. Solution: :d! r.
(c) To b e cold, it must b e windy or rainy. Solution: c! (w _ r )
(d) It is cold or dry, but not b oth. Solution: c d (Or (c _ d) ^ (:c _ :d))
(e) Unless it is windy and dry, it is raining. Solution: There is some disagreement ab out what \A unless B" means. One interpretation is that if B holds, A do es not. The other interpretation is the same, but adds also that if B do esn't hold, then A do es. So, \unless B , A" can b e written either as :B! A, or (second interpretation) :B $ A (which is the same as A B ). Acceptable answers: :(w ^ d)! r :(w ^ d) $ r (w ^ d) r.
(b) (1) 9 x 8 y T (x; y ). (a) Every course has at least one student. (d) (2) 9 y 8 xT (x; y ): (b) Some student is enrolled in every course. (e) (3) 8 x 9 y T (x; y ): (c) No student is taking every course. (i) (4) :9x 9 y T (x; y ): (d) Some course is b eing taken by all students. (g) (5) 9 x 8 y :T (x; y ): (e) Every student is taking at least one course. (a) (6) 8 y 9 xT (x; y ): (f ) Some course has an enrollment of 0. (f ) (7) 9 y 8 x:T (x; y ): (g) Some students are not taking any courses. (g) (8) :8x 9 y T (x; y ): (h) No course is b eing taken by all students. (h) (9) :9y 8 xT (x; y ): (i) No student is taking any course. (b) (10) :8x 9 y :T (x; y ): (j) All students are having a party. (g) (11) :8x:8y :T (x; y ): (k) The rain in Spain falls mainly on the plain. (c) (12) 8 x 9 y :T (x; y ): (l) No students cho ose this answer.
Solution: :(p _ (:p ^ q )) = :p ^ :(:p ^ q )) by DeMorgan = :p ^ (p _ :q )) by DeMorgan again = :p ^ p) _ (:p ^ :q ) by distributive law = F _ (:p ^ :q ) since p ^ :p = F. = :p ^ :q since F _ x = x.
Write each of the following statements using the ab ove predicates and any needed quanti ers:
(a) Harvey is taking CS 173. Solution: T (Harvey, CS173)
(b) Not all freshman are full-time students. Solution: 9 xF (x) ^ :B (x), OR :( 8 x(F (x)! B (x))). OR 9 x:(F (x)! B (x)). Note however that 8 x:(F (x)! B (x)) is incorrect.
(c) No CS course is upp er-level. Solution: :9y (C (y ) ^ U (y )) OR 8 y (C (y )! :U (y )).
(d) There is a part-time student who is not taking any CS course. Solution: 9 x 8 y A(x) ^ (C (y )! :T (x; y )). OR 9 x(A(x) ^ 8 y (C (y )! :T (x; y )))
(e) Every part-time freshman is taking some upp er-level CS course. Solution: 8 x(A(x) ^ F (x))! 9 y (U (y ) ^ C (y ) ^ T (x; y )). OR 8 x 9 y A(x) ^ F (x)! U (y ) ^ C (y ) ^ T (x; y ).
Solution: f;; f;g; f 1 g; ff 1 gg; f;; 1 g; f;; f 1 gg; f 1 ; f 1 gg; f;; 1 ; f 1 ggg
(a) True fb; cg 2 P (A).
(b) True ffagg P (A).
(c) True f;g P (A):
(d) True ; A A.
(e) False fa; cg 2 A A:
(a) Artie is afraid of spiders. (b) Bernie do es not know how to drive. (c) Charlie never pulls a job without using b oth Artie and Dufus. (d) Dufus never works with less than two other p eople. (e) No one other than Artie, Bernie, Charlie, and Dufus was involved in the robb ery.
Prove by contradiction that Artie must b e guilty. Your pro of should b e a sequence of state- ments, and for each statement you make you should explain exactly why it follows from previous statements and the facts ab ove, which you should refer to by letter.
Solution: Assume that Artie is not guilty. By (c), Charlie cannot b e guilty, since he must work with Artie if he is guilty. By (e), the only remaining p ossibilities are Bernie and Dufus. By (d), Dufus is not guilty, since he needs two accomplices, and only one (Bernie) remains. This leaves only Bernie, who by (b) could not have done it alone. So, if Artie is not guilty, then nob o dy is, but this contradicts the fact that a crime was committed and (e).
Other arguments are p ossible, but a bit more verb ose. If you didn't do a pro of by contradic- tion, then you had a harder time solving the problem, and you didn't get full credit (max 7, if everything else was correct.)
We can also do this symb olically, though that is not what was asked for. Moreover, it is not easy to do that way completely. (You'd have to intro duce predicates D (x) for \x drives", and G(x) for \x is guilty". The last statement would also give you trouble.)
A diamond cutter cuts n-carat diamonds into n single 1-carat diamonds. Whenever he makes a cut, the diamond is split into two smaller diamonds with a whole numb er of carats (no fractions). He is paid for each cut as follows: When a diamond is cut into two pieces, he receives a numb er of dollars equal to the pro duct of the size in carats of the resulting two pieces. For example, if he cuts a 9-carat diamond into a 4 and a 5-carat diamond, he'd make 4 times 5, or 20 dollars for that single cut. If he then cuts the 5-carat diamond into a 2-carat and 3-carat diamond, he'd make 6 dollars more. He continues to split the pieces (currently 4-carats, 3-carats, and 2-carats) in any manner, collecting money for each cut, until there are 9 1-carat diamonds left. A rather counterintuitive fact: no matter how he do es this, the total amount of money that he makes for splitting up an n-carat diamond into n 1-carat diamonds is always the same: n(n 1)= 2 dollars. For example, regardless of how he cuts up a 9-carat diamond, he will make 36 dollars. Prove by induction that this is indeed true: No matter what sequence of cuts is used to cut an n-carat diamond into n 1-carat diamonds, the total amount of money made will always b e n(n 1)= 2 dollars, assuming as ab ove that the amount paid for a single cut is the pro duct of the resulting sizes. Solution: Base Case: A 1-carat diamond earns 0 dollars, and 0 = 1(1 1)=2.
Inductive Step: Assume inductively that for any k -carat diamond with k < n, the amount of money made regardless of how it is cut is exactly k (k 1)=2. Now consider an n-carat diamond. The rst cut must divide the diamond into two pieces, one of size k , the other of size n k , for some k such that 1 < k < n and 1 < n k < n. The amount of money made by the rst cut is thus k (n k ). By the inductive hyp othesis, regardless of how the two pieces are cut, the total they yield for the work are k (k 1)= 2 and (n k )(n k 1)=2, resp ectively. Thus, the total amount of money made is: k (n k ) + k (k 1)= 2 + (n k )(n k 1)=2. This simpli es to n(n 1)= 2 (which we'd exp ect you to show).