




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
about discrete mathematics and logic
Typology: Lecture notes
1 / 281
This page cannot be seen from the preview
Don't miss anything!





























































































Notes Distributed to Students in Mathematics 189-240A (2000/2001) i
(Items marked ‡ not distributed in hard copy)
Contents
1 General Information 1 1.1 Instructor, Tutors, and Times. 1 1.2 Calendar Description...... 1 1.3 Class Quiz............ 1 1.4 Term Test............ 1 1.5 Homework............ 2 1.6 Term Mark........... 2 1.7 Calculators........... 3 1.8 Final Grade........... 3 1.9 Text-Book............ 3 1.10 Tutorials............. 3 1.11 Homework Grader....... 3 1.12 Supplementary Materials... 3 1.12.1 Printed Notes...... 3 1.12.2 Notes and Examinations from Previous Years.. 4 1.13 Examination information... 4
2 Timetable 5
3 Syllabus 7 3.1 Chapter 1. The Foundations: Logic, Sets, and Functions... 7 3.2 Chapter 2. The Fundamentals: Algorithms, the Integers, and Ma- trices............... 8 3.3 Chapter 6. Relations (first part) 8
4 First Problem Assignment 9
5 Class Quiz 14
6 Solutions to Problems on the Class Quiz 17
7 Second Problem Assignment 21
8 References 901
A Problems on Term Tests of Previ- ous Years ‡ 1001 A.1 1991 Term Test......... 1001 A.1.1 First Version...... 1001 A.1.2 Second Version..... 1002 A.2 1994 Term Test......... 1003 A.2.1 First Version...... 1003 A.2.2 Second Version..... 1003 A.3 1995 Term Test......... 1004 A.3.1 First Version...... 1004 A.3.2 Second Version..... 1004 A.3.3 Third Version...... 1005 A.3.4 Fourth Version..... 1005 A.4 1996 Term Test......... 1006 A.5 1997 Term Test......... 1013 A.6 1998 Term Test......... 1020 A.6.1 Problems on the count- ing of relations..... 1020 A.6.2 Solution of linear homo- geneous recurrences with constant coefficients.. 1022 A.6.3 Use of ordinary generat- ing functions to count or- dered additive partitions of integers........ 1024 A.6.4 Logic and induction.. 1027 A.6.5 Prove or disprove.... 1030 A.7 Solutions to Problems on the 1999 Class Tests........... 1032 A.7.1 Proving or disproving the validity of a rule of infer- ence........... 1033 A.7.2 Injective and surjective functions........ 1035 A.7.3 Particular solutions of in- homogeneous recurrences 1037 A.7.4 Pigeonhole principle.. 1041 A.7.5 Permutations...... 1042 A.7.6 Ordered partitions of an integer.......... 1045
1 General Information
Distribution Date: Wednesday, September 6th, 2000 (all information is subject to change)
INSTRUCTOR TUTORS Professor W. G. Brown I. D´ech`ene L. Demb´el´e OFFICE: BURN 1224 BURN 1017 BURN 1029 OFFICE HOURS W 14:30→15:20; Th 114:00→16: (subject to change): F 10:00→11: or by appointment OFFICE PHONE: 398– E-MAIL: BROWN DECHENE DEMBELE @MATH.MCGILL.CA @MATH.MCGILL.CA @MATH.MCGILL.CA CLASSROOM: MAASS 112 ARTS W-120 ENGMC 122 CLASS HOURS: MWF 15:30–16:30 W 16:30–18:00 T 14:30–16:
(3 credits) (Corequisites 189-133 (or 189-121 or CEGEP 201-105) and 189-
A quiz will be administered in class on Friday, September 15th, 2000. This quiz does not count in the computation of the term mark, and is intended as a diagnostic aid. It will be based on the material covered in the course during the first 4 lectures. Answers will be distributed, so that students may check their own performance. (Note that this is the last lecture before the end of the Course Change Period.)
A term test will be administered during the regular class hour on Wednesday, October 25th, 2000. No provision is planned for a “make-up” test for a student absent during the test. Any change in this date will be announced in the lectures.
UPDATED TO September 19, 2000
In your instructor’s eyes the main purpose of the test is as a “dry run” for the final examination.^1
There will be approximately 5 or 6 homework assignments. The material on these as- signments forms an integral part of the course; it may happen that an assignment is concerned with material (from the textbook or self-contained in the assignment) which has not been explicitly discussed in the lectures. An assignment is not a test: it should be viewed as a learning experience, and as a preparation for reading the solutions, which will normally be circulated in print. The numerical grade recorded for the assignments is relatively insignificant; but students should be sure that they understand the problems and their solutions. It should not be assumed that every type of problem that a student will be expected to be able to solve will appear on an assignment; nor that all topics which appear on assignments are equally significant. In addition to completing the assignments, students are encouraged to attempt problems in the text-book, particularly low odd-numbered problems in each set of exercises, for which there will usually be answers in the text-book, and solutions in the solutions manual. While students are not discouraged from discussing assignment problems with their colleagues, the written solutions that are handed in should be each student’s own work.^2 Submitted homework should be stapled with a cover page that contains your NAME, STUDENT NUMBER, the COURSE NUMBER, and the ASSIGNMENT NUMBER. Other pages should always include your student number. You can minimize the possi- bility that your assignment is lost or fragmented.
Graded out of 30, the TERM MARK will be the sum of the HOMEWORK GRADE (out of 10) and the TERM TEST GRADE (out of 20). (^1) Notwithstanding the minimal contribution of the test grade to the student’s final grade (cf. §1.
below), the test is to be considered an “examination” in the sense of the Handbook of Student Rights and Responsibilities (http://blizzard.cc.mcgill.ca/Secretariat/Students/index.html). (^2) From the Handbook on Student Rights and Responsibilities:
“No student shall, with intent to deceive, represent the work of another person as his or her own in any...assignment submitted in a course or program of study or represent as his or her own an entire essay or work of another, whether the material so represented constitutes a part or the entirety of the work submitted.”
1.12.2 Notes and Examinations from Previous Years
These materials are not required, but are available to interested students at the following URL:
http://www.math.mcgill.ca/brown/math240a.html
Of particular interest may be the large numbers of worked problems. Solved problems from the assignments in the course during the last four years — the years when this and the previous edition of the present textbook was used — are collected into an appendix to the current year’s notes; these will probably not be distributed to the class, but will be available in the above location on the Web. It is hoped to mount these files in “pdf” format (· · · .pdf), which can be read by Adobe “Acrobat”. Some older files on the Website are presently in “PostScript” format, (· · · .ps), for which an appropriate viewer is required (e.g. ghostview). Some of these files are very long.
2 Timetable
Distribution Date: (Original version) Wednesday, September 6th, 2000 (All information is subject to change.)^4
MONDAY WEDNESDAY FRIDAY SEPTEMBER 4 LABOUR DAY 6 §1.1 1 8 §1. Tutorials begin in the week of September 11th 11 §1.3, §1.4 13 §1.4, §1.5; Prof. Brown’s Friday office hour advanced to to- day.
Prof. Brown’s Office hour advanced to 13 Sept. Course changes must be completed by September 17 18 §1.6 20 §1.6, §1.7(pp. 76–
Deadline for withdrawal with fee refund = September 24 25 §6.1 27 §3.1 29 §3.1 1
Verification Period (Graduating Students): October 10– 9 THANKSGIVING DAY
Deadline for withdrawal (with W) from course via MARS = Oct. 15 16 §4.3, §4.6 18 §4.6 20 X 2
(tentative)
The next page will not be distributed until the syllabus has been revised.
(^4) Notation: # = distribution of assignment # n ∑ = assignment #n due ©^ R = Read Only X = reserved for eXpansion or review N = distributed notes Section numbers refer to the text-book.
3 Syllabus
Distribution Date: Wednesday, September 6th, 2000 This 0th version of the syllabus is subject to revision.
§ Section Name Comments Time §1. §1. §1.
Logic Propositional Equivalences Predicates and Quantifiers
Sets Set Operations
Review of elementary set theory (Note that the author uses the term natural numbers for the nonnegative integers; i.e. he includes 0.)
§1.6 Functions While students will be expected to be familiar with the function concept from Calculus I, II (and are reminded that Calculus III is a corequisite of this course), emphasis will be placed on the special types of functions discussed — injective, surjective, bijective, etc.
§1.7 Sequences and Summations
Students should have met/be meeting these concepts in their calculus and other courses. However, the optional material on Cardinality (pp. 76–78) will be dis- cussed.
1 2
§1.8 The Growth of Functions This important material will be met in other courses. It forms part of the syl- labus only to the extent to which it is discussed in the lectures, assignments, or printed notes.
§ Section Name Comments Time §2. §2.
Algorithms Complexity of Algorithms
These sections contain material that stu- dents will meet elsewhere. It is recom- mended that students peruse this mate- rial, but it will not form part of the syl- labus of this course.
§2.3 The Integers and Division This material is also in the syllabus of course 189-340B; it will be discussed briefly here to maintain the integrity of the present text-book. We will avoid the author’s use of the modulus as a unary function [19, Definition 8, §2.3].
Integers and Algorithms Applications of Number Theory
As much of this material is in the syl- labus of course 189-340B, these concepts will be examination material only to the extent that they are applied in other sec- tions of the syllabus.
ε
§2.6 Matrices Most of this material will have been met in pre- or corequesite courses in linear al- gebra. Algorithms for matrix operations may be met in computer science courses. Pages 157-159 may be studied in connec- tion with Chapter 6.
§ Section Name Comments Time §6.1 Relations and Their Properties
1-ε
§6.2 n-ary Relations and Their Applications
The database application will be dis- cussed very briefly, as students will meet this in their computer science courses. Other mathematical examples should be supplied.
ε
(to be continued in §?? of these notes)
((p → ¬q) ∧ q) → ¬p.
You sleep late if it is Saturday.
(Inverse = converse of contrapositive.)
(a) P (0, 0) (b) ∀x∃yP (x, y) (c) ∀y∃xP (x, y) (d) ¬∀x∃y¬P (x, y)
(a) ∃y∀xT (x, y) (b) ¬∃x∃yT (x, y) (c) ∀y∃xT (x, y) (d) ¬∀x∃yT (x, y) (e) ¬∀x∃y¬T (x, y) (f) ¬∀x¬∀y¬T (x, y) (g) ∀x∃y¬T (x, y)
The English statements are
(A) Every course is being taken by at least one student. (B) Some student is taking every course. (C) No student is taking all courses. (D) There is a course that all students are taking. (E) Every student is taking at least one course.
(F) There is a course that no students are taking. (G) Some students are taking no courses. (H) No course is being taken by all students. (I) Some courses are being taken by no students. (J) No student is taking any course.
(a) {{a}} ⊆ P (A) (b) {? } ⊆ P (A) (c) {a, c} ∈ A (d) (c, c) ∈ A × A
(a) |P (A × B)| = 64 (b) B ⊆ A (c) {a, b} ∈ A × A (d) {b, {c}} ∈ P (B) (e) {{{c}}} ⊆ P (B)
(a) A = {? , {? }, {a}, {{a}}, {{{a}}}, {? , a}, {? , {a}}, {? , {{a}}}, {a, {a}},
{a, {{a}}}, {{a}, {{a}}}, {? , a, {a}}, {? , a, {{a}}}, {? , {a}, {{a}}},
{a, {a}, {{a}}}, {? , a, {a}, {{a}}}}
(b) A = {? , {a}} (c) A = {? , {a}, {? , a}} (d) A = {? , {a}, {? }, {a,? }} (e) A = {? , {a,? }} (f) A = {? , {{? , a}}}
(a) A − (B − C) = (A − B) − C
(b) (A − C) − (B − C) = A − B
(c) A ∩ (B ∪ C) = (A ∪ B) ∩ (A ∪ C)
(d) If A ∪ C = B ∪ C, then A = B.
(e) If A ∩ C = B ∩ C, then A = B.
5 Class Quiz
Distribution Date: 15 September, 2000
(a) If 1 < 0, then 3 = 4. (b) If 1 + 1 = 2 or (inclusive) 1 + 1 = 3, then 2 + 2 = 3 and 2 + 2 = 4.
p → (¬q ∧ r), ¬p ∨ ¬(r → q).
((p → q) ∧ ¬p) → ¬q.
If you try hard, then you will win.
(Inverse = converse of contrapositive.)
(a) c ∈ A − B (b)? ∈ P (B) (c) {c} ⊆ B (d) {b, c} ∈ P (A) (e)? ⊆ A × A
(a) x ⊆ E. (b)? ∈ P (E). (c) {x} ⊆ D − E. (d) |P (D)| = 4.
6 Solutions to Problems on the Class Quiz
which was administered on 15th September, 2000.
Distribution Date: 15 September, 2000
(a) If 1 < 0, then 3 = 4. (b) If 1 + 1 = 2 or (inclusive) 1 + 1 = 3, then 2 + 2 = 3 and 2 + 2 = 4.
Solution:
(a) Here the premise, 1 < 0, is false; any conditional statement with a false premise must be true. (b) The premise is true, as it is the disjunction of two statements which are not both false. For the conditional to be true we require that the conjuction (2 + 2 = 3) ∧ (2 + 2 = 4) be true, i.e. that both of the conjuncts be true. But the first conjunct, 2 + 2 = 3, is false. Hence the conditional statement is false.
p → (¬q ∧ r), ¬p ∨ ¬(r → q).
Solution: This case could be proved using a truth table, where the columns cor- responding to the two given formulæ would be seen to have identical entries. An- other way of proving this equivalence would be as follows, using laws of logic and an equivalence proved in the textbook.
p → (¬q ∧ r) ⇔ ¬p ∨ (¬q ∧ r) [19, Example 1.2.3, p. 16] ⇔ ¬p ∨ (¬q ∧ ¬¬r) double negation law ⇔ ¬p ∨ ¬(q ∨ ¬r) de Morgan law ⇔ ¬p ∨ ¬(¬r ∨ q) commutativity of ∨ ⇔ ¬p ∨ ¬(r → q) [19, Example 1.2.3, p. 16]
((p → q) ∧ ¬p) → ¬q.
Solution: By using a truth table, or otherwise, we can discover the interpretation (truth assignment) (p, q) = (F, T ) under which the given proposition is false.