Topics in Discrete Mathematics
Total Page:16
File Type:pdf, Size:1020Kb
TOPICS IN DISCRETE MATHEMATICS A.F. Pixley Harvey Mudd College July 21, 2010 ii Contents Preface v 1 Combinatorics 1 1.1 Introduction . 1 1.2 The Pigeonhole Principle . 2 1.3 Ramsey's Theorem . 7 1.4 Counting Strategies . 15 1.5 Permutations and combinations . 19 1.6 Permutations and combinations with repetitions . 28 1.7 The binomial coefficients . 38 1.8 The principle of inclusion and exclusion . 45 2 The Integers 53 2.1 Divisibility and Primes . 53 2.2 GCD and LCM . 58 2.3 The Division Algorithm and the Euclidean Algorithm . 62 2.4 Modules . 67 2.5 Counting; Euler's φ-function . 69 2.6 Congruences . 73 2.7 Classical theorems about congruences . 79 2.8 The complexity of arithmetical computation . 85 3 The Discrete Calculus 93 3.1 The calculus of finite differences . 93 3.2 The summation calculus . 102 3.3 Difference Equations . 108 3.4 Application: the complexity of the Euclidean algorithm . 114 4 Order and Algebra 117 4.1 Ordered sets and lattices . 117 4.2 Isomorphism and duality . 119 4.3 Lattices as algebras . 122 4.4 Modular and distributive lattices . 125 iii iv CONTENTS 4.5 Boolean algebras . 132 4.6 The representation of Boolean algebras . 137 5 Finite State Machines 145 5.1 Machines-introduction . 145 5.2 Semigroups and monoids . 146 5.3 Machines - formal theory . 148 5.4 The theorems of Myhill and Nerode . 152 6 Appendix: Induction 161 v Preface This text is intended as an introduction to a selection of topics in discrete mathemat- ics. The choice of topics in most such introductory texts is usually governed by the supposed needs of students intending to emphasize computer science in their subse- quent studies. Our intended audience is somewhat larger and is intended to include any student seriously interested in any of the mathematical sciences. For this reason the choice of each topic is to a large extent governed by its intrinsic mathematical importance. Also, for each topic introduced an attempt has been made to develop the topic in sufficient depth so that at least one reasonably nontrivial theorem can be proved, and so that the student can appreciate the existence of new and unexplored mathematical territory. For reasons that are not entirely clear, at least to me, discrete mathematics seems to be not as amenable to the intuitive sort of development so much enjoyed in the study of beginning calculus. Perhaps one reason for this is the fortuitous notation used for derivatives and integrals which makes such topics as the chain rule for derivatives and the change of variable theorems for integrals so easy to understand. But, for example, in the discrete calculus, (presented in Chapter 3 of this book), despite many efforts, the notation is not quite so natural and suggestive. It may also just be the case that human intuition is, by nature, better adapted to the study of the continuous world than to the discrete one. In any case, even in beginning discrete mathematics, the role of proper mathematical reasoning and hence the role of careful proofs seems to be more essential than in beginning continuous mathematics. Hence we place a great deal of emphasis on careful mathematical reasoning throughout the text. Because of this, the prerequisites I have had in my mind in writing the text, beyond rigorous courses in single variable and multivariable calculus, include linear algebra as well as elementary computer programming. While little specific information from these subjects is used, the expectation is that the reader has developed sufficient mathematical maturity to begin to engage in reasonably sophisticated mathematical reasoning. We do assume familiarity with the meanings of elementary set and logical notation. Concerning sets this means the membership (2) and inclusion (⊂) relations, unions, intersections, complements, cartesian products, etc.. Concerning logic this means the propositional connectives (\or", \and", \negation", and \implication") and the meanings of the existential and universal quantifiers. We develop more of these topics as we need them. Mathematical induction plays an important role in the topics studied and an appendix on this subject is included. In teaching from this text I like to begin the course with this appendix. Chapters 1 (Combinatorics) and 2 (The Integers) are the longest and the most important in the text. With the exception of the principle of inclusion and exclusion (Section 1.8) which is used in Section 2.5 to obtain Legendre's formula for the Euler φ- function, and a little knowledge of the binomial coefficients, there is little dependence vi of Chapter 2 on Chapter 1. The remaining chapters depend on the first two in varying amounts, but not at all on each other. Chapter 1 Combinatorics 1.1 Introduction Combinatorics is concerned with the possible arrangements or configurations of ob- jects in a set. Three main kinds of combinatorial problems occur: existential, enu- merative, and constructive. Existential combinatorics studies the existence or non- existence of certain configurations. The celebrated \four color problem"| Is there a map of possible \countries" on the surface of a sphere which requires more than four colors to distinguish between countries?| is probably the most famous example of existential combinatorics. Its negative \solution" by Appel and Haken in 1976 required over 1000 hours of computer time and involved nearly 10 billion separate logical decisions. Enumerative combinatorics is concerned with counting the number of configura- tions of a specific kind. Examples abound in everyday life: how many ways can a legislative committee of five members be chosen from among ten Democrats and six Republicans so that the Republicans are denied a majority? In how many ways can such a committee, once chosen, be seated around a circular table? These and many other simple counting problems come to mind. Constructive combinatorics deals with methods for actually finding specific con- figurations, as opposed to simply demonstrating their existence. For example, Los Angeles County contains at least 10 million residents and by no means does any hu- man being have anywhere near that many hairs on his or her head. Consequently we must conclude (by existential combinatorics) that at any instant at least two people in LA County have precisely the same number of hairs on their heads! This simple assertion of existence is, however, a far cry from actually prescribing a method of find- ing such a pair of people | which is not even a mathematical problem. Constructive combinatorics, on the other hand, is primarily concerned with devising algorithms | mechanical procedures | for actually constructing a desired configuration. In the following discussion we will examine some basic combinatorial ideas with emphasis on the mathematical principles underlying them. We shall be primarily 1 2 Chapter 1 Combinatorics concerned with enumerative combinatorics since this classical area has the most con- nections with other areas of mathematics. We shall not be much concerned at all with constructive combinatorics and only in the following discussion of the Pigeon- hole principle and Ramsey's theorem will we be studying a primary area of existential combinatorics. 1.2 The Pigeonhole Principle If we put into pigeonholes more pigeons than we have pigeonholes then at least one of the pigeonholes contains at least two pigeons. If n people are wearing n + 1 hats, then someone is wearing two hats. The purely mathematical content of either of these assertions as well as of the \LA County hair assertion" above is the same: Proposition 1.2.1 (Pigeonhole Principle) If a set of at least n + 1 objects is parti- tioned into n non-overlapping subsets, then one of the subsets contains at least two objects. The proof of the proposition is simply the observation that if each of the n non- overlapping subsets contained at most 1 object, then altogether we would only account for at most n of the at least n + 1 objects. In order to see how to apply the Pigeonhole Principle some discussion of partitions of finite sets is in order. A partition π of a set S is a subdivision of S into non-empty subsets which are disjoint and exhaustive, i.e.: each element of S must belong to one and only one of the subsets. Thus π = fA1; :::; Ang is a partition of S if the following conditions are met: each Ai 6= ;, Ai \ Aj = ; for i 6= j, and S = A1 [···[ An. The Ai are called the blocks or classes of the partition π and the number of blocks n is called the index of π and denote it by index(π). Thus the states and the District of Columbia form the blocks of a partition of index 51 of the set of all residents of the United States. A partition π of a set S of n elements always has index ≤ n and has index = n iff each block contains precisely one element. At the other extreme is the partition of index 1 whose only block is S itself. With this terminology the Pigeonhole Principle asserts: If π is a partition of S with index(π) < jSj, then some block contains at least two elements. (jSj denotes the number of elements in S.) Partitions of S are determined by certain binary relations on S called equivalence relations. Formally, R denotes a binary relation on S if for each ordered pair (a; b) of elements of S either a stands in the relation R to b (written aRb) or a does not stand in the relation R to b. For example, =; <; ≤; j (the latter denoting divisibility) are common binary relations on the set Z of all integers. There are also common non-mathematical relations such as \is the brother of" among the set of all men, or \lives in the same state as" among residents of the United States (taking DC as a Section 1.2 The Pigeonhole Principle 3 state).