You are on page 1of 8

COMP1805 (Winter 2017)  "Discrete Structures I"

Specification for Assignment 2 of 4

Your submission must be created using Microsoft Word, Google Docs, or LaTeX.

Your submission must be saved as a "pdf" document and have the name "a2.pdf"

Do not compress your submission into a "zip" file.

Late assignments will not be accepted and will receive a mark of 0.

Submissions written by hand, compressed into an archive, or submitted in the


wrong format (i.e., are not "pdf" documents) will receive a mark of 0.

The due date for this assignment is February 11th, 2017, by 11:30pm.

1. Determine whether or not the following arguments are valid. If they are valid, then
state the rules of inference used to prove validity. If they are invalid, outline
precisely why they are invalid.

a. If it is raining then I bring my umbrella to work. I bring my umbrella.


Therefore it must be raining.

Solution: Invalid.
Let p = "It is raining" and u = "I bring my umbrella". The argument is then:

pu
u
p

Consider the case where I bring my umbrella with me every day, but it doesn’t rain
every day. So, we don’t actually know if it is raining or not because I always have my
umbrella and we cannot conclude that it is raining.

b. Everyone who has a PC plays computer games. Everyone taking COMP1501


next semester plays computer games. Therefore every student taking
COMP1501 next semester has a PC.

Let P(x) be "x has a pc", G(x) be "x plays games ", C(x) be "x is taking 1501". The
argument is then:

x P(x)  G(x)
x C(x)  G(x)
 x C(x)  P(x)
COMP1805 (Winter 2017)  "Discrete Structures I"
Specification for Assignment 2 of 4

Universal instantiation would allow the first and second lines to become
P(me)  G(me) and C(me)  G(me), respectively. Consider the case where I do not
have a PC but I do play computer games and I am taking 1501. For this case
P(me)  G(me) would be true (since the antecedent is false) and C(me)  G(me)
would also be true because both the antecedent and consequent are true. The
conclusion C(me)  P(me), however, would be false because the antecedent is true
and the consequent is false. For this case all premises are true but the conclusion is
false, so the argument is invalid.

For your own edification, here is a case that you might have tried but that wouldn't
have worked. Consider the case where I do not have a PC and I do not play games but
I am taking 1501. Although P(me)  G(me) would still be true because of the false
antecedent, C(me)  G(me) would be false because the antecedent is true but the
consequent is false. Since argument validity only applies when the premises are true,
I cannot use this case to show invalidity because not all the premises are true in this
case.

*2.0 marks each; no partial marks awarded. Please keep in mind that, for many of our
students, English is not the first language, so responses that are essentially correct can
be accepted without prejudice.

2. Prove that √4 + √5 is an irrational number.


Proof by contradiction.
Assume √4 + √5 is rational.
Let 𝑟𝑖 be used to denote unspecified rational numbers
Assume √4 + √5 = 𝑟1
2 + √5 = 𝑟1 by math
√5 = 𝑟1 − 2 by math

Lemma 1
Prove -2 is a rational number
(please note this lemma is not unnecessary because -2 is an integer and, thus, a rational)
-2 = -2 / 1
-2 / 1 is in lowest form
(because there is no common integer by which numerator and denominator are both divisible)
-2 = -2 / 1  -2 / 1 is in lowest form
 -2 is rational
√5 = 𝑟1 + −2 by math
√5 = 𝑟1 + −2 by math
√5 = 𝑟1 + 𝑟2 by Lemma 1
√5 = 𝑟3 by the closure of rationals under addition
COMP1805 (Winter 2017)  "Discrete Structures I"
Specification for Assignment 2 of 4

𝑎 𝑎
√5 = 𝑏 ∧ 𝑏 is in lowest form by the definition of rationals
𝑎
√5 = 𝑏 by simplification
5 = a2 / b2
5b2 = a2
a2 is divisible by 5
a2 = 5k
Lemma 2
Prove a2 is divisible by 5  a is divisible by 5
Prove a2 is divisible by 5  a is divisible by 5by implication equivalence
Proof by contradiction
Assume ( a2 is divisible by 5  a is divisible by 5)
a2 is divisible by 5  a is divisible by 5 by demorgan's law
a is divisible by 5  a is divisible by 5
2
by double negation
a2 = 5k  a is divisible by 5 by definition

Remember that a number x being divisible by 5 means x mod 5 == 0


So a number x being NOT divisible by 5 means x mod 5 == 1, 2, 3, or 4
Also remember that x mod y = z means x = yk + z

Proof by Cases
Case 1 of 4:
a2 = 5k  a = 5k + 1
a = 5k + 1 by simplification
2
a = (5k + 1) (5k + 1) by math
a2 = 25k2 + 10k + 1 by math
a2 = 5(5k2 + 2k) + 1 by math
a2 = 5j + 1 by math
a2 = 5k by simplification (of assumption)
a2 = 5k  a2 = 5j + 1 by conjunction
False
Case 2 of 4:
a2 = 5k  a = 5k + 2
a = 5k + 2 by simplification
2
a = (5k + 2) (5k + 2) by math
a2 = 25k2 + 20k + 4 by math
a2 = 5(5k2 + 4k) + 4 by math
a2 = 5j + 4 by math
a2 = 5k by simplification (of assumption)
a2 = 5k  a2 = 5j + 4 by conjunction
False

Case 3 of 4:
a2 = 5k  a = 5k + 3
a = 5k + 3 by simplification
a2 = (5k + 3) (5k + 3) by math
a2 = 25k2 + 30k + 9 by math
COMP1805 (Winter 2017)  "Discrete Structures I"
Specification for Assignment 2 of 4

a2 = 5(5k2 + 6k) + 9 by math


2
a = 5j + 9 by math
a2 = 5k by simplification (of assumption)
a2 = 5k  a2 = 5j + 9 by conjunction
False
*Alternatively, you could also split the remainder into a number that is divisible by five and one
that is not… i.e. a2 = 25k2 + 30k + 9= 25k2 + 30k + 5 +4 = a2 = 5(5k2 + 6k + 1) + 4 and get a2
= 5j +4

Case 4 of 4:
a2 = 5k  a = 5k + 4
a = 5k + 4 by simplification
a2 = (5k + 4) (5k + 4) by math
2 2
a = 25k + 40k + 16 by math
a2 = 5(5k2 + 8k) + 16 by math
a2 = 5j + 16 by math
2
a = 5k by simplification (of assumption)
a = 5k  a = 5j + 16
2 2
by conjunction
*Alternatively, you could split the remainder into a number that is divisible by five and one that
is not… i.e. a2 = 25k2 + 40k + 16 = 25k2 + 40k + 15 + 1 = a2 = 5(5k2 + 8k + 3) +1 and get a2 =
5j +1

back to original proof

a2 = 5k repeating from before Lemma 2


a = 5j by Lemma 2
5b2 = a2 repeating from before Lemma 2
5b2 = (5j) 2 by math (i.e., substitute)
5b2 = 25j 2 by math (i.e., substitute)
b2 = 5j 2 by math (i.e., substitute)
b2 is divisible by 5 by definition
b is divisible by 5 by Lemma 2
b is divisible by 5  a is divisible by 5 by conjunction
𝑎
is NOT in lowest form by definition
𝑏
𝑎
is in lowest form from before
𝑏
𝑎 𝑎
is in lowest form  is NOT in lowest form by conjunction
𝑏 𝑏
False
√4 + √5 is irrational

3. Prove, by indirect proof, that if n is an integer and n5+7 is odd, then n is even. Show
all your work.

Solution: (** can be skipped)


Contrapositive: If n is odd, then n5+7 is even.
Assume n=2k+1 for some integer k.
COMP1805 (Winter 2017)  "Discrete Structures I"
Specification for Assignment 2 of 4

n5+7 = (2k+1) 5 +7 = (2k+1)(2k+1)(2k+1)(2k+1)(2k+1)+7


= (4k2+2k+2k+1)(2k+1) (2k+1)(2k+1)+7 **
= (4k2+4k+1)(2k+1)(2k+1)(2k+1)+7
= (8k3+4k2+8k2+4k+2k+1)(2k+1)(2k+1)+7 **
= (8k3+12k2+6k+1)(2k+1)(2k+1)+7
= (16k4 +8k3+24k3+12k2+12k2+6k+2k+1)(2k+1)+7
=(16k4 +32k3+24k2+8k+1)(2k+1)+7
=32k5+16k4+64k4+32k3+48k3 +24k2+16k2+8k+2k+1+ 7 **
=32k5+80k4+80k3+40k2+10k+8
=2(16k5+40k4+40k3+20k2+5k+4)

Since n5+7 is two times an integer, it is even and the contrapositive is true. Thus, the
original statement is true as well.

4. Find the error in the following proof that every positive integer equals the next
largest positive integer: “Proof: Let P(n) be the proposition ‘n=n+1’. Assume that
P(n) is true, so that n=n+1. Add 1 to both sides of this equation to obtain n+1=n+2.
Since this is the statement P(n+1), it follows that P(n) is true for all positive integers
n.”

Solution: No basis case was done.

5. For integer x, such that -2≤x≤2, prove that y<0, where y=x4 -4x2 -9x-36.

Case 1: -2, y = x4 -4x2 -9x-36= (-2)4 -4(-2)2 -9(-2)-36 = 16-16+18-36= -18

Case 2: -1, y=x4 -4x2 -9x-36 = (-1)4 -4(-1)2 -9(-1)-36= 1-4+9-36= -30

Case 3: 0, y=x4 -4x2 -9x-36 = 04 -4(0)2 -9(0)-36= -36

Case 4: +1, y=x4 -4x2 -9x-36 = 14 -4(1)2 -9(1)-36= 1-4-9-36=-48

Case 5: +2, y=x4 -4x2 -9x-36= 24 -4(2)2 -9(2)-36= 16-16-18-36=-54

Negative (less than zero) in all cases.

6. Prove by induction that 1+3+5+…+(2n-1) = n2, for all positive integers n.

Base step: n=1: 2(1)-1=1=12


True for basis step.
COMP1805 (Winter 2017)  "Discrete Structures I"
Specification for Assignment 2 of 4

Inductive Hypothesis: Assume true for n=k: 1+3+5+…+(2k-1) = k2, for some positive
integer k≥1.

Inductive Step: We need to show that the statement holds for n=k+1:
1+3+5+…+(2k-1)+ (2(k+1)-1)= (k+1)2
LHS
1+3+5+…+(2k-1)+ (2(k+1)-1)
= 1+3+5+…+(2k-1)+ (2k+2-1)
= k2 +2k+1 (recursion)
= (k+1)2

So the statement holds for n=k+1

7. Prove that any integer n≥24 can be expressed as an n=5x+7y, where x,y are
nonnegative integers.
(BONUS QUESTION)

Basis steps:
24=10+14=5(2) + 7(2)
25=5(5) + 7(0)
26=5(1) + 7(3)
27=5(4) + 7(1)
28=5(0) + 7(4)
True for all basis steps.

Inductive Hypothesis: We assume that the statement holds for n=k. That is, for some
k ≥24, we have k=5x+7y, where x,y ≥ 0.

*Alternatively: This question can be solved by strong induction as well. The


induction hypothesis is that any integer i, 24 ≤i ≤ k can be expressed as i = 5x + 7y
for some nonnegative integers x and y, where k represents an arbitrary integer, k ≥
28.

Inductive Step:
We can find k+1 by adding 5 to the item that was five cases back from k + 1.
That is, for k ≥ 28, (k + 1) − 5 = k − 4 ≥ 24
So, k − 4 = 5x + 7y for some x, y
Thus, we can represent k + 1 = 5(x + 1) + 7y

(In English: we can generate five consecutive numbers and we can add 5 to each of
them to get the next five consecutive numbers. This pattern repeats itself for all
subsequent numbers. )

8. What is the power set of {0, 3, 9} ?


COMP1805 (Winter 2017)  "Discrete Structures I"
Specification for Assignment 2 of 4

Solution: 𝓟{0, 3, 9} = { , {0}, {3}, {9}, {0, 3}, {3, 9}, {0, 9}, {0, 3, 9} }

9. List explicitly the members of the following sets.

a. {𝑖 | 0 ≤ 𝑖 < 20 𝑎𝑛𝑑 𝑒𝑖𝑡ℎ𝑒𝑟 𝑖 𝑏𝑒𝑔𝑖𝑛𝑠 𝑤𝑖𝑡ℎ 𝑒𝑖𝑡ℎ𝑒𝑟 𝑎 𝑣𝑜𝑤𝑒𝑙 𝑜𝑟 𝑡ℎ𝑒 𝑙𝑒𝑡𝑡𝑒𝑟 ′𝑡′ }

Solution {one, two, three, eight, ten, eleven, twelve, thirteen, eighteen}

b. {𝑗 | 𝑗 𝑖𝑠 𝑡ℎ𝑒 𝑓𝑖𝑟𝑠𝑡 𝑛𝑎𝑚𝑒 𝑜𝑓 𝑎 𝐶𝑂𝑀𝑃1805 𝑡𝑒𝑎𝑐ℎ𝑖𝑛𝑔 𝑎𝑠𝑠𝑖𝑠𝑡𝑎𝑛𝑡 𝑡ℎ𝑎𝑡 𝑠𝑡𝑎𝑟𝑡𝑠 𝑤𝑖𝑡ℎ 𝑎 𝑣𝑜𝑤𝑒𝑙}

Solution { } or, alternatively, { Yin, Yuzhong }

10. Let 𝑆 = {1, 5, {1,5}, {𝑎𝑝𝑝𝑙𝑒𝑠, 𝑏𝑎𝑛𝑎𝑛𝑎𝑠}, {5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}} and
T= {{1, 5, 10}, {5}, 1, {𝑓𝑟𝑢𝑖𝑡𝑠}, 𝑐𝑎𝑡𝑠, {𝑑𝑜𝑔𝑠}} and answer the following questions.

a. Which set has the larger cardinality? Solution: S has cardinality 5 and T
has cardinality 6 so T is larger

b. What is the intersection, 𝑆 ∩ 𝑇? Solution: {1}

c. What is the cardinality of the union 𝑆 ∪ 𝑇? Solution: 10

11. Determine whether or not the following is valid. Justify your answer by using
membership tables.

(𝐴 ∪ 𝐵 ∪ 𝐶) − 𝐵 − (𝐶 ∩ 𝐴) = (𝐴 − 𝐵) ∪ (𝐵 − 𝐴)

𝐴 𝐵 𝐶 𝐴 ∪𝐵∪𝐶 (𝐴 ∪ 𝐵 ∪ 𝐶) − 𝐵 (𝐶 ∩ 𝐴) (𝐴 ∪ 𝐵 ∪ 𝐶) 𝐴−𝐵 𝐵−𝐴 (𝐴 − 𝐵) ∪ (𝐵 − 𝐴)


− 𝐵 − (𝐶 ∩ 𝐴)
1 1 1 1 0 1 0 0 0 0
1 1 0 1 0 0 0 0 0 0
1 0 1 1 1 1 0 1 0 1
1 0 0 1 1 0 1 1 0 1
0 1 1 1 0 0 0 0 1 1
0 1 0 1 0 0 0 0 1 1
0 0 1 1 1 0 1 0 0 0
0 0 0 0 0 0 0 0 0 0

12. Draw the Venn Diagrams for the following set:

(𝐴 ∪ 𝐵 ∪ 𝐶) − 𝐵 − (𝐶 ∩ 𝐴) = (𝐴 − 𝐵) ∪ (𝐵 − 𝐴)
COMP1805 (Winter 2017)  "Discrete Structures I"
Specification for Assignment 2 of 4

13. What is the intersection, A, of the set of all the digits that appear in your student
number, B, and the set of all even numbers, C. Draw the Venn Diagram for sets A, B,
and C.

This changes with your student number, but if your student number was
100123456...

You might also like