# Assignment 2 comp2130 Winter 2014. Obey all instructions given in the roass document. Out of 48

Yüklə 29,46 Kb.
 tarix 08.11.2018 ölçüsü 29,46 Kb.
 Assignment 2 COMP2130 Winter 2014. Obey all instructions given in the ROASS document. Out of 48 Q1)[3] Find the truth set for each of the following: a) predicate: 7/d is an integer, d  Z+. b) predicate: is an integer, d  { -1, 0 ,1, 5, 25}. Note that means positive square root of d. c) predicate : 1 < x2  3, x R. a) {1,7} [1] b) {0,1,25} [1] c) {xR| 1 < x } [1] [-.5 if no set notation} Q2) [3] Let D be the set of all students at your school, and let M(s) be “s is a math major” and C(s) be “s is a computer science major” and E(s) be “s is an engineering student”. Express each of the following statement using quantifiers, variables and M(s), C(s), and E(s). a) No engineering students are also math students or computer science students. b) Some math students are computer science students but no engineers are computer science students. a) s D, if M(s) C(s) then ~E(s). [1] b) (s D such that M(s) ^ C(s) ) ^ ( sD, if C(s) then ~E(s)) [2] [variants are allowed] Q3) [1] Write in logical form: “the sum of any two fractions is an integer.” x,y  Q, x+yZ. [1] Q4) [1] Which of the following are a negation for: “All dogs are loyal”. Be careful there may be more than one correct answer. a) All dogs are disloyal. b) No dogs are disloyal. c) Some dogs are loyal. d) Some dogs are disloyal. e) There exists disloyal animals that are not dogs. f) There exists loyal animals that are dogs. g) No animals that are not dogs are loyal. h) Not all dogs are loyal. i) There is an animal that is not a dog but is loyal. d) h) [1] Q5) [2] Is the following statement true? “For all real numbers, x and y, if x2=y2 then x = y.” What is its negation? Is the negation true?  x,yR such that (x2=y2) ^ (x  y). [1] Yes the negation is true.[1] Q6) [2] Consider the sequence: 1415926535. “All the 3’s immediately following a 1 are followed by a 7” Is this statement true? Why? Yes[1], it is true because there are no 3’s immediately following a 1 in the sequence so it is vacuously true.[1] or Yes, it is true because there are no 3’s immediately following a 1 in the sequence so there is nothing to make it false. Q7) [1] Rewrite the following in the if-then form: “Being on time each day condition is a sufficient condition for passing this course.” If you are on time each day, you will pass this course. [1] Q8) [4] Let D=E={-2.-1,0,1,2}. Explain why the following are true or false. a) x  D, y E such that x2-y2  2. b) xD such that y  E, x+y= -1. a) if x= -2 D then (-2)2-(2)2=0 2 and 2 E if x= -1 D then (-1)2-(1)2=0 2 and 1 E if x= 0 D then (0)2-(0)2=0 2 and 0 E if x= 1 D then (1)2-(1)2=0 2 and 1 E if x= 2 D then (2)2-(-2)2=0 2 and -2 E [1] Since for all x in D we can find a y in E to make the inequality true[.5], then a) is true[.5] b) if x= -2 D and y = 0  E, then x+y=-2 -1 so x=-2 does not work. if x= -1 D and y = -1  E, then x+y=-2 -1 so x=-1 does not work. if x= 0 D and y = 0  E, then x+y=0 -1 so x=-0 does not work. if x= 1 D and y = 0 E, then x+y=1 -1 so x=1 does not work. if x= 2 D and y = 0  E, then x+y=2 -1 so x=0 does not work. [1] Since the statement is false for every x  D[.5], the statement is false.[.5] b) alternate solution Assume such x exists, and let y=2,[.5] then x+y=x+2=-1, which implies x=-3.[.5] Now if we set y=1, we have x+y=-3+1=-2, which contradicts our choice of x.[.5] Therefore such x does not exist." [.5] Q9) [4] Write the negation for Q8a) and Q8b. a) x  D, y E such that x2-y2  2  x D such that ~(y E such that x2-y2  2) [1]  x D such that y E x2-y2 > 2) [1] b) xD such that y  E, x+y= -1 x D, ~(y  E, x+y= -1) [1] x D,  y  E, x+y  -1. [1] Q10) [4]Fill in the blank in these arguments. a) Students in this class are intelligent. Joan is not in this class. ___________________ no conclusion [1] b) Students in this class are intelligent. Joan is not intelligent. _Joan is not in this class.________________[1]___________ c) Students in this class are intelligent Joan is in this class. __Joan is intelligent______________________[1]__________ d) Students in this class are intelligent Joan is intelligent. ______no conclusion________________________[1]____ Q11) [8] Put each statement into logic form and then rearrange the new statements into the proper order. You may need to use the contrapositive form. 1) No one, who is going to a party, ever fails to brush his teeth; 2) No one looks cool, if he is untidy; 3) Marijuana smokers have no self-control; 4) Every one, who has brushed his teeth, looks cool; 5) No one wears a costume, unless he is going to a party; 6) A man is always untidy, if he has no self-control; Translation: Note these are all understood to be people (1) If a person is going to a party, then he brushes his teeth; (2) If a person is untidy then he does not look cool; (2C) If a person looks cool, then that person is tidy; {Contrapositive of 2} (3) If a person is a Marijuana smoker then he has no self-control; (3C) If a person has self-control then he is not a Marijuana smoker; (4) If a person brushed his teeth, then they look cool; (5) If a person wears a costume, then he is going to a party; (6) If a person has no self-control then he is always untidy; (6C) If a person is tidy then that person has self-control; {Contrapositive of 6} [3] Answer (5) If a person wears a costume, then he is going to a party; (1) If a person is going to a party, then he brushes his teeth; (4) If a person brushed his teeth, then he looks cool; (2C) If a person looks cool, then that person is tidy; (6C) If a person is tidy then that person has self-control; (3C) If a person has self-control then he is not a Marijuana smoker; [3] Therefore, by Transitivity,[1] If a person wears a costume then that person is not a Marijuana smoker.[1] Marijuana smokers never wear a costumes to parties.. Q12) [5] Prove the following theorem: If m|a and m|b and a+b+c = 0, then m|c. Theorem: If m|a and m|b and a+b+c = 0, then m|c. Proof: Let m|a and m|b[.5], then by the definition of divisibility, x, y  Z such that a = mx and b=my[.5]. Now a+b+c = 0. Then, c = -a-b {algebra} [1] = -mx-my {substitution} [1] = m(-x-y). {factoring} [1] Since (-x-y)  Z{closure}[.5], we have m|c.{def of divisibility}[.5]. Q13) [4] Prove that the product of an even integer and an odd integer is even. Proof: Let the even integer be n = 2k,kZ.{def of even} Let the odd number be m=2h+1, where h Z.[1] Now n*m=2k(2h+1) {substitution}[1] =2(2kh+k) {algebra}[1] Since 2kh+k is an integer {closure laws} n*m is even by definition of even. [1] Q14) [1] What is the largest positive integer that the product of 5 consecutive integers is always divisible by? Don’t prove it unless you want to. There are no marks for it. 120[1] Q15) [5] If a non-zero rational number is divided by an irrational number, then the result is irrational. Let the rational number be p =a/b where a,b0. Let the irrational number be q. [.5] Assume (in order to get a contradiction) that p/q=c/d where d0.{def of rational number}[1]. Since p is non-zero then so is the result so c0.[.5] (a/b)/q=c/d {subst} [.5] 1/q= (c/d)*(b/a) {algebra} q = da/cb {algebra} [.5] Since b0 and c0, bc0 and bc Z and adZ, then q is a rational number.{by def}. Contradiction with given.[.5] So p/q is irrational.[.5] Note that 0 is rational so we are not dividing by zero. {bonus}Dostları ilə paylaş:

Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©genderi.org 2017
rəhbərliyinə müraciət

Ana səhifə