wuct121: discrete mathematics wollongong university college

55
WUCT121: Discrete Mathematics Assignment 1 Autumn 2010 Submission Receipt Student name: ____________________________ Student number: _____________ Date submitted: __________________________ Tutor initials: ________________ Page 1 of 2f WUCT121: Discrete Mathematics Wollongong University College Assignment 1 Autumn 2010 Student name: _________________________Student number:______________ Untidy or badly set-out work will not be marked, and will be recorded as unsatisfactory. Give full working for all answers, unless the question says otherwise. Please staple your assignment together, with this cover sheet. This assignment must be submitted by the end of your tutorial in week 2. Question 1. For each of the following sentences, determine whether or not they are statements. For each statement, determine its truth value. Briefly justify your answers. (i) Lies, damned lies, and statistics. (ii) There are two high tides and two low tides every day. (iii) For all real numbers x, y, and z, x – (y z) = (x y) – z. Question 2. Translate into symbols the following compound statement. If I attend all lectures and tutorials, attempt all of the tutorial and assignment questions, and regularly consult with my teachers, I should pass this subject. Clearly define all simple statements p, q, r ... used and give the statement form of the compound statement. Question 3. Write down the truth table that corresponds to the following simple rules. (i) All outcomes are true unless both statements p and q are false. (ii) All outcomes are false unless both statements p and q are true.

Upload: others

Post on 06-Feb-2022

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 1 Autumn 2010 Submission Receipt

Student name: ____________________________ Student number: _____________ Date submitted: __________________________ Tutor initials: ________________ Page 1 of 2f

WUCT121: Discrete Mathematics Wollongong University College

Assignment 1 Autumn 2010

Student name: _________________________Student number:______________ Untidy or badly set-out work will not be marked, and will be recorded as unsatisfactory. Give full working for all answers, unless the question says otherwise. Please staple your assignment together, with this cover sheet. This assignment must be submitted by the end of your tutorial in week 2.

Question 1.

For each of the following sentences, determine whether or not they are statements. For each statement, determine its truth value. Briefly justify your answers.

(i) Lies, damned lies, and statistics.

(ii) There are two high tides and two low tides every day.

(iii) For all real numbers x, y, and z, x – (y – z) = (x – y) – z.

Question 2.

Translate into symbols the following compound statement.

If I attend all lectures and tutorials, attempt all of the tutorial and assignment questions, and regularly consult with my teachers, I should pass this subject.

Clearly define all simple statements p, q, r ... used and give the statement form of the compound statement.

Question 3.

Write down the truth table that corresponds to the following simple rules.

(i) All outcomes are true unless both statements p and q are false.

(ii) All outcomes are false unless both statements p and q are true.

Page 2: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 1 Autumn 2010 Submission Receipt

Student name: ____________________________ Student number: _____________ Date submitted: __________________________ Tutor initials: ________________ Page 2 of 2f

Question 4.

Translate into English the following compound statements.

(i) ~p ∧ q

(ii) ~(p ∧ q)

Are their truth values the same? Briefly justify your answer.

Question 5.

Translate into English the following compound statements.

(i) ~p ∨ q

(ii) ~(p ∨ q)

Are their truth values the same? Briefly justify your answer.

Question 6.

Briefly explain why the operations of addition and multiplication of natural numbers are closed, but the operations of subtraction and division of natural numbers are not.

Question 7.

(i) Write down the associative, commutative, and distributive properties of natural numbers with respect to the operations of addition and multiplication.

(ii) Do you think similar properties exist for the set of integers and the set of real numbers? Briefly justify your answers.

Question 8.

(i) Write down the law of trichotomy, the laws of transitivity, and the well ordering principle.

(ii) Do you think these properties also apply to the set of integers and the set of real numbers? Briefly justify your answers.

Page 3: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 2 Autumn 2010 Submission Receipt

Student name: ____________________________ Student number: _____________ Date submitted: __________________________ Tutor initials: ________________ Page 1 of 3f

WUCT121: Discrete Mathematics Wollongong University College

Assignment 2 Autumn 2010

Student name: _________________________Student number:______________ Untidy or badly set-out work will not be marked, and will be recorded as unsatisfactory. Give full working for all answers, unless the question says otherwise. Please staple your assignment together, with this cover sheet. This assignment must be submitted by the end of your tutorial in week 3.

Question 1.

Write down the truth tables for the following compound statements:

(i) p if q,

(ii) p only if q,

(iii) p if and only if q

Write down any tautology which contains all three of these statements.

Question 2.

Translate into English the following compound statements:

(i) ~(~p ∨ ~q)

(ii) p ∧ q Are their truth values the same? Use truth tables to justify your answer.

Question 3.

Translate into English the following compound statements.

(i) ~(~p ∧ ~q)

(ii) p ∨ q

Are their truth values the same? Use truth tables to justify your answer.

Page 4: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 2 Autumn 2010 Submission Receipt

Student name: ____________________________ Student number: _____________ Date submitted: __________________________ Tutor initials: ________________ Page 2 of 3f

Question 4.

An argument is a conditional statement where one or more hypotheses p1, p2, …, pn imply a conclusion q, that is, (p1 ∧ p2 ∧ … ∧ pn) ⇒ q. It is said to be valid if it is a tautology. Translate into symbols the following argument:

I could do my Discrete Math assignments or enjoy a more full social life. If I enjoy a more full social life, I could fail this subject. I don’t want to fail this subject. Therefore, I must do my Discrete Math assignments.

Clearly define all simple statements p, q, r ... used and give the statement form of the compound statement. Use truth tables to determine whether this is a valid argument.

Question 5.

Use the “quick” method to show that the following statements are tautologies:

(i) (p ∧ (p ⇒ q) ⇒ q)

(ii) ((p ⇒ q) ∧ (q ⇒ r)) ⇒ (p ⇒ r))

Question 6.

(i) Write down the definitions for the odd and even integers.

(ii) Write down the definitions for the prime and composite integers.

(iii) Write down the definitions for the rational and real numbers.

Question 7.

Consider a singleton set A containing only 0 as an element, that is, A = {0}. Of the operations of addition, subtraction, multiplication, and division, write down which operations on this set are closed. Briefly justify your answers.

Question 8.

Write down two operations that are closed on the set of natural numbers but are not commutative, that is, there exist natural numbers a and b such that op(a, b) ≠ op(b, a).

Page 5: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 2 Autumn 2010 Submission Receipt

Student name: ____________________________ Student number: _____________ Date submitted: __________________________ Tutor initials: ________________ Page 3 of 3f

Question 9.

Use the Sieve of Eratosthenes to find all of the prime numbers between 101 and 200. Justify your answer by demonstrating how you determined that each of these numbers was in fact a prime number.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 94 95 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200

Page 6: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 3 Autumn 2010 Submission Receipt

Student name: ____________________________ Student number: _____________ Date submitted: __________________________ Tutor initials: ________________ Page 1 of 2f

WUCT121: Discrete Mathematics Wollongong University College

Assignment 3 Autumn 2010

Student name: _________________________Student number:______________ Untidy or badly set-out work will not be marked, and will be recorded as unsatisfactory. Give full working for all answers, unless the question says otherwise. Please staple your assignment together, with this cover sheet. This assignment must be submitted by the end of your tutorial in week 4.

Question 1.

Use full truth tables to determine whether the following compound statements are tautologies, contradictions, or are contingent:

(i) (p ⇒ q) ⇔ (~q ⇒ ~p)

(ii) ((~p ∨ q) ∧ (~q ∨ r)) ⇒ (~p ∨ r))

Question 2.

Use the quick method to determine whether the following compound statements are tautologies, contradictions, or are contingent:

(i) ~(p ⇒ q) ⇔ (~q ⇒ ~p)

(ii) ((~p ∨ q) ∧ (~q ∨ r)) ⇒ (~p ∨ r))

Do your results from question 1 agree with your results from question 2? Briefly justify your answers.

Question 3.

(i) Briefly explain the rules of Substitution and Substitution of Equivalence.

(ii) Using these rules, or otherwise, show how we can derive

~(~p ∨ ~q) ⇔ (p ∧ q)

from the following statements. Show all working.

a. ~(p ∨ q) ⇔ (~p ∧ ~q)

b. ~~p ⇔ p

Page 7: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 3 Autumn 2010 Submission Receipt

Student name: ____________________________ Student number: _____________ Date submitted: __________________________ Tutor initials: ________________ Page 2 of 2f

Question 4.

Using the logical equivalences given in your notes, rewrite the following statements without using conditional or biconditional connectives:

(i) (p ⇒ q) ⇔ (~q ⇒ ~p)

(ii) ((~p ∨ q) ∧ (~q ∨ r)) ⇒ (~p ∨ r))

Question 5.

Translate the following statements from English into predicate logic notation:

(i) There is a unique even prime number.

(ii) Every student can correctly answer some questions in this assignment.

Question 6.

Translate the following statements from predicate logic notation into English:

(i) ∃ x ∈, ∀ y ∈, x ≥ y

(ii) ∀ students s, ∃ assigned problem p, s cannot correctly solve p.

Question 7.

Negate the statements given in question 5 and translate their negations from English into predicate logic notation. Which statements are true? Briefly justify your answers.

Question 8.

Negate the statements given in question 6 and translate their negations from predicate logic notation into English. Which statements are true? Briefly justify your answers.

Page 8: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 4, Autumn 2010 Submission Receipt

Student name: ____________________________ Student number: _____________ Date submitted: __________________________ Tutor initials: ________________ Page 1 of 2

WUCT121: Discrete Mathematics Wollongong University College

Assignment 4, Spring 2010

Student name: _________________________Student number:______________ Untidy or badly set-out work will not be marked, and will be recorded as unsatisfactory. Give full working for all answers, unless the question says otherwise. Please staple your assignment together, with this cover sheet. This assignment must be submitted during your tutorial in week 6.

Question 1.

(i) State the Principle of Mathematical Induction in English.

(ii) Translate your statement from part (i) above into predicate logic notation.

Question 2.

Using the Principle of Mathematical Induction,

(i) Prove 1)1.(

1...3.2

13.2

1+

=+

+++n

nnn

for all natural numbers n.

(ii) Prove nni

i

=∑=

=1

1 for all natural numbers n.

Question 3.

(i) State the Generalised Principle of Mathematical Induction in English.

(ii) Translate your statement from part (i) above into predicate logic notation.

Question 4.

Using the Generalised Principle of Mathematical Induction,

(i) Prove n3 – n is divisible by 6 for all natural numbers n ≥ 2.

[Hint: Consider the definition of divisibility: For all integers a and b, if b divides a, there exists an integer c such that a = bc, that is, ∀a, b ∈ (b|a ⇒ ∃c ∈, a = bc)]

(ii) Prove n! > n2 for all natural numbers n ≥ 4.

Page 9: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 4, Autumn 2010 Submission Receipt

Student name: ____________________________ Student number: _____________ Date submitted: __________________________ Tutor initials: ________________ Page 2 of 2

Question 5.

(i) State the Strong Principle of Mathematical Induction in English.

(ii) Translate your statement from part (i) above into predicate logic notation.

Question 6.

Suppose that a1, a2, a3, … is a sequence defined as follows:

a1 = 1, a2 = 3

ak = ak-2 + 2ak-1 for all natural numbers k ≥ 3

Use the Strong Principle of Mathematical Induction to prove that an is odd for all natural numbers.

Question 7.

Observe that

1 = 1 1 + 3 = 4 1 + 3 + 5 = 9 1 + 3 + 5 + 7 = 16 1 + 3 + 5 + 7 + 9 = 25

Guess a general formula and prove it by using mathematical induction.

Page 10: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 5, Autumn 2010 Submission Receipt

Student name: ____________________________ Student number: _____________ Date submitted: __________________________ Tutor initials: ________________ Page 1 of 2

WUCT121: Discrete Mathematics Wollongong University College

Assignment 5, Spring 2010

Student name: _________________________Student number:______________ Untidy or badly set-out work will not be marked, and will be recorded as unsatisfactory. Give full working for all answers, unless the question says otherwise. Please staple your assignment together, with this cover sheet. This assignment must be submitted during your tutorial in week 7.

Question 1.

(i) State the Rule or Modus Ponens and Law of Syllogism in English.

(ii) Translate your statements from part (i) above into predicate logic notation.

(iii) Consider the following statements in which x ∈ :

P: x = 1 Q: x + 1 = 2 R: (x + 1)2 = 4

If we assume that P is a true statement, explain how these statements, together with Modus Ponens and the Law of Syllogism, can be used to decide the truth-value of statement R.

Question 2.

In the television show Doctor Who, the main character once asked his opponent whether the following argument was valid:

All elephants are pink. Jumbo is an elephant. Therefore, Jumbo is pink.

Translate this argument into predicate logic notation. Briefly explain whether or not it is a valid argument. Justify your answer.

Question 3.

(i) Write down the tautology that is used in Proof by Contradiction.

(ii) Using proof by contradiction or otherwise, prove the following statement:

The set of primes is not finite.

Page 11: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 5, Autumn 2010 Submission Receipt

Student name: ____________________________ Student number: _____________ Date submitted: __________________________ Tutor initials: ________________ Page 2 of 2

Question 4.

(i) Write down the tautology that is used in Proof by Contrapositive.

(ii) Using proof by contrapositive or otherwise, prove the following statement:

For all integers n, if n3 is even then n is even”.

Question 5.

(i) Write down the tautology that is used in Proof by Cases.

(ii) Using proof by cases or otherwise, prove the following statement:

If m is an integer, then m2 + m + 1 is always odd.

Question 6.

(i) State the Fundamental Theory of Arithmetic.

(ii) Use the Fundamental Theory of Arithmetic to evaluate lcm(364, 780)

Question 7.

(i) State the Quotient-Remainder theorem.

(ii) Briefly explain how the Euclidean Algorithm can be used to evaluate the greatest common divisor of two integers.

(iii) Use the Euclidean Algorithm to evaluate gcd(2136, − 89).

Also, find m, n ∈ such that 2136m + 89n = gcd(2136, − 89).

Page 12: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 6, Autumn 2010 Submission Receipt

Student name: ____________________________ Student number: _____________ Date submitted: __________________________ Tutor initials: ________________ Page 1 of 2

WUCT121: Discrete Mathematics Wollongong University College

Assignment 6, Autumn 2010

Student name: _________________________Student number:______________ Untidy or badly set-out work will not be marked, and will be recorded as unsatisfactory. Give full working for all answers, unless the question says otherwise. Please staple your assignment together, with this cover sheet. This assignment must be submitted during your tutorial in week 8.

Question 1.

Let A be a set, and let P(x) be a predicate which applies to elements x ∈ A.

(i) Briefly describe how you would prove the following statements

a) ( )xPAx ,∈∀

b) ( )xPAx ,∈∃

(ii) Briefly describe how you would disprove the following statements

a) ( )xPAx ,∈∀

b) ( )xPAx ,∈∃

Question 2.

Determine whether each of the following statements is true or false. If a statement is true, give a brief reason why. If a statement is false, demonstrate why.

(i) ∃x ∈ , ∃y ∈ ( x + y ≠ y + x )

(ii) ∀x ∈ , ∀y ∈ , ∃ε > 0 ( | x + y | > ε )

Question 3.

(i) Use the quotient-remainder theorem to show that any integer n can be written as one of the following forms: qn 3= , 13 += qn , or 23 += qn where q is some integer.

(ii) By considering the three cases from (i), prove that the square of any integer has the form k3 or 13 +k for some integer k.

Page 13: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 6, Autumn 2010 Submission Receipt

Student name: ____________________________ Student number: _____________ Date submitted: __________________________ Tutor initials: ________________ Page 2 of 2

Question 4.

(i) Use the quotient-remainder theorem to show that any odd integer n can be written as one of the following forms: 14 += qn or 34 += qn where q is some integer.

(ii) By considering the two cases from (i), prove that the square of any odd integer has the form 18 +m for some integer m.

Question 5.

Let U = {0, 1, 2, 3, 4}, A = {0, 1, 2}, B = {1, 2, 3} and C = {2, 3, 4}.

Write down the following sets

(i) A ∪ B

(ii) B ∩ C

(iii) C – A

(iv) U – B

(v) U ∪ C

(vi) U ∩ A

(vii) ∅ ∪ B

(viii) ∅ ∩ C

Question 6.

Indicate which of the following statements are true and which are false. Explain briefly.

(i) U ∈ U

(ii) U ⊆ U

(iii) ∅ ∈ ∅

(iv) ∅ ⊆ ∅

(v) ∅ ∈ {∅}

(vi) ∅ ⊆ {∅}

(vii) U ∈ {{U}}

(viii) U ⊆ {{U}}

Page 14: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 7, Autumn 2010 Submission Receipt

Student name: ____________________________ Student number: _____________ Date submitted: __________________________ Tutor initials: ________________ Page 1 of 2

WUCT121: Discrete Mathematics Wollongong University College

Assignment 5, Spring 2010

Student name: _________________________Student number:______________ Untidy or badly set-out work will not be marked, and will be recorded as unsatisfactory. Give full working for all answers, unless the question says otherwise. Please staple your assignment together, with this cover sheet. This assignment must be submitted during your tutorial in week 9.

Question 1.

How many people must be enrolled in Discrete Mathematics to ensure that at least three people have surnames that begin with the same two letters? Justify your answer.

Question 2.

A WCA administrator wants to assign one hundred and twenty students to eleven classes so that no class has more than fifteen students. Show that there must be at least three classes with ten or more students. Justify your answer.

Question 3.

Determine the truth value of the following congruence relations. Justify your answers.

(i) 17 ≡ 2(mod5)

(ii) 4 ≡ −5(mod7)

(iii) − 2 ≡ −8(mod3)

(iv) − 6 ≡ 22(mod2)

Question 4.

(i) Write out the addition and multiplication tables for 6.

(ii) Use the tables in part (i) to solve the equations below for x in 6:

a. x + [3]= [1]

b. [2]x = [3]

c. [3]x = [1]

d. x + [4]= [0]

Page 15: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 7, Autumn 2010 Submission Receipt

Student name: ____________________________ Student number: _____________ Date submitted: __________________________ Tutor initials: ________________ Page 2 of 2

Question 5.

Prove by mathematical induction that for all n ≥ 1, n3 ≡ n (mod3).

Question 6.

(i) Find 911 (mod 13)

(ii) Find 913 (mod 11)

Question 7.

Let U be the universal set and let A and B be non empty subsets of the universal set.

(i) Write down the formal definitions of set operations

a. set union: A ∪ B

b. set intersection: A ∩ B

c. set complement: A

d. set difference: A – B

(ii) Write down the formal definitions of set relationships

a. set equality: A = B

b. subset and superset: A ⊆ B

(iii) Write down the formal definitions of special sets

a. the empty set: ∅

b. the universal set: U

c. the power set: ( )AP

Question 8. Let A = {1, 2}. Write down each of the following sets:

(i) ( )AP

(ii) ( )( )APP

Question 9.

Let U be the universal set, and let A and B be elements of ( )UP .

Use a typical element argument to prove that ( ) BABA ∪=∩ .

[Hint: You need to show that ( ) ( )BABA ∪⊆∩ and ( ) ( )BABA ∩⊆∪ are both true]

Page 16: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 8, Autumn 2010 Submission Receipt

Student name: ____________________________ Student number: _____________ Date submitted: __________________________ Tutor initials: ________________ Page 1 of 2

WUCT121: Discrete Mathematics Wollongong University College

Assignment 8, Autumn 2010

Student name: _________________________Student number:______________ Untidy or badly set-out work will not be marked, and will be recorded as unsatisfactory. Give full working for all answers, unless the question says otherwise. Please staple your assignment together, with this cover sheet. This assignment must be submitted during your tutorial in week 10.

Question 1.

(i) State the definition of a simple graph.

(ii) Draw a simple graph that has four vertices with degrees 1, 2, 2, and 3.

(iii) Explain why there are no simple graphs that have four vertices with degrees 1, 2, 3, and 3.

(iv) Explain why there are no simple graphs that have four vertices with degrees 1, 2, 3, and 4.

Question 2.

(i) Draw a graph G consisting of four vertices {v1, v2, v3, v4} and six edges {e1, e2, e3, e4, e5, e6}, where e1=(v1,v2), e2 = (v1, v3), e3 = (v1, v4), e4 =(v2, v3), e5 =(v2, v4), and e6 =(v3, v4)}

(ii) Write down the four simple paths from v1 to v2.

(iii) Write down the four closed paths of length 3 from v1 to v1.

Question 3.

Let U be the universal set and let A and B be subsets of U.

Prove or disprove ∅=−∩− )()( ABBA

[Hint: It may be helpful to consider a Venn diagram of A, B, and U.]

Question 4.

Let U be the universal set and let A, B and C be subsets of U.

Prove or disprove )()( CBACBA −−=−−

[Hint: It may be helpful to consider a Venn diagram of A, B, C and U.]

Page 17: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 8, Autumn 2010 Submission Receipt

Student name: ____________________________ Student number: _____________ Date submitted: __________________________ Tutor initials: ________________ Page 2 of 2

Question 5.

(i) State the definition of an ordered pair.

(ii) State the definition of a binary relation.

(iii) State the definition of the domain of a binary relation.

(iv) State the definition of the range of a binary relation.

(v) State the definition of the inverse of a binary relation.

Question 6.

Let A= {1, 2, 3}, B = {2, 3, 4}, and R be a relation from A to B.

(i) List the elements of A x B.

(ii) List the elements of R = {(x, y) | x < y}.

(iii) Write down the domain and range of R.

(iv) Sketch the graph of R in 2

(v) Would R-1 also be a relation from A to B? Justify your answer.

Page 18: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 9, Autumn 2010 Submission Receipt

Student name: ____________________________ Student number: _____________ Date submitted: __________________________ Tutor initials: ________________ Page 1 of 3

WUCT121: Discrete Mathematics Wollongong College Australia

Assignment 9, Autumn 2010

Student name: _________________________Student number:______________ Untidy or badly set-out work will not be marked, and will be recorded as unsatisfactory. Give full working for all answers, unless the question says otherwise. Please staple your assignment together, with this cover sheet. This assignment must be submitted during your tutorial in week 11.

Question 1.

Let H be the set of all people and R be a relation on H given by R= {(h1, h2): h1 is the brother of h2}

i) Write down the domain and range of R.

ii) Is R reflexive? Justify your answer.

iii) Is R symmetric? Justify your answer.

iv) Is R transitive? Justify your answer.

v) Is R an equivalence relation? Justify your answer.

vi) Write down R-1.

Question 2.

Let R be the equivalence relation on defined by R = {(a, b): a ≡ b (mod 5)}.

Write down, for each a ∈ , the equivalence class of a.

Question 3.

Sketch the following relations on [-2, 2] and determine which are functions. Justify your answers.

i) R1 = {(x, y): x + y = 0}.

ii) R2 = {(x, y): x2 + y2 = 4}.

Question 4.

Simplify the following composition of permutations:

i) (1 2 3).(1 2 3)

ii) (12)-1.(23)-1

Page 19: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 9, Autumn 2010 Submission Receipt

Student name: ____________________________ Student number: _____________ Date submitted: __________________________ Tutor initials: ________________ Page 2 of 3

Question 5.

Label the vertices and edges of the following graphs in any convenient way and show whether or not they are isomorphic.

Question 6.

i) Explain what is meant by bipartite and complete bipartite graphs.

ii) Draw two examples of bipartite graphs, one that is complete and one that is not.

Question 7.

i) Explain what is meant by a circuit in a graph.

ii) Write down all circuits that include the vertex e.

c

b e d a g f iii) Is this graph an Eulerian graph? Justify your answer.

iv) Does this graph have an Eulerian path? Justify your answer.

Page 20: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 9, Autumn 2010 Submission Receipt

Student name: ____________________________ Student number: _____________ Date submitted: __________________________ Tutor initials: ________________ Page 3 of 3

Question 8.

i) Explain what is meant by a spanning tree.

ii) Use Kruskal’s algorithm to find a minimal spanning tree for the graph below.

1 c

b 4 6 3 e d a 5 9 2 1 5 g 4 f iii) Is your spanning tree unique? Justify your answer.

Page 21: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 1 Autumn 2010 Solutions Page 1of 3

Question 1.

(i) Not a statement – this is not a declarative sentence, and so cannot be a statement.

(ii) True statement – there are two high tides and two low tides every day as a consequence of the gravitational attraction of the earth’s oceans to the moon. Look it up. ☺

(iii) False statement – this statement specifies what could be the associative property of real numbers with respect to operation of subtraction, but this statement is true only when z = 0. Consider the following counterexample: let x = 1, y = 2, and z = 3: the left hand side equals 1 – (2 – 3) = 2 while the right hand side equals (1 – 2) – 3 = -4, so the statement must be false for some values of x, y, and z

Question 2.

Let p, q, r, s, t, and u be the statements “I attend all lectures”, “I attend all tutorials”, “I attempt all of the tutorial questions”, “I attempt all of the assignment questions”, “I regularly consult with my teachers” and “I should pass this subject” respectively. The statement form is (p ∧ q ∧ r ∧ s ∧ t) ⇒ u

It is important to write each of these simple statements in full – if you leave off the beginning of any of these statements, for example, “attend all tutorials”, they cease to be statements and become simply collections of words.

Question 3.

(i) This is the disjunction (or) table.

p q (q ∨ r) 1 T T T T F T F T T F F F

(ii) This is the conjunction (and) table.

p q (p ∧ q) 1 T T T T F F F T F F F F

These two rules should serve as simple memory aids for these tables. Remember them and you won’t go wrong. Maybe ☺

Page 22: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 1 Autumn 2010 Solutions Page 2of 3

Question 4.

(i) not p and q

(ii) not both p and q

These two statements do not always have the same truth value. For example, if p is true and q is false, not p and q is false but not both p and q is true.

Question 5.

(i) not p or q

(ii) neither p nor q

These two statements do not always have the same truth value. For example, if p is false and q is true, not p or q is true but neither p nor q is false.

It should be clear from questions 4 and 5 that it is important to test all possible combination of truth values when writing and testing a computer program. A common error many programmers make is to test only some (or one) combination which is false and some (or one) combination which is true and to assume the rest must work as expected. It is not that simple.

Question 6.

An operation on the set of natural numbers is said to be closed if and only if the result of that operation is always a natural number. Formally, we could write something like

“The operation op is closed on the set of natural numbers if, for all natural numbers x and y, there exists a natural number z such that op(x, y) = z”.

This is true for addition and multiplication but not for subtraction and division. A simple counterexample demonstrates this – let x = 1 and y = 2. We have x – y = -1, which is not a natural number, so subtraction is not closed. Similarly, x/y = ½, which is also not a natural number, so division is also not closed.

Question 7.

(i) Commutative properties:

a) x + y = y + x

b) x y = y x

Associative properties:

a) x + (y + z) = (x + y) + z

b) x (y z) = (x y) z

Distributive property:

x (y + z) = x y + x z

Page 23: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 1 Autumn 2010 Solutions Page 3of 3

More formally, we should precede each of these statements by explicit declarations of the nature of our variables, for example, the first property should really be written as

“for all natural numbers x and y, x + y = y + x”

We will examine these sort of formal statements in more detail in the near future when we look at the predicate logic (Logic notes, section 2)

(ii) These properties also apply to the sets of integers, rational numbers, and real numbers – you were taught these rules in primary school and of course they haven’t changed. ☺

Question 8.

(i) Law of Trichotomy:

Given two natural numbers x and y, one and only one of the following three relationships are true:

a) x > y

b) x = y

c) x < y

Laws of Transitivity:

Given three natural numbers x, y and z, the following statements are true:

a) If x > y and y > z then x > z

b) If x = y and y = z then x = z

c) If x < y and y < z then x < z

Well ordering principle:

A set of numbers is deemed to be a well ordered set if and only if the set has a minimum value and every subset of that set also has a minimum value.

(ii) The Law of Trichotomy and the Laws of Transitivity apply equally to the sets of natural numbers, integers, rational numbers, and real numbers – you were taught these rules in high school and of course they haven’t changed. We just give them bizarre names to confuse you. ☺

The Well ordering principle is a different matter. None of the sets of integers, rational numbers, or real numbers can be deemed a well ordered set as none of these sets has a least element. It is possible to have a well ordered subset of these sets, for example, the set of natural numbers is a subset of all three of these other sets.

Page 24: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 2 Autumn 2010 Solutions Page 1 of 4

Question 1.

(i) p if q

p q (q ⇒ p) 1 T T T T F T F T F F F T

(ii) p only if q

p q (p ⇒ q) 1 T T T T F F F T T F F T

(iii) p if and only if q

p q (p ⇔ q) 1 T T T T F F F T F F F T

(iv) both p if q and p only if q is logically equivalent to p if and only if q

((q ⇒ p) ∧ (p ⇒ q)) ≡ (p ⇔ q)

Question 2.

(i) neither not p nor not q

(ii) p and q

(iii) neither not p nor not q is logically equivalent to p and q

~(~p ∨ ~q) ≡ (p ∧ q)

p q ~ (∼ p ∨ ∼ q) ⇔ (p ∧ q) 4 1 3 2 6 5 T T T F F F T T T F F F T T T F F T F T T F T F F F F T T T T F

Page 25: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 2 Autumn 2010 Solutions Page 2 of 4

Question 3.

(i) not both not p and not q

(ii) p or q

(iii) not both not p and not q is logically equivalent to p or q

~(~p ∧ ~q) ≡ (p ∨ q)

p q ~ (∼ p ∧ ∼ q) ⇔ (p ∨ q) 4 1 3 2 6 5 T T T F F F T T T F T F F T T T F T T T F F T T F F F T T T T F

Question 4.

I could do my Discrete Math assignments or enjoy a more full social life. If I enjoy a more full social life, I could fail this subject. I don’t want to fail this subject. Therefore, I must do my Discrete Math assignments. Let p, q, and r be the statements “I could do my Discrete Math assignments”, “I could enjoy a more full social life”, and “I could fail this subject” respectively. The statement form of our hypotheses (the first, second, and third sentences) are p or q, if q then r, and ~r respectively. The statement form of our conclusion (the fourth sentence) is p.

The statement form is ((p ∨ q) ∧ (q ⇒r) ∧ ~r) ⇒ p and is a tautology:

p q r ((p ∨ q) ∧ (q ⇒ r) ∧ ~ r) ⇒ p 1 4 2 5 3 6 T T T T T T F F T T T F T F F F T T T F T T T T F F T T F F T T T T T T F T T T T T F F T F T F T F F F T T F F T F F T F F T F F F F F T F T T

It is important to write each of these simple statements in full – if you leave off the beginning of any of these statements, for example, “enjoy a more full social life”, they cease to be statements and become simply collections of words.

It is also worth noting that there are some slight variations in wording of some of our statements, for example, “I could do my Discrete Math assignments” and “I must do my Discrete Math assignments” are technically not the same, but for our purposes, we treat them as if they were exactly the same. This sort of thing is fairly common.

Page 26: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 2 Autumn 2010 Solutions Page 3 of 4

Question 5.

(i) (p ∧ (p ⇒ q) ⇒ q is a tautology

(p ∧ (p ⇒ q) ⇒ q

2 1 3 Step 1 F Step 2 T F Step 3 T T Step 4 T F Step 5 F

Step 1: Set the main connective (#3) to false. Step 2: This requires that connective #2 be true and the last occurrence of q be false. Step 3: This requires that both the first occurrence of p and connective #1 be true. Step 4: We know that p is true (step 2) and q is false (step 3) so we can write these truth values in for the other occurrences of these statement variables. Step 5: This requires that connective #1 be false, which is a contradiction as we know from step #3 that this connective must be true. Therefore, this statement cannot be false, and so is a tautology.

(ii) ((p ⇒ q) ∧ (q ⇒ r)) ⇒ (p ⇒ r) is a tautology

((p ⇒ q) ∧ (q ⇒ r)) ⇒ (p ⇒ r)

1 3 2 5 4 Step 1 F Step 2 T F Step 3 T T Step 4 T F Step 5 T T Step 6 T F Step 7 F

Step 1: Set the main connective (#5) to false. Step 2: This requires that connective #3 be true and the connective #4 be false. Step 3: Connective #3 requires that both connective #1 and connective #2 be true. Now there are three possible ways that these connectives could be true: T ⇒ T, F ⇒ T, and F ⇒ F, so skip these connectives for the moment and look at connective #4 instead. Step 4: Connective #4 requires that the last occurrence of p be true and the last occurrence of r be false. Step 5: We know that p is true (step 4) so we can write this truth value in for the first occurrence of p. This requires that the first occurrence of q be true. Step 6: We know that q is true (step 5) and r is false (step 4) so we can write these truth values in for the other occurrences of these statement variables. Step 7: This requires that connective #2 be false, which is a contradiction as we know from step #3 that this connective must be true. Therefore, this statement cannot be false, and so is a tautology.

Please not that there are usually several ways to get to these conclusions depending on which steps you follow after step 3. In each case, you should end up with some statement variable or connective having two truth values, which is impossible.

Page 27: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 2 Autumn 2010 Solutions Page 4 of 4

Question 6.

(i) An even integer is twice some integer.

An odd integer is twice some integer plus (or minus) 1.

(Note that the definition of an odd natural number is twice some natural number minus 1 because the “plus 1” definition fails as 1 = 2 x 0 + 1 is invalid because 0 is not a natural number.)

(ii) A prime number is an integer greater than 1 which has no factors other than itself and 1.

A composite number is an integer greater than 1 which has factors other than itself and 1.

(Note that 1 is neither a prime nor a composite number).

(iii) A rational number can be written as the ratio of two integers. The divisor cannot equal 0.

A real number is either a rational number or an irrational number. (An irrational number cannot be written as the ratio of two integers. The divisor cannot equal 0).

Question 7.

The set {0} is closed for the operations of addition, multiplication, and subtraction:

0 + 0 = 0

0 x 0 = 0

0 – 0 = 0

It is not closed for the operation of division:

0 ÷ 0 ≠ 0

Question 8.

Exponentiation corresponds to a closed operation on the set of natural numbers which fails the commutative property:

∀ x, y ∈ , xy ∈ so operation is closed.

Consider 23 ≠ 32 so the commutative property fails.

Other examples are more obscure. Mod and Div are functions in C++ that correspond to operations which are closed on the set of integers and fail the commutative property. However, they are not closed on the set of natural numbers as they can return a value of 0, which is not a natural number.

In C++ you could create a function that always returns the first (or second) value of two natural numbers that are passed to it. Say Tweedledee( x, y) = x and Tweedledum( x, y) = y. These functions correspond to operations that are closed on the set of natural numbers but fail the commutative property. I suppose this question was a little unfair but I am trying to encourage you to think in this class. ☺

Page 28: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 3 Autumn 2010 Solutions Page 1 of 6

Question 1.

(i) (p ⇒ q) ⇔ (~q ⇒ ~p) is a tautology

p q (p ⇒ q) ⇔ (~ q ⇒ ~ p) 1 5 2 4 3 T T T T F T F T F F T T F F F T T T F T T F F T T T T T

(ii) ((~p ∨ q) ∧ (~q ∨ r)) ⇒ (~p ∨ r)) is a tautology

p q r ((~ p ∨ q) ∧ (~ q ∨ r)) ⇒ (~ p ∨ r) 1 2 5 3 4 8 6 7 T T T F T T F T T F T T T F F T F F F T F F T F T F F F T T T F T T F F F F F T T T F F F T T T T T F T T T T F T F T T F F F T T T F F T T T T T T T T T F F F T T T T T T T T

Question 2.

(i) (p ⇒ q) ⇔ (~q ⇒ ~p) is a tautology

This question is not a good candidate for the quick method. The main connective is a biconditional. We may have to test both combinations of truth values that would make this connective false. Blech!

First choice: LHS is true and RHS is false

(p ⇒ q) ⇔ (~ q ⇒ ~ p) 1 5 2 4 3

Step 1 F Step 2 T F Step 3 T F Step 4 F T Step 5 T F Step 6 F

Note that there are three possible combinations of truth values that can make connective #1 true. Rather than test each combination in turn, skip to connective #4 to determine the truth values of p and q, and then substitute these back to determine whether the truth value of connective #1 is valid. It is not as we require it to be both true (step #2) and false (step #6). Therefore, this combination of truth values is impossible.

Page 29: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 3 Autumn 2010 Solutions Page 2 of 6

Second choice: LHS is false and RHS is true

(p ⇒ q) ⇔ (~ q ⇒ ~ p) 1 5 2 4 3

Step 7 F Step 8 F T Step 9 T F Step 10 F T Step 11 T F Step 12 F

Note that there are three possible combinations of truth values that can make connective #4 true. Rather than test each combination in turn, substitute the truth values already found in step #9 back to determine whether the truth value of connective #4 is valid. It is not as we require it to be both true (step #8) and false (step #12). Therefore, this combination of truth values is impossible.

We have tested both possible combinations of truth values that would make the main connective false and neither is valid. Therefore, this statement cannot be false, and so is a tautology, as previously determined in question 1(i).

In general, the truth value of any statement that contains a biconditional should be found using truth tables whenever possible.

(ii) ((~p ∨ q) ∧ (~q ∨ r)) ⇒ (~p ∨ r)) is a tautology

((~ p ∨ q) ∧ (~ q ∨ r)) ⇒ (~ p ∨ r) 1 2 5 3 4 8 6 7

Step 1 F Step 2 T F Step 3 T T Step 4 F F Step 5 T Step 6 T F Step 7 F T T Step 8 F

Note that there are three possible combinations of truth values that can make connectives #2 and #4 true. Rather than test each combination in turn, skip to connective #7 to determine the truth values of p (step #5) and r (step #4), and then substitute these back to determine the truth value of q and determine whether it is valid. It is not as we require it to be both true (step #7) and false (step #8). Therefore, this statement cannot be false, and so is a tautology, as previously determined in question 1(ii).

Page 30: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 3 Autumn 2010 Solutions Page 3 of 6

Question 3.

(i) The Rule of Substitution: If in a tautology, we substitute all occurrences of a statement variable with some statement, the resulting statement will also be a tautology.

For example, (p ⇒ q) ⇔ (~p ∨ q) is a known tautology. If we substitute all occurrences of of q with ~q, we obtain (p ⇒ ~q) ⇔ (~p ∨ ~q) which must also be a tautology.

The Rule of Substitution of Equivalence: If in a tautology, we substitute any occurrence of a statement with an equivalent statement, the resulting statement will also be a tautology.

For example, (p ⇒ q) ⇔ (~p ∨ q) and ~~p ⇔ p are known tautologies. If we substitute the first occurrence of of p in the first statement with ~~p from the second statement, we obtain (~~p ⇒ q) ⇔ (~p ∨ q) which must also be a tautology.

(ii) The statement we wish to derive has a form similar to one of the De Morgan Laws, so we will start with that tautology

(Step 1) ~(p ∨ q) ⇔ (~p ∧ ~q)

Now substitute in step 1 all occurrences of p with ~p and all occurrences of q with ~q

(Step 2) ~(~p ∨ ~q) ⇔ (~~p ∧ ~~q)

We now have two double negations so we need that tautology

(Step 3) ~~p ⇔ p

Now substitute in step 3 all occurrences of p with q

(Step 4) ~~q ⇔ q

We can now perform substitution of equivalence twice by replacing the double negations of p and q in step 2 with the results from steps 3 and 4

(Step 5) ~(~p ∨ ~q) ⇔ (p ∧ q)

which is the statement we wanted to derive. Please note that you do not have to explain what you are doing in as much detail as I have here. You should always indicate what rules you are using.

Question 4.

We need to use the two tautologies which define the conditional and biconditional connectives.

• (p ⇒ q) ≡ (~p ∨ q)

• (p ⇔ q) ≡ ((p ⇒ q) ∧ (q ⇒ p))

(i) (p ⇒ q) ⇔ (~q ⇒ ~p)

The best way to approach this question was to first substitute (p ⇒ q) for all occurrences of p and (~q ⇒ ~p) for all occurrences of q in the right hand side of the definition of the biconditional connective

≡ (((p ⇒ q) ⇒ (~q ⇒ ~p)) ∧ ((~q ⇒ ~p) ⇒ (p ⇒ q)))

Step 2 use substitution of equivalence and the definition of the conditional connective twice

≡ (((~p ∨ q) ⇒ (~q ⇒ ~p)) ∧ ((~q ⇒ ~p) ⇒ (~p ∨ q)))

Page 31: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 3 Autumn 2010 Solutions Page 4 of 6

Step 3 substitute ~q for all occurrences of p and ~p for all occurrences of q in the definition of the conditional connective

(~q ⇒ ~p) ≡ (~~q ∨ p)

Step 4 use substitution of equivalence and the tautology from step 3 twice

≡ (((~p ∨ q) ⇒ (~~q ∨ ~p)) ∧ ((~~q ∨ ~p) ⇒ (~p ∨ q)))

We need to perform two more substitutions and two more substitutions of equivalence to eventually get

≡ ((~(~p ∨ q) ∨ (~~q ∨ ~p)) ∧ (~(~~q ∨ ~p) ∨ (~p ∨ q)))

(ii) ((~p ∨ q) ∧ (~q ∨ r)) ⇒ (~p ∨ r))

≡ ~((~p ∨ q) ∧ (~q ∨ r)) ∨ (~p ∨ r))

You were not asked to simplify these statements. This would be a lot more work and require that you use the Commutative, Associative and Distributive Laws for Conjunction (∧) and Disjunction (∨), as well as De Morgan Laws and Double Negation. Good Luck to anyone who tried. ☺

Question 5.

(i) There is a unique even prime number:

∃x ∈ (x is unique ∧ x is even ∧ x is prime)

This is the simplest way of writing our statement. We could define the properties of unique, even, and prime by introducing further predicate variables, for example

• x is even ⇔ ∃y ∈ (x = 2y)

• x is prime ⇔ x > 1 ∧ ∀p, q ∈ (x = pq ⇒ ((p = 1 ∧ q = x) ∨ (p = x ∧ q = 1))

but this would not improve the clarity of our answer. If in doubt, keep it simple. ☺

(ii) Every student can correctly answer some questions in this assignment:

∀ students s, ∃ questions in this assignment q (s can correctly answer q)

Alternately, we could first define the set of students S and the set of questions in this assignment Q, and write

∀ s ∈S, ∃ q ∈Q (s can correctly answer q)

Question 6.

(i) ∃ x ∈, ∀ y ∈, x ≥ y:

A direct translation of these symbols would be

“There exists a rational number x such that, for all rational numbers y, x is greater than or equal to y”.

A translation without using quantifiers or variables would be

“There is a largest rational number”.

Page 32: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 3 Autumn 2010 Solutions Page 5 of 6

(ii) ∀ students s, ∃ assigned problem p, s cannot correctly solve p.

A direct translation of these symbols would be

“For all students s, there exist assigned problems p such that s cannot correctly solve p”.

A translation without using quantifiers or variables would be

“All students cannot correctly solve some assigned problems”.

Question 7.

(i) ~There is a unique even prime number

~∃x ∈ (x is unique ∧ x is even ∧ x is prime) ≡ ∀x ∈ ~(x is unique ∧ x is even ∧ x is prime) ≡ ∀x ∈ (~(x is unique) ∨ ~(x is even) ∨ ~(x is prime)) ≡ ∀x ∈ (x is not unique ∨ x is not even ∨ x is not prime)

Direct translation is “For all integers x, x is neither unique, even, nor prime” Best translation is “There is no unique even prime number”

The original statement was true. The number is 2. ☺

(ii) ~Every student can correctly answer some questions in this assignment:

~∀ students s, ∃ questions in this assignment q (s can correctly answer q) ≡ ∃ students s, ~∃ questions in this assignment q (s can correctly answer q) ≡ ∃ students s, ∀ questions in this assignment q ~(s can correctly answer q) ≡ ∃ students s, ∀ questions in this assignment q (s cannot correctly answer q)

Direct translation is “There exist students s such that, for all questions in this assignment q, s cannot correctly answer q”. Best translation is “Some students cannot correctly answer any questions in this assignment”

The original statement is false. Some students did not hand in their assignments, and so did not correctly answer any questions.

Question 8.

(i) ~∃ x ∈, ∀ y ∈, x ≥ y:

≡ ∀x ∈, ~∀y ∈, x ≥ y ≡ ∀x ∈, ~∃y ∈, x ≥ y ≡ ∀x ∈, ∃y ∈, ~(x ≥ y) ≡ ∀x ∈, ∃y ∈, x < y

Direct translation is “For all rational numbers x, there exist rational numbers y such that x is less than y”. Best translation is “There is no largest rational number”

The original statement was false. This can be demonstrated using a proof by contradiction. For example, let x be the largest rational number. Now consider y = x+1. Clearly, y > x, and so x is not the largest rational number. Therefore, there is no largest rational number.

Page 33: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 3 Autumn 2010 Solutions Page 6 of 6

(ii) ~∀ students s, ∃ assigned problem p, s cannot correctly solve p.

≡ ∀ students s, ~∃ assigned problems p, s cannot correctly solve p ≡ ∃ students s, ~∃ assigned problems p, s cannot correctly solve p ≡ ∃ students s, ∀ assigned problems p, ~(s cannot correctly solve p) ≡ ∃ students s, ∀ assigned problems p, s can correctly solve p

Direct translation is “There exist students s such that, for all assigned problems p, s can correctly solve p”. Best translation is “Some students can correctly solve all assigned problems”

The original statement is (probably) false. No student has ever achieved full marks in a predicate logic assignment, but we continue to hope. ☺

Page 34: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 3 Autumn 2010 Solutions Page 1 of 5

Question 1.

(i) For all natural numbers n, let Claim(n) be a statement.

If Claim(1) is true, and For all natural numbers k ≥ 1,

if Claim(k) is true, then Claim(k +1) is also true

then Claim(n) is true for all natural numbers n, that is, ∀n ∈ .

(ii) Let P(n) be a predicate, then the PMI is:

)()))1()(()1(( nPnkPkPkP . ∈∀⇒+⇒∈∀∧

Question 2.

(i) Let claim(n) be 1)1.(

1...3.2

12.1

1+

=+

+++n

nnn

Claim(1) is 11

1)11(1

1+

=+

which is obviously true.

Assume that Claim(k) is true for some k ≥ 1,

i.e. 1)1.(

1...3.2

12.1

1+

=+

+++k

kkk

Now show that Claim(k+1) is also true,

i.e. 21

)2).(1(1

)1.(1...

3.21

2.11

++

=++

++

+++kk

kkkk

LHS = )2).(1(

1)1.(

1...3.2

12.1

1++

++

+++kkkk

=)2).(1(

11 +++

+ kkkk using our assumption of Claim(k)

= )2).(1(

1)2.(++++

kkkk

= )2).(1(

122

++++

kkkk

= )2).(1(

)1( 2

+++

kkk

= )2()1(

++

kk

= RHS

So Claim(k+1) is true given Claim(k) is true and therefore, by the Principle of Mathematical Induction, Claim(n) must be true for all natural numbers n.

Page 35: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 3 Autumn 2010 Solutions Page 2 of 5

(ii) Let Claim(n) be nn

i=∑

=11

Claim(1) is 111

1

=∑=i

which is obviously true.

Assume that Claim(k) is true for some k ≥ 1,

i.e. kk

i=∑

=11

Now show that Claim(k+1) is also true,

i.e. 111

1+=∑

+

=

kk

i

LHS = ∑+

=

1

1

1k

i

= ∑=

k

i 11 + 1

= 1+k using our assumption of Claim(k) = RHS

So Claim(k+1) is true given Claim(k) is true and therefore, by the Principle of Mathematical Induction, Claim(n) must be true for all natural numbers n.

Question 3.

(i) For all natural numbers n, let Claim(n) be a statement and let q∈ .

If Claim(q) is true, and For all natural numbers k ≥ q,

if Claim(k) is true, then Claim(k +1) is also true

then Claim(n) is true for all natural numbers n ≥ q, that is, ∀n ∈ , n ≥ q.

(ii) Let P(n) be a predicate, then the PMI is:

)(,,)))1()((,,)(( nPqnnkPkPqkkqP ≥∈∀⇒+⇒≥∈∀∧

Question 4.

(i) Let Claim(n) be n3 – n is divisible by 6, that is, ∃p∈ (n3 – n = 6p)

Claim(2) is 23 – 2 is divisible by 6

LHS = 23 – 2 = 6, RHS = 6p, so we require p = 1, and so Claim(2) is true.

Assume that Claim(k) is true for some k ≥ 2, i.e. ∃p∈ (k3 – k = 6p)

Now show that Claim(k+1) is also true, i.e. ∃q∈ ((k+1)3 – (k+1) = 6q)

Page 36: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 3 Autumn 2010 Solutions Page 3 of 5

LHS = (k+1)3 – (k+1) = (k3 + 3k2 + 3k + 1) – (k+1) = (k3 – k) + 3k2 + 3k = 6p + 3k2 + 3k using our assumption of Claim(k) = 6p + 3k(k + 1)

[To show that 3k(k + 1) is divisible by 6, we need to show that k(k + 1) is divisible by 2.

There are two cases to consider: k is even and k is odd.

(1) If k is even, i.e. ∃r∈ (k = 2r), we have k(k + 1) = 2r(2r + 1), which is divisible by 2.

(2) If k is odd, i.e. ∃r∈ (k = 2r – 1), then k + 1 = 2r and we have k(k + 1) = 2r(2r – 1), which is again divisible by 2.

Therefore, 3k(k + 1) is divisible by 6].

LHS = … = 6p + 3k(k + 1) = either 6p + 6r(r + 1) or 6p + 6r(r – 1) = 6p + 6r(r ± 1) = 6(p + r ± 1) = 6q , where q = p + r ± 1 = RHS

So Claim(k+1) is true given Claim(k) is true and therefore, by the Generalized Principle of Mathematical Induction, Claim(n) must be true for all natural numbers n ≥ 2.

(ii) Let Claim(n) be n! > n2

Claim(4) is 4! > 42

LHS = 4! = 24, RHS = 42 = 16, so LHS > RHS, and so Claim(4) is true.

Assume that Claim(k) is true for some k ≥ 4, i.e. k! > k2

Now show that Claim(k+1) is also true, i.e. (k + 1)! > (k + 1) 2

LHS = (k + 1)! = (k + 1). k! > (k + 1). k2 using our assumption of Claim(k) = k3 + k2 = k3 + k2 + (2k + 1) – (2k + 1) = k3 + (k2 + 2k + 1) – (2k + 1) = k3 + (k + 1)2 – (2k + 1) = (k + 1)2 + k3 – (2k + 1) > (k + 1)2 since k3 > 2k + 1 for k ≥ 4 = RHS

So Claim(k+1) is true given Claim(k) is true and therefore, by the Generalized Principle of Mathematical Induction, Claim(n) must be true for all natural numbers n ≥ 4.

Page 37: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 3 Autumn 2010 Solutions Page 4 of 5

Question 5.

(i) For all natural numbers n, let Claim(n) be a statement and let q∈ .

If Claim(1), Claim(2), …, Claim(q) are all true, and For all natural numbers k ≥ q,

if Claim(k), Claim(k-1), … Claim(1) are all true, then Claim(k +1) is also true

then Claim(n) is true for all natural numbers n, that is, ∀n ∈ .

(ii) Let P(n) be a predicate, then the PMI is:

)(,)))1())1(...)1()(((,,)(...)2()1((

nPnkPPkPkPqkkqPPP

∈∀⇒+⇒∧∧−∧≥∈∀∧∧∧∧

Question 6.

Let Claim(n) be that an is an odd natural number, that is, ∃p ∈ (an = 2p – 1)

Claim(1) is a1 is odd and since a1 = 1 is odd, Claim(1) is true

Claim(2) is a2 is odd and since a2 = 3 is odd, Claim(2) is true

Claim(3) is a3 is odd

From the recurrence relationship, a3 = a1+ 2a2 = 1+2(3) = 7 which is odd, so Claim(3) is true.

Assume that Claim(1), Claim(2), … Claim(k-1) and Claim(k) are all true, that is, that each of a1, a2, … ak-1 and ak are odd natural numbers:

∃p1 ∈ (a1 = 2p1 – 1) ∃p2 ∈ (a1 = 2p2 – 1) … ∃pk-1 ∈ (ak-1 = 2pk-1 – 1) ∃pk ∈ (ak = 2pk – 1)

Now show that Claim(k+1) is also true, that is, that ak+1 is an odd natural number

∃q ∈ (ak+1 = 2q – 1)

From the recurrence relationship, ak = ak-2 + 2ak-1 LHS = a k+1 = ak-1 + 2ak = (2pk-1 – 1) + 2(2pk – 1) using Claim(k) and Claim(k-1) = (2pk-1 + 4pk – 3) = (2pk-1 + 4pk + 4) – 1 = 2(pk-1 + 2pk + 2) – 1 = 2q – 1, where q = pk-1 + 2pk + 2 = RHS

So Claim(k+1) is true given Claim(k), Claim(k-1), …Claim(1) are true and therefore, by the Strong Principle of Mathematical Induction, Claim(n) must be true for all natural numbers.

Page 38: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 3 Autumn 2010 Solutions Page 5 of 5

Question 7.

Each line satisfies the formula 1 + 3 + … + (2n – 1) = n2

Let claim(n) be 1 + 3 + … + (2n – 1) = n2

Claim(1) is 1 = 12 which is obviously true.

Assume that Claim(k) is true for some k ≥ 1, i.e. 1 + 3 + … + (2k – 1) = k2

Now show that Claim(k+1) is also true, i.e. 1 + 3 + … + (2k – 1) + (2k + 1) = (k + 1)2

LHS = 1 + 3 + … + (2k – 1) + (2k + 1) = k2 + (2k + 1) using our assumption of Claim(k) = (k + 1)2 = RHS

So Claim(k+1) is true given Claim(k) is true and therefore, by the Principle of Mathematical Induction, Claim(n) must be true for all natural numbers n.

[If we found that Claim(n) was not true for all natural numbers, it would mean that our original guess was wrong, or our proof was wrong, or both. Start again! ☺]

Page 39: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 5 Autumn 2010 Solutions Page 1 of 3

Question 1.

(i) Modus Ponens: If P is true and P implies Q is true, then Q is true. (P ∧ (P ⇒ Q)) ⇒ Q

(ii) Law of Syllogism : If P implies Q is true and Q implies R is true, then P implies R is true ((P ⇒ Q) ∧ (Q ⇒ R)) ⇒ (P ⇒ R)

(iii) Let P, Q, and R be the statements x = 1, x + 1 = 2, and (x + 1)2 = 4 respectively.

P ⇒ Q is a true statement: x = 1⇒ x + 1 = 2

Q ⇒ R is a true statement: x + 1 = 2 ⇒ (x + 1)2 = 4

By the Law of Syllogism, P ⇒ R must also be a true statement: x = 1⇒ (x + 1)2 = 4

If we assume that P is a true statement, then by Modus Ponens, R must also be a true statement: (x + 1)2

= 4

Question 2.

This quotation appears to be an example of the Universal Law of Modus Ponens.

All elephants are pink. Jumbo is an elephant. Therefore, Jumbo is pink.

This argument becomes

∀ elephants x (x is pink) ∧ Jumbo is an elephant ⇒ Jumbo is pink

However, to be a valid argument, all of the premises must be true. The first premise is false. In the episode of the television series I am quoting above, the villain did not realize that elephants were not pink, and so make a fundamental flaw.

Question 3.

(i) Proof by Contradiction is usually written as (P ⇒ (Q ∧ ~Q)) ⇒ ~P, though in some books the occurrences of P and ~P may be swapped.

(ii) Let us assume that the set of all prime numbers is finite, that is, there are a finite number of prime numbers p1, p2, …pn. Now consider a natural number q = (p1 x p2 x … x pn) + 1.

It is clear that none of the prime numbers p1, p2, …pn can divide this number without leaving a nonzero remainder. Therefore, q must also be a prime number. However, it is not one of our known prime numbers, and so does not belong to our set of prime numbers, which is a contradiction. Therefore, the set of primes is not finite.

Page 40: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 5 Autumn 2010 Solutions Page 2 of 3

Question 4.

(i) Proof by Contrapositive is written as (P ⇒ Q) ⇒ (~Q ⇒ ~P).

(ii) Let P(n) and Q(n) be the statements “n3 is even” and “n is even”, where n is an integer.

~P(n) is the statement “n3 is not even” or “n3 is odd”.

~Q(n) is the statement “n is not even” or “n is odd”.

The contrapositive of our statement is therefore n is odd ⇒ n3 is odd

From our earlier definition of an odd integer, we may write

n is odd ⇔ ∃p ∈ (n = 2p + 1) and n3 is odd ⇔ ∃q ∈ (n3 = 2q + 1)

n = 2p + 1 ⇒ n3 = (2p + 1) 3

⇒ n3 = 8p3 + 12p2 + 6p + 1 ⇒ n3 = 2(4p3 + 6p2 + 3p) + 1 ⇒ n3 = 2q + 1, where q = 4p3 + 6p2 + 3p ∈

Therefore, n is odd ⇒ n3 is odd is true where n is an integer, and by proof by contrapositive, the original statement must also be true.

Question 5.

(i) Proof by Cases is usually written as ((P ∨ Q) ⇒ R) ⇒ ((P ⇒ R) ∧ (Q ⇒ R)) for two premises P and Q and conclusion R. A more general form has n premises P1, P2, … Pn and conclusion Q ((P1 ∨ P2 ∨… Pn ) ⇒ Q) ⇒ ((P1 ⇒ Q) ∧ (P2 ⇒ Q) ∧ … (Pn ⇒ Q))

(ii) Let m be an integer. There are two cases to examine:

a) m is even, that is, ∃p ∈ (m = 2p)

m2 + m + 1 = (2p) 2 + 2p + 1| ⇒ m2 + m + 1 = 4p 2 + 2p + 1 ⇒ m2 + m + 1 = 2(2p 2 + p) + 1 ⇒ m2 + m + 1 = 2q + 1, where q = 2p 2 + p ⇒ m2 + m + 1 is odd

Therefore, m is even ⇒ m2 + m + 1 is odd

b) m is odd, that is, ∃p ∈ (m = 2p + 1)

m2 + m + 1 = (2p + 1) 2 + (2p + 1) + 1 ⇒ m2 + m + 1 = (4p 2 + 4p + 1) + (2p + 1) + 1 ⇒ m2 + m + 1 = (4p 2 + 6p + 2) + 1 ⇒ m2 + m + 1 = 2(2p 2 + 3p + 1) + 1 ⇒ m2 + m + 1 = 2q + 1, where q = 2p 2 + 3p + 1 ⇒ m2 + m + 1 is odd

Therefore, m is odd ⇒ m2 + m + 1 is odd

Since both cases are true, then m2 + m + 1 is odd for all integers m is true by proof by cases.

Page 41: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 5 Autumn 2010 Solutions Page 3 of 3

Question 6.

(i) If a ∈ and a >1 then a can be factorized in a unique way in the form a = p1

α1 p2α2 p3

α3 ... pkαk where p1, p2, … pk are each prime numbers and

αi ∈ for each i = 1, 2,…, k .

(ii) 364 = 2 x 182 = 22 x 91= 22 x 7 x 13

780 = 2 x 390 = 22 x 195 = 22 x 3 x 65 = 22 x 3 x 5 x 13

lcm(364, 780) = 22 x 3 x 5 x 7 x 13 = 5460

Question 7.

(i) The Quotient–Remainder Theorem is as follows:

If n and d > 0 are both integers, then there exist unique integers q and r such that n = dq + r and 0≤ r < d.

(ii) The Euclidean Algorithm is used to find gcd(a, b) and can be described as follows:

Step 1. Let a, b ∈, with | a | > | b | ≥ 0.

Step 2. If b = 0, then gcd(a, b) = a.

If b ≠ 0, then apply the quotient remainder theorem to get a = bq + r, where 0 ≤ r < b, set gcd(a, b) = gcd(b, r), and repeat the process by letting a = b and b = r, to find gcd(b, r). The process is guaranteed to terminate eventually with r = 0 because each new remainder is less than the preceding one and all are nonnegative.

Note if a < 0 or b < 0 then let a =| a |, b =| b | in the above algorithm

(iii) 2136 = 24 x 89 + 0

Therefore, gcd(2136, − 89) = 89

Rewriting we get 2136 – 24 x 89 = 0 and so 2136 – 23 x 89 = 89, which is of the form 2136m + 89n = gcd(2136, –89), where m = 1 and n = –23

Page 42: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 6 Autumn 2010 Solutions Page 1 of 3

Question 1.

Let A be a set, and let P(x) be a predicate which applies to elements x ∈ A.

(i) a) To prove the universal statement ( )xPAx ,∈∀ , you must either exhaustively test that P(x) is true for every element x of set A or perform a general proof of the predicate P(x).

b) To prove the existential statement ( )xPAx ,∈∃ , you must find an element x of set A for which P(x) is true. This is referred to as an example.

(ii) a) To disprove the universal statement ( )xPAx ,∈∀ , you must find an element x of set A for which P(x) is false. This is referred to as a counterexample.

b) To disprove the existential statement ( )xPAx ,∈∃ , you must either exhaustively test that P(x) is false for every element x of set A or perform a general disproof of the predicate P(x).

Question 2.

(i) This statements translates into English as “there exist real numbers x and y such that the sum of x and y is not equal to the sum of y and x”. It is a false statement.

Consider the negation of this statement

~ ∃x ∈ Ρ, ∃y ∈ Ρ ( x + y ≠ y + x ) ≡ ∀x ∈ Ρ, ∀y ∈ Ρ ( x + y = y + x )

You should recognize that this is the commutative law for addition of real numbers, and so must be a true statement. Therefore, the original statement must be false.

(ii) This statement translates into English as “for all real numbers x and y, there exists a positive real number ε such that the absolute value of the sum of x and y is greater than ε”. This is also a false statement.

Consider the negation of this statement

~ ∀x ∈ Ρ, ∀y ∈ Ρ, ∃ε > 0 ( | x + y | > ε ) ≡ ∃x ∈ Ρ, ∃y ∈ Ρ, ∀ε > 0 ( | x + y | ≤ ε )

If we can find real numbers x and y such that | x + y | = 0 we will have proved the negation of our statement. Two examples immediately come to mind:

a) x and y are both zero

b) x and y are additive inverses of each other

Therefore, the original statement must be false.

Question 3.

(i) The Quotient–Remainder Theorem is as follows:

If n and d > 0 are both integers, then there exist unique integers q and r such that n = dq + r and 0≤ r < d.

Now let d = 3: there exist unique integers q and r such that n = 3q + r and 0≤ r < 3, that is, n can be written as one of the following forms: qn 3= , 13 += qn , or 23 += qn where q is some integer.

Page 43: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 6 Autumn 2010 Solutions Page 2 of 3

(ii) Let n be an integer. There are three cases to examine:

a) qn 3=

n2 = (3q) 2 ⇒ n2 = 9q 2 ⇒ n2 = 3(3q 2) ⇒ n2 = 3k, where k = 3q 2

Therefore, qn 3= ⇒ ∃k ∈Ζ (n2 = 3k ∨ n2 = 3k + 1)

b) 13 += qn

n2 = (3q + 1) 2 ⇒ n2 = 9q 2 + 6q + 1 ⇒ n2 = 3(3q 2 + 2q) + 1 ⇒ n2 = 3k + 1, where p = 3q 2 + 2q

Therefore, 13 += qn ⇒ ∃k ∈Ζ (n2 = 3k ∨ n2 = 3k + 1)

c) 23 += qn

n2 = (3q + 2) 2 ⇒ n2 = 9q 2 + 12q + 4 ⇒ n2 = 3(3q 2 + 4q + 1) + 1 ⇒ n2 = 3k + 1, where k = 3q 2 + 4q + 1

Therefore, 23 += qn ⇒ ∃k ∈Ζ (n2 = 3k ∨ n2 = 3k + 1)

Since all three cases are true, then that the square of any integer has the form k3 or 13 +k for some integer k is true by proof by cases.

Question 4.

(i) The Quotient–Remainder Theorem is as follows:

If n and d > 0 are both integers, then there exist unique integers q and r such that n = dq + r and 0≤ r < d.

Now let d = 4: there exist unique integers q and r such that n = 4q + r and 0≤ r < 4, that is, n can be written as one of the following forms: qn 4= , 14 += qn , 24 += qn or 34 += qn where q is some integer.

It should be clear from our definitions of even and odd integers that qn 4= and 24 += qn are even integers while 14 += qn and 34 += qn are odd integers.

(ii) Let n be an odd integer. There are two cases to examine:

a) 14 += qn

n2 = (4q + 1) 2 ⇒ n2 = 16q 2 + 8q + 1 ⇒ n2 = 8(2q 2 + q) + 1 ⇒ n2 = 8m + 1, where m = 2q 2 + q

Therefore, 14 += qn ⇒ ∃m ∈Ζ (n2 = 8m + 1)

Page 44: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 6 Autumn 2010 Solutions Page 3 of 3

b) 34 += qn

n2 = (4q + 3) 2 ⇒ n2 = 16q 2 + 24q + 1 ⇒ n2 = 8(2q 2 + 3q) + 1 ⇒ n2 = 8m + 1, where m = 2q 2 + 3q

Therefore, 34 += qn ⇒ ∃m ∈Ζ (n2 = 8m + 1)

Since both cases are true, then that the square of any odd integer has the form 18 +m for some integer m is true by proof by cases.

Question 5.

Let U = {0, 1, 2, 3, 4}, A = {0, 1, 2}, B = {1, 2, 3} and C = {2, 3, 4}.

(i) A ∪ B = {x ∈ U | x ∈{0, 1, 2} ∨ x ∈{1, 2, 3}} = {0, 1, 2, 3}

(ii) B ∩ C = {x ∈ U | x ∈{1, 2, 3} ∧ x ∈{2, 3, 4}} = {2, 3}

(iii) C – A = {x ∈ U | x ∈{2, 3, 4} ∧ ~(x ∈{0, 1, 2})} = {3, 4}

(iv) U – B = {x ∈ U | x ∈{0, 1, 2, 3, 4} ∧ ~(x ∈{1, 2, 3})} = {0, 4}

(v) U ∪ C = {x ∈ U | x ∈{0, 1, 2, 3, 4} ∨ x ∈{2, 3, 4}} = {0, 1, 2, 3, 4} = U

(vi) U ∩ A = {x ∈ U | x ∈{0, 1, 2, 3, 4} ∧ x ∈{0, 1, 2}} = {0, 1, 2} = A

(vii) ∅ ∪ B = {x ∈ U | x ∈{ } ∨ x ∈{1, 2, 3}} = {1, 2, 3} = B

(viii) ∅ ∩ C = {x ∈ U | x ∈{ } ∧ x ∈{1, 2, 3}} = { } = ∅

Question 6.

The truth values of these statements can be determined from consideration of several basic tautologies: (a) ∀ sets A (A ⊆ A), (b) ∀ sets A (∅ ⊆ A), and (c) ∀ x (x ≠ { x })

(i) U ∈ U is false. The statement should be interpreted as ∀ sets U (U ∈ U), that is, the universal set is always an element of itself. We could define the universal set as the set of all possible sets, or even as the set of all possible things, so ∃ set U (U ∈ U) would be true, but such a definition is self-referential, and leads to an inconsistency known as the Russell Paradox. For all practical purposes, this statement is false. For example, if we let U = ∅, this statement reduces to statement (iii) below, which is clearly false. Oh what fun is logic … ☺

(ii) U ⊆ U is true from (a) above

(iii) ∅ ∈ ∅ is false as ∅ contains no elements

(iv) ∅ ⊆ ∅ is true from both (a) and (b) above

(v) ∅ ∈ {∅} is true as {∅} is a singleton set containing the empty set

(vi) ∅ ⊆ {∅} is true from (b) above

(vii) U ∈ {{U}} is false from (c) above as {{U}} dos not contain U

(viii) U ⊆ {{U}} is false from (c) above as {{U}} does not contain the elements of U

Page 45: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 8 Autumn 2010 Solutions Page 1 of 4

Question 1.

The Generalised Pigeonhole Principle can be stated as

(1) if n pigeons fly into k pigeonholes and for some number m, n > km, then some pigeonhole contains at least m+1 pigeons, or

(2) if n pigeons fly into k pigeonholes, then at least one pigeonhole contains at least

⎥⎥⎤

⎢⎢⎡kn pigeons.

Our pigeons are the students enrolled in Discrete Mathematics. Our pigeonholes are the different combinations of the first two letters of student surnames. We have k = 262 = 676 different combinations of letters. Therefore, we need n = 2(676)+1 = 1353 students to guarantee at least three students share the same combination of letters. That would indeed be a large Discrete Mathematics class. ☺

Question 2.

Our pigeons are the students to be assigned classes by the administrator so we have n = 120. Our pigeonholes seem to be the eleven classes to which they are to be assigned so we have k = 11.

We can conclude that at least one class must contain at least ⎥⎥⎤

⎢⎢⎡

11120 = 11 students.

However, this does not answer the question! Back to the drawing board!

We are given additional information that no class may contain more than fifteen students. Let us assign nine students to each of the eleven classes, for a total of 99 students. Let us then assign a further six students to two of these classes, filling them to their maximum capacity of fifteen, for a total of 111 students. There are now nine students remaining to assign to classes and nine classes remaining to which they may be assigned, so at least one of these classes must contain at least one additional student, and so there must be at least three classes containing ten or more students.

Question 3.

(i) 17 = 3(5) + 2 ⇒ 17≡ 2(mod 5) is true.

(ii) -5 = -1(7) + 2 ⇒ 4 ≡ -5(mod 7) is false.

(iii) -8 = -3(3) + 1 and -2 = -1(3) + 1 ⇒ -1 ≡ -8(mod 3) is true.

(iv) -6 = -3(2) + 0 and 22 = 11(2) + 0 ⇒ -6 ≡ 22(mod 2) is true.

Question 4.

+ [0] [1] [2] [3] [4] [5] x [0] [1] [2] [3] [4] [5] [0] [0] [1] [2] [3] [4] [5] [0] [0] [0] [0] [0] [0] [0] [1] [1] [2] [3] [4] [5] [0] [1] [0] [1] [2] [3] [4] [5] [2] [2] [3] [4] [5] [0] [1] [2] [0] [2] [4] [0] [2] [4] [3] [3] [4] [5] [0] [1] [2] [3] [0] [3] [0] [3] [0] [3] [4] [4] [5] [0] [1] [2] [3] [4] [0] [4] [2] [0] [4] [2] [5] [5] [0] [1] [2] [3] [4] [5] [0] [5] [4] [3] [2] [1]

Page 46: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 8 Autumn 2010 Solutions Page 2 of 4

(ii) a. x + [3]= [1] ⇒ x = [4]

b. [2]x = [3] ⇒ no solution exists

c. [3]x = [1] ⇒ no solution exists

d. x + [4]= [0] ⇒ x = [2]

Question 5.

Recall that n3 ≡ n (mod3) is equivalent to 3|(n3 – n) and, from our definition of divisibility, that this is equivalent to ∃p ∈ (n3 – n = 3p). This last expression is the best expression to use as Claim(n).

Claim(1) is ∃p ∈ (13 – 1 = 3p). Clearly, p = 0, so Claim(1) is true.

Claim(2) is ∃p ∈ (23 – 2 = 3p). Clearly, p = 2, so Claim(2) is true.

Let us assume that Claim(k) is true for k ≥ 1, that is, ∃p ∈ (k3 – k = 3p).

Now attempt to show that Claim(k+1) is also true, that is, ∃q ∈ ((k+1)3 – (k+1) = 3q).

LHS = (k+1)3 – (k+1) = (k3 + 3k2 + 3k + 1) – (k+1) = k3 + 3k2 + 2k = (k3 – k) + 3k2 + 3k using Claim(k) = 3p + 3k2 + 3k = 3(p + k2 + k) = 3q, where q = p + k2 + k ∈ = RHS

Therefore, by the Principle of Mathematical Induction, Claim(n) must be true for all natural numbers n.

Question 6.

(i) 92 = 81 = (6 x 13) + 3 ⇒ 92 ≡ 3(mod 13) 94 = (92)2 ⇒ 94 ≡ 32(mod 13) ≡ 9(mod 13) 98 = (94)2 ⇒ 98 ≡ 92(mod 13) ≡ 3(mod 13) 911 = 98 x 92 x 9 ⇒ 911 ≡ (3 x 3 x 9)(mod 13) ≡ 92(mod 13) ≡ 3(mod 13)

So 911(mod 13) ≡ 3

(ii) 92 = 81 = (7 x 11) + 4 ⇒ 92 ≡ 4(mod 11) 94 = (92)2 ⇒ 94 ≡ 42(mod 11) but 42 = 16 = (1 x 11) + 5 ⇒ 94 ≡ 5(mod 11) 98 = (94)2 ⇒ 98 ≡ 52(mod 11) but 52 = 25 = (2 x 11) + 3 ⇒ 98 ≡ 3(mod 11) 913 = 98 x 94 x 9 ⇒ 913 ≡ (3 x 5 x 9)(mod 11) but 3 x 5 x 9 = 135 = (12 x 11) + 3 ⇒ 913 ≡ (3 x 5 x 9)(mod 11)

So 913(mod 11) ≡ 3

Page 47: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 8 Autumn 2010 Solutions Page 3 of 4

Question 7.

The following definitions are given in lectures and must be known if you are to be able to do a proof using the typical element argument.

(i) a. }|{ BxAxUxBA ∈∨∈∈=∪ b. }|{ BxAxUxBA ∈∧∈∈=∩ c. )}(|~{}|{ AxUxAxUxA ∈∈=∉∈= d. )}(~|{}|{ BxAxUxBxAxUxBA ∈∧∈∈=∉∧∈∈=−

(ii) a. )( BxAxUxBA ∈⇔∈∈∀≡= b. )( BxAxUxBA ∈⇒∈∈∀≡⊆

(iii) a }|{ xxUx ≠∈=∅ b. }|{ xxUxU =∈=∅= c. }|{)( AXXA ⊆=℘

Question 8.

(i) }},2{},1{,{)( AA ∅=℘

(ii) {))(( =℘℘ A ,∅ },{}},2{{}},1{{},{ A∅ }},{},2{{}},{},1{{}},2{},1{{}},{,{}},2{,{}},1{,{ AAA∅∅∅ }},{},2{},1{{}},{},2{,{}},{},1{,{}},2{},1{,{ AAA ∅∅∅ }}{},2{},1{,{ A∅ }

Note that if a set has n elements, the power set will have 2n elements. It is probably worth drawing a Hasse Diagram to determine all of the subsets of a set, and then list them as they appear in the diagram.

Question 9.

To prove BABA ∪=∩ , we need to prove )( BAxBAxUx ∪∈⇔∩∈∈∀ , and so we need to prove BAxBAx ∪∈⇔∩∈ for a arbitrary element x.

LHS ≡ BAx ∩∈ ≡ )(~ BAx ∩∈ by definition of complement ≡ )(~ BxAx ∈∧∈ by definition of intersection ≡ BxAx ∈∨∈ (~)(~ ) by De Morgan’s Laws of Logic ≡ BxAx ∈∨∈ by definition of complement (twice) ≡ BAx ∪∈ by definition of union ≡ RHS

Therefore, BAxBAx ∪∈⇔∩∈ is true for an arbitrary element x. Therefore, )( BAxBAxUx ∪∈⇔∩∈∈∀ is true. Therefore, BABA ∪=∩ is true.

Page 48: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 8 Autumn 2010 Solutions Page 4 of 4

Strictly speaking, we should perform the proof using the set theorems BABA ∪⊆∩ and BABA ∩⊆∪ which means we would need to prove )( BAxBAxUx ∪∈⇒∩∈∈∀ and )( BAxBAxUx ∩∈⇒∪∈∈∀ which means we would need to prove BAxBAx ∪∈⇒∩∈ and BAxBAx ∩∈⇒∪∈ for a arbitrary element x. This is trivial given the proof on the previous page

LHS ≡ BAx ∩∈ ⇒ )(~ BAx ∩∈ by definition of complement ⇒ )(~ BxAx ∈∧∈ by definition of intersection ⇒ BxAx ∈∨∈ (~)(~ ) by De Morgan’s Laws of Logic ⇒ BxAx ∈∨∈ by definition of complement (twice) ⇒ BAx ∪∈ by definition of union ⇒ RHS

and RHS ≡ BAx ∪∈ ⇒ BxAx ∈∨∈ by definition of union ⇒ BxAx ∈∨∈ (~)(~ ) by definition of complement (twice) ⇒ )(~ BxAx ∈∧∈ by De Morgan’s Laws of Logic ⇒ )(~ BAx ∩∈ by definition of intersection ⇒ BAx ∩∈ by definition of complement ⇒ LHS

It should be clear that the proof of BAxBAx ∪∈⇒∩∈ is exactly the same as the proof of BAxBAx ∩∈⇒∪∈ except that all of the steps are performed in reverse order.

Page 49: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 8 Autumn 2010 Solutions Page 1 of 3

Question 1.

(i) A simple graph is a graph which has no parallel edges or loops

(ii) A simple graph exists that has four vertices with degrees 1, 2, 2, and 3

(iii) The sum of the vertices must be even. Alternately, the number of vertices with odd degree

must be even. Therefore, no graph can have four vertices with degrees 1, 2, 3, and 3.

(iv) A graph exists that has four vertices with degrees 1, 2, 3, and 4. However, it is not a simple graph because it has a pair of parallel edges.

Question 2.

(i) G ={V, E} given V = {v1, v2, v3, v4} and E ={e1, e2, e3, e4, e5, e6}, where e1=(v1,v2), e2 = (v1, v3), e3 = (v1, v4), e4 =(v2, v3), e5 =(v2, v4), and e6 =(v3, v4)

The actual shape of the graph (square, rectangle, rhombus, etc) is irrelevant.

(ii) The four simple paths from v1 to v2 are

a. v1, e1, v2

b. v1, e2, v3, e5, v2

c. v1, e3, v4, e4, v2

d. v1, e2, v3, e6, v4, e4, v2

(iii) The four closed paths of length 3 from v1 to v1 are

a. v1, e2, v3, e5, v2, e1, v1

b. v1, e3, v4, e4, v2, e1, v1

a. v1, e1, v2, e5, v3, e2, v1 (not same as (a) as opposite direction)

c. v1, e1, v2, e4, v4, e3, v1 (not same as (b) as opposite direction)

v1 v2

v4 v3

e1

e4

e6

e3

e5 e2

Page 50: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 8 Autumn 2010 Solutions Page 2 of 3

Question 3.

Draw a Venn diagram with two intersecting circles A and B.

The diagram is partitioned into four disjoint regions: BABABABA ∩∩∩∩ ,,, .

Now BABA ∩=− is the part of A that does not overlap with B.

Similarly BAAB ∩=− is the part of B that does not overlap with A.

Informally, we can see that A – B and B – A do not overlap, so ∅=−∩− )()( ABBA is true.

More formally, we could use our set theorems to show that the LHS = RHS.

)()( ABBA −∩− )()( ABBA ∩∩∩= using set difference (twice)

)( ABBA ∩∩∩= using associativity )( ABBA ∩∩∩= using commutativity

)( AA ∩∅∩= using negation/complement laws )( ∅∩∩= AA using commutativity

∅∩= A using dominance laws ∅= using dominance laws

Alternately, we could show this same result using a typical element argument, which probably is our most complicated method of solution, and so perhaps best avoided unless you know what you are doing. ☺

To prove ∅=−∩− )()( ABBA is true, we must show that ))()(( ∅∈≡−∩−∈∈∀ xABBAxUx is true, which in turn requires that we show ∅∈≡−∩−∈ xABBAx )()( is true for an arbitrary element x

)()( ABBAx −∩−∈ )()( ABBAx ∩∩∩∈≡ using set difference (twice)

)()( AxBxBxAx ∈∧∈∧∈∧∈≡ using definition of intersection (three times) ))(~())(~(( AxBxBxAx ∈∧∈∧∈∧∈≡ using definition of complement (twice)

))(~)((~ AxBxBxAx ∈∧∈∧∈∧∈≡ using associativity ))(~)(~( AxBxBxAx ∈∧∈∧∈∧∈≡ using commutivity

))(~( AxFAx ∈∧∧∈≡ using negation/complement laws ))((~ FAxAx ∧∈∧∈≡ using commutivity

FAx ∧∈≡ using dominance laws F≡ using dominance laws

∅∈≡ x using definition of the empty set

A B

Page 51: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 8 Autumn 2010 Solutions Page 3 of 3

So ∅∈≡−∩−∈ xABBAx )()( is true for an arbitrary element x, so ))()(( ∅∈≡−∩−∈∈∀ xABBAxUx must also be true, and therefore, so is

∅∈≡−∩−∈ xABBAx )()( .

Question 4.

Draw a Venn diagram with three intersecting circles A, B, and C

The diagram is partitioned into eight disjoint regions. Label each region with a unique designation, say integers from 1 to 8, as follows

We have A = {1, 2, 3, 4}, B = {2, 3, 5, 6}, C = {3, 4, 6, 7}, and U = {1, 2, 3, 4, 5, 6, 7, 8}.

Now A – B = {1, 4} so (A – B) – C = {1}. Similarly (B – C) = {2, 5} so A – (B – C) = {1, 3, 4}.

Therefore, )()( CBACBA −−≠−− , and the sets A, B, and C above form a counterexample which disproves the statement.

Question 5.

(i) A x B = { (1, 2), (1, 3), (1, 4), (2, 2), (2, 3), (2, 4), (3, 2), (3,3), (3, 4) }

(ii) R = {(x, y) | x < y} = { (1, 2), (1, 3), (1, 4), (2, 3), (2, 4), (3, 4) }

(iii) Domain R = {1, 2, 3} = A Range R = {2, 3, 4} = B

(iv) y 4 | x x x 3 | x x 2 | x 1 | 0 | x 0 1 2 3 4

(v) R-1 = {(x, y) | y < x} = { (2, 1), (3, 1), (3, 2), (4, 1), (4, 2), (4, 3) }

Notice that (4, 1) ∉ A x B, (4, 2) ∉ A x B, and (4, 3) ∉ A x B, so R-1 cannot be a relation from A to B.

AB

C

123

4

56

7

8

Page 52: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 9 Autumn 2010 Solutions Page 1 of 4

Question 1.

Let H be the set of all people and R be a relation on H given by R = {(h1, h2): h1 is the brother of h2}

(i) Domain of R = set of all people who are male and have any brothers or sisters.

Range of R = set of all people who have any brothers

(ii) R is reflexive means that, for all h1, if h1 is the brother of h2, then h1 is also the brother of h1. This is clearly impossible, so R is NOT reflexive.

(iii) R is symmetric means that, for all h1 and h2, if h1 is the brother of h2, then h2 is also the brother of h1. This is false as h2 is the brother or sister of h1, so R is NOT symmetric.

(iv) R is transitive means that, for all h1, h2 and h3, if h1 is the brother of h2 and h2 is the brother of h3 then h1 is also the brother of h3. Now consider the case where there are only two brothers - if h1 is the brother of h2 and h2 is the brother of h1, then is h1 also the brother of h1. This is clearly impossible, so R is NOT transitive.

(v) R is not an equivalence relation as it is not reflexive, symmetric, and transitive.

(vi) R-1 = {(h1, h2): h1 is the brother or sister of h2}

Question 2.

The set of equivalence classes of R is {[0], [1], [2], [3], [4]}, where [0] = {…, -10, -5, 0, 5, 10, …}, [1] = {…, -9, -4, 1, 6, 11, …}, [2] = {…, -8, -3, 2, 7, 12, …}, [3] = {…, -7, -2, 3, 8, 13, …}, and [4] = {…, -6, -1, 4, 9, 14, …}

Question 3.

i) R1 = {(x, y): x + y = 0} is a function as it passes both the existence requirement (i.e. Domain = [-2, 2]) and the uniqueness requirement (i.e. is not one-to-many as it passes the vertical line test).

ii) R2 = {(x, y): x2 + y2 = 4} is not a function as it fails the uniqueness requirement (i.e. is one-to-many as it fails the vertical line test).

Question 4.

i) (1 2 3).(1 2 3) = (1 3 2)

Let f = (1 2 3), that is, f(1) = 2, f(2) = 3, and f(3) = 1.

f may be interpreted as “1 goes to 2, 2 goes to 3, and 3 goes back to 1”

Now define g = (1 2 3).(1 2 3)

g(1) = f(f(1)) = f(2) = 3 g(2) = f(f(2)) = f(3) = 1 g(3) = f(f(3)) = f(1) = 2

g may be interpreted as “1 goes to 3, 3 goes to 2, and 2 goes back to 1”

So g = (1 3 2)

Page 53: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 9 Autumn 2010 Solutions Page 2 of 4

ii) (12)-1.(23)-1 = (2 1).(3 2)

Let f = (2 1), that is, f(1) = 2, f(2) = 1, and f(3) = 3.

f may be interpreted as “1 goes to 2, 2 goes back to 1, and 3 is unchanged”

Let g = (3 2), that is, g(1) = 1, g(2) = 3, and g(3) = 2.

g may be interpreted as “2 goes to 3, 3 goes back to 2, and 1 is unchanged”

Now define h = (2 1).(3 2)

h(1) = g(f(1)) = g(2) = 3 h(2) = g(f(2)) = g(1) = 1 h(3) = g(f(3)) = g(3) = 2

h may be interpreted as “1 goes to 3, 3 goes to 2, and 2 goes back to 1”

So h = (1 3 2)

Question 5.

Both graphs have five vertices of degree 2 and five edges, so they could be isomorphic.

Choose any vertex on the pentagon and label it v1, then moving in a clockwise direction, label the other four vertices v2, v3, v4, and v5. Label the edges e1 = (v1, v2), e2 = (v2, v3), e3 = (v3, v4), e4 = (v4, v5), and e5 = (v5, v1).

Now choose any vertex on the star and label it v1. Choose either of the adjacent vertices and label it v2, and the edge joining these vertices e1. Now label the other vertex adjacent to v2 as v3, and the edge joining these vertices as e2. Repeat these steps until all of the vertices have been labeled. Finally, label the edge joining v5 and v1 as e5.

We now see that the vertices and edges of the pentagon correspond to the vertexes and edges of the star, that is, we have successfully mapped one graph onto the other graph. Therefore, the graphs must be isomorphic.

A more formal approach is given on pages 26 and 27 of your Graph Theory notes.

Question 6.

i) A simple graph G = {V, E} is said to be bipartite if there exists sets U ⊂ V and W ⊂ V, such that (1) U ∪ W =V and U ∩ W =∅ and (2) every edge of G connects a vertex in U with a vertex in W .

A complete bipartite graph is a bipartite graph where every vertex is connected to every other vertex.

Page 54: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 9 Autumn 2010 Solutions Page 3 of 4

ii) The following graph is an example of a complete bipartite graph.

u1 w2

w1 u2

If I remove any edge, the resulting graph will still be bipartite, but will not be complete.

Question 7.

i) A circuit is a closed path in which no edge is repeated.

ii) The clockwise circuits that contain vertex e are:

a, (a, b), b, (b, c), c, (c, d), d, (d, e), e, (a, e), a

a, (a, b), b, (b, g), g, (f, g), f, (e, f), e, (a, e), a

b, (b, c), c, (c, d), d, (d, e), e, (e, f), f, (f, g), g, (b, g), b

c, (c, d), d, (d, e), e, (e, f), f, (f, g), g, (c, g), c

d, (d, e), e, (e, f), f, (d, f), d

Remember that a path is a sequence of vertices and edges, so you must either label the edges in this graph or use the notation above to indicate the edges.

If we reverse the direction and travel in an anticlockwise direction, we have another five circuits – simply reverse the above paths.

iii) This graph is not an Eulerian graph as it does not contain an Eulerian circuit, that is, no circuit exists which includes every edge of the graph.

iv) This graph does not contain an Eulerian path as no path exists which includes every edge of the graph once and only once in the path.

Question 8.

i) A spanning tree is a sub-graph that includes every vertex of the graph.

ii) The minimal spanning tree has total weight 15 and is as follows

1 c

b 4 6 3 e d a 5 9 2 1 5 g 4 f

Page 55: WUCT121: Discrete Mathematics Wollongong University College

WUCT121: Discrete Mathematics

Assignment 9 Autumn 2010 Solutions Page 4 of 4

Step 1: create a table of edges and their weights

Edge Weight

(a, b) 4

(a, e) 5

(b, c) 1

(b, g) 2

(c, d) 3

(c, g) 9

(d, e) 6

(d, f) 5

(e, f) 1

(f, g) 4

Step 2: sort the table according to the weights and apply the algorithm

Edge Weight Will adding edge make circuit?

Action taken

Cumulative weight of subgraph

(b, c) 1 No Added 1

(e, f) 1 No Added 2

(b, g) 2 No Added 4

(c, d) 3 No Added 7

(a, b) 4 No Added 11

(f, g) 4 No Added 15

(a, e) 5 Yes Not Added 15

(d, f) 5 Yes Not Added 15

(d, e) 6 Yes Not Added 15

(c, g) 9 Yes Not Added 15

iii) The spanning tree is unique.