discrete mathematics book, Lecture notes of Mathematical Statistics

about discrete mathematics and logic

Typology: Lecture notes

2018/2019

Uploaded on 03/14/2019

mohammad-said
mohammad-said 🇹🇷

4

(1)

2 documents

1 / 281

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
McGILL UNIVERSITY
FACULTY OF SCIENCE
DEPARTMENT OF
MATHEMATICS AND STATISTICS
MATHEMATICS 189–240A
DISCRETE STRUCTURES AND
COMPUTING
Notes Distributed to Students
(Fall Term, 2000/2001)
W. G. Brown
September 19, 2000
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download discrete mathematics book and more Lecture notes Mathematical Statistics in PDF only on Docsity!

McGILL UNIVERSITY

FACULTY OF SCIENCE

DEPARTMENT OF

MATHEMATICS AND STATISTICS

MATHEMATICS 189–240A

DISCRETE STRUCTURES AND

COMPUTING

Notes Distributed to Students

(Fall Term, 2000/2001)

W. G. Brown

September 19, 2000

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)

1.1 Instructor, Tutors, and Times

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:

1.2 Calendar Description

(3 credits) (Corequisites 189-133 (or 189-121 or CEGEP 201-105) and 189-

  1. For Major and Honours students in Computer Science only. Others only with the Instructor’s permission.) Abstractly defined mathematical structures. Mathematical induction. Sets, relations and functions. Combinatorics; graphs; recurrences; generating functions. Lattices, Boolean algebras.

1.3 Class Quiz

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.)

1.4 Term Test

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

1.5 Homework

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.

1.6 Term Mark

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.

1.13 Examination information

  1. “Will there be a supplemental examination in this course.” Yes.
  2. “Will students with marks of D, F, or J have the option of doing additional work to upgrade their mark?” No.
  3. “Will the final examination be machine scored?” No.

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.

15 CLASS QUIZ;

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–

22 §2.3 ^2

Deadline for withdrawal with fee refund = September 24 25 §6.1 27 §3.1 29 §3.1 1

OCTOBER

2 §3.2, §3.3 4 §4.1, §4.2 6 §4.1, §4.2 ^3

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

23 §5.4,§5.1  4 25 CLASS TEST

(tentative)

30 §5.2, §5.4, N

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.

3.1 Chapter 1. The Foundations: Logic, Sets, and Functions

§ 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.

3.2 Chapter 2. The Fundamentals: Algorithms, the Integers,

and Matrices

§ 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.

3.3 Chapter 6. Relations (first part)

§ 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)

  1. Determine whether the following proposition is a tautology:

((p → ¬q) ∧ q) → ¬p.

  1. Write the contrapositive, converse, and inverse of the following statement:

You sleep late if it is Saturday.

(Inverse = converse of contrapositive.)

  1. Suppose P (x, y) is the statement x + 2y = xy, where x and y are integers. What are the truth values of

(a) P (0, 0) (b) ∀x∃yP (x, y) (c) ∀y∃xP (x, y) (d) ¬∀x∃y¬P (x, y)

  1. Suppose the variable x represents students, y represents courses and T (x, y) means ”x is taking y”. Match each of the following symbolic statements with all its equivalent English statements in the second list:

(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.

  1. Suppose A = {a, b, c}. Determine the truth value of each of the following state- ments. Justify your answers.

(a) {{a}} ⊆ P (A) (b) {? } ⊆ P (A) (c) {a, c} ∈ A (d) (c, c) ∈ A × A

  1. Suppose A = {a, b, c} and B = {b, {c}}. For each of the following statements, determine whether it is true or false.

(a) |P (A × B)| = 64 (b) B ⊆ A (c) {a, b} ∈ A × A (d) {b, {c}} ∈ P (B) (e) {{{c}}} ⊆ P (B)

  1. Determine, for each of the following sets A, whether it is the power set of some set B. If that is so, give 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

  • This quiz is based on [19, §§1.1 – 1.4 and part of §1.5].
  • No books, notes, calculators, or other aids may be used.
  • THIS QUIZ DOES NOT COUNT IN THE COMPUTATION OF YOUR TERM MARK!
  • All answers must be thoroughly justified. Unless you are instructed to the contrary, it is never sufficient to simply state a one-word answer.
  • For the purpose of assigning a numerical grade, the questions numbered with Arabic numberals (1, 2, 3,...) may be taken to be of equal value, although they are not equally difficult.
  • A sketch of solutions will be provided at the end of the hour. It is suggested that you exchange papers with another student, and each grade the other’s paper, referring to the sketch of solutions.
  1. Determine whether each of the following is true or false, giving a precise explanation in each case.

(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.

  1. Determine whether or not the following two propositions are logically equivalent:

p → (¬q ∧ r), ¬p ∨ ¬(r → q).

  1. Determine whether the following proposition is a tautology:

((p → q) ∧ ¬p) → ¬q.

  1. Write the contrapositive, converse, and inverse of the following statements:

If you try hard, then you will win.

(Inverse = converse of contrapositive.)

  1. Suppose P (x, y) is the statement x + 2y = xy, where x and y are integers. What are the truth values of
  1. Suppose A = {a, b, c} and B = {b, {c}}. For each of the following statements, determine whether it is true or false. (Because of time limitations no justification is requested.)

(a) c ∈ A − B (b)? ∈ P (B) (c) {c} ⊆ B (d) {b, c} ∈ P (A) (e)? ⊆ A × A

  1. Suppose D = {x, y} and E = {x, {x}}, where x 6 = y. For each of the following statements, determine whether it is true or false. (Because of time limitations no justification is requested.)

(a) x ⊆ E. (b)? ∈ P (E). (c) {x} ⊆ D − E. (d) |P (D)| = 4.

  1. Find three subsets of { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 } such that the intersection of any two has cardinality 2 and the intersection of all three has cardinality 1.

6 Solutions to Problems on the Class Quiz

which was administered on 15th September, 2000.

Distribution Date: 15 September, 2000

  1. Determine whether each of the following is true or false, giving a precise explanation in each case.

(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.

  1. Determine whether or not the following two propositions are logically equivalent:

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]

  1. Determine whether the following proposition is a tautology:

((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.