introduction to discrete mathematics - springer978-1-4612-4052-5/1.pdfintroduction to discrete...
TRANSCRIPT
Introduction to
DISCRETE MATHEMATICS
with ISETL
Springer New York Berlin Heidelberg Barcelona Budapest Hong Kong London Milan Paris Santa Clara Singapore Tokyo
Introduction to
DISCRETE MATHEMATICS
with ISETL
William E. Fenton Ed Dubinsky
.~ ~
Springer
William E. Fenton Department of Mathematics Bellarmine College Newburg Road Louisville, KY 40205 USA
Ed Dubinsky Department of Mathematics Purdue University West Lafayette, IN 47907 USA
Library of Congress Cataloging-in-Publication Data
Fenton, William (William E.) Introduction to discrete mathematics with ISETL I by William Fenton & Ed Dubinsky.
p. cm. Includes bibliographical references (p. - ) and index.
ISBN-13: 978-1-4612-8480-2 e-ISBN-13: 978-1-4612-4052-5 DOl: 10.1007/978-1-4612-4052-5
1. Mathematics. 2. Computer science-Mathematics. 3. ISETL (computer pro-gram language) I. Dubinsky. Ed. II. Title.
QA39.2.F445 1996 511.3'078--<ic20 96-8337
Printed on acid-free paper.
© 1996 Springer-Verlag New York Inc. Solkover reprint of the hardcover 1st edition 1996
All rights reserved. This work may not be translated or copied in whole or in part without the written permission of the publisher (Springer-Verlag New York, Inc., 175 Fifth Avenue, New York, NY 10010, USA), except for brief excerpts in connection with reviews or scholarly analysis. Use in connection with any form of information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed is forbidden. The use of general descriptive names, trade names, trademarks, etc., in this publication, even if the former are not especially identified, is not to be taken as a sign that such names, as understood by the Trade Marks and Merchandise Marks Act, may accordingly be used freely by anyone.
Production coordinated by Black Hole Publishing and managed by Terry Kornak; manufacturing supervised by Joe Quatela.
Typeset by Black Hole Publishing, Berkeley, CA.
987654321
Contents
COMMENTS FOR THE INSTRUCTOR To the Student. . . . . . . .
1 NUMBERS AND PROGRAMS 1.1 The Basics of ISETL
Activities . . . . . . Discussion .....
Beginning with ISETL Some Syntax . . . . . . Familiar Sets of Numbers Decimal Representation Binary Representation . Sequences
Exercises 1.2 Divisibility ....
Activities Discussion
ISETLfuncs- Functions ISETL smaps- Functions. Sources of Functions Recursive Functions . Modular Arithmetic Prime Numbers .. Common Divisors . Common Multiples
Exercises · .. Overview of Chapter I ....
2 PROPOSITIONAL CALCULUS 2.1 Boolean Expressions
Activities · ...... Discussion ......
Constants and Variables Basic Operations. . . . Functions Using Boolean Values
Exercises · .. 2.2 Implication and Proof .
Activities · ..
xi xiv
1 1 1 1 1 3 3 5 5 6 6 9 9
12 12 13 14 15 15 16 18 20 21 24
27 27 27 29 29 30 32 33 34 34
vi CONTENTS
Discussion · .................. 36 Conditional Statements ....... 36 Variations of Conditional Statements 37 Direct Proof . . . . . . 38 Indirect Proof ..... 38 Proof by Contradiction 39
Exercises · .. 40 Overview of Chapter 2 41
3 SETS AND TUPLES 43 3.1 Defining Sets and Tuples 43
Activities · ... 43 Discussion · .. 46
Sets and their Elements 46 Tuples and their Elements . 48 Forming Sets and Tuples 48 Sequences ...... 50 Recursive Sequences 50
Exercises 51 3.2 Operations on Sets 53
Activities . 53 Discussion 55
Cardinality. 55 Subsets ... 55 Basic Combinations of Sets 57 De Morgan's Laws. 58 Cartesian Products . 59 Inclusion-Exclusion 59
Exercises 60 3.3 Counting Methods 62
Activities 62 Discussion 64
The Multiplication Principle. 64 Permutations . . . . . . . 65 Combinations ...... 66 The Pigeonhole Principle 67
Exercises · .. 68 Overview of Chapter 3 70
4 PREDICATE CALCULUS 73 4.1 Quantified Expressions 73
Activities · .. 73 Discussion · . 76
Existential and Universal Quantifiers 76
CONTENTS vii
Quantifying over Proposition Valued FunctionsExistential . . . . . . . . . . . . . . . . . . .. 76 Quantifying over Proposition Valued Functions-Universal. . . . . . . . . . . . . . . . . 77 Negations ................ 78 Reasoning about Quantified Expressions 78
Exercises . . . . . 79 4.2 Multi-Level Quantification 84
Activities . . . . . 84 Discussion .... 87
Quantified Statements that Depend on a Variable 87 Two-Level Quantification . . . . . . . . . . 89 Negating Two-Level Quantifications .... 90 Reasoning about Two-Level Quantifications 91 Three-Level Quantification 92
Exercises . . . 92 Overview of Chapter 4 . . 96
5 RELATIONS AND GRAPHS 5.1 Relations and their Graphs
Activities . . . . . Discussion ....
Relations. Representing a Relation Properties of Relations More about Graphs .,
Exercises ............ . 5.2 Equivalence Relations and Graph Theory
Activities . . . . . . . . . . . . Discussion .......... .
Equivalence Relations Types of Graphs Subgraphs Planarity
Exercises ... Overview of Chapter 5
6 FUNCTIONS 6.1 Representing Functions .
Activities . . . . Discussion ...
Constructing Functions Functions as Expressions Functions as Sequences Functions as Tables . . .
97 97 97 99 99
100 101 102 103 106 106 107 107 109 109 III III 114
117 117 117 120 120 122 122 123
viii CONTENTS
Functions as Graphs . . . . The Process of a Function . Two Definitions
Exercises ... 6.2 Properties of Functions
Activities . . .
124 125 126 126 129 129
Discussion .. 132 Basic Properties 132 One-to-One Functions . 133 Combinations of Functions 135 Inverse Functions . . . . . 137 Rate of Growth for Functions 138
Exercises . . . 140 Overview of Chapter 6 . . . . 143
7 MATHEMATICAL INDUCTION 145 7.1 Understanding the Method 145
Activities . . . . . . . 145 Discussion ...... 148
Proposition-Valued Functions . 148 Eventually Constant Proposition-Valued Func-tions . . . . . . . . . . . . . . 148 Implication-Valued Functions. 149 Modus Ponens . . . . . 150 Coordinating the Steps
Exercises ...... . 7.2 Using Mathematical Induction
Activities . . . . . . . Discussion ..... .
Making Induction Proofs The Induction Principle Complete Induction . . The Binomial theorem .
Exercises ... Overview of Chapter 7
8 PARTIAL ORDERS Activities Discussion . . . . . . .
Order on a Set Diagrams of Posets Topological Sorting Sperner's Theorem.
Exercises ... Overview of Chapter 8 .. . . . . . .
151 151 153 153 154 154 156 156 157 158 160
163 163 164 164 165 166 167 168 170
CONTENTS ix
9 INFINITE SETS 173 Discussion ...... . . . . . . . . . . . . . . . . . . . 173
Sets of Equal Cardinality . . . . . . . . . . . . 173 Infinite Sets ................... 174 Countable Sets .................. 174 Uncountable Sets ................ 178 Ordering oflnfinite Sets . . . . . . . . . . . . . 179
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . 180
APPENDIX 1: GETTING STARTED WITH ISETL 182 A. Working in the Execution Window ........... 182 B. Working with Files ................... 184 C. Using Directives .................... 185 D. Graphing in ISETL ................... 186
APPENDIX 2: SOME SPECIAL CODE 188
INDEX 191
INDEX OF FREQUENTLY USED SETS AND FUNCTIONS 194
COMMENTS FOR THE INSTRUCTOR
TEACHING A COURSE WITH THIS BOOK
This book is intended to support a constructivist approach to teaching (in the epistemological sense, not the mathematical). That is, it can be used in an undergraduate discrete mathematics course or in a "bridge" course to help create an environment in which students construct for themselves mathematical concepts appropriate to understanding and solving problems. Of course, the pedagogical ideas on which the book is based do not appear explicitly in its text, but rather are implicit in its structure and content.
The mathematical ideas in our text are not presented in a completed and polished form, adhering to a strict logical sequence, but are presented roughly and circularly, with the student responsible for trying to straighten things out. The student is given considerable help in making mathematical constructions to use in making sense out of the material. This help comes from a combination of computer activities, leading questions, and a conversational writing style.
It should be noted that although each learning cycle begins with activities preceding a discussion of some of the mathematical ideas on which they are based, the students are not expected to discover all of the mathematics for themselves. In fact, since the main purpose of the activities is to establish an experiential base for subsequent learning, students who spend considerable time and effort working on the activities will reap benefits whether they have discovered the "right" answers or not. Definitions, theorems, proofs and summaries are presented only after the student has had a chance to work with the ideas related to the concepts to be formalized.
In teaching courses based on this book and on similar texts in other subjects, we find that our approach appears to be extremely effective for most students, bringing them a stronger understanding of mathematical ideas than one would think possible from experience with traditional pedagogy. The exercise set is strong enough to challenge superior students and whet their appetite for more mathematics. And we find that students of all levels who go through our courses develop a positive attitude towards mathematical abstraction and mathematics in general.
Finally, before describing the structure of the book, we should point out that this text is only part of the course. The authors are preparing a package to aid instructors in using this approach. This package will include discussion of the activities and their solutions, samples of assignments, class lesson plans, sample exams, and information on dividing students into teams. This material will be available
XII COMMENTS FOR THE INSTRUCTOR
from the authors. An ISETL user's manual by Jennie Dautermann, entitled Using ISETL 3.0: A Language for Learning Mathematics, is available from West Publishing (ISBN 0-314-01326-1 for the Macintosh version, and 0-314-01327-X for the DOS version).
THE A.C.E. CYCLE
The text is divided into sections, each intended to be covered by an average class in about a week. A section consists of a set of Activities, Class discussion material, and a set of Exercises.
Activities
These tasks present problems which require students, working in teams, to write ISETL code representing mathematical constructs that can be used to solve the problems. Often an activity will require use of mathematics not yet covered in the text. The student is expected to try to discover the mathematics or sometimes just make guesses, possibly reading ahead in the text for clues or explanations.
Class Discussion Material
These portions contain some explanations, some completed mathematics, and many questions, all taking place under the assumption that the student has already spent considerable time and effort on the activities related to the same topics. Our experience indicates that, with this background, students can relate much more meaningfully to formal definitions and theorems. Each unanswered question in the text is either answered later in the book or repeated as an explicit problem in the exercises. Our way of using this discussion material in a course is to have the students work together in teams during class to solve paper and pencil problems, mainly suggested by the open questions in the text. This largely replaces lectures, which occur only as summations after the students have had a chance, through the activities and discussions, to understand the material.
Exercises
There are two kinds of exercises in this text. Some exercises are relatively traditional and are used to reinforce and solidify the ideas that the students have constructed up to this point. They occasionally introduce preliminary versions of topics that will be considered later. Other exercises, especially in the chapters on Predicate Calculus, Functions, and Mathematical Induction, have been taken from our research into learning and represent problems we have used to understand the difference between students who are constructing useful mathematical ideas and those who are not.
COMMENTS FOR THE INSTRUCTOR xiii
Obtaining ISETL
A user's manual is available for ISETL, in separate versions for DOS or Macintosh. These come from the West Publishing Company and a disk is included. ISETL is also available on the World Wide Web at
http://www.mth.cmich.edu/faculty/mathewsllinks.htrnl
Another option is to contact either one of the authors. A Windows version ofISETL has recently been developed by John Kirchmeyer
of Mount Union College. Version 1.2 is a true Windows application with pulldown menus, a button bar, and mouse abilities. As of May 1996 ISETL for Windows lacks graphics capabilities, but work continues and graphics are expected to be part of the next version. Information and the most current version of ISETL for Windows can be obtained from the WWW at
http://csis03 .muc.edu/isetlw /istelw.html
Please note that ISETL is a free software. We encourage instructors to make it freely available to students for their own computers.
COVERING THE COURSE MATERIAL
Though the teaching method supported by this book is novel, the selection of material is fairly standard. The text can be used for an introductory lower level college course in discrete mathematics or, perhaps with some supplementary material provided by the instructor, for a higher level college course intended to provide a bridge to the study of more advanced mathematical topics. The first chapter provides the student with the opportunity to learn how to program in ISETL while simultaneously learning or reviewing certain basic material. Chapters 2-8 cover standard topics in elementary discrete mathematics. The instructor should be aware that the activities often rely on activities from earlier sections, so care is called for when assigning problems.
Chapter 9-which we are introducing in this text as an informal experimentrepresents a departure from our methodology. There is no question that some students do not need the special kind of pedagogy and interaction with computers that this text supports. These are individuals who, we believe, have special talent in this subject. We think of them as the "natural athletes" of mathematics. Most students, however, need some assistance, some scaffolding to help them construct mathematical concepts; such is the main aim of this text and of the course of which it is a part. Whether students in general will always need the kind of support that a constructivist pedagogical approach tries to provide is, for us, an open question. It might be that some students, after experiencing a course such as this, will develop the ability to construct mathematical concepts in their minds by listening to a presentation of the material, or by reading about it in a text-plus, of course, by working problems. Chapter 9 is written in a completely traditional manner,
xiv COMMENTS FOR THE INSTRUCTOR
and we recommend that it be presented in class by the instructor explaining the material and discussing it with students. The question it raises is whether some students, at the end of this course, will be able to handle mathematics presented in a traditional manner.
Returning to our constructivist pedagogy, the experiences of the many faculty who have implemented this and similar texts in courses using our pedagogical methods, indicate that this approach can provide the opportunity for students to gain a much deeper understanding of the concepts of mathematics than may be possible in a course taught in a more traditional manner. We hope your experience will be similar.
TO THE STUDENT
In this book we ask a lot of questions. You should ask a lot of questions too, and the first one might be: What is Discrete Mathematics? Most of the mathematics you have studied up to now has been continuous mathematics, which deals with continuous sets such as intervals, the number line, or the coordinate plane. These concepts will be useful for studying discrete mathematics, but the emphasis will now be on sets with discrete elements, elements which are distinct and disconnected from each other. Sets with only a finite number of elements are automatically discrete sets, though the infinitely many integers form a discrete set too. A large portion of discrete mathematics is concerned with finite sets. Finite sets sound as though they are easier to understand than infinite sets, but this can be misleading. After all, the size of the U.S. national debt is a finite number; do you think you understand it?
A natural question about a finite set is: How big is it? This simple query can be surprisingly difficult to answer. Think about the following set:
L:= the set of positive three-digit numbers in which the first digit is less than the other two digits
This has to be a finite set, since it contains just some of the positive three-digit numbers and there are only 900 of those. (Do you see why there are only 900?) But how many elements does L have? Counting elements in a set is part of discrete mathematics.
Discrete mathematics also looks at mathematical structures that can be built on discrete sets. We could ask how the elements could be compared to each other. The point [5,3] in the coordinate plane can be either "bigger" or "smaller" than the point [2,6]; it depends on what you mean by "bigger." The points could even be considered "equal"; can you think of a way to do this? Another aspect of mathem&tical structure asks how to combine elements to make new elements and how these combining operations work. For instance, it is possible to do interesting arithmetic using only single-digit numbers. This arithmetic is not what you are used to, since fi + 9 has to give a single-digit answer. Sets can be combined to
COMMENTS FOR THE INSTRUCTOR xv
fonn new sets; the size of these combinations depends on how the sets are merged. Sentences can be combined to fonn new sentences; whether the new sentence is true or false hinges on how the combination is made.
A second question you might ask about this book is: Why use computers? An historical reason is that many problems in discrete mathematics require a lot of computation. The computer has made great contributions to the subject by helping to solve such problems. Further, computer science has raised many problems which can be analyzed with techniques from discrete mathematics. So the two areas have strong ties. But we think there is a better reason for using a computer. It is an enonnously valuable tool for learning the concepts of discrete mathematics. Interaction with a computer will help you build mathematical structures in your mind, which will strengthen your ability to analyze problems in a mathematical way. Writing the precise instructions that a computer needs will help to clarify your understanding of a problem. When you think through the steps that a computer has to use to calculate a result, you will better comprehend how the mathematics operates in the problem.
The computer-based problems in this text use a programming language called ISETL, which stands for Interactive SET Language. Much of this language looks like standard mathematical notation, so while you learn ISETL you will actually be learning mathematics. There are a few syntax details to get used to, such as putting a semicolon at the end of every line; these will come to you fairly quickly. There are always frustrations when working with a computer, but after a short time, syntax will be a minor point. More often, the difficulties will be with understanding the underlying mathematics. This is a signal to think harder about the concepts and about how you are investigating the problem.
If you have looked through the book already, you have probably noticed that each section starts with activity problems. Working on the activities will help you build a foundation for a strong understanding of the concepts in that section. Feel free to guess at possible solutions and then test your guesses. If you need help with ISETL, check Appendix 1 or ask your instructor if a copy of the manual is available. You should certainly read the text of the section while you are working on the activities, or even beforehand. The written discussions talk about the concepts used in the activities, and sometimes there are hints on how to solve these problems. So reading ahead is a good idea. At the end of each chapter is an overview of the topics included in that chapter. Sometimes the activities ask you to develop fonnulas for various concepts. We suggest that you write these fonnulas on the overview pages and also fill in the important definitions. By doing this, you will create your own reference guide.
THE COMPUTER
There are certain basic things you will have to know about the computers that you will be using. The answers to the following questions are different from one computer to another, so we cannot respond to them here:
xvi COMMENTS FOR THE INSTRUCTOR
• How do you tum the computer on or off?
• How do you enter information? Keyboard, mouse, disks?
• How do you give commands? Menus, icons?
• How are the files organized?
• How do you save files or remove them?
• How do you get into ISETL?
• How do you print something?
• How do you edit the worksheet on the screen? Add, delete, or change text?
Some of these questions are dealt with in Appendix 1. Your instructor can help you with the others. It looks like a lot to learn all at once, but after a short time these will be routine issues, and then you can concentrate on the mathematics.
By working the problems in this book you will learn ISETL. But if you wish to learn more, you should get a copy of the manual, Using ISETL 3.0: A Language for Learning Mathematics by Jennie Dautermann. This is available from West Publishing in either a DOS or Macintosh version.
Bill Fenton / Bellarmine College Ed Dubinsky / Purdue University